hi i after computation a Mapping Matrix using RANSAC and Below command:
src_pts = np.float32([kp1[m.queryIdx].pt for m in matches]).reshape(-1, 1, 2)
dst_pts = np.float32([kp2[m.trainIdx].pt for m in matches]).reshape(-1, 1, 2)
homography = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC, 5.0)
h, w = model.shape
pts = np.float32([[0, 0], [0, h - 1], [w - 1, h - 1], [w - 1, 0]]).reshape(-1, 1, 2)
then for Projecting Corners Keypoints into a 3d Image, I used perspectiveTransform command:
dst = cv2.perspectiveTransform(cv2.UMat(pts, homography))
but pycharm gives this error due to UMat usage:
SystemError: <class 'cv2.umat'=""> returned NULL without setting an error