OpenCV Android – How to draw a circle/rectangle around an outline?
I’m new to openCV and I’m having some issues as a result.
One question is how to get the coordinates of a contour to draw a circle around it.
So far, my code looks like this:
List<MatOfPoint> contours = mDetector.getContours(); Imgproc.drawContours(mRgba, contours, -1, CONTOUR_COLOR, -1); <<code that I need>> Core.circle(mRgba, new Point(150.0,150.0), 100, CONTOUR_COLOR, 5);
The outline is “extracted” and drawn on the surface of the test circle, but how do I get the coordinates (boundary) from the profile to draw a circle around each profile.