cv.getPerspectiveTransform - MATLAB File Help
cv.getPerspectiveTransform

Calculates a perspective transform from four pairs of the corresponding points

T = cv.getPerspectiveTransform(src, dst)

Input

Output

The function calculates the 3x3 matrix of a perspective transform so that:

t_i * [X_i; Y_i; 1] = T * [x_i; y_i; 1]

where:

dst(i,:) = [X_i, Y_i], src(i,:) = [x_i, y_i]  for i=1,2,3
See also