Home>

I am trying to find the Euler angle from the rotation matrix using OpenCV in python.
I am trying to get Euler angle using decomposeProjectionMatrix (),
I need a rotation matrix that is a 3x3 matrix, but I don't know how to extend it to a 3x4 matrix.

double * _r = rotCamerMatrix.ptr();
double projMatrix [12] = {_r [0], _ r [1], _ r [2], 0, _r [3], _ r [4], _ r [5], 0, _r [6], _ r [7] , _r [8], 0};
projMat = cv :: Mat (3,4, CV_64FC1, projMatrix);

C ++ looks like this, but I don't know how to implement it in python.

Thanks for your professor.

Reference URL (FW/tool version etc.)

Reference : https://qiita.com/TaroYamada/items/e3f3d0ea4ecc0a832fac