3

Consider an image which is a composite of repeated pattern of varying size and unknown topography (as shown below) An image composed of varying tile patterns. Note that there are 4 patterns here considering that the images of same topography are classified in the same category

How do we find the repeated pattern (along with its location) ?

Adi279
  • 138
  • 2
  • 13
  • A few clarifying questions: Do we have a minimum size of the pattern? In your example, an algorithm might find trivially small diagonal lines all over. – pixelpax Mar 07 '18 at 20:48
  • A few clarifying questions: Do we have a minimum size of the pattern? In your example, an algorithm might find trivially small diagonal lines all over. If pattern A is a scaled down version of pattern B, should A match B? If so, will there be equal scaling on both axes? There are several repeated patterns in this image, should the algorithm return N groups of matches? – pixelpax Mar 07 '18 at 20:55
  • We don't have min pattern size. if A and B are scaled version of one another, they can be classified as different. Yes, return multiple (N) groups of matches – Adi279 Mar 07 '18 at 21:32

2 Answers2

1

An easy way to do this is to compute the autocorrelation of the image. At least the blocks with the same size can be identified this way.

A more elaborate way is explained in this post. You first of course will need to subdivide your big image into small images.

yar
  • 1,855
  • 13
  • 26
  • Could you provide me some detail ?I don't carry much background is in image processing. Any link(s) would be useful. – Adi279 Mar 04 '18 at 21:35
  • Basicly its a 2d [cross correlation](https://en.wikipedia.org/wiki/Cross-correlation) of a signal (i.e. the image) with it-self. Matlab has a function and a nice [documentation](https://de.mathworks.com/help/signal/ref/xcorr2.html) for this. The nice thing is, that this task can be computed very efficiently by use of an FFT. – yar Mar 04 '18 at 21:42
  • It seems like I should be aware of the pattern I am searching for before I perform the analysis. In my case, I am just given the image and am required to find the pattern(s) in the image. – Adi279 Mar 04 '18 at 22:26
  • No, you don't have to be aware of the pattern you're searching for. Either do a full autocorrelation of the image or subdivide your image into small pieces and cross-correlate them with the full image. – yar Mar 04 '18 at 23:22
1

I'd have a look at the SIFT and RANSAC algorithm, it might not be exactly what you need, but it'll lead you in the right direction. What makes this hard is that you don't know which features you're looking for ahead of time so you will need some overseeing algorithm helping you make guesses.

Open source implementation https://robwhess.github.io/opensift/

Wikipedia with some good links at the bottom as well as descriptions of similar algorithms

pixelpax
  • 1,435
  • 13
  • 22
  • Do you have any thoughts on the effectiveness and correctness of using a Gabor filter ? [link](https://www.mathworks.com/help/images/texture-segmentation-using-gabor-filters.html) – Adi279 Mar 08 '18 at 17:10