不使用 haarCascade.xml 进行对象检测
matchTemplate 仅适用于图像中的一个对象,并且对象必须与 template_image 具有相同的大小和旋转。 haarTraining 生成 haarCascade.xml 文件需要很长时间。那么有没有其他检测物体的方法不存在这些问题呢?
matchTemplate works for only one object in the image, and object must have same size and rotation as template_image.
haarTraining takes long time for generating haarCascade.xml file. So Is there any other method of detecting objects, which has not any of these problems?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
OpenCV 有一些非常好的目标检测样本(没有 haar 级联)。您应该查看 matcher_simple.cpp作为起点。接下来要查看的几个是 descriptor_extractor_matcher.cpp 和 matching_to_many_images.cpp。
matching_to_many_images.cpp
可能最接近您正在寻找的内容,因为它为您划分了训练和查询阶段,并允许持久存储训练描述符。另外,请查看 features2d 教程。
希望有帮助!
OpenCV has some very good samples for object detection (without haar cascades). You should have a look at matcher_simple.cpp as a starting point. The next few to look at are descriptor_extractor_matcher.cpp and matching_to_many_images.cpp.
matching_to_many_images.cpp
will probably be closest to what you are looking for as it breaks out the training and query phases for you, and allows for persistent storage of the training descriptors.Also, have a look at the features2d tutorials.
Hope that helps!
检测物体的方法有很多种,每种方法都存在很多问题。这取决于您面临的具体问题。
Haar 对象检测是一个很好的方法。训练阶段只需要一次,然后您可以在每次运行程序时重复使用haarcascade.xml,当然您也可以将其分发给其他人。
其他检测器包括 HOG、LBP、SIFT。请注意,所有这些都需要一些时间进行培训。
There are many ways to detect objects, and there are many problems with each of them. It depends on the specific problem you are facing.
Haar object detection is a good one. The training phase is only needed once, then you can reuse the haarcascade.xml each time you run the program, and of course you can distribute it to others as well.
Other detectors include HOG, LBP, SIFT. Note that all of them take some time for training.