title: Matching two images in OpenCv
body: <p>I am having a little trouble in matching two similar images. i e I have obtained a binary image from the filter tat is shown as "pic1", I need to compare this image with the stored images in a folder and if there is a match with the input image then the code/prgm should return true and if there is no match it should return false. The problem is I couldn't find a particular function in OpnenCV to do this particular type of matching.I found out some techniques in openCV, they are Surf, template matching . But I couldn't find out how to implement those functions to solve my problem, and to decide which would more accurate in finding the match even when the image has different orientations with the database. So please someone help with this problem.
  Thank you.  </p>
  
  <p>Pic1:
  <img src="https://i.stack.imgur.com/cNzHd.jpg" alt="enter image description here"></p>