Sorry for make a question again. I try this for blob in Android. and draw rectangle too, i mean for show scala too, but i don't know how to doing. And i try to modification this part. but still overlapping. How to show the real number of that circles ? Somebody can help me ?
public class ColorBlobDetector {
// Lower and Upper bounds for range checking in HSV color space
private Scalar mLowerBound = new Scalar(20,20,20,0);
private Scalar mUpperBound = new Scalar(30,30,30,0);
private Scalar mColorRadius = new Scalar(20,25,25,0);
private Mat mSpectrum = new Mat();
private List mContours = new ArrayList();
/ Filter contours by area and resize to fit the original image size
mContours.clear();
each = contours.iterator();
while (each.hasNext()) {
MatOfPoint contour = each.next();
if (Imgproc.contourArea(contour) >= 49656 || Imgproc.contourArea(contour)<53177) {
Core.multiply(contour, new Scalar(4,4), contour);
mContours.add(contour);

↧