title: Detect black circles(not just pixels) in a image using JUI
body: <p>I have a image with blackened circles.</p>
  
  <p>The image is a scanned copy of an survey sheet pretty much like an OMR questionnaire sheet.</p>
  
  <p>I want to detect the circles that have been blackened using the <code>JUI</code>(if any other api required)</p>
  
  <p>I have a few examples while searching, but they dont give me accurate result.</p>
  
  <p>I tried..<em>UDAI,Moodle</em>...etc...</p>
  
  <p>Then I decided to make my own. I am able to detect the black pixels but as follows.</p>
  
  <pre><code>BufferedImage mapa = BMPDecoder.read(new File("testjui.bmp"));
  
               final int xmin = mapa.getMinX();
               final int ymin = mapa.getMinY();
  
               final int ymax = ymin + mapa.getHeight();
               final int xmax = xmin + mapa.getWidth();
  
  
               for (int i = xmin;i&lt;xmax;i++)
               {
                  for (int j = ymin;j&lt;ymax;j++)
                  {
  
                   int pixel = mapa.getRGB(i, j);
  
                   if ((pixel &amp; 0x00FFFFFF) == 0)
                   {
                       System.out.println("("+i+","+j+")");
                   }
                  }
               }
  </code></pre>
  
  <p>This gives me the co-ordinates of all the black pixels but i cannot make out if its a circle or not.</p>
  
  <p>How can I identify if its a circle.</p>
  
  <p><strong>2]</strong> Also I want to know if the image scanned is tilted....I know that the Udai api takes care of that, but for some reason I am not able to get my survey template to run with that code.</p>