# Calibrating Extrinsics and DFS

Source: https://forum.modalai.com/topic/3350/calibrating-extrinsics-and-dfs
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2024-04-23 20:39:18 UTC by Taylor Presley
Replies: 1 · Views: 622

## Taylor Presley · 2024-04-23 20:39:18 UTC

Re: [VOXL2 Stereo Calibrate ERROR](/topic/2857/voxl2-stereo-calibrate-error)

Hey everyone,

I'm recalibrating the Sentinel stereo cameras because it was not publishing DFS (even though the server is running).

Upon trying to recalibrate, I'm having a similar issue to @AP123 post VOXL2 Stereo Calibrate ERROR.

All comments and recommendations are welcome!

Thanks,
Taylor

```
voxl2:/$ voxl-calibrate-camera stereo_front -s 6x9 -l 0.02
Please open voxl-portal in a web browser to view the camera calibrator overlay stream
Running Calibration...
Calibrating Left Camera
Running Calibration...
Running Calibration...
Running Calibration...
Matrix
[548.5382302680308, 0, 285.3415669716975;
 0, 547.0025566893958, 235.3038337229943;
 0, 0, 1]
Distortion
[-0.2424323763061194;
 0.1269460760379177;
 -0.004142521667776578;
 0.002519660999314344;
 0]
distortion_model: plumb_bob
Re-projection error reported by calibrateCamera: 0.484597
Calibration Succeded!
Calibrating Right Camera
Running Calibration...
Running Calibration...
Matrix
[543.062224502327, 0, 301.719040785862;
 0, 542.0482517180614, 245.9552291727296;
 0, 0, 1]
Distortion
[-0.236760512593058;
 0.1416137307136648;
 -0.002976128262009898;
 0.0009654060730829055;
 0]
distortion_model: plumb_bob
Re-projection error reported by calibrateCamera: 0.528407
Calibration Succeded!
Calibrating Extrinsics
7 frames will be processed
R
[0.999257189294548, -0.03760915797903753, -0.008403622984628861;
 0.03775986819471018, 0.9991144801232372, 0.01855930930804526;
 0.007698181413691082, -0.01886284295066306, 0.999792444039632]
T
[-0.07616424149746555;
 -0.001485191500948734;
 -0.01076830039005899]
Re-projection error reported by stereoCalibrate: 1.421312
Detected horizontal stereo pair
Distance between cameras: 0.0762
Extrinsics Calibration Failed
exceeded allowable max reprojection error:  0.5

Saved intrinsics to: /data/modalai/opencv_stereo_front_intrinsics.yml
Running Calibration...
Exiting Cleanly

```
Additional details for reference:
```
voxl2:/$ voxl-inspect-services
Scanning services...

 Service Name             |  Enabled  |   Running   |  CPU Usage
-------------------------------------------------------------------
 docker-autorun           | Disabled  | Not Running |  
 modallink-relink         | Disabled  | Not Running |  
 voxl-camera-server       |  Enabled  |   Running   |    97.7%
 voxl-cpu-monitor         |  Enabled  |   Running   |     0.4%
 voxl-dfs-server          |  Enabled  |   Running   |    18.2%
 voxl-feature-tracker     | Disabled  | Not Running |  
 voxl-flow-server         | Disabled  | Not Running |  
 voxl-imu-server          |  Enabled  |   Running   |     4.4%
 voxl-lepton-server       | Disabled  | Not Running |  
 voxl-mavcam-manager      |  Enabled  |   Running   |     0.0%
 voxl-mavlink-server      |  Enabled  |   Running   |     2.7%
 voxl-modem               | Disabled  | Not Running |  
 voxl-neopixel-manager    | Disabled  | Not Running |  
 voxl-open-vins-server    | Disabled  | Not Running |  
 voxl-portal              |  Enabled  |   Running   |    31.8%
 voxl-px4-imu-server      | Disabled  | Not Running |  
 voxl-px4                 |  Enabled  |   Running   |    29.5%
 voxl-qvio-server         |  Enabled  |   Running   |    13.5%
 voxl-rangefinder-server  | Disabled  | Not Running |  
 voxl-remote-id           | Disabled  | Not Running |  
 voxl-softap              |  Enabled  |  Completed  |  
 voxl-static-ip           | Disabled  | Not Running |  
 voxl-streamer            |  Enabled  |   Running   |     0.0%
 voxl-tag-detector        | Disabled  | Not Running |  
 voxl-tflite-server       | Disabled  | Not Running |  
 voxl-time-sync           | Disabled  | Not Running |  
 voxl-uvc-server          | Disabled  | Not Running |  
 voxl-vision-hub          |  Enabled  |   Running   |     4.1%
 voxl-wait-for-fs         |  Enabled  |  Completed  |  

```
```
mdr@mdr-System-Product-Name:~$ adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully

                                                         ▂▂▂▂▂▂▂▂▂▂▂▂▂          
                                                    ▂▄▆▆██▛▀▀▀▀▀▀▀▀▜████▆▆▄▂    
 ███╗   ███╗ ██████╗ ██████╗  █████╗ ██╗         ▗▆████▀▔             ▔▔▀▀▀▀▚▄  
 ████╗ ████║██╔═══██╗██╔══██╗██╔══██╗██║       ▗▟████▀     ▗██▖    ▐█   ▝▀▆▄▄▄  
 ██╔████╔██║██║   ██║██║  ██║███████║██║      ▟████▀      ▗█▘▝█▖   ▐█       ▜█▀ 
 ██║╚██╔╝██║██║   ██║██║  ██║██╔══██║██║      █▌ ▐█▌     ▗█▘  ▝█▖  ▐█       ▐▄  
 ██║ ╚═╝ ██║╚██████╔╝██████╔╝██║  ██║███████╗  ▀████    ▗█▘    ▝█▖ ▐█     ▂▄███ 
 ╚═╝     ╚═╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝    ▀▀██▄▄                ▂▆███▀   
                                                     ▀▀██▄▄ ▀▀▆▄▄▄▄▆██▀▀▀▘      

--------------------------------------------------------------------------------
system-image: 1.7.4-M0054-14.1a-perf
kernel:       #1 SMP PREEMPT Fri Feb 9 21:59:24 UTC 2024 4.19.125
--------------------------------------------------------------------------------
hw platform:  M0054
mach.var:     1.0
--------------------------------------------------------------------------------
voxl-suite:   1.1.3-1

```

## Reply by Guest · 2024-04-25 14:52:10 UTC

@Taylor-Presley 

Hey Taylor, happy to try and help!

On calibrating we try to keep the reprojection error as low as possible. You're getting an error of 1.42 which is almost triple what we'd like at worst. I'd recommend trying to recalibrate in different lighting conditions with as flat of a checkerboard as you can make. Even small imperfections here can lead to bad calibration.

Hope this helps!

Thomas
