Question

Is it possible to use FindExtrinsicCameraParams2 to get the pose matrix instead of using homography decomposition with SURF feature detection ?

Was it helpful?

Solution

Yes it is assuming you have a calibrated camera and have a set of points whose position is known in world space at t = 0 and image space in the current frame. If you know both of those then the call looks like this

FindExtrinsicCameraParams2(objectPoints, imagePoints, cameraMatrix, distCoeffs, rvec, tvec, useExtrinsicGuess=0)
  • objectPoints are the points in world coordinates of the object you are looking at at t==0.

  • imagePoints are the current image points corresponding to those world coordinates.

  • cameraMatrix is your camera matrix

  • distCoeffs are your distortion coefficients (to ignore those just pass all 0's).

  • rvec and tvec will be filled by the function so they contain your current rotation and translation vectors.

Once you have the contents of rvec and tvec you can convert rvec to a rotation matrix using Rodrigues and then combine the two to get your pose matrix.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top