Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
colorfilter.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015
3  *
4  * This file is part of Paparazzi.
5  *
6  * Paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * Paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
26 // Own header
28 #include <stdio.h>
29 
31 
32 struct video_listener *listener = NULL;
33 
34 // Filter Settings
41 
42 // Result
43 int color_count = 0;
44 
45 // Function
46 struct image_t *colorfilter_func(struct image_t *img);
47 struct image_t *colorfilter_func(struct image_t *img)
48 {
49  // Filter
54  );
55 
56  return img; // Colorfilter did not make a new image
57 }
58 
59 void colorfilter_init(void)
60 {
61  listener = cv_add_to_device(&COLORFILTER_CAMERA, colorfilter_func);
62 }
void colorfilter_init(void)
Definition: colorfilter.c:59
uint8_t color_cb_max
Definition: colorfilter.c:38
struct video_listener * cv_add_to_device(struct video_config_t *device, cv_function func)
Definition: cv.c:45
uint8_t color_lum_max
Definition: colorfilter.c:36
Definition: image.h:42
struct video_listener * listener
Definition: colorfilter.c:32
Image helper functions like resizing, color filter, converters...
int color_count
Definition: colorfilter.c:43
uint8_t color_cr_max
Definition: colorfilter.c:40
uint8_t color_cb_min
Definition: colorfilter.c:37
unsigned char uint8_t
Definition: types.h:14
struct image_t * colorfilter_func(struct image_t *img)
Definition: colorfilter.c:47
uint8_t color_lum_min
Definition: colorfilter.c:35
uint8_t color_cr_min
Definition: colorfilter.c:39
uint16_t image_yuv422_colorfilt(struct image_t *input, struct image_t *output, uint8_t y_m, uint8_t y_M, uint8_t u_m, uint8_t u_M, uint8_t v_m, uint8_t v_M)
Filter colors in an YUV422 image.
Definition: image.c:149