Can I use the outputs of estimateWorldCameraPose to construct a cameraMatrix?

조회 수: 3 (최근 30일)
Robin Pape
Robin Pape 2020년 9월 4일
편집: Robin Pape 2020년 9월 4일
I am doing visual odometry and I use a stereo camera setup to triangulate world points.
I match these points with points in a subsequent image, and then I want to use estimateWorldCameraPose to estimate the camera pose in a world coordinate system.
This function returns the parameters worldOrientation and worldLocation, which I want to use to construct the cameraMatrix for my next triangulation to get the world coordinates of the points.
My question is: Can I use these parameters directly for the cameraMatrix-function?
This would be the code:
[worldOrientation, worldLocation] = estimateWorldCameraPose(imagePoints, worldPoints, intrinsics);
camMatrix1 = cameraMatrix(intrinsics, worldOrientation, worldLocation);
camMatrix2 = cameraMatrix(intrinsics, worldOrientation, worldLocation + [baseline, 0, 0]);
worldPoints = triangulate(matchedPointsLeft, matchedPointsRight, camMatrix1, camMatrix2);
Thank you!

답변 (1개)

Matt J
Matt J 2020년 9월 4일
Yes, you can.
  댓글 수: 1
Robin Pape
Robin Pape 2020년 9월 4일
편집: Robin Pape 2020년 9월 4일
Thank you.
I thought so, too, but the results I am getting are not plausible.
However, if I do it this way:
orientation = worldOrientation';
translation = -worldLocation * worldOrientation';
camMatrix1 = cameraMatrix(intrinsics, orientation, translation);
camMatrix2 = cameraMatrix(intrinsics, orientation, translation + [baseline, 0, 0] * worldOrientation');
The results are completely plausible. I tried this, because the documentation of cameraMatrix suggested something like this, with relative location and orientation though. Multiplying the translation with the rotation matrix kind of makes sense, as this probably makes sure the coordinates of the new points are still correct after a rotation of the camera...?
Could you maybe explain further to me what is happening here?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for USB Webcams에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by