Forest Non-Forest masking

From Open Foris Wiki

Jump to: navigation, search

This exercise provides an example of pixel based forest-non forest classification. The example uses a Landsat TM image as an input, extracts training observations from MODIS VCF -product and classifies the input image using the extracted training and Open Foris Toolkit Nearest Neighbour oft-nn classifier and estimator.

Exercise:

1. Download your Landsat scene using e.g. GloVis

2. Download the appropriate MODIS VCF tile

3. Subset the VCF image to the extension of the Landsat image
 oft-clip.pl landsat.tif VCF.tif clipped_VCF.tif 

4. Generalize the VCF product to forest/non-forest mask

oft-calc -ot Byte -um landsat.tif clipped_VCF.tif fornofor_vcf.tif 
1
#1 50 > 1 2 ?
5. Compute average Landsat response for both classes using:
 oft-stat fornofor_vcf.tif landsat.tif ls.stat
6. Clean the statistics file and keep only the averages.
awk '{print $1,$3,$4,$5,$6,$7,$8}' ls.stat > train.dat

7. Run Nearest Neighbour Classification to produce the Forest Non-Forest map with output FNF.tif

oft-nn -o FNF.tif -i landsat_t1.tif
train.dat
1
1
1
1

Finally, have a look at the output with openev2/similar and try to figure out how to improve the output.



Back to Open Foris Toolkit Main Page

Back to Tools & Exercises



Personal tools