title: Detect areas with low density of white pixels
body: <p>I'm a student trying to analyze binary images where almost the whole picture is black, but with a few white pixels evenly distributed in the image. I want to detect if the whole image has even density of white pixels. If areas in the image have low density of white pixels, I want to detect it.</p>
  
  <p>In the following image, I have marked an area without white pixels as an example of what i want to detect:</p>
  
  <p><img src="https://i.stack.imgur.com/m7D6d.jpg" alt="("> </p>
  
  <p>In my program, I get the coordinates of the white pixels before I make the picture. I then create a black BufferedImage and write a white pixel on each coordinate to create the image I have attached.
  For me, the most important thing is to detect if the image contains completely black areas that are larger than an adjustable size (I have to experiment to find the right setting)</p>
  
  <p>If it is possible to detect this in a good way simply by using the coordinates of the white pixels (without creating a black image and then add all the white pixels) it will also be of interest to me.</p>
  
  <p>I use Java and OpenCV in my program, Does anyone have any suggestions on how to proceed to do this? Are there any features in OpenCV that can help me?</p>
  
  <p>Appreciate all answers</p>