1 | initial version |
i think you can scale down your image before detection as shown here
2 | No.2 Revision |
i think you can scale down your image before detection to speed up your app as shown here
int scale = 2 ; // you can try other values
resize( srcGray, srcGray, Size(srcGray.cols/scale , srcGray.rows/scale ), INTER_LINEAR );
cat_face_cascade.detectMultiScale( srcGray, faces, 1.2, 5 , 0 , Size(64, 64));
.
.
.
resize( srcGray, srcGray, Size(srcGray.cols*scale , srcGray.rows*scale ), INTER_LINEAR );
also look ufacedetect.cpp what to do --scale parameter
3 | No.3 Revision |
i think you can scale down your image before detection to speed up your app as shown here
int scale = 2 ; // you can try other values Mat srcGray1;
resize( srcGray, srcGray, Size(srcGray.cols/scale , srcGray.rows/scale ), srcGray1, Size(srcGray.cols/2, srcGray.rows/2), INTER_LINEAR );
cat_face_cascade.detectMultiScale( srcGray, srcGray1, faces, 1.2, 5 , 0 , Size(64, 64));
.
.
.
resize( srcGray, srcGray, Size(srcGray.cols*scale
for( size_t i = 0; i < faces.size(); i++ )
{
Point center(faces[i].x * 2 + faces[i].width, faces[i].y *2 + faces[i].height );
ellipse(srcGray, center, Size(faces[i].width , srcGray.rows*scale faces[i].height ), INTER_LINEAR );
0, 0, 360, Scalar(255, 0, 255), 4, 8, 0);
}//endfor
also look ufacedetect.cpp what to do --scale parameter
4 | No.4 Revision |
i think you can scale down your image before detection to speed up your app as shown here
Mat srcGray1;
resize( srcGray, srcGray1, Size(srcGray.cols/2, srcGray.rows/2), INTER_LINEAR );
cat_face_cascade.detectMultiScale( srcGray1, faces, 1.2, 5 , 0 , Size(64, 64));
.
.
.
for( size_t i = 0; i < faces.size(); i++ )
{
Point center(faces[i].x * 2 + faces[i].width, faces[i].y *2 + faces[i].height );
ellipse(srcGray, center, Size(faces[i].width , faces[i].height ), 0, 0, 360, Scalar(255, 0, 255), 4, 8, 0);
}//endfor
also look ufacedetect.cpp what to do --scale parameter