This is the fragment of code INSIDE my own function.
rvecs = std::vector<cv::Mat>();
tvecs = std::vector<cv::Mat>();
cv::calibrateCamera(objectPoints, imagePoints, boardSize, cameraMatrix, distCoeffs, rvecs, tvecs, flag);
std::cout<<"\nrvecs:\n"<<rvecs.at(1)<<"\ntvecs:\n"<<tvecs.at(1)<<std::endl;
And it gives an output:
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?