# How can I automatically find the boundary of a high intensity region inside an image?

I have an image I(x,y):

Red indicates high values and blue low values. Everything in black is drawn onto the image afterwards. The black dot (xp,yp) represents a point clicked by an user and the black curve a boundary around the high value region around the user clicked point.

How can I automatically find this boundary?

As can be seen from the picture; I do not want the boundary to propagate through narrow gaps.

• Pretty good example of why you shouldn't use the jet colormap. :) – endolith Oct 9 '12 at 17:12
• Interesting! Are you saying that the visible boundary between green/yellow and red is somewhat arbitrary and that a greyscale image would give a more correct indication of where the intensity changes sharply? – Andy Oct 9 '12 at 17:32
• You say that red indicates high values, but yellow and green are perceptually much brighter, so they look like the high value spots at first glance, but they're actually not important at all. They just happen to appear bright because all the colors in the colormap are fully saturated. Yes, grayscale is better, or other colormaps designed for monotonically increasing luminance. – endolith Oct 9 '12 at 18:23