libkovan  1
The kovan standard library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
camera.h
Go to the documentation of this file.
1 /**************************************************************************
2 
3 
4  * Copyright 2012 KISS Institute for Practical Robotics *
5  * *
6  * This file is part of libkovan. *
7  * *
8  * libkovan is free software: you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation, either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * libkovan is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with libkovan. Check the LICENSE file in the project root. *
20  * If not, see <http://www.gnu.org/licenses/>. *
21  **************************************************************************/
22 
23 #ifndef _CAMERA_H_
24 #define _CAMERA_H_
25 
34 #include "geom.h"
35 #include "export.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 typedef struct pixel
42 {
43  int r;
44  int g;
45  int b;
46 } pixel;
47 
49 {
54 };
55 
65 
79 
92 EXPORT_SYM int camera_open_device(int number, enum Resolution res);
93 
101 EXPORT_SYM int camera_load_config(const char *name);
102 
108 EXPORT_SYM void set_camera_width(int width);
109 
115 EXPORT_SYM void set_camera_height(int height);
116 
123 EXPORT_SYM int get_camera_width(void);
124 
131 EXPORT_SYM int get_camera_height(void);
132 
138 EXPORT_SYM int camera_update(void);
139 
147 
153 EXPORT_SYM int get_channel_count(void);
154 
162 EXPORT_SYM int get_object_count(int channel);
163 
172 EXPORT_SYM const char *get_object_data(int channel, int object);
173 
178 EXPORT_SYM int get_code_num(int channel, int object);
179 
186 EXPORT_SYM int get_object_data_length(int channel, int object);
187 
193 EXPORT_SYM double get_object_confidence(int channel, int object);
194 
199 EXPORT_SYM int get_object_area(int channel, int object);
200 
205 EXPORT_SYM rectangle get_object_bbox(int channel, int object);
206 
207 EXPORT_SYM int get_object_bbox_ulx(int channel, int object);
208 EXPORT_SYM int get_object_bbox_uly(int channel, int object);
209 EXPORT_SYM int get_object_bbox_brx(int channel, int object);
210 EXPORT_SYM int get_object_bbox_bry(int channel, int object);
211 EXPORT_SYM int get_object_bbox_width(int channel, int object);
212 EXPORT_SYM int get_object_bbox_height(int channel, int object);
213 
218 EXPORT_SYM point2 get_object_centroid(int channel, int object);
219 
220 EXPORT_SYM int get_object_centroid_column(int channel, int object);
221 EXPORT_SYM int get_object_centroid_x(int channel, int object);
222 EXPORT_SYM int get_object_centroid_row(int channel, int object);
223 EXPORT_SYM int get_object_centroid_y(int channel, int object);
224 
229 EXPORT_SYM point2 get_object_center(int channel, int object);
230 
231 EXPORT_SYM int get_object_center_column(int channel, int object);
232 EXPORT_SYM int get_object_center_x(int channel, int object);
233 EXPORT_SYM int get_object_center_row(int channel, int object);
234 EXPORT_SYM int get_object_center_y(int channel, int object);
235 
242 EXPORT_SYM void camera_close();
243 
249 EXPORT_SYM void set_camera_config_base_path(const char *const path);
250 
258 EXPORT_SYM const unsigned char *get_camera_frame_row(unsigned row);
259 
267 EXPORT_SYM const unsigned char *get_camera_frame();
268 
270 
271 #ifdef __cplusplus
272 }
273 #endif
274 
275 
276 #endif
EXPORT_SYM const unsigned char * get_camera_frame()
Definition: camera.h:51
EXPORT_SYM void set_camera_width(int width)
Definition: camera.h:53
EXPORT_SYM int get_object_center_column(int channel, int object)
EXPORT_SYM int get_camera_width(void)
EXPORT_SYM int get_code_num(int channel, int object)
EXPORT_SYM int get_object_bbox_bry(int channel, int object)
EXPORT_SYM int get_object_area(int channel, int object)
struct pixel pixel
EXPORT_SYM int get_channel_count(void)
EXPORT_SYM int get_object_centroid_x(int channel, int object)
EXPORT_SYM int get_object_bbox_ulx(int channel, int object)
EXPORT_SYM void camera_close()
EXPORT_SYM int get_object_count(int channel)
EXPORT_SYM int get_object_bbox_uly(int channel, int object)
EXPORT_SYM int get_object_centroid_column(int channel, int object)
EXPORT_SYM int camera_open_at_res(enum Resolution res)
EXPORT_SYM int camera_open()
EXPORT_SYM pixel get_camera_pixel(point2 p)
EXPORT_SYM rectangle get_object_bbox(int channel, int object)
EXPORT_SYM point2 get_object_center(int channel, int object)
EXPORT_SYM int get_object_center_y(int channel, int object)
EXPORT_SYM double get_object_confidence(int channel, int object)
EXPORT_SYM int get_object_data_length(int channel, int object)
EXPORT_SYM int camera_open_device(int number, enum Resolution res)
EXPORT_SYM int get_object_center_row(int channel, int object)
EXPORT_SYM int camera_update(void)
Definition: camera.h:50
int r
Definition: camera.h:43
EXPORT_SYM point2 get_object_centroid(int channel, int object)
Definition: geom.h:43
Resolution
Definition: camera.h:48
EXPORT_SYM int get_object_bbox_width(int channel, int object)
EXPORT_SYM void set_camera_height(int height)
EXPORT_SYM int camera_load_config(const char *name)
Definition: geom.h:30
EXPORT_SYM int get_object_bbox_height(int channel, int object)
EXPORT_SYM unsigned get_camera_element_size()
#define EXPORT_SYM
Definition: export.h:7
Definition: camera.h:41
EXPORT_SYM int get_object_bbox_brx(int channel, int object)
Definition: camera.h:52
EXPORT_SYM int get_object_centroid_y(int channel, int object)
int g
Definition: camera.h:44
EXPORT_SYM int get_object_center_x(int channel, int object)
EXPORT_SYM int get_object_centroid_row(int channel, int object)
EXPORT_SYM void set_camera_config_base_path(const char *const path)
EXPORT_SYM const char * get_object_data(int channel, int object)
EXPORT_SYM const unsigned char * get_camera_frame_row(unsigned row)
int b
Definition: camera.h:45
EXPORT_SYM int get_camera_height(void)