Detecting a region of patch of color in an image?
<p>I am a beginner to image analysis and am trying to write a program that does the
following-
What I have is the image of a heat map. Something that looks like:</p>
<p><img src="https://i.stack.imgur.com/wpqQQ.png" alt="heat map" /></p>
<p>What I need to do is for the program to detect if there is any region of 'problem'. In this case red would be considered problem. I went through tutorials and know how to detect if the color of region of problem is already known. I need to the program to tell me if there is a problem even if the two colors(red and green) is swamped. In that case, the problem would be green. So basically, if there is a patch of a color anywhere within a larger region of a different color, the program should draw a contour around the inner region. Any suggestion would be appreciated.</p>
<p>PS. I am using opencv 3 with python 2.7 running on raspbian jessie</p>