Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/computer_vision/cv_blob_locator.h"
#include "modules/computer_vision/cv.h"
#include "modules/computer_vision/blob/blob_finder.h"
#include "modules/computer_vision/blob/imavmarker.h"
#include "modules/computer_vision/detect_window.h"
#include "modules/computer_vision/cv_georeference.h"
#include "generated/flight_plan.h"
#include <stdio.h>
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_t * | cv_marker_func (struct image_t *img, uint8_t camera_id) |
struct image_t * | cv_window_func (struct image_t *img, uint8_t camera_id) |
struct image_t * | cv_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 |
Definition in file cv_blob_locator.c.
#define BLOB_LOCATOR_FPS 0 |
Default FPS (zero means run at camera fps)
Definition at line 33 of file cv_blob_locator.c.
#define Img | ( | X, | |
Y | |||
) | (((uint8_t*)img->buf)[(Y)*img->w*2+(X)*2]) |
Definition at line 79 of file cv_blob_locator.c.
void cv_blob_locator_event | ( | void | ) |
Definition at line 264 of file cv_blob_locator.c.
References blob_enabled, blob_locator, cv_blob_locator_type, camera_frame_t::f, FALSE, geofilter_length, georeference_filter(), georeference_project(), camera_frame_t::h, marker_enabled, camera_frame_t::px, camera_frame_t::py, camera_frame_t::w, and window_enabled.
Definition at line 131 of file cv_blob_locator.c.
References blob_enabled, blob_locator, image_t::buf, c(), color_cb_max, color_cb_min, color_cr_max, color_cr_min, color_lum_max, color_lum_min, image_label_t::filter, image_t::h, image_create(), image_free(), IMAGE_GRADIENT, image_labeling(), p, image_label_t::pixel_cnt, image_filter_t::u_max, image_filter_t::u_min, image_filter_t::v_max, image_filter_t::v_min, image_t::w, image_label_t::x_sum, image_filter_t::y_max, image_filter_t::y_min, and image_label_t::y_sum.
Referenced by cv_blob_locator_init().
void cv_blob_locator_init | ( | void | ) |
Definition at line 230 of file cv_blob_locator.c.
References BLOB_LOCATOR_FPS, color_cb_max, color_cb_min, color_cr_max, color_cr_min, color_lum_max, color_lum_min, cv_add_to_device(), cv_blob_locator_func(), cv_blob_locator_reset, cv_marker_func(), cv_window_func(), and georeference_init().
void cv_blob_locator_periodic | ( | void | ) |
Definition at line 257 of file cv_blob_locator.c.
void cv_blob_locator_start | ( | void | ) |
Definition at line 316 of file cv_blob_locator.c.
References georeference_init().
void cv_blob_locator_stop | ( | void | ) |
Definition at line 321 of file cv_blob_locator.c.
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().
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().
void start_vision | ( | void | ) |
Definition at line 326 of file cv_blob_locator.c.
References cv_blob_locator_type, georeference_init(), and record_video.
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.
void stop_vision | ( | void | ) |
Definition at line 338 of file cv_blob_locator.c.
References cv_blob_locator_type, georeference_init(), and record_video.
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().
volatile uint32_t blob_locator = 0 |
Definition at line 54 of file cv_blob_locator.c.
Referenced by cv_blob_locator_event(), cv_blob_locator_func(), cv_marker_func(), and cv_window_func().
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().
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().
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().
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().
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().
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().
uint8_t cv_blob_locator_reset |
Definition at line 47 of file cv_blob_locator.c.
Referenced by cv_blob_locator_init().
uint8_t cv_blob_locator_type |
Definition at line 48 of file cv_blob_locator.c.
Referenced by cv_blob_locator_event(), start_vision(), start_vision_land(), and stop_vision().
int geofilter_length = 5 |
Definition at line 50 of file cv_blob_locator.c.
Referenced by cv_blob_locator_event().
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().
int marker_size = 18 |
Definition at line 51 of file cv_blob_locator.c.
Referenced by cv_marker_func().
int record_video = 0 |
Definition at line 52 of file cv_blob_locator.c.
Referenced by start_vision(), start_vision_land(), and stop_vision().
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().