I want to optimize my face detection algorithm by scaling down the image. What is the best way? should I use cvPyrDown (as I saw in one example and yielded poor results so far), cvResize or another function?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you only want to scale the image, use
cvResizeas Adrian Popovici suggested.cvPyrDownwill apply a Gaussian blur to smooth the image, then by default it will down-sample the image by a factor of two by rejecting even columns and rows. This smoothing may be degrading your performance (I’m not sure how it affects the detection algorithm). Another possibility for the poor performance might be the discontinuities created by just dropping even rows and columns; whereas, the smooth interpolations (assuming you interpolated with something other than nearest neighbor) bycvResizeallow the face detection to work better. Here is the documentation oncvPyrDownfor more information on the exact kernel that is used.