Home

Awesome

cuSTSG

Version 1.0

Overview

High-quality Normalized Difference Vegetation Index (NDVI) time-series data are important for many applications. To generate high-quality NDVI time series, a noise-reduction method integrating spatial-temporal information with Savitzky-Golay filter (named STSG) was proposed by Cao et al. (2018). STSG assumes discontinuous clouds in space, and employs neighboring pixels in the noise reduction for a target pixel in a particular year. The relationship between the NDVI of the target pixel and those of the neighboring pixels is obtained from the multi-year NDVI time series. STSG is able to address the problem of temporally continuous NDVI gaps and effectively increases local low NDVI values without overcorrecting. However, STSG largely depends on the quality flags of NDVI time-series data, and inaccurate quality flags will greatly deviate the production of the target and neighboring pixels from the ground-truth data. STSG also requires extensive computing time when dealing with large-scale applications.

To address the above issues of STSG, we designed and implemented a GPU-enabled STSG program based on the Compute Unified Device Architecture (CUDA), called cuSTSG. Firstly, the cosine similarities between the annual NDVI time series are used to identify and exclude the NDVI values with inaccurate quality flags from the NDVI seasonal growth trajectory. Secondly, the computational performance is improved by reducing redundant computations, and parallelizing the computationally intensive procedures using CUDA on GPUs. The experiments showed that cuSTSG effectively mitigated the effects of inaccurate quality flags on the final production, and improved the accuracy by 10%, compared with the original STSG. The results also showed cuSTSG achieved a speed-up over 30 on a GPU, compared with the C++-implemented STSG on a CPU.

Key features of cuSTSG

References

To Cite cuSTSG in Publications

Compilation

  1. Open all the source codes in Visual Studio
  2. Click menu Project -> Properties -> VC++ Directories -> Include Directories, and add the "include" directory of GDAL (e.g., C:\GDAL\include)
  3. Click menu Project -> Properties -> VC++ Directories -> Lib Directories, and add the "lib" directory of GDAL (e.g., C:\GDAL\lib)
  4. Click menu Build -> Build Solution
  5. Once successfully compiled, an executable file, cuSTSG.exe, is created.

In a Linux/Unix terminal, type in:

  1. $ cd /the-directory-of-source-codes/
  2. $ nvcc -o cuSTSG cuSTSG.cu Filter.cu -lgdal
  3. Once successfully compiled, an executable file, cuSTSG, is created.

Usage

Example (// for comments):

//******************************************************************

//Input parameters

//the years of the data ("," is necessary to separate data)

Years = 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018

//the path of the NDVI data

NDVI_path = ../TestData/NDVI/NDVI_test_

//the path of the NDVI quality flags

Reliability_path = ../TestData/Reliability/Reliability_test_

//the path of the production

STSG_Test_path = ../TestData/STSG_Test.tif

//the thereshold of cosine similarity to define similar years

cosyear = 0.90

//the half size of the window within which to search pixels with inaccurate quality flags in the dissimilar year

win_year = 2

//the half size of the neighboring window within which to search similar pixels

win = 10

//the thereshold of correlation coefficient to define similar pixels

sampcorr = 0.9

//snow_address indicates whether to deal with snow contamianted NDVI values(1 = yes / 0 = no)

snow_address = 1

//******************************************************************

$ cuSTSG.exe parameters.txt

$ ./cuSTSG parameters.txt