estworldpose giving different answers on each run.

4 ビュー (過去 30 日間)
Ali
Ali 2023 年 9 月 29 日
コメント済み: Ali 2023 年 10 月 2 日
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 Center および File ExchangeComputer 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