Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
detect_window.h
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, see
18  * <http://www.gnu.org/licenses/>.
19  *
20  */
21 
29 #ifndef WINDOW_DETECTION_MODULE
30 #define WINDOW_DETECTION_MODULE
31 
32 #define MODE_DARK 0
33 #define MODE_BRIGHT 1
34 
35 #include "inttypes.h"
36 
37 extern void detect_window_init(void);
38 extern struct image_t* detect_window(struct image_t *img, uint8_t camera_id);
39 
40 uint16_t detect_window_sizes(uint8_t *in, uint32_t image_width, uint32_t image_height, uint16_t *coordinate,
41  uint32_t *integral_image, uint8_t MODE);
42 uint16_t detect_window_one_size(uint8_t *in, uint32_t image_width, uint32_t image_height, uint16_t *coordinate,
43  uint16_t *size, uint8_t calculate_integral_image, uint32_t *integral_image, uint8_t MODE);
44 uint16_t detect_escape(uint8_t *in, uint32_t image_width, uint32_t image_height, uint16_t *escape_coordinate,
45  uint32_t *integral_image, uint8_t n_cells);
46 void get_integral_image(uint8_t *in, uint32_t image_width, uint32_t image_height, uint32_t *integral_image);
47 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,
48  uint32_t image_width, uint32_t image_height);
49 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,
50  uint32_t image_width, uint32_t image_height);
51 uint16_t get_window_response(uint16_t x, uint16_t y, uint16_t feature_size, uint16_t border, uint32_t *integral_image,
52  uint16_t image_width, uint16_t image_height, uint16_t px_inner, uint16_t px_border, uint8_t MODE);
53 uint16_t get_border_response(uint16_t x, uint16_t y, uint16_t feature_size, uint16_t window_size, uint16_t border_size,
54  uint32_t *integral_image, uint16_t image_width, uint16_t image_height, uint16_t px_inner, uint16_t px_outer);
55 void filter_bad_pixels(uint8_t *in, uint32_t image_width, uint32_t image_height);
56 void transform_illuminance_image(uint8_t *in, uint8_t *out, uint32_t image_width, uint32_t image_height, uint8_t n_bits,
57  uint8_t bright_win);
58 
59 #endif /* WINDOW_DETECTION_MODULE */
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: detect_window.c:256
uint16_t
unsigned short uint16_t
Definition: types.h:16
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: detect_window.c:237
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: detect_window.c:285
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: detect_window.c:69
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: detect_window.c:333
uint32_t
unsigned long uint32_t
Definition: types.h:18
detect_window_init
void detect_window_init(void)
Definition: detect_window.c:39
uint8_t
unsigned char uint8_t
Definition: types.h:14
get_integral_image
void get_integral_image(uint8_t *in, uint32_t image_width, uint32_t image_height, uint32_t *integral_image)
Definition: detect_window.c:206
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: detect_window.c:100
detect_window
struct image_t * detect_window(struct image_t *img, uint8_t camera_id)
Definition: detect_window.c:48
filter_bad_pixels
void filter_bad_pixels(uint8_t *in, uint32_t image_width, uint32_t image_height)
Definition: detect_window.c:320
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: detect_window.c:172
inttypes.h
image_t
Definition: image.h:44
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: detect_window.c:225