Camera Intrinsics for camera 2 not returned by estimateCameraParameters.
조회 수: 15 (최근 30일)
이전 댓글 표시
Hi, can anyone explain the following?
After running the below commands:
[imagePoints,pairsUsed] = detectCircleGridPoints(CameraOneImages.Files,CameraTwoImages.Files,[9 11],PatternType="asymmetric",circleColor="white");
centerDistance = 2.2;
worldPoints = generateCircleGridPoints([9 11], centerDistance);
imageSize=[1701 1651];
params = estimateCameraParameters(imagePoints,worldPoints, 'ImageSize',imageSize);
When I check for the intrinsic matrix for camera 2, I found that "Camera Intrinsic" for camera 2 is not returned by the function estimateCameraParameters. What could be the cause for not reporting the "Camera Intrinsic" for camera 2? Everything appears to be okay since the function detectCircleGridPoints detects the centers of all the white dots in all the images and did not report any warnings and errors.
댓글 수: 2
Matt J
2022년 10월 27일
We cannot run your code unless you provide imagePoints,pairsUsed in a .mat file.
답변 (2개)
Giridharan Kumaravelu
2022년 10월 31일
It looks like the estimateCameraParameters function did not have sufficient number of quality points to converge to a better solution. Because of that it did not go far away from its initial estimates for the camera parameters (which can be negative too).
Looking at the plots generated by @Matt J, it appears that the calibration images lack variety in poses and also there were only 6 images.
@hlseck Please increase the number of calibration images and also calibrate with sufficient variety as described in this doc page: https://www.mathworks.com/help/vision/ug/prepare-camera-and-capture-images.html#mw_abbcc91e-07ab-4e40-a3b6-bb4a263e8379.
댓글 수: 0
Matt J
2022년 10월 27일
편집: Matt J
2022년 10월 27일
Hmmm. It seems like it might be a version-related problem. When I run your code in R2022a, I get intrinsics for both cameras:
>> params.CameraParameters1.Intrinsics
ans =
cameraIntrinsics with properties:
FocalLength: [5.8522e+05 3.4051e+05]
PrincipalPoint: [3.0379e+03 1.4885e+03]
ImageSize: [1701 1651]
RadialDistortion: [-2.0671 -2.6121e+05]
TangentialDistortion: [0 0]
Skew: 0
IntrinsicMatrix: [3×3 double]
>> params.CameraParameters2.Intrinsics
ans =
cameraIntrinsics with properties:
FocalLength: [5.6750e+05 3.0497e+05]
PrincipalPoint: [786.3843 1.0454e+03]
ImageSize: [1701 1651]
RadialDistortion: [-72.1295 1.0642]
TangentialDistortion: [0 0]
Skew: 0
IntrinsicMatrix: [3×3 double]
However, running it here in the forum (which is R2022b), generates significantly different intrinsics for camera1 and errors for camera2:
load('imagePoints_pairsUsed.mat')
centerDistance = 2.2;
worldPoints = generateCircleGridPoints([9 11], centerDistance);
imageSize=[1701 1651];
params = estimateCameraParameters(imagePoints,worldPoints, 'ImageSize',imageSize);
params.CameraParameters1.Intrinsics
params.CameraParameters2.Intrinsics
댓글 수: 3
Matt J
2022년 10월 27일
편집: Matt J
2022년 10월 27일
0.3 doesn't seem too bad ...
No, I don't believe there is a way to constrain the parameter estimates. However, you might try varying the position of the calibration pattern a bit more among your 6 images. Currently, they all seem to give points in approximately the same positions.
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Support Package for USB Webcams에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!