Oft-countpix.pl

From Open Foris Wiki

Jump to: navigation, search

Counts the number of pixels within an image with (default), below or above (options) a specific value

Usage: oft-countpix.pl <input> <value> [-b/-v/-a [band]]

<input> is a raster image

<value> is an real number. If not precised, oft-countpix.pl gives the total number of pixels. If value is below the min or above the max of the image, a warning is given

Options:

-v = count all pixels with value value (default)

-b = count all pixels below value

-a = count all pixels above value

[band] = number of the band. Default is Band 1


Exercise:

cd /home/...
  • Usage of oft-countpix.pl using the input image forestc.tif with pixel value of 33
oft-countpix.pl images/forestc.tif 33
oft-countpix.pl images/forestc.tif 33 -a
  • Usage of oft-countpix.pl using the input image landsat_t1.tif with value 50, counting all pixels below, in band 4
oft-countpix.pl images/landsat_t1.tif 50 -b 4



Back to Open Foris Toolkit Main Page

Back to Tools & Exercises



Personal tools