I have an image and I'm trying to find the filled circles inside image (MCQ's). I have found all contours and when drawing its drawing the circles but now I don't know how to find the number of white pixels inside contour. Image is in binary pealse suggest something. Thanks
java.util.List<MatOfPoint> contours_crop = new ArrayList<MatOfPoint>();
Imgproc.findContours(crop.clone(), contours_crop, new Mat() ,Imgproc.RETR_EXTERNAL , Imgproc.CHAIN_APPROX_SIMPLE);
//Imgproc.cvtColor(crop, crop, Imgproc.COLOR_GRAY2BGR);
double noPixels = Core.countNonZero(contours_crop.get(3));
Toast.makeText(MainActivity.this, "Pixels:"+noPixels, 10000).show();