How would you identify specific points in an image based on the pixels around the point(s) that you wish to identify?
For example, if I had an image with lots of different colors but I only wanted to find the blue areas which are next to green areas and ignore everything else.
I’m sure the first step in this example would be to pass a filter over the image to remove all colors apart from green and blue but I wouldn’t know where to go from there in eliminating green and blue parts which are not adjacent.
[0] I assume that you are looking for direct neighboring regions.
[1] Since you are sure that the first step is to remove all colors except green and blue, i’ll continue from there.
[2] Next, all you need to do is to segment blue from [1] and turn that into logical map or a black/white image
[3] dilate [2] to your desired size
[4] then, segment green from [1] and turn that into a logical map or a black/white image
[5] multiply [3] to [4], the leftovers would be the region that has green next to blue.