Camera Intrinsics for camera 2 not returned by estimateCameraParameters.
16 次查看(过去 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 个评论
回答(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!