在人脸检测中,我尝试将正面检测器和侧面检测器结合起来(使用Viola-Jones方法)。但是,系统对单个面有两个不同的边界框。我使用了groupRectangles函数,它没有产生一个有界框而不是两个框的预期结果。请回复一些关于这个问题的建议?
发布于 2015-04-17 19:33:04
我认为Micka想要编写按位操作,而不是逻辑操作:
if((profileFace & frontFace).width > 0)
combinedFace = profileFace | frontFace; 或者,如果矩形的重叠非常大,也可以合并它们,例如:
cv::Rect intersection = profileFace & frontFace;
// If the intersection is more then 80%, then use their intersection for further processing
if(std::min(intersection.area() / profileFace.area(), (intersection.area()) / frontFace.area()) > 0.8) {
...
}https://stackoverflow.com/questions/29696871
复制相似问题