guillem84

convert a group of pixels into its majority value that surrounds it

Discussion created by guillem84 on Feb 18, 2011
Dear colleagues,

I would like to know if I can calculate the majority value that surround a group of pixels. I need to calculate the majority value that surround this GROUP OF PIXELS THAT HAS THE SAME VALUE, NOT THE MAJORITY THAT SURROUND EACH PIXEL. I have been trying with focal statistics but i didn't succeed.. Then i need to change the value (or color) of this group of pixels for its majority value that surrounds it.

In the picture below (Figure1) you can find and example of this case: There is a group of two yellow pixels market with a red circle. I need to convert this group of two yellow pixels into orange (the majority color that surround this group)

Best wishes,

Guillem

Attachments

Outcomes