[GRASS-user] counting cells equal center cell on window

Milton Cezar Ribeiro miltinho.astronauta at gmail.com
Fri Dec 5 20:42:55 EST 2008


Dear all,
I have a raster map with categorical values.
I have many occurrence of alone-pixels, where all neighbours
are different from a central pixels. So I need to change all pixels
that differ from alll its neighbours for the "mode" value.

I know that "r.neighbours ..method=mode" return the mode value.
Now I need to identify only those pixels that differ from neighbours.
I think one way is count all occurrence the value of central pixel
on a windows (like 3x3, 5x5), and attrib it on a bynary map, where
"ones" is for those positons where central pixels have frequency 1,
and "zeros" for those potisions where central pixels have frequency >1.

Any help are welcome.

Best wishes,

miltinho astronauta
brazil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20081205/f582318b/attachment.html


More information about the grass-user mailing list