I have the cameraMatrix
and the distCoeff
needed to undistort an image or a vector of points. Now I\'d like to distort them back.
Is it poss
You can easily distort back your points using ProjectPoints.
cv::Mat rVec(3, 1, cv::DataType::type); // Rotation vector
rVec.at(0) = 0;
rVec.at(1) = 0;
rVec.at(2) =0;
cv::Mat tVec(3, 1, cv::DataType::type); // Translation vector
tVec.at(0) =0;
tVec.at(1) = 0;
tVec.at(2) = 0;
cv::projectPoints(points,rVec,tVec, cameraMatrix, distCoeffs,result);
PS: in the opencv 3 they added a function for distort.