estworldpose giving different answers on each run.

4 次查看(过去 30 天)
I have the a setero camera calibration file and am using the first image from the set of images to define a target line for my application. To find this orientation I am using the estworldpose function (I have attached the calibration file, the image points and the world points in use). Each run with the function gives different rotation matrix and translation values, (I can see the error in tranlation clearly). For refrence: translation should be roughly [100,50,-1900].
Are the different values because of one/all of these reasons?:
  1. An image used in calibration should not be used
  2. The ransac method method is not working because the world points I gave are planar (I want to use the checkerboard to define the target line)
If there is another reason can you explain it please.
Thank you.

采纳的回答

Qu Cao
Qu Cao 2023-9-29
estworldpose is a RANSAC-based method. You may want to set the random seed before running the function to get persistent results.
https://www.mathworks.com/help/matlab/ref/rng.html
  2 个评论
Ali
Ali 2023-9-29
I set the random seed and it does give me persistent results.
But the solutions are still wrong. Why does the random seed make a difference when the estworldpose is doing multiple iterations to give a final solution and why is the solution wrong? Is it because the world points are planar?
Ali
Ali 2023-10-2
I figured out why the solutions were completely wrong or sometimes close to correct. I had not aligned the world points in the same order as the Image points. So during the RANSAC the combination of random points sometimes was close to the correct orientation which gave a close to correct answer. The solution still changes on multiple runs but it does not give a outright wrong solution, for example: The solution for translation should be roughly [100,50,-1900], now all the solutions are in the correct order of magnitude unlike before when the solutions were of wrong order of magnitude.
Setting the random seed will give persistent solutions.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Computer Vision with Simulink 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by