Commit cc399e2a authored by Andrey Kamaev's avatar Andrey Kamaev Committed by OpenCV Buildbot

Merge pull request #330 from sromberg:2.4

parents 3c4cfccc 9f417268
...@@ -56,11 +56,12 @@ static void detect_and_draw_objects( IplImage* image, CvLatentSvmDetector* detec ...@@ -56,11 +56,12 @@ static void detect_and_draw_objects( IplImage* image, CvLatentSvmDetector* detec
for( i = 0; i < detections->total; i++ ) for( i = 0; i < detections->total; i++ )
{ {
CvObjectDetection detection = *(CvObjectDetection*)cvGetSeqElem( detections, i ); CvObjectDetection detection = *(CvObjectDetection*)cvGetSeqElem( detections, i );
float score = detection.score;
CvRect bounding_box = detection.rect; CvRect bounding_box = detection.rect;
cvRectangle( image, cvPoint(bounding_box.x, bounding_box.y), cvRectangle( image, cvPoint(bounding_box.x, bounding_box.y),
cvPoint(bounding_box.x + bounding_box.width, cvPoint(bounding_box.x + bounding_box.width,
bounding_box.y + bounding_box.height), bounding_box.y + bounding_box.height),
CV_RGB(255,0,0), 3 ); CV_RGB(cvRound(255.0f*score),0,0), 3 );
} }
cvReleaseMemStorage( &storage ); cvReleaseMemStorage( &storage );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment