开发者

How to match texture similarity in images?

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 开发者_如何学Cgive 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. 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.

You need to focus on steps 2 and 4.

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.

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

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.

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


I'd suggest to use wavelet analysis. Wavelets are localized in both time and frequency and give a better signal representation using multiresolution analysis than FT does.

Thre is a paper explaining a wavelete approach for texture description. There is also a comparison method.

You might need to slightly modify an algorithm to process images of arbitrary shape.


An interesting approach for this, is to use the Local Binary Patterns. Here is an basic example and some explanations : http://hanzratech.in/2015/05/30/local-binary-patterns.html

See that method as one of the many different ways to get features from your pictures. It corresponds to the 2nd step of DanielHsH's method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜