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
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:
61 void DictionaryTrainingYUV(uint8_t *frame, uint16_t width, uint16_t height);
62 void DistributionExtraction(uint8_t *frame, uint16_t width, uint16_t height);
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 */
void save_texton_dictionary(void)
Save the texton dictionary.
Definition: textons.c:441
uint32_t learned_samples
Definition: textons.c:38
uint8_t patch_size
Definition: textons.c:97
unsigned short uint16_t
Definition: types.h:16
uint8_t alpha_uint
Definition: textons.c:95
void load_texton_dictionary(void)
Load a texton dictionary.
Definition: textons.c:471
float **** dictionary
Definition: textons.c:37
uint32_t n_learning_samples
Definition: textons.c:98
uint8_t FULL_SAMPLING
Definition: textons.c:100
uint8_t dictionary_initialized
Definition: textons.c:39
float alpha
Definition: textons.c:107
uint8_t load_dictionary
Definition: textons.c:94
uint32_t border_width
Definition: textons.c:101
uint8_t dictionary_number
Definition: textons.c:103
void DictionaryTrainingYUV(uint8_t *frame, uint16_t width, uint16_t height)
Function that performs one pass for dictionary training.
Definition: textons.c:166
unsigned long uint32_t
Definition: types.h:18
uint8_t dictionary_ready
Definition: textons.c:106
float * texton_distribution
Definition: textons.c:40
void textons_init(void)
Initialize.
Definition: textons.c:501
unsigned char uint8_t
Definition: types.h:14
uint32_t n_samples_image
Definition: textons.c:99
void DistributionExtraction(uint8_t *frame, uint16_t width, uint16_t height)
Function that extracts a texton histogram from an image.
Definition: textons.c:311
uint32_t border_height
Definition: textons.c:102
void textons_stop(void)
Definition: textons.c:522
uint8_t n_textons
Definition: textons.c:96