Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Best function to analyze 2D mosquito position

Hi guys,

I've been findcontours on my webcam to map a 2-D position of mosquitoes in a chamber but the results are marginal.

Here's a snippet:

for (int i = 0; i < contours.size(); i++){
            vector<Point> contour_poly;
            approxPolyDP(Mat(contours[i]), contour_poly, 3, true);

            //Simplifying the whole "contours[i].at(0)" thing
            int x = contours[i].at(0).x, y = contours[i].at(0).y;
            circle(current_frame, Point(x, y), 3, Scalar(0, 255, 0), 1, 8, 0);

        }

Any other suggestions on more suitable functions out there?

Thanks. Vizier87