Processing Kernel for remote sensing data
examples_pkfilter

Examples of pkfilter

Filtering in spatial domain

Filter input.tif with morphological dilation filter. Use a circular kernel (instead of rectangular) of size 3x3.

pkfilter -i input.tif -o filter.tif -dx 3 -dy 3 -f dilate -circ

Similar to previous example, but consider only values of 255 for filtering operation. Typical usage: dilate cloud values in input image that are flagged as 255

pkfilter -i input.tif -o filter.tif -dx 3 -dy 3 -class 255 -f dilate -circ

Filtering in spectral/temporal domain

Filtering in spectral/temporal domain. Calculate the median value for each pixel, calculated on a moving window of width 3 (-dz 3) over all input bands. The output raster dataset will contain as many bands as the input raster dataset.

pkfilter -i input.tif -o filter_stdev.tif -dz 3 -f median

"Filtering" in spectral/temporal domain. No moving window (-dz 1). Calculate the standard deviation for each pixel, calculated on all input bands. The output raster dataset will contain a single band only.

pkfilter -i input.tif -o filter_stdev.tif -dz 1 -f stdev

"Smooth" (interpolate) nodata in spectral/temporal domain (-dz 1), using a linear interpolation. The following interpolation types are supported: akima (default), linear, polynomial, cspline, cspline_periodic, akima_periodic (please check gsl page for more information on the interpolation types).

pkfilter -i input.tif -o input_smoothed.tif -dz 1 -f smoothnodata -interp linear