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

3 visualizaciones (últimos 30 días)
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!

Respuestas (1)

Matt J
Matt J el 4 de Sept. de 2020
Yes, you can.
  1 comentario
Robin Pape
Robin Pape el 4 de Sept. de 2020
Editada: Robin Pape el 4 de Sept. de 2020
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?

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Support Package for USB Webcams en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by