pano_unwrap

Unwrap images taken through a panoramic lens @image html images/airborne/modules/pano_unwrap/pano_unwrap.jpg “Left: AR.Drone 2.0 with Kogeto Dot 360 panoramic lens on bottom camera. Middle: raw image and region of interest (blue). Right: unwrapped image.” This module unwraps images taken through a panoramic lens. The unwrapped image is returned to the video thread or available as `pano_unwrapped_image`. The user should specify the region of interest (the part of the raw image that should be unwrapped) by setting the following values: - The center of the lens (`center_x` and `center_y`) - The radii of the top and bottom of the ROI (`radius_bottom` and `radius_top`) - The body +x direction in the raw image (`forward_direction`) - The body +y direction in the raw image (`flip_horizontal`) The region of interest can be shown by setting `show_calibration` to TRUE and `overwrite_video` to FALSE. The size of the output image can be set with `width` and `height`. The height of the image can also be set to zero, in which case it is determined automatically from the `vertical_resolution`. Optionally, the image can be derotated to cancel the pitch and roll movements of the drone. This requires a correct setting of the `vertical_resolution`. Reasonable values can be found by looking at the unwrapped and derotated image and adjusting the vertical resolution until the environment no longer appears to move during pitch and roll motions. The following assumptions are made: - The vertical resolution is constant throughout the region of interest. - Pitch and roll angles are small (for derotation). @image html images/airborne/modules/pano_unwrap/unwrapped_derotated.png “Derotation (shown for large roll angle).”

Defines

Name

Value

Description

PANO_UNWRAP_CAMERA

front_camera|bottom_camera (default)

Camera to use

PANO_UNWRAP_CENTER_X

0.50

Center of lens in raw image [fraction of raw image width]

PANO_UNWRAP_CENTER_Y

0.50

Center of lens in raw image [fraction of raw image height]

PANO_UNWRAP_RADIUS_BOTTOM

0.20

Distance from the lens center to the bottom of the region of interest [fraction of raw image height]

PANO_UNWRAP_RADIUS_TOP

0.30

Distance from lens center to the top of the region of interest [fraction of raw image height]

PANO_UNWRAP_FORWARD_DIRECTION

270.0

Forward direction in raw image measured counterclockwise from right [deg]

PANO_UNWRAP_FLIP_HORIZONTAL

TRUE|FALSE (default)

Flip output image horizontally

PANO_UNWRAP_VERTICAL_RESOLUTION

0.18

Vertical resolution of region of interest [fraction of raw image height/rad]

PANO_UNWRAP_DEROTATE_ATTITUDE

TRUE|FALSE (default)

Derotate the image, i.e. keep the panorama aligned with the horizon

PANO_UNWRAP_WIDTH

640

Width of the unwrapped image [px]

PANO_UNWRAP_HEIGHT

0

Height of the unwrapped image [px]. Set to 0 to determine automatically.

PANO_UNWRAP_OVERWRITE_VIDEO_THREAD

TRUE (default)|FALSE

Write unwrapped image to the video thread

PANO_UNWRAP_FPS

0

Maximum FPS (0: unlimited)

Depends

  • video_thread