如何匹配图像中的纹理相似度? [英] How to match texture similarity in images?

查看:2048
本文介绍了如何匹配图像中的纹理相似度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

量化图像某部分纹理的方法有哪些?我正在尝试检测图像中纹理相似的区域,这类似于它们的相似程度如何?

What are the ways in which to quantify the texture of a portion of an image? I'm trying to detect areas that are similar in texture in an image, sort of a measure of "how closely similar are they?"

所以问题是什么信息关于图像(边缘,像素值,渐变等)可以视为包含其纹理信息。

So the question is what information about the image (edge, pixel value, gradient etc.) can be taken as containing its texture information.

请注意,这不是基于模板匹配。

Please note that this is not based on template matching.

维基百科没有详细介绍实际上实现任何纹理分析。

Wikipedia didn't give much details on actually implementing any of the texture analyses.

推荐答案

你想在图像中找到两个看起来相同(相同纹理)或在一个纹理中匹配的不同区域形象到另一个?
由于不同的辐射测量,第二个更难。

Do you want to find two distinct areas in the image that looks the same (same texture) or match a texture in one image to another? The second is harder due to different radiometry.

以下是如何测量区域相似性的基本方案。

Here is a basic scheme of how to measure similarity of areas.


  1. 您编写的函数作为输入获取图像中的区域并计算标量值。像平均亮度一样。此标量称为要素

  2. 您可以编写更多此类函数以获取大约8 - 30个要素。它们形成了一个对图像中区域信息进行编码的向量。

  3. 计算要比较的两个区域的向量

  4. 定义相似度函数这需要两个向量并输出它们相似的数量。

  1. You write a function which as input gets an area in the image and calculates scalar value. Like average brightness. This scalar is called a feature
  2. You write more such functions to obtain about 8 - 30 features. which form together a vector which encodes information about the area in the image
  3. Calculate such vector to both areas that you want to compare
  4. Define similarity function which takes two vectors and output how much they are alike.

您需要关注步骤2和步骤4。

You need to focus on steps 2 and 4.

步骤2:使用以下功能:std()亮度,某种角点检测器,熵滤波器,边缘方向直方图,FFT频率直方图(x和y方向)。如果可用,请使用颜色信息。

Step 2.: Use the following features: std() of brightness, some kind of corner detector, entropy filter, histogram of edges orientation, histogram of FFT frequencies (x and y directions). Use color information if available.

步骤4.您可以使用余弦相似度,最小值 - 最大值或加权余弦值。

Step 4. You can use cosine simmilarity, min-max or weighted cosine.

实现大约4-6个这样的功能后,相似功能开始运行测试。查看结果并尝试了解它不起作用的原因或位置。然后添加特定功能以涵盖该主题。
例如,如果您看到具有大斑点的纹理被认为与具有微小斑点的纹理相似,则添加形态过滤器计算的大小> 20sq像素的对象的密度。

After you implement about 4-6 such features and a similarity function start to run tests. Look at the results and try to understand why or where it doesnt work. Then add a specific feature to cover that topic. For example if you see that texture with big blobs is regarded as simmilar to texture with tiny blobs then add morphological filter calculated densitiy of objects with size > 20sq pixels.

迭代识别问题设计特定功能的过程大约5次,您将开始获得非常好的结果。

Iterate the process of identifying problem-design specific feature about 5 times and you will start to get very good results.

这篇关于如何匹配图像中的纹理相似度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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