Latest code for motion componsation

41 views
Skip to first unread message

Chathushka Ranasinghe

unread,
Mar 10, 2025, 6:12:22 AMMar 10
to dv-users
Hi,

Is there any one who can provide the updated  sample code for Iimu-compensation and contrast-max-rotation (motion compensation). The current one in dv-processing sample files is not compatible with yaml calibration files.

Thanks in advance
Chathushka

Luca Longinotti

unread,
Mar 10, 2025, 9:42:33 AMMar 10
to dv-u...@googlegroups.com
YAML files are not officially supported.
dv-processing's Calibration classes support either XML files, generated by DV's calibration module, or JSON files.
You can see <camera/calibration_set.hpp> for the relevant code.
In theory, all that is needed to load .yml files is to change the extension that is checked in the "LoadFromFile()" function in the file above, line 59.
From a pure loading perspective, XML and YAML files in OpenCV can both be read and loaded.
But it is highly unlikely this will work, as our code then expects the various matrices and data points saved in that file to have specific names corresponding to what DV generates in its calibration module.
Your YAML file from some other source will almost certainly have a different internal naming scheme and so won't load properly.
If you have calibration files in different formats from other sources, your best best is to write a small conversion tool, loading your format and then writing out a dv-processing compatible JSON file, passing all the required calibration parameters:
-- 
Luca Longinotti (llongi)

Senior Software Engineer
iniVation AG - https://inivation.com/
A SynSense Group company

Chathushka Ranasinghe

unread,
Mar 11, 2025, 7:19:09 AMMar 11
to dv-users
Hi

I see. However in imu_compensation.cpp  file,  there are lot of mismatches wrt recent imu-camera calibration(https://gitlab.com/inivation/dv/dv-imu-cam-calibration/-/tree/master). The imu_compensation.cpp  still uses xml format calibration files( but contrast-maximization-depth.cpp uses json) and parameters like time_offset_cam_imu. , tranformarion_cam_imu is not in the calibration.json ( I tried renaming them several ways and checking the official documentation for further details but couldn't run successfully). 

If you can provide updated files if possible, it would be a great help

Best Regards
Chathushka 

Reply all
Reply to author
Forward
0 new messages