I'm working with OpenCV stereo vision and my calibration module is acting up. For debugging purposes, I'd like to visualize the camera parameters calibration is calculating, and I'm hoping to find some built in functionality to help with this. I'm looking for something akin to Matlab's showExtrinsics(). Any suggestions/pointers to writing my own visualization? I was unable to find anything helpful in OpenCV docs.

My intrinsics matrix:

%YAML:1.0
M1: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 4.6716183686593592e+02, 0., 3.4685206899619874e+02, 0.,
       4.6716183686593592e+02, 2.6460277614179995e+02, 0., 0., 1. ]
D1: !!opencv-matrix
   rows: 1
   cols: 5
   dt: d
   data: [ 1.3545958543110964e-01, -2.0383389968255977e-01, 0., 0., 0. ]
M2: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 4.6716183686593592e+02, 0., 3.1321301298488936e+02, 0.,
       4.6716183686593592e+02, 2.7674405764548516e+02, 0., 0., 1. ]
D2: !!opencv-matrix
   rows: 1
   cols: 5
   dt: d
   data: [ 6.8017486649835202e-02, -1.2178761345435389e-01, 0., 0., 0. ]

My extrinsics matrix:

%YAML:1.0
R: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 9.9771868227118155e-01, -7.5673210589346316e-03,
       6.7083281814831405e-02, 8.9579410266375625e-03,
       9.9975067896491787e-01, -2.0453244284196821e-02,
       -6.6911780275377294e-02, 2.1007512017769996e-02,
       9.9753771763237242e-01 ]
T: !!opencv-matrix
   rows: 3
   cols: 1
   dt: d
   data: [ -3.7118950200284830e+00, 2.0057520035877928e-02,
       -1.1958455121942886e-01 ]
R1: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 9.9498387348418538e-01, -1.2286209661821963e-02,
       9.9278097073585744e-02, 1.3314580062505074e-02,
       9.9986428207583911e-01, -9.7025453735457880e-03,
       -9.9145415749623558e-02, 1.0975722350366061e-02,
       9.9501242206050977e-01 ]
R2: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   data: [ 9.9946687339085338e-01, -5.4006987617013216e-03,
       3.2199401348428379e-02, 5.0670326515128601e-03,
       9.9993271463178834e-01, 1.0435103699094591e-02,
       -3.2253591651478383e-02, -1.0266385049651746e-02,
       9.9942698941122865e-01 ]
P1: !!opencv-matrix
   rows: 3
   cols: 4
   dt: d
   data: [ 4.2226276527153402e+02, 0., 2.8740816497802734e+02, 0., 0.,
       4.2226276527153402e+02, 2.7487768363952637e+02, 0., 0., 0., 1.,
       0. ]
P2: !!opencv-matrix
   rows: 3
   cols: 4
   dt: d
   data: [ 4.2226276527153402e+02, 0., 2.8740816497802734e+02,
       -1.5682311212949173e+03, 0., 4.2226276527153402e+02,
       2.7487768363952637e+02, 0., 0., 0., 1., 0. ]
Q: !!opencv-matrix
   rows: 4
   cols: 4
   dt: d
   data: [ 1., 0., 0., -2.8740816497802734e+02, 0., 1., 0.,
       -2.7487768363952637e+02, 0., 0., 0., 4.2226276527153402e+02, 0.,
       0., -2.6926054427670321e-01, 0. ]
有帮助吗?

解决方案

I don't think there is such a thing in OpenCV. But you can, in principle, take your calibration data into matlab, and manually construct a cameraParameters object, which you can then pass into showExtrinsics().

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top