Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

you'll have to stereocalibrate your cameras before.

this will give you an intrinsics.yml, containing a camera matrix(M) and a mat of distortion coeffs(D) per cam, similar to this one:


%YAML:1.0
M1: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 9.5743840072544333e+002, 0., 3.9758112215955236e+002, 0.,
       9.5743840072544333e+002, 2.4543538137869606e+002, 0., 0., 1. ]
D1: !!opencv-matrix
   rows: 1
   cols: 8
   dt: d
   data: [ -1.9585193838073178e-001, -3.6240697544102501e-001, 0., 0.,
       0., 0., 0., -1.3099251281533999e+000 ]
M2: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 9.5743840072544333e+002, 0., 3.2842822528436216e+002, 0.,
       9.5743840072544333e+002, 1.4142796122371439e+002, 0., 0., 1. ]
D2: !!opencv-matrix
   rows: 1
   cols: 8
   dt: d
   data: [ -1.6914752581778550e-001, -9.5256780141422942e-002, 0., 0.,
       0., 0., 0., 1.2054120883082130e-001 ]

you'll have to stereocalibrate calibrate both of your cameras before.

this will give you an intrinsics.yml, containing a camera matrix(M) and a mat of distortion coeffs(D) per cam, cam.

( you could use stereo_calibration for this, it would give you the desired file with both cams at a time, but it's definitely more pain to do. so just do 2 single calibrations and concat the output to a single file similar to this one:one ):


%YAML:1.0
M1: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 9.5743840072544333e+002, 0., 3.9758112215955236e+002, 0.,
       9.5743840072544333e+002, 2.4543538137869606e+002, 0., 0., 1. ]
D1: !!opencv-matrix
   rows: 1
   cols: 8
   dt: d
   data: [ -1.9585193838073178e-001, -3.6240697544102501e-001, 0., 0.,
       0., 0., 0., -1.3099251281533999e+000 ]
M2: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 9.5743840072544333e+002, 0., 3.2842822528436216e+002, 0.,
       9.5743840072544333e+002, 1.4142796122371439e+002, 0., 0., 1. ]
D2: !!opencv-matrix
   rows: 1
   cols: 8
   dt: d
   data: [ -1.6914752581778550e-001, -9.5256780141422942e-002, 0., 0.,
       0., 0., 0., 1.2054120883082130e-001 ]