MATLAB Geographic Data Processing 25: Vegetation Phenology Extraction and Analysis Model Optimization (Savitzky-Golay)

Phenology Extraction Model Optimization

1. Prerequisites

Before I wrote an article using Savitzky-Golay to process remote sensing data and obtain MATLAB code for ground phenology information: Python geographic data processing seventeen: vegetation phenology extraction and analysis (Savitzky-Golay),
but found that there are some problems: the beginning period of phenology and The thresholds for the end of phenology are all set to the same value, but in some studies, different phenological thresholds need to be set according to different environmental conditions, as follows:

insert image description here
The dynamic threshold method model looks like this:
insert image description here

2. MATLAB code

The SOS threshold is set to 0.2 and the EOS threshold is set to 0.5:

% 读取文件夹下的子文件夹列表
folderPath = 'D:\dataset\phenology';
subFolders = dir(folderPath);
subFolders = subFolders([subFolders.isdir]);
subFolders = subFolders(3:end); % 排除"."和".."文件夹

% 循环处理每个子文件夹
for i = 1:length(subFolders)
	fprintf('d=%d\n', i)
    subFolder = subFolders(i).name;
    subsubFolder = subFolder(1:4);
    subFolderPath = fullfile(folderPath, subFolder);
    
    % 读取第一个tif影像获取基本信息
    tifFile = dir(fullfile(subFolderPath, '*.tif'));
    tifFilePath = fullfile(subFolderPath, tifFile(1).name);
    [a, R] = geotiffread(tifFilePath);
    info = geotiffinfo(tifFilePath);
    

Guess you like

Origin blog.csdn.net/amyniez/article/details/131331567