0

Suppose I have an grayscale image this:- {first image}
and i want to check whether this image exists in this one below:-{second}
without any third party library


first image
first image

second
second
I thought of using Getpixel() to get all the black pixels and check if the pattern matches

Sorry for my English

Trevor
  • 7,777
  • 6
  • 31
  • 50
  • 2
    Have a look at Image convolution and template Matching: https://en.wikipedia.org/wiki/Template_matching . The easiest way would be to shift the first image through the second one and sum up the multiplied matching values. Store the sum value for each shifted step with its coordinates and when finished you look for the maximum to get the best match coordinates. – David_D Jan 26 '16 at 12:44
  • 2
    If the image is going to be a chunk of the big one, not a "similar" one, but a literal cutted part, then you should not do convolution and template matching, but image integrals: https://stackoverflow.com/questions/29663764/determine-if-an-image-exists-within-a-larger-image-and-if-so-find-it-using-py – Ander Biguri Jan 26 '16 at 15:43
  • 1
    That's what you wanna do: http://stackoverflow.com/questions/2262832/detect-the-location-of-an-image-within-a-larger-image and http://stackoverflow.com/questions/3105375/how-to-detect-occurrencies-of-a-small-image-in-a-larger-image – FiReTiTi Jan 26 '16 at 22:08

0 Answers0