libkovan  1
The kovan standard library
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 #include "vtable.h"
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 typedef struct pixel
43 {
44  int r;
45  int g;
46  int b;
47 } pixel;
48 
50 {
55 };
56 
66 
80 
93 VF EXPORT_SYM int camera_open_device(int number, enum Resolution res);
94 
102 VF EXPORT_SYM int camera_load_config(const char *name);
103 
109 VF EXPORT_SYM void set_camera_width(int width);
110 
116 VF EXPORT_SYM void set_camera_height(int height);
117 
124 VF EXPORT_SYM int get_camera_width(void);
125 
133 
139 VF EXPORT_SYM int camera_update(void);
140 
148 
155 
163 VF EXPORT_SYM int get_object_count(int channel);
164 
173 VF EXPORT_SYM const char *get_object_data(int channel, int object);
174 
179 VF EXPORT_SYM int get_code_num(int channel, int object);
180 
187 VF EXPORT_SYM int get_object_data_length(int channel, int object);
188 
194 VF EXPORT_SYM double get_object_confidence(int channel, int object);
195 
200 VF EXPORT_SYM int get_object_area(int channel, int object);
201 
206 VF EXPORT_SYM rectangle get_object_bbox(int channel, int object);
207 VF EXPORT_SYM int get_object_bbox_ulx(int channel, int object);
208 VF EXPORT_SYM int get_object_bbox_uly(int channel, int object);
209 VF EXPORT_SYM int get_object_bbox_brx(int channel, int object);
210 VF EXPORT_SYM int get_object_bbox_bry(int channel, int object);
211 VF EXPORT_SYM int get_object_bbox_width(int channel, int object);
212 VF EXPORT_SYM int get_object_bbox_height(int channel, int object);
213 
218 VF EXPORT_SYM point2 get_object_centroid(int channel, int object);
219 VF EXPORT_SYM int get_object_centroid_column(int channel, int object);
220 VF EXPORT_SYM int get_object_centroid_x(int channel, int object);
221 VF EXPORT_SYM int get_object_centroid_row(int channel, int object);
222 VF EXPORT_SYM int get_object_centroid_y(int channel, int object);
223 
224 
229 VF EXPORT_SYM point2 get_object_center(int channel, int object);
230 VF EXPORT_SYM int get_object_center_column(int channel, int object);
231 VF EXPORT_SYM int get_object_center_x(int channel, int object);
232 VF EXPORT_SYM int get_object_center_row(int channel, int object);
233 VF EXPORT_SYM int get_object_center_y(int channel, int object);
234 
241 VF EXPORT_SYM void camera_close();
242 
248 VF EXPORT_SYM void set_camera_config_base_path(const char *const path);
249 
257 VF EXPORT_SYM const unsigned char *get_camera_frame_row(unsigned row);
258 
266 VF EXPORT_SYM const unsigned char *get_camera_frame();
267 
269 
270 VFL
271 
272 #ifdef __cplusplus
273 }
274 #endif
275 
276 
277 #endif
VF EXPORT_SYM int get_object_bbox_width(int channel, int object)
VF EXPORT_SYM int get_channel_count(void)
VF EXPORT_SYM void camera_close()
Definition: camera.h:52
Definition: camera.h:54
VF EXPORT_SYM int get_object_area(int channel, int object)
VF EXPORT_SYM int get_object_centroid_column(int channel, int object)
VF EXPORT_SYM int camera_open_device(int number, enum Resolution res)
VF EXPORT_SYM int get_object_centroid_x(int channel, int object)
VF EXPORT_SYM int get_object_centroid_row(int channel, int object)
VF EXPORT_SYM int camera_load_config(const char *name)
struct pixel pixel
VF EXPORT_SYM int get_object_center_y(int channel, int object)
VF EXPORT_SYM int get_object_count(int channel)
VF EXPORT_SYM unsigned get_camera_element_size()
VF EXPORT_SYM void set_camera_width(int width)
VF EXPORT_SYM int get_object_center_column(int channel, int object)
VF EXPORT_SYM pixel get_camera_pixel(point2 p)
VF EXPORT_SYM int get_object_bbox_bry(int channel, int object)
VF EXPORT_SYM int get_object_bbox_ulx(int channel, int object)
VF EXPORT_SYM int get_object_bbox_uly(int channel, int object)
VF EXPORT_SYM int camera_open_at_res(enum Resolution res)
VF EXPORT_SYM const unsigned char * get_camera_frame_row(unsigned row)
VF EXPORT_SYM int get_object_center_row(int channel, int object)
VF EXPORT_SYM int camera_update(void)
VF EXPORT_SYM rectangle get_object_bbox(int channel, int object)
Definition: camera.h:51
VF EXPORT_SYM int get_object_bbox_height(int channel, int object)
VF EXPORT_SYM double get_object_confidence(int channel, int object)
int r
Definition: camera.h:44
VF EXPORT_SYM const char * get_object_data(int channel, int object)
VF EXPORT_SYM int get_camera_width(void)
Definition: geom.h:44
Resolution
Definition: camera.h:49
VF EXPORT_SYM int get_object_bbox_brx(int channel, int object)
#define VF
Definition: vtable.h:10
VF EXPORT_SYM int get_code_num(int channel, int object)
Definition: geom.h:31
#define VFL
Definition: vtable.h:11
#define EXPORT_SYM
Definition: export.h:7
Definition: camera.h:42
VF EXPORT_SYM int camera_open()
Definition: camera.h:53
VF EXPORT_SYM int get_object_data_length(int channel, int object)
VF EXPORT_SYM const unsigned char * get_camera_frame()
int g
Definition: camera.h:45
VF EXPORT_SYM void set_camera_config_base_path(const char *const path)
VF EXPORT_SYM point2 get_object_centroid(int channel, int object)
VF EXPORT_SYM int get_object_centroid_y(int channel, int object)
VF EXPORT_SYM int get_object_center_x(int channel, int object)
VF EXPORT_SYM point2 get_object_center(int channel, int object)
int b
Definition: camera.h:46
VF EXPORT_SYM void set_camera_height(int height)
VF EXPORT_SYM int get_camera_height(void)