python 2.7 - checking duplicate images with ORB -


currently working on checking duplicate images , using orb that, first part complete, have descriptor vector of both images, second part want know how calculate scores using hamming distance, , should threshold of saying these duplicates

    img1 = gray_image15     img2 = gray_image25     # initiate star detector     orb = cv2.orb_create()      # find keypoints orb     kp1 = orb.detect(img1,none)     kp2 = orb.detect(img2,none)     # compute descriptors orb     kp1, des1 = orb.compute(img1, kp1)     kp2, des2 = orb.compute(img2, kp2)      matcher = cv2.bfmatcher(cv2.norm_hamming, crosscheck=true)     matches = matcher.match(des1, des2)     # sort them in order of distance.     matches = sorted(matches, key = lambda x:x.distance) 

i want know next step in process can print yes or no duplicates. using opencv3.0.0 python 2.7

  • once obtain descriptors, can use bag-of-words model cluster descriptors of reference image, is, build vocabulary (visual words).
  • then project descriptors of other image on vocabulary.
  • then can obtain histogram showing distribution of each of visual words in 2 images.
  • compare these 2 histograms using histogram comparison technique , use threshold detect duplicates. example, if use bhattacharyya distance, low value means match.

i don't have python implementation of this, can find similar in c++ here.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -