Issues with computing extrinsic matrices after camera calibration
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Luca
el 11 de Abr. de 2014
Respondida: Dima Lisin
el 1 de Mayo de 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 comentarios
Respuesta aceptada
Dima Lisin
el 1 de Mayo de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Support Package for USB Webcams en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!