如何使用倒角匹配算法来查找“类似图像” [英] How to use Chamfer Matching algorithm for finding 'Similar Images'
问题描述
我想要求更多关于如何使用倒角匹配算法(边匹配算法)来找到相似图像的信息。
倒角匹配算法基本上是计算两个图像之间的距离(不相似性)。基本思想是:
- 提取查询图像的边缘/轮廓以及目标图像。
- 在查询图像中获取轮廓的一个点/像素,并找到目标图像中轮廓的最近点/像素的距离。
- 将所有边缘点/像素的距离
- Extract the edge/contours of a query image as well as target image.
- Take one point/pixel of contour in query image and find the distance of a closest point/pixel of contour in target image.
- Sum the distances for all edge points/pixels of query image.
这给出了倒角距离,即两个图像之间的不相似度的值。值越低结果越好。但是,如果目标图片大于查询图片,则必须照顾缩放和滑动窗口。
您可以找到工作示例opencv \modules\contrib。
I would like to ask for more information on how Chamfer Matching algorithm (an edge matching algorithm) can be used to find 'similar' images. I would like to know if it is possible to place a 'score' for the matched results.
The Chamfer Matching Algorithm basically calculates the distance (dis-similarity) between two images. The basic idea is to:
This gives the Chamfer Distance i.e. a value of dis-similarity between two images. The lower the value better the result. However, you have to take care of scaling, and sliding windows as well if target image is larger than query image which is often the case.
You could find working exampling on opencv\modules\contrib.
这篇关于如何使用倒角匹配算法来查找“类似图像”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!