title: How to detect colored patches in an image using OpenCV?
body: <p>I am trying to detect if the picture(black and white sketch) is colored or not in the room conditions by a mobile camera. </p>
  
  <p><img src="https://i.stack.imgur.com/jVmND.jpg" alt="enter image description here"></p>
  
  <p>I have been able to get this result </p>
  
  <p><a href="https://i.stack.imgur.com/zt6gi.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zt6gi.png" alt="enter image description here"></a></p>
  
  <p>using following code </p>
  
  <pre><code>Mat dest = new Mat (sections[i].rows(),sections[i].cols(),CvType.CV_8UC3);
  Mat hsv_image = new Mat (sections[i].rows(),sections[i].cols(),CvType.CV_8UC3);
  
  Imgproc.cvtColor (sections[i],hsv_image,Imgproc.COLOR_BGR2HSV);
  
  List &lt;Mat&gt; rgb = new List&lt;Mat&gt; ();
  Core.split (hsv_image, rgb);
  Imgproc.equalizeHist (rgb [1], rgb [2]);
  Core.merge (rgb, sections[i]);
  Imgproc.cvtColor (sections[i], dest, Imgproc.COLOR_HSV2BGR);
  
  Core.split (dest, rgb);
  </code></pre>
  
  <p>How can I sucessfully find out if the image is colored or not. The color can be any and it has room conditions. Please help me on this as I am beginner to it.</p>
  
  <p>Thanks</p>