title: How to calculate % score from ORB algorithm?
body: <p>I am using the ORB algorithm of OpenCV 2.4.9 with Python to compare images. The ORB algorithm does not return the similarity score as a percentage. Is there any way to do this?</p>
  
  <p>My code to compare images using ORB is as follows</p>
  
  <pre><code>img1 = cv2.imread("img11.jpg",0) 
  img2 = cv2.imread("img2.jpg",0)
  # Initiate ORB detector
  orb = cv2.ORB()
  
  # find the keypoints and descriptors with ORB
  kp1, des1 = orb.detectAndCompute(img1,None)
  kp2, des2 = orb.detectAndCompute(img2,None)
  
  # create BFMatcher object
  bf = cv2.BFMatcher(cv2.NORM_HAMMING)
  
  matches = bf.knnMatch(des1, trainDescriptors = des2, k = 2)
  
  good = []
  for m,n in matches:
      if m.distance &lt; 0.75*n.distance:
          good.append([m])
  if len(good) &gt; 20:
     print "similar image"
  </code></pre>
  
  <p>I did find a solution on Stack Overflow to do this for <em>sift</em> algorithm using <em>Matlab</em> but is there any external library out there that can be easily used with Python to do that with OpenCV?</p>