1 | initial version |
Hi,
You should :
first undistort your raw image
then apply your warpperspective()
And use the undistorted camera matrix of course ( Intrinsic_undisto ).
To get the transform Mat, you don't have to do such complex computes.
Mat Trans_to_C= ( Mat_<double>(3,3) <<
1, 0, -Cx,
0, 1, -Cy,
0, 0, fx);
Mat Intrinsic_undisto = ( Mat_<double>(3,3) <<
fx, 0, Cx,
0, fy, Cy,
0, 0, 1);
Mat 3x3_Translation_bird_eye = ( Mat_<double>(3,3) <<
1, 0, Trans_X,
0, 1, Trans_Y,
0, 0, Trans_Z);
Mat transform = 3x3_Translation_bird_eye * Intrinsic_undisto * 3x3_Rot * Trans_to_C;
I'm not sure for 3x3_Translation_bird_eye, but you should try this...