feat: add perspective transform
This commit is contained in:
@@ -161,10 +161,10 @@ class VisionChunk:
|
||||
|
||||
for match in good_matches:
|
||||
pt1 = kp1[match.queryIdx].pt
|
||||
src_pts.append([pt1[0] - cx1, cy1 - pt1[1]]) # Y вверх!
|
||||
src_pts.append([pt1[0], pt1[1]])
|
||||
|
||||
pt2 = kp2[match.trainIdx].pt
|
||||
dst_pts.append([pt2[0] - cx2, cy2 - pt2[1]])
|
||||
dst_pts.append([pt2[0], pt2[1]])
|
||||
|
||||
src_pts = np.float32(src_pts).reshape(-1, 1, 2)
|
||||
dst_pts = np.float32(dst_pts).reshape(-1, 1, 2)
|
||||
|
||||
Reference in New Issue
Block a user