Camera pose worse after refinement with bundleAdjustmentMotion

10 visualizaciones (últimos 30 días)
Lisa Månsson
Lisa Månsson el 23 de Abr. de 2020
Editada: Lisa Månsson el 23 de Abr. de 2020
Dear helper,
I tried out the new function bundleAdjustmentMotion released in Matlab R2020a to refine my estimated camera pose. The problem is that the output shows that the refined pose has a greater reprojection error than the imput pose. I thought the algorithm would rather not update the pose at all in that case.
Any clues why this is happening? And maybe what I could do about it?
Thanks in advance!
Below I have an example for when the problem occur:
worldPoints = [-103 -51.5000000000000 66.9500000000000
-89.6100000000000 -61.8000000000000 66.9500000000000
-110.931000000000 -51.5927000000000 50.9232000000000
-91.0314000000000 -62.0575000000000 41.9519000000000
-115.349700000000 -34.3711000000000 72.3060000000000
-57.9272000000000 -59.2765000000000 78.0122000000000];
imagePoints = [150.922203055741 246.412460609795
139.762086448905 245.010922434622
152.832425559090 223.276361281141
139.764208894823 215.907977399472
171.702432806430 252.975377257368
141.744415386340 256.777077665036];
worldOrientation = [-0.0561788573583534 0.998364830627578 0.0105641351693954
0.164654663131831 -0.00117174603335630 0.986350581142515
0.984750109365240 0.0571514827209302 -0.164319597516384];
worldLocation = [-339.652024249253 -35.6979662479237 56.9638605186294];
absolutePose = rigid3d(worldOrientation, worldLocation);
% Camera Matrix
c_xy = [186,186];
f = 281;
camera_matrix = [f,0,c_xy(1);0,f,c_xy(2);0,0,1];
cameraParams = cameraParameters('IntrinsicMatrix',camera_matrix');
[refinedPose, reprojectionErrors] = ...
bundleAdjustmentMotion(worldPoints, ...
imagePoints, absolutePose, cameraParams,...
'AbsoluteTolerance',1e-9, ...
'RelativeTolerance', 1e-9, ...
'MaxIterations', 300, ...
'Verbose', true);
Output from the code above starts and ends with:
Initializing bundle adjustment solver ...
Starting Levenberg-Marquardt iterations:
Iteration 1:Mean squared reprojection error: 5.1853
...
Iteration 69:Mean squared reprojection error: 4.2495
Iteration 70:Mean squared reprojection error: 4.2492
bundle adjustment stopped because the relative change in the squared reprojection error was less than the specified relative tolerance value.
Mean reprojection error before bundle adjustment: 1.4443.
Mean reprojection error after bundle adjustment: 1.6822.

Respuestas (0)

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