Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
cv_blob_locator.c File Reference
+ Include dependency graph for cv_blob_locator.c:

Go to the source code of this file.

Macros

#define BLOB_LOCATOR_FPS   0
 Default FPS (zero means run at camera fps) More...
 
#define Img(X, Y)   (((uint8_t*)img->buf)[(Y)*img->w*2+(X)*2])
 

Functions

struct image_tcv_marker_func (struct image_t *img, uint8_t camera_id)
 
struct image_tcv_window_func (struct image_t *img, uint8_t camera_id)
 
struct image_tcv_blob_locator_func (struct image_t *img, uint8_t camera_id)
 
void cv_blob_locator_init (void)
 
void cv_blob_locator_periodic (void)
 
void cv_blob_locator_event (void)
 
void cv_blob_locator_start (void)
 
void cv_blob_locator_stop (void)
 
void start_vision (void)
 
void start_vision_land (void)
 
void stop_vision (void)
 

Variables

uint8_t color_lum_min
 
uint8_t color_lum_max
 
uint8_t color_cb_min
 
uint8_t color_cb_max
 
uint8_t color_cr_min
 
uint8_t color_cr_max
 
uint8_t cv_blob_locator_reset
 
uint8_t cv_blob_locator_type
 
int geofilter_length = 5
 
int marker_size = 18
 
int record_video = 0
 
volatile uint32_t blob_locator = 0
 
volatile bool blob_enabled = false
 
volatile bool marker_enabled = false
 
volatile bool window_enabled = false
 

Detailed Description

Author
C. De Wagter Find a colored item and track its geo-location and update a waypoint to it

Definition in file cv_blob_locator.c.

Macro Definition Documentation

◆ BLOB_LOCATOR_FPS

#define BLOB_LOCATOR_FPS   0

Default FPS (zero means run at camera fps)

Definition at line 33 of file cv_blob_locator.c.

◆ Img

#define Img (   X,
 
)    (((uint8_t*)img->buf)[(Y)*img->w*2+(X)*2])

Definition at line 79 of file cv_blob_locator.c.

Function Documentation

◆ cv_blob_locator_event()

◆ cv_blob_locator_func()

◆ cv_blob_locator_init()

void cv_blob_locator_init ( void  )

◆ cv_blob_locator_periodic()

void cv_blob_locator_periodic ( void  )

Definition at line 257 of file cv_blob_locator.c.

◆ cv_blob_locator_start()

void cv_blob_locator_start ( void  )

Definition at line 316 of file cv_blob_locator.c.

References georeference_init().

+ Here is the call graph for this function:

◆ cv_blob_locator_stop()

void cv_blob_locator_stop ( void  )

Definition at line 321 of file cv_blob_locator.c.

◆ cv_marker_func()

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

Definition at line 62 of file cv_blob_locator.c.

References blob_locator, marker(), marker_enabled, marker_size, marker_deviation_t::x, and marker_deviation_t::y.

Referenced by cv_blob_locator_init().

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

◆ cv_window_func()

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

Definition at line 84 of file cv_blob_locator.c.

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

Referenced by cv_blob_locator_init().

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

◆ start_vision()

void start_vision ( void  )

Definition at line 326 of file cv_blob_locator.c.

References cv_blob_locator_type, georeference_init(), and record_video.

+ Here is the call graph for this function:

◆ start_vision_land()

void start_vision_land ( void  )

Definition at line 332 of file cv_blob_locator.c.

References cv_blob_locator_type, georeference_init(), and record_video.

+ Here is the call graph for this function:

◆ stop_vision()

void stop_vision ( void  )

Definition at line 338 of file cv_blob_locator.c.

References cv_blob_locator_type, georeference_init(), and record_video.

+ Here is the call graph for this function:

Variable Documentation

◆ blob_enabled

volatile bool blob_enabled = false

Definition at line 56 of file cv_blob_locator.c.

Referenced by cv_blob_locator_event(), and cv_blob_locator_func().

◆ blob_locator

volatile uint32_t blob_locator = 0

◆ color_cb_max

uint8_t color_cb_max

Definition at line 42 of file cv_blob_locator.c.

Referenced by cv_blob_locator_func(), and cv_blob_locator_init().

◆ color_cb_min

uint8_t color_cb_min

Definition at line 41 of file cv_blob_locator.c.

Referenced by cv_blob_locator_func(), and cv_blob_locator_init().

◆ color_cr_max

uint8_t color_cr_max

Definition at line 45 of file cv_blob_locator.c.

Referenced by cv_blob_locator_func(), and cv_blob_locator_init().

◆ color_cr_min

uint8_t color_cr_min

Definition at line 44 of file cv_blob_locator.c.

Referenced by cv_blob_locator_func(), and cv_blob_locator_init().

◆ color_lum_max

uint8_t color_lum_max

Definition at line 39 of file cv_blob_locator.c.

Referenced by cv_blob_locator_func(), and cv_blob_locator_init().

◆ color_lum_min

uint8_t color_lum_min

Definition at line 38 of file cv_blob_locator.c.

Referenced by cv_blob_locator_func(), and cv_blob_locator_init().

◆ cv_blob_locator_reset

uint8_t cv_blob_locator_reset

Definition at line 47 of file cv_blob_locator.c.

Referenced by cv_blob_locator_init().

◆ cv_blob_locator_type

uint8_t cv_blob_locator_type

◆ geofilter_length

int geofilter_length = 5

Definition at line 50 of file cv_blob_locator.c.

Referenced by cv_blob_locator_event().

◆ marker_enabled

volatile bool marker_enabled = false

Definition at line 57 of file cv_blob_locator.c.

Referenced by cv_blob_locator_event(), and cv_marker_func().

◆ marker_size

int marker_size = 18

Definition at line 51 of file cv_blob_locator.c.

Referenced by cv_marker_func().

◆ record_video

int record_video = 0

Definition at line 52 of file cv_blob_locator.c.

Referenced by start_vision(), start_vision_land(), and stop_vision().

◆ window_enabled

volatile bool window_enabled = false

Definition at line 58 of file cv_blob_locator.c.

Referenced by cv_blob_locator_event(), and cv_window_func().