I am trying to use extrinsics function of matlab to calculate the translation vector. As a requirement i want to give the input camera parameters. i.e. Camera matrix, distortion matrix. But when i give the input i.e. camParam a 3x3 cameraMatrix, it gives me error.
camParam = [994.735326361544, 0, 624.663440953582;
0, 998.166467837258, 364.087425569226;
0, 0, 1];
[rotationMatrix,translationVector] = extrinsics(left_right_eye_points,(face.model)',camParam);
I get the following error:
Error using extrinsics
Expected cameraParams to be one of these types:
cameraParameters
Instead its type was double.
Error in extrinsics>checkInputs (line 140)
validateattributes(cameraParams, {'cameraParameters'}, {}, ...
Error in extrinsics (line 91)
checkInputs(imagePoints, worldPoints, cameraParams);
Error in Simple_conversion_from_World_to_Camera_to_image (line 37)
[rotationMatrix,translationVector] = extrinsics(left_right_eye_points,(face.model)',camParam)
My question is:
1) how should i arrange my camParam, so that the function extrinsics may accept it.
2) In addition does it also need distortion coefficients? if yes than how to arrange that as well.