Search code examples
image-processingmatrixsubmatrix

Search for partially matching pattern in an image


Consider the following problem of locating a 2d pattern inside an image (0-255).

A match is said to be found at (x, y) if most of the elements of the bigger matrix (say > 50%) are in some range of the respective elements of the smaller matrix i.e

0.8*small[i][j] <= bigger[x+i][y+j] <= 1.2*smaller[i][j]

I remember this problem to be a standard problem in image searching, but couldn't recollect, neither find the exact name.

I would be very grateful if someone could figure out the name of an equivalent standard problem.
Thank you in advance.


Solution

  • I thought it might have been something like "moving windows" or something, so that's what I looked for. Thinking of the right name can be tricky, and with so many similar methods, finding the actual one you want can get hard. Glad I could help you out.

    Anyway, it's template matching.