OpenCV - 针对不同角度的长物体的 Haar 分类器
我之前曾成功地将 Haar 分类器与 OpenCV 结合使用。不幸的是,它似乎只适用于方形物体和固定角度(即面)。然而,我需要找到具有不同角度的“长”(矩形)物体(参见示例输入图像)。
有没有办法训练 Haar 分类器来查找此类对象?我能找到的只是人脸识别的教程。还有其他替代方法吗?
I have used Haar classifier with OpenCV before succesfully. Unfortunately it seems to work only on square objects and fixed angles (i.e. faces). However I need to find "long" (rectangular) objects which have different angles (see sample input image).
Is there a way to train Haar classifier to find such objects? All I can find are tutorials for face recognition. Any other alternative approches?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
已知 Haar 分类器仅适用于刚性物体。每个视图都需要一个分类器。例如,OpenCV 中的侧面分类器的效果不如正面分类器(原因是侧面比正面在偏航、俯仰、滚动方面有更多的变化)。
没有完美的方法可以回答您的问题。
然而,在你的情况下,无论你试图分类(我想是微生物)都是相互重叠的。这是一个复杂的问题。但是,您可以隔离微生物出现的区域(而不是像人脸一样隔离每个微生物)。
您可以参考指纹分割技术,这些技术已知可以增强指纹上的脊线(在您的情况下是微生物边缘)与背景并隔离图像。
检查以下页面中的“ridgesegmentation.m”:
http://www.csse.uwa.edu.au/ 〜pk/Research/MatlabFns/index.html
Haar classifiers are known to work with rigid object only. You need a classifier for each of the view. For example, the side-face classifier in OpenCV doesn't work as good as front-face classifer(due to the reason being, side face has more variation in yaw-pitch-roll than front face).
There is no perfect way of answering your question.
However, in your case whatever you are trying to classify (microbes I suppose) are overlapping on each other. Its a complex issue. But, you can isolate the region where microbes occur (not isolate each microbe like a face).
You can refer fingerprint segmentation techniques that are known to enhance the ridges on a fingerprint (here in your case its microbe edges) from the background and isolate the image.
Check "ridgesegmentation.m" in the following page:
http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/index.html