Aggregation of neighbour pixels with the same value

457
1
01-11-2011 07:13 AM
GuillemDomènech_i_Surinyach
New Contributor
Dear colleagues,

I need to identify clusters of pixels with the same value and an area lower than a specific value. If some of these clusters are surrounded by a group of pixels that have the same value each other, I need to give to this clusters the same value than the pixels around them. The main problem is that I have a lot of clusters and I need to do it automatically.
I attached an example (fig1). In this case, there are four clusters: Two of orange pixels and two of green pixels. In both cases they are surrounded by yellow pixels, hence, pixels of this four clusters should be convert into yellow color.
If someone knew a methodology to do it I would be really grateful.

Best wishes,

Guillem
0 Kudos
1 Reply
EricRice
Esri Regular Contributor
Guillem,

Have you checked out the Majority Filter and Boundary Clean tools?  This section in the documentation is probably a good starting point for you.

Smoothing zone edges with Boundary Clean and Majority Filter

Note, these tools are licensed with Spatial Analyst.

Regards,
Eric
0 Kudos