Setting flag when Opencv stereo camera calibration

133 Views Asked by At

I'm currently working on stereo calibration with an event camera (DVS), and I have code that can determine the internal matrix of a single camera using an asymmetric circle pattern. I believe that if I use this code, I can also determine the internal matrices of both cameras. However, I'm a bit confused about how to set the following flags in OpenCV when I have the image points corresponding to the internal parameters of each camera. Since this is my first time doing calibration, I would greatly appreciate your guidance.

Here's a breakdown of how to set the flags you've listed:

CALIB_FIX_INTRINSIC: Use this to fix the cameraMatrix and distCoeffs so that only R, T, E, and F matrices are estimated.

CALIB_USE_INTRINSIC_GUESS: When you know the initial intrinsic parameters, use this to optimize some or all of the intrinsic parameters according to the specified flags. Provide the initial values as provided by the user.

CALIB_USE_EXTRINSIC_GUESS: If you have valid initial values for R and T, this flag optimizes them further. Otherwise, it initializes R and T to the median value of the pattern views for each dimension separately.

CALIB_FIX_PRINCIPAL_POINT: Fix the principal point during optimization.

CALIB_FIX_FOCAL_LENGTH: Fix the focal length (fx and fy) during optimization.

CALIB_FIX_ASPECT_RATIO: Optimize the vertical focal length (fy) while fixing the aspect ratio (fx/fy).

CALIB_SAME_FOCAL_LENGTH: Enforce that both cameras have the same focal length in both x and y directions.

CALIB_ZERO_TANGENT_DIST: Set the tangential distortion coefficients for each camera to zero and fix them during optimization.

CALIB_FIX_K1,..., CALIB_FIX_K6: Use these to prevent changes to specific radial distortion coefficients during optimization. If you provided initial distortion coefficients in distCoeffs and use CALIB_USE_INTRINSIC_GUESS, those coefficients will be used. Otherwise, they will be set to 0.

CALIB_RATIONAL_MODEL: Enable the use of distortion coefficients k4, k5, and k6. This should be specified explicitly to use the rational model and return 8 coefficients. If not set, it returns only 5 distortion coefficients.

CALIB_THIN_PRISM_MODEL: Enable coefficients s1, s2, s3, and s4. Specify this flag explicitly to use the thin prism model and return 12 coefficients. If not set, it returns only 5 distortion coefficients.

CALIB_FIX_S1_S2_S3_S4: Fix the thin prism distortion coefficients during optimization.

CALIB_TILTED_MODEL: Enable coefficients tauX and tauY. Specify this flag explicitly to use the tilted sensor model and return 14 coefficients. If not set, it returns only 5 distortion coefficients.

CALIB_FIX_TAUX_TAUY: Fix the coefficients of the tilted sensor model during optimization. If you provided initial values in distCoeffs and use CALIB_USE_INTRINSIC_GUESS, those coefficients will be used; otherwise, they will be set to 0.

stereo camera calibration

0

There are 0 best solutions below