Files
paparazzi/conf/modules/cv_undistort_image.xml
Gautier Hattenberger e4d9e10492 [modules][ocaml] implement module dependency (#2669)
- support depends, conflicts and provides nodes, all under a 'dep' node
- autoload are kept for now and are not moved yet
- modules are updated for new dep format
- it is now required that module's name and filename are the same
2021-03-16 17:47:34 +01:00

51 lines
3.0 KiB
XML

<!DOCTYPE module SYSTEM "module.dtd">
<module name="cv_undistort_image" dir="computer_vision">
<doc>
<description>
Undistortion a fisheyelens distortion of a whole image.
Note that this is quite a slow process, so it is not really advisable to use this in a vision pipeline leading to control.
However, it can be used to find the right undistortion parameter k, and shows that the undistortion functions work.
The code also can be used to convert image coordinates from distorted fisheye lenses to undistorted coordinates and back.
It takes into account the camera calibration matrix and the distortion of the specific lens.
</description>
<define name="UNDISTORT_MIN_X_NORMALIZED" value="-2.0" description="Minimal normalized x-coordinate to be used for the undistortion"/>
<define name="UNDISTORT_MAX_X_NORMALIZED" value="2.0" description="Maximal normalized x-coordinate to be used for the undistortion"/>
<define name="UNDISTORT_FPS" value="0" description="The (maximum) frequency to run the calculations at. If zero, it will max out at the camera frame rate"/>
<define name="UNDISTORT_CAMERA" value="bottom_camera|front_camera" description="The V4L2 camera device that is used for the calculations"/>
<define name="UNDISTORT_CENTER_RATIO" value="1.0" description="If smaller than 1 only generate pixels for the center_ratio times the min_x to max_x interval. This makes undistortion quicker, but for a smaller FOV."/>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="Undistort">
<dl_setting var="min_x_normalized" min="-4.0" step="0.1" max="0.0" shortname="min_x_n" param="UNDISTORT_MIN_X_NORMALIZED"/>
<dl_setting var="max_x_normalized" min="0.1" step="0.1" max="4.0" shortname="max_x_n" param="UNDISTORT_MAX_X_NORMALIZED"/>
<dl_setting var="camera_intrinsics.Dhane_k" min="1.0" step="0.01" max="2.5" shortname="dhane_k" param="UNDISTORT_DHANE_K"/>
<dl_setting var="center_ratio" min="0.05" step="0.01" max="1.0" shortname="center_ratio" param="UNDISTORT_CENTER_RATIO"/>
<dl_setting var="camera_intrinsics.focal_x" min="0.0" step="0.05" max="1024.0" shortname="focal_x" param="UNDISTORT_FOCAL_X"/>
<dl_setting var="camera_intrinsics.center_x" min="0.0" step="0.05" max="1024.0" shortname="center_x" param="UNDISTORT_CENTER_X"/>
<dl_setting var="camera_intrinsics.focal_y" min="0.0" step="0.05" max="1024.0" shortname="focal_y" param="UNDISTORT_FOCAL_Y"/>
<dl_setting var="camera_intrinsics.center_y" min="0.0" step="0.05" max="1024.0" shortname="center_y" param="UNDISTORT_CENTER_Y"/>
</dl_settings>
</dl_settings>
</settings>
<dep>
<depends>video_thread</depends>
</dep>
<header>
<file name="undistort_image.h"/>
</header>
<init fun="undistort_image_init()"/>
<makefile target="ap|nps">
<file name="undistort_image.c"/>
<file name="image.c" dir="modules/computer_vision/lib/vision"/>
<file name="undistortion.c" dir="modules/computer_vision/lib/vision"/>
</makefile>
</module>