Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
undistort_image.c File Reference
Include dependency graph for undistort_image.c:

Go to the source code of this file.

Macros

#define UNDISTORT_FPS   0
 Default FPS (zero means run at camera fps).
#define UNDISTORT_MIN_X_NORMALIZED   -2.0f
 Minimal normalized coordinate that will be shown in the undistorted image.
#define UNDISTORT_MAX_X_NORMALIZED   2.0f
 Maximal normalized coordinate that will be shown in the undistorted image.
#define UNDISTORT_CENTER_RATIO   1.00f
 Maximal normalized coordinate that will be shown in the undistorted image.

Functions

static struct image_t * undistort_image_func (struct image_t *img, uint8_t camera_id)
void undistort_image_init (void)

Variables

float min_x_normalized
float max_x_normalized
float center_ratio
struct camera_intrinsics_t camera_intrinsics
struct video_listener * listener = NULL
static float K [9]

Macro Definition Documentation

◆ UNDISTORT_CENTER_RATIO

#define UNDISTORT_CENTER_RATIO   1.00f

Maximal normalized coordinate that will be shown in the undistorted image.

Definition at line 29 of file undistort_image.c.

Referenced by undistort_image_init().

◆ UNDISTORT_FPS

#define UNDISTORT_FPS   0

Default FPS (zero means run at camera fps).

Definition at line 14 of file undistort_image.c.

Referenced by undistort_image_init().

◆ UNDISTORT_MAX_X_NORMALIZED

#define UNDISTORT_MAX_X_NORMALIZED   2.0f

Maximal normalized coordinate that will be shown in the undistorted image.

Definition at line 24 of file undistort_image.c.

Referenced by undistort_image_init().

◆ UNDISTORT_MIN_X_NORMALIZED

#define UNDISTORT_MIN_X_NORMALIZED   -2.0f

Minimal normalized coordinate that will be shown in the undistorted image.

Definition at line 19 of file undistort_image.c.

Referenced by undistort_image_init().

Function Documentation

◆ undistort_image_func()

struct image_t * undistort_image_func ( struct image_t * img,
uint8_t camera_id )
static

Definition at line 46 of file undistort_image.c.

References image_t::buf, camera_intrinsics, center_ratio, dest, h(), image_t::h, image_copy(), image_create(), image_free(), IMAGE_YUV422, K, max_x_normalized, min_x_normalized, normalized_coords_to_distorted_pixels(), image_t::type, and image_t::w.

Referenced by undistort_image_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ undistort_image_init()

void undistort_image_init ( void )

Variable Documentation

◆ camera_intrinsics

struct camera_intrinsics_t camera_intrinsics

Definition at line 36 of file undistort_image.c.

Referenced by undistort_image_func(), and undistort_image_init().

◆ center_ratio

float center_ratio

Definition at line 35 of file undistort_image.c.

Referenced by undistort_image_func(), and undistort_image_init().

◆ K

◆ listener

struct video_listener* listener = NULL

Definition at line 38 of file undistort_image.c.

◆ max_x_normalized

float max_x_normalized

Definition at line 34 of file undistort_image.c.

Referenced by undistort_image_func(), and undistort_image_init().

◆ min_x_normalized

float min_x_normalized

Definition at line 33 of file undistort_image.c.

Referenced by undistort_image_func(), and undistort_image_init().