I would like to reclassify only the pixels of one value that are completely enclosed by pixels of another value.
Can someone help me do this?
I've used 10 iterations of majority filter (using four as kernel filter and half as majority definition) to help fill in some of the missing pixels.
What i need to do is to reclassify the value of any pixel completely enclosed by pixels of another value to the same value as the surrounding pixels. On the attached image, I would like to reclassify the enclosed blue pixels to the same value as the green pixels.
I appreciate any help.