Camera pose worse after refinement with bundleAdjustmentMotion
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
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.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Software Development Tools에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!