From Open Foris Wiki
oft-trim - erosion filter producing binary output
Usage: oft-trim [-ws WindowSize] [-origval] -um <maskile> <inputfile> <outputfile>
oft-trim analyses the content of the spatial neighbourhood of each pixel. If all the pixels within the window are less or equal to zero, output is zero. Else, output is one.
- Get Example data set
- For this exercise following tools are used: oft-trim
1. Open your working directory using
2. Lets run oft-trim with the input file landsat_t1.tif with the option -ws set to 3 to create the output file trim.tif:
oft-trim -ws 3 landsat_t1.tif trim.tif
3. Verify in QGIS that all the values of your output image are all trimmed to 1.