feat: add perspective transform

This commit is contained in:
2026-01-10 17:47:32 +03:00
parent 155bf17847
commit 17594bc8fc
6 changed files with 150 additions and 254 deletions

View File

@@ -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)