简体   繁体   English

OpenCV - Haar分类器,适用于不同角度的长物体

[英]OpenCV - Haar classifier for long objects with different angles

I have used Haar classifier with OpenCV before succesfully. 我成功地使用了Haar分类器和OpenCV。 Unfortunately it seems to work only on square objects and fixed angles (ie 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? 还有其他替代方法吗?

样本输入图像

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). 例如,OpenCV中的侧面分类器不能像前面的分类器一样好(由于其原因,侧面在偏航 - 俯仰 - 滚动方面比前面有更多的变化)。

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 请查看以下页面中的“ridgesegmentation.m”: http//www.csse.uwa.edu.au/~pk/Research/MatlabFns/index.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM