I need instructions on implementing a houghes circle code using android studio to an app. I do not know where to put everything and need detailed instructions on how to create the app and save it onto an android device.

iCannyUpperThreshold = 100;
iMinRadius = 20;
iMaxRadius = 400;
iAccumulator = 300;

Imgproc.HoughCircles(thresholdImage, circles, Imgproc.CV_HOUGH_GRADIENT, 
         2.0, thresholdImage.rows() / 8, iCannyUpperThreshold, iAccumulator, 
         iMinRadius, iMaxRadius);

if (circles.cols() > 0)
    for (int x = 0; x < circles.cols(); x++) 
        double vCircle[] = circles.get(0,x);

        if (vCircle == null)

        Point pt = new Point(Math.round(vCircle[0]), Math.round(vCircle[1]));
        int radius = (int)Math.round(vCircle[2]);

        // draw the found circle
        Core.circle(destination, pt, radius, new Scalar(0,255,0), iLineThickness);
        Core.circle(destination, pt, 3, new Scalar(0,0,255), iLineThickness);
5 Months
Discussion Span
Last Post by Rajan_7

Mirty, I too was a little lost on my first Android app. So I googled "my first android app tutorial" and completed those. As to your questions, I think those would be in those tutorials. That is, complete the tutorials to learn how to make an app. Or at least your first simple app.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.