简体   繁体   English

在图像中分离相似的对象-OpenCV Python

[英]Separating similar object in an image - opencv python

I am trying to detect the objects in an image which look similar to the reference image. 我试图检测图像中看起来与参考图像相似的对象。 Here is how i'm trying to accomplish it: 这是我试图实现的方式:

Here is the sample Image: 这是示例图片:

在此处输入图片说明

and here is the image with SURF keypoints: 这是具有SURF关键点的图像:

在此处输入图片说明

The rectangle is drawn based on Clustering method like "Hierarchial Clustering". 矩形是根据“层次聚类”之类的聚类方法绘制的。

The main problem is, in this case it doesnt detect the objects individually, it detects everything as one object. 主要问题是,在这种情况下,它不会单独检测对象,而是将所有内容检测为一个对象。

Is there a way to seperate these keypoints, so as to detect each vehicle seperately? 有没有办法分离这些关键点,以便分别检测每辆车? Is this a good way to detect objects or if there is a better way please suggest. 这是检测物体的好方法,还是有更好的方法请提出建议。

SURF keypoints are useful in detecting similar images, or images taken of the same place from different perspectives. SURF关键点可用于检测相似图像或从不同角度拍摄的相同位置的图像。 Although you can use Haar classifiers for the purpose of object detection. 尽管您可以将Haar分类器用于对象检测。 It is also a part of OpenCV library. 它也是OpenCV库的一部分。

Here is another great tutorial regarding object detection using OpenCV. 是有关使用OpenCV进行对象检测的另一篇很棒的教程。

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

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