How does calibrateCamera works under hood?

asked 2012-11-10 17:55:11 -0500

vlattson gravatar image

updated 2012-11-10 18:00:33 -0500

This is the fragment of code INSIDE my own function.

rvecs = std::vector<cv::Mat>();
tvecs = std::vector<cv::Mat>();
cv::calibrateCamera(objPts, imPts, boardSz, camMatrix, distCoeffs, rvecs, tvecs, flag);    

And it gives an output:

rvecs: [-2.07794159464744; 1.839724077653041; -0.9104975914162868]
tvecs: [81.31706021250416; 213.1216587926538; 367.8369235219837]

And it's nice to see any result but:
I am wondering how this function changes the values of rvecs and tvecs, because they are both local variables and according to the documentation it gets variables, not references so I thought they are copied and my results will be something zero-like. Is it different for containers (vector) of objects of external classes (Mat)? Aren't they passed by value?

edit retag flag offensive close merge delete