4
votes

This is the declaration of CvStereoCalibrate() in c++ from http://docs.opencv.org/

C++: double stereoCalibrate( InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints1, InputArrayOfArrays imagePoints2, InputOutputArray cameraMatrix1, InputOutputArray distCoeffs1, InputOutputArray cameraMatrix2, InputOutputArray distCoeffs2, Size imageSize, OutputArray R, OutputArray T, OutputArray E, OutputArray F, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 30, 1e-6), int flags=CALIB_FIX_INTRINSIC )

1) What is the meaning of the parameter type InputOutputArray?

2) can I compute the intrinsic camera parameters cameraMatrix1,cameraMatrix2 and distortion coefficients distCoeffs1,distCoeffs2of each camera using CvCalibrateCamera() then passes them as a parameter to CvstereoCalibrate() ?

1

1 Answers

5
votes

The InputOutputArray is "placeholder" type. Parameters of this type are modified in place, inside the function.

There are other 2 types:

InputArray which is read-only inside the function. These parameters are used as source data for the function, but are not modified by the function.

OutputArray which is write-only. Parameters of this type are modified inside the function. Usually this means they are created inside the function. This means that data in the array are replaced by the data generated by the function.

This principle is used so the function can "return" more than one value.