README.org
1.07 KB

# Temporal gapfilling for image time series

# Introduction

Gapfilling for time series replaces invalid pixels (as designated by a mask) by an interpolation using the valid dates of the series.

# Linear gapfilling

- Linear interpolation of invalid pixels using the 2 (before and after) closest valid pixels.
- At the beginning (resp. the end) just replicate the first (resp. the last) valid pixel.

# Spline gapfilling

Depending on the number of valid dates in the temporal profile, the interpolation will be performed differently. All algorithms use the GNU/GSL library.

- Less than 3 valid dates will apply linear interpolation
- With 3 or 4 valid dates, cubic splines with natural boundary conditions will be used. The resulting curve is piecewise cubic on each interval, with matching first and second derivatives at the supplied data-points. The second derivative is chosen to be zero at the first point and last point.
- With more than 4 valid dates, a non-rounded Akima spline with natural boundary conditions is used.