haartraining counting
i used haartraininng to count the object, but this will count frame by frame. So can we use this to count a object one time only.
for( i = 0; i < (object ? object->total : 0); i++ )
{
CvRect* r = (CvRect*)cvGetSeqElem( object, i );
pt1.x = r->x*scale;
pt2.x = (r->x+r->width)*scale;
pt1.y = r->y*scale;
pt2.y = (r->y+r->height)*scale;
cvRectangle( img, pt1, pt2, CV_RGB(230,20,232), 3, 8, 0 );
}
cout << "Total: " << object->total << " cars" << endl;