Issues with computing extrinsic matrices after camera calibration
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Luca
am 11 Apr. 2014
Beantwortet: Dima Lisin
am 1 Mai 2014
I am using the camera calibrator app on matlab 2014a. I used the attached images for calibration. Then I want to compute the extrinsic parameters for other images. I wrote the following code according to the documentation in matlab.
function [rotationmatrix,translationvector] = extrinsic(imagefile,cameraParameters)
imOrig=imread(imagefile);
im = undistortImage(imOrig, cameraParameters);
[imagePoints, boardSize] = detectCheckerboardPoints(im);
squareSize = 2.43; % in millimeters
worldPoints = generateCheckerboardPoints(boardSize, squareSize);
[rotationmatrix, translationvector] = extrinsics(imagePoints, worldPoints, cameraParameters);
end
To verify that my code works, I have tested it with the first image I used for calibration. I have obtained the extrinsic rotation and translation matrices using this code and the calibration parameters. Then I compared them to the matrices that I have directly from calibration. They shoudl be equal. Actually, they are very similar but not identical (averaging 1 mm difference for each matrix coordinate). Do you know why?
0 Kommentare
Akzeptierte Antwort
Dima Lisin
am 1 Mai 2014
During calibration, all camera parameters, including the translations and rotations of all checkerboards are estimated jointly using a numeric optimization algorithm. In other words, you are trying to fit all the parameters to minimize the reprojection error. On the other hand, when you call extrinsics() you are computing only the rotation and translation for the single checkerboard, and you are computing it in closed form using the parameters that you have just estimated. This is why the results are not exactly the same.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Support Package for USB Webcams finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!