I'm new to opencv, i'm doing my project that need to be able to detect how many object moving in front of the webcam. I try to search, but it doesn't seem to be any result what I have been looking for.
I'm using...
Point2f rect_points[4]; rect.points( rect_points );
for(j = 0; j < 4; j++ )
{
line(pic, rect_points[j], rect_points[(j+1)%4], Scalar(0,0,0), 3, 4 );
circle(frame,rect_points[j],5,Scalar(144,144,255),3);
}
.. to draw rectangles(4lines) and circles in each corner to cover the object, but they're create in loop, is there any way I can count the objects.
Here the result that i'm working on :
In the snapshot there are 2 squares drawn by lines, I want to count the objects in the squares any idea? please help
Thank you for reading and helping.