Advertisement
spsancti

Untitled

Jul 7th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1.     def addFramePair(self, images, ratio=0.75, reprojThresh=4.0, showMatches=False):        
  2.         (imageA, imageB) = images
  3.         (kpsA, featuresA) = self.detectAndDescribe(imageA)
  4.         (kpsB, featuresB) = self.detectAndDescribe(imageB)
  5.  
  6.         H = self.matchKeypoints(kpsA, kpsB, featuresA, featuresB, ratio, reprojThresh)
  7.         self.accHomography *= np.asmatrix(H)
  8.  
  9.         result = cv2.warpPerspective(imageA, np.linalg.inv(self.accHomography), (1600, 900))
  10.         return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement