Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
detect_window.h File Reference
#include "inttypes.h"
+ Include dependency graph for detect_window.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MODE_DARK   0
 
#define MODE_BRIGHT   1
 

Functions

void detect_window_init (void)
 
struct image_tdetect_window (struct image_t *img, uint8_t camera_id)
 
uint16_t detect_window_sizes (uint8_t *in, uint32_t image_width, uint32_t image_height, uint16_t *coordinate, uint32_t *integral_image, uint8_t MODE)
 
uint16_t detect_window_one_size (uint8_t *in, uint32_t image_width, uint32_t image_height, uint16_t *coordinate, uint16_t *size, uint8_t calculate_integral_image, uint32_t *integral_image, uint8_t MODE)
 
uint16_t detect_escape (uint8_t *in, uint32_t image_width, uint32_t image_height, uint16_t *escape_coordinate, uint32_t *integral_image, uint8_t n_cells)
 
void get_integral_image (uint8_t *in, uint32_t image_width, uint32_t image_height, uint32_t *integral_image)
 
uint32_t get_sum_disparities (uint16_t min_x, uint16_t min_y, uint16_t max_x, uint16_t max_y, uint32_t *integral_image, uint32_t image_width, uint32_t image_height)
 
uint32_t get_avg_disparity (uint16_t min_x, uint16_t min_y, uint16_t max_x, uint16_t max_y, uint32_t *integral_image, uint32_t image_width, uint32_t image_height)
 
uint16_t get_window_response (uint16_t x, uint16_t y, uint16_t feature_size, uint16_t border, uint32_t *integral_image, uint16_t image_width, uint16_t image_height, uint16_t px_inner, uint16_t px_border, uint8_t MODE)
 
uint16_t get_border_response (uint16_t x, uint16_t y, uint16_t feature_size, uint16_t window_size, uint16_t border_size, uint32_t *integral_image, uint16_t image_width, uint16_t image_height, uint16_t px_inner, uint16_t px_outer)
 
void filter_bad_pixels (uint8_t *in, uint32_t image_width, uint32_t image_height)
 
void transform_illuminance_image (uint8_t *in, uint8_t *out, uint32_t image_width, uint32_t image_height, uint8_t n_bits, uint8_t bright_win)
 

Detailed Description

Detect a bright region surrounded by dark or viceversa - sometimes this corresponds to a window.

Definition in file detect_window.h.

Macro Definition Documentation

◆ MODE_BRIGHT

#define MODE_BRIGHT   1

Definition at line 33 of file detect_window.h.

◆ MODE_DARK

#define MODE_DARK   0

Definition at line 32 of file detect_window.h.

Function Documentation

◆ detect_escape()

uint16_t detect_escape ( uint8_t in,
uint32_t  image_width,
uint32_t  image_height,
uint16_t escape_coordinate,
uint32_t integral_image,
uint8_t  n_cells 
)

Definition at line 172 of file detect_window.c.

References c(), and get_avg_disparity().

+ Here is the call graph for this function:

◆ detect_window()

struct image_t* detect_window ( struct image_t img,
uint8_t  camera_id 
)

Definition at line 48 of file detect_window.c.

References image_t::buf, detect_window_sizes(), image_t::h, image_create(), image_free(), IMAGE_GRAYSCALE, image_to_grayscale(), MODE_BRIGHT, and image_t::w.

Referenced by detect_window_init().

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

◆ detect_window_init()

void detect_window_init ( void  )

Definition at line 39 of file detect_window.c.

References cv_add_to_device(), detect_window(), and DETECT_WINDOW_FPS.

+ Here is the call graph for this function:

◆ detect_window_one_size()

uint16_t detect_window_one_size ( uint8_t in,
uint32_t  image_width,
uint32_t  image_height,
uint16_t coordinate,
uint16_t size,
uint8_t  calculate_integral_image,
uint32_t integral_image,
uint8_t  MODE 
)

Definition at line 100 of file detect_window.c.

References get_border_response(), get_integral_image(), get_window_response(), MODE_DARK, and RES.

Referenced by detect_window_sizes().

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

◆ detect_window_sizes()

uint16_t detect_window_sizes ( uint8_t in,
uint32_t  image_width,
uint32_t  image_height,
uint16_t coordinate,
uint32_t integral_image,
uint8_t  MODE 
)

Definition at line 69 of file detect_window.c.

References detect_window_one_size(), N_WINDOW_SIZES, and s.

Referenced by cv_window_func(), and detect_window().

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

◆ filter_bad_pixels()

void filter_bad_pixels ( uint8_t in,
uint32_t  image_width,
uint32_t  image_height 
)

Definition at line 320 of file detect_window.c.

◆ get_avg_disparity()

uint32_t get_avg_disparity ( uint16_t  min_x,
uint16_t  min_y,
uint16_t  max_x,
uint16_t  max_y,
uint32_t integral_image,
uint32_t  image_width,
uint32_t  image_height 
)

Definition at line 237 of file detect_window.c.

References h(), RES, and image_t::w.

Referenced by detect_escape().

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

◆ get_border_response()

uint16_t get_border_response ( uint16_t  x,
uint16_t  y,
uint16_t  feature_size,
uint16_t  window_size,
uint16_t  border_size,
uint32_t integral_image,
uint16_t  image_width,
uint16_t  image_height,
uint16_t  px_inner,
uint16_t  px_outer 
)

Definition at line 285 of file detect_window.c.

References get_sum_disparities(), and RES.

Referenced by detect_window_one_size().

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

◆ get_integral_image()

void get_integral_image ( uint8_t in,
uint32_t  image_width,
uint32_t  image_height,
uint32_t integral_image 
)

Definition at line 206 of file detect_window.c.

Referenced by detect_window_one_size().

+ Here is the caller graph for this function:

◆ get_sum_disparities()

uint32_t get_sum_disparities ( uint16_t  min_x,
uint16_t  min_y,
uint16_t  max_x,
uint16_t  max_y,
uint32_t integral_image,
uint32_t  image_width,
uint32_t  image_height 
)

Definition at line 225 of file detect_window.c.

Referenced by get_border_response(), and get_window_response().

+ Here is the caller graph for this function:

◆ get_window_response()

uint16_t get_window_response ( uint16_t  x,
uint16_t  y,
uint16_t  feature_size,
uint16_t  border,
uint32_t integral_image,
uint16_t  image_width,
uint16_t  image_height,
uint16_t  px_inner,
uint16_t  px_border,
uint8_t  MODE 
)

Definition at line 256 of file detect_window.c.

References get_sum_disparities(), MODE_DARK, and RES.

Referenced by detect_window_one_size().

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

◆ transform_illuminance_image()

void transform_illuminance_image ( uint8_t in,
uint8_t out,
uint32_t  image_width,
uint32_t  image_height,
uint8_t  n_bits,
uint8_t  bright_win 
)

Definition at line 333 of file detect_window.c.