Oft-filter

From Open Foris Wiki

Jump to: navigation, search

oft-filter - moving window filters

Usage: oft-filter [-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32 /CFloat32/CFloat64}] [-h] [-x xdim] [-y xdim] [-c const] [-n nodata][-f filter][-v] <-i inputfile> <-o outputfile>

Options:

[-h] print this help
[-i input] input file name
[-o output] output file name
[-x #] Window size in x-direction (default=3)
[-y #] Window size in y-direction (default=3)
[-c #] Constant used to multiply the resulting value
[-n #] Input NoData value, ignored in calculation (Def. from infile)
[-v] Verbose
[-f #] Type of statistics to be computed (default=1):
       0: mean
       1: standard deviation
       2: variance
       3: skewness
       4: rank
       5: coefficient of variation: 100*std/mean

The program computes local statistics on values of a raster within the zones of a moving window.


Exercise:


1. For this exercise we use the Lansat imagery landsat_t1.tif

2. Open your working directory using

cd /home/...1

3. Examples:

  • In the first exercise we want to create the standard deviation for the moving window using the default window size and default statistics (without defining -f). The output image is called std.tif:
oft-filter -i landsat_t1.tif -o std.tif
  • Now we go through an example calculating the coefficient of variation (100*std/mean) using the option -f 5. Output: coe_var.tif
oft-filter -i landsat_t1.tif -o coe_var.tif -f 5.
  • Calculation of the mean using the option -f 0. Output: mean.tif
oft-filter -i landsat_t1.tif -o mean.tif -f 0

4. Load your computed rasters in QGIS and verify your output statistics using Identify Results.

  • Example of the computed mean.tif:



Back to Open Foris Toolkit Main Page

Back to Tools & Exercises



Personal tools