Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

WarpPerpective will transform a rectangle seen in perspective (like a trapeziod) into a real rectangle.

image description

For it to work, you have to define correctly the corners.

However in the golf image you map a rectangle onto a rectangle, so it won't deform it.

Take care: WarpPerspective works correctly only on planar rectangles. However the golf balls are not planar. You might get elongated golf balls, and determining correctly the real position won't be easy.