Dear all,<div><br></div><div>I have a raster map with categorical values. </div><div>I have many occurrence of alone-pixels, where all neighbours </div><div>are different from a central pixels. So I need to change all pixels</div>
<div>that differ from alll its neighbours for the "mode" value.</div><div><br></div><div>I know that "r.neighbours ..method=mode" return the mode value.</div><div>Now I need to identify only those pixels that differ from neighbours.</div>
<div>I think one way is count all occurrence the value of central pixel</div><div>on a windows (like 3x3, 5x5), and attrib it on a bynary map, where </div><div>"ones" is for those positons where central pixels have frequency 1,</div>
<div>and "zeros" for those potisions where central pixels have frequency >1.</div><div><br></div><div>Any help are welcome.</div><div><br></div><div>Best wishes,</div><div><br></div><div>miltinho astronauta</div>
<div>brazil</div>