The recomputeM​odelFromIn​liers parameter in estimateWorldCameraPose does not work properly.

4 次查看(过去 30 天)
When I turn the recomputeModelFromInliers true from the default false, and try to get better model estimation will all the inliers. The result is much worse than the original model. This is due to an error in the section of code for recomputeModelFromInliers. It does not computer a model with all the inliers, but just uses the first 3 inliers for model calculation.
Where can I find a correct function/code that can do recomputeModelFromInliers?
  3 个评论
Jack Wang
Jack Wang 2021-11-19
Hi Sahil,
Thank you for the response.
In the Monocular Visual Odometry, VisualOdometryExample.mlx, it calls estimateWorldCameraPose function twice.
In estimateWorldCameraPose.m on line 125: params.recomputeModelFromInliers = false; The on line 141 it calls the function [isFound, pose, inlierIdx] = vision.internal.ransac.msac(points, params, funcs, cameraParams.IntrinsicMatrix, outputClass); If change params.recomputeModelFromInliers = true, the msac should recompute model from all the inliers, as indicated in the msac. However, it does not recompute a model with all the inliers, but just uses the first 3 inliers to get a model, which usually is much worse than the original model.
Sahil Jain
Sahil Jain 2021-11-23
Hi Jack,
Could you please share the input data to the "estimateWorldCameraPose" function so that the issue can be investigated?

请先登录,再进行评论。

回答(3 个)

Jack Wang
Jack Wang 2021-11-23
Hi Sahil,
When you run the VisualOdometryExample.mlx, it calls estimateWorldCameraPose function twice online 130 and 194.
The input data for estimateWorldCameraPose function include imagePoints, worldPoints and intrinsics

Sahil Jain
Sahil Jain 2021-12-10
Hi Jack
From my understanding of the question, you want the model to be recomputed using all the inliers instead of only three. However, the algorithm has been implemented based on the following reference which uses only three inliers:
Xiao-Shan Gao, Xiao-Rong Hou, Jianliang Tang and Hang-Fei Cheng, "Complete solution classification for the perspective-three-point problem," in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 25, no. 8, pp. 930-943, Aug. 2003, doi: 10.1109/TPAMI.2003.1217599.
You can try to modify the code to use all inliers, but it is not recommended and may not produce the desired result.

Jack Wang
Jack Wang 2021-12-12
Hi Sahil,
Thanks for your response.
This means that aprameter "recomputeModelFromInliers" does not function as it supposed to do.
I have already revised the code and get recomputeModelFromInliers work.

类别

Help CenterFile Exchange 中查找有关 Camera Calibration 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by