transform the individual pixels, but rather to move them from one place in the image to
another. This is the job of cv::warpPerspective().
If you want to solve the inverse problem to find the most probable perspective
transformation given many pairs of corresponding points, use
cv::getPerspectiveTransform() or cv::findHomography().
cv::phase()
void cv::phase(
cv::InputArray x, // Input array of x-components
cv::InputArray y, // Input array of y-components
cv::OutputArray dst, // Output array of angles (radians)
);
cv::phase() computes the azimuthal (angle) part of a Cartesian-to-polar conversion on a two-
dimensional vector field. This vector field is expected to be in the form of two separate single--channel
arrays. These two input arrays should, of course, be of the same size. (If you happen to have a single two--
channel array, a quick call to cv::split() will do just what you need.) Each element in dst is then
computed from the corresponding elements of x and y as the arctangent of the ratio of the two.
cv::polarToCart()
void cv::polarToCart(
cv::InputArray magnitude, // Input array of magnitudes
cv::InputArray angle, // Input array of angles
cv::OutputArray x, // Output array of x-components
cv::OutputArray y, // Output array of y-components
bool angleInDegrees = false // degrees (if true) ...