Loading...
Loading...
Corrección de perspectiva del documento fotografiado en ángulo mediante transformación homográfica
npx skill4agent add davidcastagnetoa/skills perspective_transformopencv_contour_detectionmaxWidth = max(distance(br, bl), distance(tr, tl))dst = np.array([[0,0],[maxWidth,0],[maxWidth,maxHeight],[0,maxHeight]])M = cv2.getPerspectiveTransform(src_pts, dst_pts)warped = cv2.warpPerspective(img, M, (maxWidth, maxHeight))