39#define PRINT(string,...) fprintf(stderr, "[object_detector->%s()] " string,__FUNCTION__ , ##__VA_ARGS__)
40#if OBJECT_DETECTOR_VERBOSE
41#define VERBOSE_PRINT PRINT
43#define VERBOSE_PRINT(...)
48#ifndef COLOR_OBJECT_DETECTOR_FPS1
49#define COLOR_OBJECT_DETECTOR_FPS1 0
51#ifndef COLOR_OBJECT_DETECTOR_FPS2
52#define COLOR_OBJECT_DETECTOR_FPS2 0
129 VERBOSE_PRINT(
"centroid %d: (%d, %d) r: %4.2f a: %4.2f\n", camera, x_c, y_c,
158#ifdef COLOR_OBJECT_DETECTOR_CAMERA1
159#ifdef COLOR_OBJECT_DETECTOR_LUM_MIN1
167#ifdef COLOR_OBJECT_DETECTOR_DRAW1
174#ifdef COLOR_OBJECT_DETECTOR_CAMERA2
175#ifdef COLOR_OBJECT_DETECTOR_LUM_MIN2
183#ifdef COLOR_OBJECT_DETECTOR_DRAW2
226 up = &buffer[y * 2 *
img->w + 2 * x];
227 yp = &buffer[y * 2 *
img->w + 2 * x + 1];
228 vp = &buffer[y * 2 *
img->w + 2 * x + 2];
232 up = &buffer[y * 2 *
img->w + 2 * x - 2];
234 vp = &buffer[y * 2 *
img->w + 2 * x];
235 yp = &buffer[y * 2 *
img->w + 2 * x + 1];
Main include for ABI (AirBorneInterface).
#define COLOR_OBJECT_DETECTION1_ID
#define COLOR_OBJECT_DETECTION2_ID
struct video_listener * cv_add_to_device(struct video_config_t *device, cv_function func, uint16_t fps, uint8_t id)
Computer vision framework for onboard processing.
#define VERBOSE_PRINT(...)
#define COLOR_OBJECT_DETECTOR_FPS1
Default FPS (zero means run at camera fps)
static struct image_t * object_detector(struct image_t *img, uint8_t filter)
static pthread_mutex_t mutex
#define COLOR_OBJECT_DETECTOR_FPS2
Default FPS (zero means run at camera fps)
struct image_t * object_detector2(struct image_t *img, uint8_t camera_id)
void color_object_detector_periodic(void)
void color_object_detector_init(void)
struct color_object_t global_filters[2]
uint32_t find_object_centroid(struct image_t *img, int32_t *p_xc, int32_t *p_yc, bool draw, uint8_t lum_min, uint8_t lum_max, uint8_t cb_min, uint8_t cb_max, uint8_t cr_min, uint8_t cr_max)
struct image_t * object_detector1(struct image_t *img, uint8_t camera_id)
Assumes the color_object consists of a continuous color and checks if you are over the defined color_...
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.