Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
textons.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Hann Woei Ho, Guido de Croon
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 
33 #ifndef TEXTONS_H
34 #define TEXTONS_H
35 
36 #include <stdint.h>
37 
38 // outputs
39 extern float *texton_distribution; // main outcome of the image processing: the distribution of textons in the image
40 
41 // settings
43 extern uint8_t alpha_uint;
44 extern uint8_t n_textons;
45 extern uint8_t patch_size; // Should be even
48 extern uint8_t FULL_SAMPLING;
49 extern uint32_t border_width;
50 extern uint32_t border_height;
52 
53 // status variables
55 extern float alpha;
56 extern float ** **dictionary;
59 
60 // functions:
63 void save_texton_dictionary(void);
64 void load_texton_dictionary(void);
65 
66 // Module functions
67 extern void textons_init(void);
68 extern void textons_stop(void);
69 
70 #endif /* TEXTONS_H */
n_textons
uint8_t n_textons
Definition: textons.c:96
textons_stop
void textons_stop(void)
Definition: textons.c:522
uint16_t
unsigned short uint16_t
Definition: types.h:16
save_texton_dictionary
void save_texton_dictionary(void)
Save the texton dictionary.
Definition: textons.c:441
dictionary
float **** dictionary
Definition: textons.c:37
alpha_uint
uint8_t alpha_uint
Definition: textons.c:95
load_texton_dictionary
void load_texton_dictionary(void)
Load a texton dictionary.
Definition: textons.c:471
n_learning_samples
uint32_t n_learning_samples
Definition: textons.c:98
uint32_t
unsigned long uint32_t
Definition: types.h:18
FULL_SAMPLING
uint8_t FULL_SAMPLING
Definition: textons.c:100
dictionary_initialized
uint8_t dictionary_initialized
Definition: textons.c:39
frame
static uint8_t frame[20]
Definition: cc2500_frsky_x.c:163
dictionary_number
uint8_t dictionary_number
Definition: textons.c:103
DictionaryTrainingYUV
void DictionaryTrainingYUV(uint8_t *frame, uint16_t width, uint16_t height)
Function that performs one pass for dictionary training.
Definition: textons.c:166
dictionary_ready
uint8_t dictionary_ready
Definition: textons.c:106
alpha
float alpha
Definition: textons.c:107
load_dictionary
uint8_t load_dictionary
Definition: textons.c:94
border_width
uint32_t border_width
Definition: textons.c:101
uint8_t
unsigned char uint8_t
Definition: types.h:14
texton_distribution
float * texton_distribution
Definition: textons.c:40
textons_init
void textons_init(void)
Initialize.
Definition: textons.c:501
n_samples_image
uint32_t n_samples_image
Definition: textons.c:99
DistributionExtraction
void DistributionExtraction(uint8_t *frame, uint16_t width, uint16_t height)
Function that extracts a texton histogram from an image.
Definition: textons.c:311
border_height
uint32_t border_height
Definition: textons.c:102
patch_size
uint8_t patch_size
Definition: textons.c:97
learned_samples
uint32_t learned_samples
Definition: textons.c:38