良好的算法找到图片类似的地方? [英] Good algorithm to find similar areas in images?

查看:188
本文介绍了良好的算法找到图片类似的地方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要搜索类似地区的两个图像,但我不知道什么是最好的。 的区域不进行缩放或转化的任何方式,但可能会出现在两个图像(我想知道在哪里)的任何地方。还有其他的他们周围的东西。

这是什么,我希望有一个例子:

我怎样才能做到这一点?

解决方案
  1. segmentate图片

    要获得绑定矩形/多边形/地区发现的面具

  2. 按各地区计算

    • 在直方图
    • FFT DCT 并过滤掉unsignificant数据(主要是高频率......类似于JPEG comprimation)
    • 尺寸(宽,heigth,面积,周长...)
  3. 查找匹配

    所以比较图像之间的每个区域。处理从 2 数据作为单一数据集,计算基于一个从下面的对比区域之间的相似性:

    • 相关系数
    • 在距离+ tresholding
    • 尺寸系数(高宽比,周长/面积,...)
  4. 特定图像,你可以创建自己的自定义比较

    • 例如这里是我的 OCR
    • 如果你想同样的尺寸,那么你可以很容易地添加尺寸+/-一些treshold比较
  5. ,以提高precision

    您可以将每个区域的一些次区域和计算的 2 也让他们拥有更强大的数据集,但要注意的旋转。

    此外,如果你的分割是基于色彩均匀性系数,那么你也可以包括对数据集

  6. 旋转图片

    有关,你需要使用像旋转功能无关!

    • 在直方图
    • 在色彩均匀性
    • 使用形状分区域不变的轮换如CO为中心的圈子...

    或者找基本特征/ EDGE和旋转一个形象相匹配的另一位置...

  7. 多边形

    有关多边形图像,你可以vectorise图像回矢量形式,然后使用算法任何多边形比较

I want to search for similar areas in two images, but I don't know what works best. The areas are not scaled or transformed in any way, but may appear anywhere in both images (I want to know where). There is other stuff around them.

This is an example of what i want:

How can I do this?

解决方案

  1. segmentate image

    To obtain bound rectangles/polygon/mask of found areas

  2. per each region compute

    • histogram
    • FFT or DCT and filter out unsignificant data (mostly high frequencies ... similar to JPEG comprimation)
    • size (width,heigth,area,perimeter length...)
  3. find matches

    So compare each regions between images. Handle data from #2 as single dataset and compute the similarity between compared regions based on one from the following:

  4. for specific images you can create own custom comparison

    • for example here is mine for OCR
    • if you want the same size then you can easily add comparison of the sizes +/- some treshold
  5. to improve precision

    You can divide each region to few subregions and compute #2 also for them to have more robust dataset but beware of the rotations.

    Also if you segmentation is based on color homogenity coefficient then you can also include that to the dataset

  6. rotated images

    For that you need use features independend on rotation like:

    • histogram
    • color homogenity
    • use shapes for subregions invariant to rotation like co-centric circles ...

    Or find base feature/edge and rotate one image to match the other one position ...

  7. polygons

    For polygon images you can vectorise image back to vector form and then use any polygon comparison algorithm

这篇关于良好的算法找到图片类似的地方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆