cvPyrDown vs cvResize用于人脸检测优化 [英] cvPyrDown vs cvResize for face detection optimization

查看:71
本文介绍了cvPyrDown vs cvResize用于人脸检测优化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过按比例缩小图像来优化我的人脸检测算法.什么是最好的方法?我应该使用cvPyrDown(如我在一个示例中看到的那样,到目前为止效果不佳),cvResize还是其他函数?

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?

推荐答案

如果只想缩放图像,请按照Adrian Popovici的建议使用cvResize.

If you only want to scale the image, use cvResize as Adrian Popovici suggested.

cvPyrDown将应用高斯模糊来平滑图像,然后默认情况下,它将通过拒绝偶数列和偶数行对图像进行2倍的下采样.这种平滑可能会降低您的性能(我不确定它如何影响检测算法).性能不佳的另一种可能是通过仅丢弃偶数行和列而造成的不连续性.相反,通过cvResize进行平滑插值(假设您使用最近邻以外的值进行插值)可以使人脸检测更好地工作.

cvPyrDown will 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) by cvResize allow the face detection to work better. Here is the documentation on cvPyrDown for more information on the exact kernel that is used.

这篇关于cvPyrDown vs cvResize用于人脸检测优化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆