Error on running dfs_server. Cannot get Point Cloud



  • Hi!
    I want to get the point cloud from the stereo imagery using the voxl-dfs-server. I have calibrated the stereo camera using the instructions given here. The calibration procedure was successful and it generated the left.yaml, right.yaml and calibration_stereo.xml files. However, it did not generate the opencv_stereo_extrinsics.yml and opencv_stereo_intrinsics.yml files. I could not find anywhere on the docs any instructions to generate these files. So I had to write them myself taking information from ost.txt. Here are the two files that I wrote:

    1. opencv_stereo_extrinsics.yml
    %YAML:1.0
    R1: !!opencv-matrix
       rows: 3
       cols: 3
       dt: d
       data: [ 0.999731, -0.005262, -0.022599,
                0.005377, 0.999973, 0.005039,
                0.022572, -0.005159, 0.999732]
    P1: !!opencv-matrix
       rows: 3
       cols: 4
       dt: d
       data: [527.372271, 0.000000, 331.544373, 0.000000,
                0.000000, 527.372271, 240.925325, 0.000000,
                0.000000, 0.000000, 1.000000, 0.000000]
    R2: !!opencv-matrix
       rows: 3
       cols: 3
       dt: d
       data: [0.998424, 0.024289, -0.050596,
            -0.024547, 0.999689, -0.004480,
            0.050471, 0.005715, 0.998709]
    P2: !!opencv-matrix
       rows: 3
       cols: 4
       dt: d
       data: [527.372271, 0.000000, 331.544373, -42.405281,
            0.000000, 527.372271, 240.925325, 0.000000,
            0.000000, 0.000000, 1.000000, 0.000000]
    
    
    1. opencv_stereo_intrinsics.yml
    M1: !!opencv-matrix
       rows: 3
       cols: 3
       dt: d
       data: [488.682800, 0.000000, 321.505138,
            0.000000, 489.299446, 232.298091,
            0.000000, 0.000000, 1.000000]
    D1: !!opencv-matrix
       rows: 1
       cols: 5
       dt: d
       data: [-0.171999, 0.074949, 0.001013, -0.001734, 0.000000]
    M2: !!opencv-matrix
       rows: 3
       cols: 3
       dt: d
       data: [ 500.025405, 0.000000, 290.363517,
                0.000000, 500.227973, 248.074606,
                0.000000, 0.000000, 1.000000]
    D2: !!opencv-matrix
       rows: 1
       cols: 5
       dt: d
       data: [-0.194946, 0.140224, 0.001638, 0.000149, 0.000000]
    
    

    Then I pushed these files to the VOXL using ./push_stereo_cal_to_voxl.sh
    However, when I run the voxl-dfs-server on the VOXL I get the following output Screenshot from 2021-10-04 15-07-53.png
    I am suspicious of my .yml files that I generated. Do you have any working .yml files that I can use as template and change values for my system.
    Please let me know how can I debug this and get the point cloud from the stereo imagery with dfs-server.
    Output of voxl-version FYI: Screenshot from 2021-10-04 15-11-45.png

    Please let me know if any other information is needed. I'd appreciate any insight into solving this.

    Thanks
    Prasad


  • Dev Team

    Hi Prasad,

    I've seen the error that you talked about with the ungenerated once or twice and running the calibration procedure again properly generated the files.

    This is a sample stereo cal from my board (that has a few additional data fields from a soon to be released cal rework) that would serve as a good general idea of what the files should look like. The DFS algorithm is, however, very sensitive to inaccuracies and I'd strongly recommend trying to calibrate your cameras again, but if that doesn't work you can add your values to this format:

    yocto:/$ cat /data/modalai/opencv_stereo_extrinsics.yml 
    %YAML:1.0
    ---
    R: !!opencv-matrix
       rows: 3
       cols: 3
       dt: d
       data: [ 9.9965050025202740e-01, -5.6519379540328910e-04,
           2.6430245966411248e-02, 2.8842568739021546e-03,
           9.9613506820545850e-01, -8.7787282413751958e-02,
           -2.6278478041102546e-02, 8.7832832399280705e-02,
           9.9578854941426354e-01 ]
    T: !!opencv-matrix
       rows: 3
       cols: 1
       dt: d
       data: [ -7.9514399346537298e-02, -2.7245018421472277e-03,
           6.0288890076187220e-04 ]
    reprojection_error: 2.8997817600221831e-01
    calibration_time: "2021-09-30 22:52:56"
    yocto:/$ cat /data/modalai/opencv_stereo_intrinsics.yml     
    %YAML:1.0
    ---
    M1: !!opencv-matrix
       rows: 3
       cols: 3
       dt: d
       data: [ 4.9291881707143079e+02, 0., 3.0643471662712096e+02, 0.,
           4.9232152259255315e+02, 2.1697996372929907e+02, 0., 0., 1. ]
    D1: !!opencv-matrix
       rows: 5
       cols: 1
       dt: d
       data: [ -1.6984598364049669e-01, 6.0034285910162230e-02,
           -8.8644933037586781e-04, -4.1419313003228072e-04, 0. ]
    reprojection_error1: 1.9741562557305206e-01
    M2: !!opencv-matrix
       rows: 3
       cols: 3
       dt: d
       data: [ 4.9673975454370270e+02, 0., 3.1711708934220133e+02, 0.,
           4.9610254255552854e+02, 2.2876245199481119e+02, 0., 0., 1. ]
    D2: !!opencv-matrix
       rows: 5
       cols: 1
       dt: d
       data: [ -1.6758727319959599e-01, 5.4041564358266361e-02,
           -1.5695644102222835e-03, -5.8891426327232642e-04, 0. ]
    reprojection_error2: 3.1594418176162986e-01
    width: 640
    height: 480
    distortion_model: plumb_bob
    calibration_time: "2021-09-30 22:52:56"
    

Log in to reply