1

I have a pattern/image that's printed on a piece of paper and multiple copies are stuck on the wall (ImageA) and I have a larger image (B) of the wall with all these pieces of paper. I want to find the locations of these patterns. Due to apparent distortion of the pattern on the wall, I am unable to use template matching properly (MATLAB or Python). Are there any other methods to do this?

Input: Small Pattern Image (A), Large Image (B)

Desired Output: Multiple pixel X,Y coordinates of A found in B (Approximate locations are ok)

SEU
  • 1,304
  • 4
  • 15
  • 36
  • Depends on how deep you want to go I think... probably the most robust solution would be a type of convolutional neural network, but if you don't have experience with this, it's a big step. Also they tend to a little tough to use when doing image localization (as opposed to classification). – v.chaplin Aug 31 '17 at 20:30

1 Answers1

0

If the patterns in image B are all roughly the same size / scale, and template A doesn't have strong rotational symmetry, I would try doing a normalized cross-correlation, with the template rotated at different angles. normxcorr2 in MATLAB, or skimage.feature.match_template in Python. You should get a result that has one global maximum and several smaller maxima. Depending on the clutter in your image, the locations of most or all of these maxima should correspond to the locations of A in B.

Have a look at the two answers here: Normalize scipy.ndimage.filters.correlate

v.chaplin
  • 617
  • 6
  • 8