How does calibrateCamera works under hood? [closed]
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);
std::cout<<"\nrvecs:\n"<<rvecs.at(1)<<"\ntvecs:\n"<<tvecs.at(1)<<std::endl;
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?
see https://docs.opencv.org/master/d9/d0c... and https://docs.opencv.org/master/d2/d9e...