3

I am trying to determine whether part of an image exists in another image. See the images below:

Full Image

second part of image that i want to check if he existing in the full image:

if the second part exists inside the full image then the function should return true

If it exists then it should draw a layer on the containing UIImageView outlining where it is found. I am done with finding a rect and place layer object on the same but stuck in scan for image existence of another image.

(i want to check if Part Of Image Existing In Another Image). Can anyone provide me with some help

Daniel Galasko
  • 23,617
  • 8
  • 77
  • 97
77base
  • 59
  • 6
  • You have to convert your `UIImage` object into `NSData` object and compare your NSData object with its contents....This is only an Idea but not guaranty this will work or not....because Image Processing is not little concept....You may need Third Party for your solution – Sarat Patel Jan 14 '15 at 12:06
  • Try some other method to provide the images, I am not going to download anything to my computer. – zaph Jan 14 '15 at 12:14
  • Won't work with this Sarat_Patel. Need Superimposing kind of things where image will scan to find particular section which is similar to searching image. I need the third party library only to do this...!! – 77base Jan 14 '15 at 12:15
  • Zaph it was for example... if you understand the concept no need to download..below is the link for the same solution in .net http://stackoverflow.com/questions/1910876/c-sharp-checking-if-an-image-exists-within-another-image – 77base Jan 14 '15 at 12:17

1 Answers1

2

Sounds as if you need to implement template matching.

OpenCV is a good tool for the job. Here is a tutorial:

http://docs.opencv.org/doc/tutorials/imgproc/histograms/template_matching/template_matching.html

Strongly recommended - install openCV via cocoaPods to save yourself a headache.

Community
  • 1
  • 1
foundry
  • 31,615
  • 9
  • 90
  • 125
  • 1
    template matching gives me pixel to pixel matching. Is there anything which allow me to match if pixel resolution is not same. – 77base Feb 27 '15 at 10:40