title: OpenCV: Dominoes circular spots/disks detection
body: <p>I am developing an Android app that calculates the sum of all points of the being-seen dominoes pieces -shown in picture- using OpenCV for Android.</p>
  
  <p><img src="https://i.stack.imgur.com/3pTkW.png" alt="a sample"></p>
  
  <p>The problem is, I can't find a way to filtering other contours and counting only dots I see in the dominoes, I tried to use Canny edge finding then use HoughCircles, but with no result, as I don't have an absolute top view of the rocks and HoughCircles detect perfect circles only :)</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public Mat onCameraFrame(Mat inputFrame) {
      inputFrame.copyTo(mRgba);
  
      Mat grey = new Mat();
      // Make it greyscale
      Imgproc.cvtColor(mRgba, grey, Imgproc.COLOR_RGBA2GRAY);
  
      // init contours arraylist
      List&lt;MatOfPoint&gt; contours = new ArrayList&lt;MatOfPoint&gt;(200);     
  
      //blur
      Imgproc.GaussianBlur(grey, grey, new Size(9,9), 10);        
      Imgproc.threshold(grey, grey, 80, 150, Imgproc.THRESH_BINARY);
  
  
      // because findContours modifies the image I back it up
      Mat greyCopy = new Mat();
      grey.copyTo(greyCopy);
  
  
      Imgproc.findContours(greyCopy, contours, new Mat(), Imgproc.RETR_TREE, Imgproc.CHAIN_APPROX_NONE);      
      // Now I have my controus pefectly
  
  
      MatOfPoint2f mMOP2f1 = new MatOfPoint2f();
  
      //a list for only selected contours
      List&lt;MatOfPoint&gt; SelectedContours = new ArrayList&lt;MatOfPoint&gt;(400);     
  
      for(int i=0;i&lt;contours.size();i++)
      {
  
          if(here I should put a condition that distinguishes my spots, eg: if contour inside is black and is a black disk)
          {
              SelectedContours.add(contours.get(i));
          }
      }
      Imgproc.drawContours(mRgba, SelectedContours, -1, new Scalar(255,0,0,255), 1);       
      return mRgba;        
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>One unique feature of my contours after threshold is they're totally black from inside, is there anyway I could calculate the mean color/intensity for a given contour ?</p>