madhurayavarapu
madhurayavarapu

Reputation: 69

Different image size OpenCV stereoCalibrate

I have two cameras with different resolutions but stereoCalibrate functions has only one option for imagesize.

If I understand correctly stereoCalibrate computes rigid transformation matrix from cam1 to cam2. If that is true then which camera size should I use as input to the function stereoCalibrate?

Upvotes: 5

Views: 3612

Answers (1)

Kornel
Kornel

Reputation: 5354

The imageSize parameter is used only to initialize intrinsic camera matrices.

I suggest to calibrate each camera independently using cv::calibrateCamera() and so get the camera matrices and distortion coefficients for each camera. And then estimate the transformation between the camera coordinate systems (rotation R and translation t) using cv::stereoCalibrate() with flags CV_CALIB_FIX_INTRINSIC enabled (with the pre-estimated camera matrices and distortion coefficients).

And so the imageSize parameter doesn't matter anymore.

Upvotes: 4

Related Questions