How to get the size or area of a contour upon touch
I am new to openCV functionality , I need help on how I can get the size of the contour and if possible crop the touched part and save.I have checked for the solution on Google as well as StackOverFlow. Any link to a tutorial will be highly appreciated.
UPDATE: I am using the color-blob detector sample code,Please help.I have tried this:
List<MatOfPoint> con = mDetector.getContours();
double size = Imgproc.contourArea((Mat) con);
String Stringsize =Double.toString(size);
Toast.makeText(this, Stringsize, Toast.LENGTH_SHORT).show();
describing, how far you are, and what you tried would be very helpful, (mentioning, you did not find a readymade anywhere is NOT)
Like @berak said, there won't be a ready to use solution on the net available. You will have to reason and think for yourself. If I was you I would start by looking how to capture mouse activity with openCV. Just a simple search on this forum will already give you the answer.