Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/pano_unwrap/pano_unwrap.h"
#include "state.h"
#include "modules/computer_vision/cv.h"
#include <stdio.h>
Go to the source code of this file.
Data Structures | |
struct | LUT_t |
Macros | |
#define | PANO_UNWRAP_CAMERA bottom_camera |
#define | PANO_UNWRAP_CENTER_X 0.50 |
#define | PANO_UNWRAP_CENTER_Y 0.50 |
#define | PANO_UNWRAP_RADIUS_BOTTOM 0.20 |
#define | PANO_UNWRAP_RADIUS_TOP 0.30 |
#define | PANO_UNWRAP_FORWARD_DIRECTION 270.0 |
#define | PANO_UNWRAP_FLIP_HORIZONTAL FALSE |
#define | PANO_UNWRAP_VERTICAL_RESOLUTION 0.18 |
#define | PANO_UNWRAP_DEROTATE_ATTITUDE FALSE |
#define | PANO_UNWRAP_WIDTH 640 |
#define | PANO_UNWRAP_HEIGHT 0 |
#define | PANO_UNWRAP_OVERWRITE_VIDEO_THREAD TRUE |
#define | PANO_UNWRAP_FPS 0 |
#define | PIXEL_U(img, x, y) ( ((uint8_t*)((img)->buf))[4*(int)((x)/2) + 2*(y)*(img)->w] ) |
#define | PIXEL_V(img, x, y) ( ((uint8_t*)((img)->buf))[4*(int)((x)/2) + 2*(y)*(img)->w + 2] ) |
#define | PIXEL_Y(img, x, y) ( ((uint8_t*)((img)->buf))[2*(x) + 1 + 2*(y)*(img)->w] ) |
#define | RED_Y 76 |
#define | RED_U 84 |
#define | RED_V 255 |
#define | GREEN_Y 149 |
#define | GREEN_U 43 |
#define | GREEN_V 21 |
#define | BLUE_Y 29 |
#define | BLUE_U 255 |
#define | BLUE_V 107 |
Functions | |
static void | set_output_image_size (void) |
static void | update_LUT (const struct image_t *img) |
static void | unwrap_LUT (struct image_t *img_raw, struct image_t *img) |
static struct image_t * | camera_cb (struct image_t *img, uint8_t camera_id) |
void | pano_unwrap_init () |
Variables | |
struct pano_unwrap_t | pano_unwrap |
struct image_t | pano_unwrapped_image |
Unwrapped panoramic image. More... | |
static struct LUT_t | LUT |
Definition in file pano_unwrap.c.
struct LUT_t |
Definition at line 115 of file pano_unwrap.c.
Data Fields | ||
---|---|---|
struct FloatVect2 * | dphi | |
struct FloatVect2 * | dtheta | |
struct pano_unwrap_t | settings | |
uint16_t * | x | |
uint16_t * | y |
#define BLUE_U 255 |
Definition at line 112 of file pano_unwrap.c.
#define BLUE_V 107 |
Definition at line 113 of file pano_unwrap.c.
#define BLUE_Y 29 |
Definition at line 111 of file pano_unwrap.c.
#define GREEN_U 43 |
Definition at line 109 of file pano_unwrap.c.
#define GREEN_V 21 |
Definition at line 110 of file pano_unwrap.c.
#define GREEN_Y 149 |
Definition at line 108 of file pano_unwrap.c.
#define PANO_UNWRAP_CAMERA bottom_camera |
Definition at line 34 of file pano_unwrap.c.
#define PANO_UNWRAP_CENTER_X 0.50 |
Definition at line 38 of file pano_unwrap.c.
#define PANO_UNWRAP_CENTER_Y 0.50 |
Definition at line 41 of file pano_unwrap.c.
#define PANO_UNWRAP_DEROTATE_ATTITUDE FALSE |
Definition at line 60 of file pano_unwrap.c.
#define PANO_UNWRAP_FLIP_HORIZONTAL FALSE |
Definition at line 53 of file pano_unwrap.c.
#define PANO_UNWRAP_FORWARD_DIRECTION 270.0 |
Definition at line 50 of file pano_unwrap.c.
#define PANO_UNWRAP_FPS 0 |
Definition at line 75 of file pano_unwrap.c.
#define PANO_UNWRAP_HEIGHT 0 |
Definition at line 67 of file pano_unwrap.c.
#define PANO_UNWRAP_OVERWRITE_VIDEO_THREAD TRUE |
Definition at line 71 of file pano_unwrap.c.
#define PANO_UNWRAP_RADIUS_BOTTOM 0.20 |
Definition at line 44 of file pano_unwrap.c.
#define PANO_UNWRAP_RADIUS_TOP 0.30 |
Definition at line 47 of file pano_unwrap.c.
#define PANO_UNWRAP_VERTICAL_RESOLUTION 0.18 |
Definition at line 57 of file pano_unwrap.c.
#define PANO_UNWRAP_WIDTH 640 |
Definition at line 64 of file pano_unwrap.c.
#define PIXEL_U | ( | img, | |
x, | |||
y | |||
) | ( ((uint8_t*)((img)->buf))[4*(int)((x)/2) + 2*(y)*(img)->w] ) |
Definition at line 101 of file pano_unwrap.c.
#define PIXEL_V | ( | img, | |
x, | |||
y | |||
) | ( ((uint8_t*)((img)->buf))[4*(int)((x)/2) + 2*(y)*(img)->w + 2] ) |
Definition at line 102 of file pano_unwrap.c.
#define PIXEL_Y | ( | img, | |
x, | |||
y | |||
) | ( ((uint8_t*)((img)->buf))[2*(x) + 1 + 2*(y)*(img)->w] ) |
Definition at line 103 of file pano_unwrap.c.
#define RED_U 84 |
Definition at line 106 of file pano_unwrap.c.
#define RED_V 255 |
Definition at line 107 of file pano_unwrap.c.
#define RED_Y 76 |
Definition at line 105 of file pano_unwrap.c.
Definition at line 303 of file pano_unwrap.c.
References pano_unwrap_t::overwrite_video_thread, pano_unwrap, pano_unwrapped_image, image_t::pprz_ts, set_output_image_size(), image_t::ts, unwrap_LUT(), and update_LUT().
Referenced by pano_unwrap_init().
void pano_unwrap_init | ( | void | ) |
Definition at line 313 of file pano_unwrap.c.
References camera_cb(), cv_add_to_device(), image_create(), IMAGE_YUV422, PANO_UNWRAP_CAMERA, PANO_UNWRAP_FPS, pano_unwrapped_image, and set_output_image_size().
|
static |
Definition at line 132 of file pano_unwrap.c.
References image_t::h, pano_unwrap_t::height, image_create(), image_free(), IMAGE_YUV422, pano_unwrap, pano_unwrapped_image, pano_unwrap_t::radius_bottom, pano_unwrap_t::radius_top, pano_unwrap_t::vertical_resolution, image_t::w, and pano_unwrap_t::width.
Referenced by camera_cb(), and pano_unwrap_init().
Definition at line 230 of file pano_unwrap.c.
References BLUE_U, BLUE_V, BLUE_Y, pano_unwrap_t::center, pano_unwrap_t::derotate_attitude, LUT_t::dphi, LUT_t::dtheta, GREEN_U, GREEN_V, GREEN_Y, image_t::h, pano_unwrap_t::height, LUT, MAT33_ELMT, pano_unwrap, PIXEL_U, PIXEL_V, PIXEL_Y, RED_U, RED_V, RED_Y, pano_unwrap_t::show_calibration, stateGetNedToBodyRMat_f(), pano_unwrap_t::vertical_resolution, image_t::w, pano_unwrap_t::width, FloatVect2::x, LUT_t::x, FloatVect2::y, and LUT_t::y.
Referenced by camera_cb().
|
static |
Definition at line 153 of file pano_unwrap.c.
References pano_unwrap_t::center, LUT_t::dphi, LUT_t::dtheta, pano_unwrap_t::flip_horizontal, pano_unwrap_t::forward_direction, image_t::h, pano_unwrap_t::height, LUT, pano_unwrap, pano_unwrapped_image, pano_unwrap_t::radius_bottom, pano_unwrap_t::radius_top, s, LUT_t::settings, image_t::w, pano_unwrap_t::width, FloatVect2::x, LUT_t::x, FloatVect2::y, and LUT_t::y.
Referenced by camera_cb().
|
static |
Definition at line 1 of file pano_unwrap.c.
Referenced by unwrap_LUT(), and update_LUT().
struct pano_unwrap_t pano_unwrap |
Definition at line 1 of file pano_unwrap.c.
Referenced by camera_cb(), set_output_image_size(), unwrap_LUT(), and update_LUT().
struct image_t pano_unwrapped_image |
Unwrapped panoramic image.
Definition at line 1 of file pano_unwrap.c.
Referenced by camera_cb(), pano_unwrap_init(), set_output_image_size(), and update_LUT().