title: How to get size of an area in JavaCV
body: <p>In my project I want to get the size from the greatest homogeneous area of a specific color (in my example below it's the blue sky).</p>
  
  <p>My first idea is to convert the orginal image:</p>
  
  <p><img src="https://i.stack.imgur.com/HQSTX.jpg" alt="original image"></p>
  
  <p>to an binary image, detect the skycolor and create a mask with this area:
  <img src="https://i.stack.imgur.com/A68Rl.jpg" alt="mask image"></p>
  
  <p>But how can I get the size and the position of these white pixels? I want a efficient method, which says true, if the picture has a blue sky in the upper 1/3 of the picture.
  Any ideas? Should I create a "global mask" (see image 3 in comment) and compare it with the binary picture? Or is there an easier way?</p>
  
  <p>Thank you.</p>