Login  Register

Re: stereo example

Posted by noone on Oct 15, 2024; 12:21pm
URL: http://official-rtab-map-forum.206.s1.nabble.com/stereo-example-tp10512p10544.html

i updated the CameraStereoVideo cpp and header so i can have more control over the camera communication thanks for your guide , i think i have calibration problem or i am doing something wrong

[ WARN] (2024-10-15 15:02:28) OdometryF2M.cpp:1269::rtabmap::OdometryF2M::computeTransform() 20 visual features required to initialize the odometry (only 0 extracted).


i get this warning and i see only red color in the 3D window ( dense cloud )  anyway the camera working smooth , maybe i wrote something wrong in the yamls ?

may you check my calibrations ?  NOTE: i converted to meters because matlab used mm

why i did not use the calibration app ?  because it gives me low resolution images and it cant detect anything i dont know why and it crashes when i unlock calibration then press calibration



Matlab calibration prints more than 20 images , i tested them they works 100 %
Camera 1 Intrinsics
-------------------
Focal length (pixels):   [ 1050.7460 +/- 0.3417     1052.5362 +/- 0.3286  ]
Principal point (pixels):[  966.8852 +/- 0.1482      538.5527 +/- 0.1402  ]
Radial distortion:       [    0.0255 +/- 0.0003       -0.0316 +/- 0.0004  ]

Camera 2 Intrinsics
-------------------
Focal length (pixels):   [ 1045.3382 +/- 0.3377     1047.1505 +/- 0.3232  ]
Principal point (pixels):[  964.9739 +/- 0.1513      537.1091 +/- 0.1499  ]
Radial distortion:       [    0.0241 +/- 0.0003       -0.0305 +/- 0.0003  ]

Position And Orientation of Camera 2 Relative to Camera 1
---------------------------------------------------------
Rotation of camera 2:         [    0.0000 +/- 0.0001        0.0114 +/- 0.0001        0.0013 +/- 0.0000  ]
Translation of camera 2 (millimeters):[  -59.8172 +/- 0.0088        0.1399 +/- 0.0077        0.0350 +/- 0.0301  ]
Fundamental Matrix:
   -0.0000   -0.0000    0.0002
   -0.0000    0.0000    0.0577
    0.0001   -0.0568   -0.3288

Essential Matrix:
   -0.0016   -0.0350    0.1399
   -0.6489    0.0006   59.8137
   -0.2168  -59.8170   -0.0018

Projection Matrix for Camera 1:
   1.0e+03 *

    1.0507         0    0.9669         0
         0    1.0525    0.5386         0
         0         0    0.0010         0

Projection Matrix for Camera 2:
   1.0e+04 *

    0.1056    0.0001    0.0953   -6.2495
    0.0005    0.1047    0.0537    0.0165
    0.0000    0.0000    0.0001    0.0000




the pose yaml

%YAML:1.0
---
camera_name: m_pose
rotation_matrix:
   rows: 3
   cols: 3
   data: [ 1.0000, 0.0000, 0.0000,
           0.0114, 1.0000, 0.0013,
           -0.0013, -0.0114, 1.0000 ]
translation_matrix:
   rows: 3
   cols: 1
   data: [ -0.0598172, 0.0001399, 0.0000350 ]  # Converted from mm to m

essential_matrix:
  rows: 3
  cols: 3
  data: [ -0.0000016, -0.0000350, 0.0001399,
          -0.0006489, 0.0000006, 0.0598137,
          -0.0002168, -0.0598170, -0.0000018 ]
fundamental_matrix:
  rows: 3
  cols: 3
  data: [ -0.0000, -0.0000, 0.0002,
           -0.0000, 0.0000, 0.0577,
           0.0001, -0.0568, -0.3288 ]


the left yaml

%YAML:1.0
---
camera_name: m_left
image_width: 1920
image_height: 1080
camera_matrix:
  rows: 3
  cols: 3
  data: [ 1.0507460000000001e+03, 0., 9.6688520000000005e+02,
           0., 1.0525362000000000e+03, 5.3855269999999996e+02,
           0., 0., 1. ]
distortion_coefficients:
  rows: 1
  cols: 4
  data: [ 2.55e-02, -3.16e-02, 0., 0. ]
distortion_model: plumb_bob
rectification_matrix:
  rows: 3
  cols: 3
  data: [ 1., 0., 0.,
          0., 1., 0.,
          0., 0., 1. ]
projection_matrix:
  rows: 3
  cols: 4
  data: [ 1.0507460000000001e+03, 0., 9.6688520000000005e+02, 0.,
          0., 1.0525362000000000e+03, 5.3855269999999996e+02, 0.,
          0., 0., 1., 0. ]
local_transform:
  rows: 3
  cols: 4
  data: [ 0., 0., 1., 0., -1., 0., 0., 0., 0., -1., 0., 0. ]
essential_matrix:
  rows: 3
  cols: 3
  data: [ -0.0000016, -0.0000350, 0.0001399,
          -0.0006489, 0.0000006, 0.0598137,
          -0.0002168, -0.0598170, -0.0000018 ]
fundamental_matrix:
  rows: 3
  cols: 3
  data: [ -0.0000, -0.0000, 0.0002,
          -0.0000, 0.0000, 0.0577,
          0.0001, -0.0568, -0.3288 ]