libwallaby  v23
The wallaby standard library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
camera.h
Go to the documentation of this file.
1 /*
2  * camera.h
3  *
4  * Created on: Jan 29, 2016
5  * Author: Nafis Zaman
6  */
7 
8 #ifndef _CAMERA_H_
9 #define _CAMERA_H_
10 
11 #include "geom.h"
12 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 typedef struct pixel
25 {
26  int r;
27  int g;
28  int b;
29 } pixel;
30 
32 {
37 };
38 
39 enum Model
40 {
43 };
44 
53 int camera_open();
54 
64 int camera_open_black();
65 
79 int camera_open_at_res(enum Resolution res);
80 
94 int camera_open_device(int number, enum Resolution res);
95 
112 int camera_open_device_model_at_res(int number, enum Model model, enum Resolution res);
113 
122 int camera_load_config(const char *name);
123 
124 
131 void set_camera_width(int width);
132 
139 void set_camera_height(int height);
140 
147 int get_camera_width(void);
148 
155 int get_camera_height(void);
156 
162 int camera_update(void);
163 
172 
178 int get_channel_count(void);
179 
187 int get_object_count(int channel);
188 
197 const char *get_object_data(int channel, int object);
198 
203 int get_code_num(int channel, int object);
204 
211 int get_object_data_length(int channel, int object);
212 
218 double get_object_confidence(int channel, int object);
219 
224 int get_object_area(int channel, int object);
225 
230 rectangle get_object_bbox(int channel, int object);
231 int get_object_bbox_ulx(int channel, int object);
232 int get_object_bbox_uly(int channel, int object);
233 int get_object_bbox_brx(int channel, int object);
234 int get_object_bbox_bry(int channel, int object);
235 int get_object_bbox_width(int channel, int object);
236 int get_object_bbox_height(int channel, int object);
237 
242 point2 get_object_centroid(int channel, int object);
243 int get_object_centroid_column(int channel, int object);
244 int get_object_centroid_x(int channel, int object);
245 int get_object_centroid_row(int channel, int object);
246 int get_object_centroid_y(int channel, int object);
247 
252 point2 get_object_center(int channel, int object);
253 int get_object_center_column(int channel, int object);
254 int get_object_center_x(int channel, int object);
255 int get_object_center_row(int channel, int object);
256 int get_object_center_y(int channel, int object);
257 
265 void camera_close();
266 
272 void set_camera_config_base_path(const char *const path);
273 
281 const unsigned char *get_camera_frame_row(unsigned row);
282 
290 const unsigned char *get_camera_frame();
291 
292 unsigned get_camera_element_size();
293 
294 
295 #ifdef __cplusplus
296 }
297 #endif
298 
299 
300 #endif
Definition: camera.h:42
int get_object_bbox_width(int channel, int object)
Definition: camera.h:34
int get_camera_height(void)
Definition: camera.h:36
double get_object_confidence(int channel, int object)
pixel get_camera_pixel(point2 p)
struct pixel pixel
const unsigned char * get_camera_frame_row(unsigned row)
int camera_open_device(int number, enum Resolution res)
int camera_open_at_res(enum Resolution res)
int camera_load_config(const char *name)
int get_object_center_y(int channel, int object)
int get_object_centroid_column(int channel, int object)
point2 get_object_center(int channel, int object)
int camera_open_black()
int get_object_centroid_y(int channel, int object)
int get_object_bbox_height(int channel, int object)
int get_object_bbox_ulx(int channel, int object)
Definition: camera.h:41
int get_object_count(int channel)
const unsigned char * get_camera_frame()
int get_object_center_x(int channel, int object)
void camera_close()
int camera_open()
void set_camera_height(int height)
int get_object_data_length(int channel, int object)
int get_object_centroid_x(int channel, int object)
int get_object_bbox_uly(int channel, int object)
Definition: camera.h:33
int get_channel_count(void)
int r
Definition: camera.h:26
Model
Definition: camera.h:39
int camera_open_device_model_at_res(int number, enum Model model, enum Resolution res)
void set_camera_width(int width)
Definition: geom.h:32
Resolution
Definition: camera.h:31
Definition: geom.h:19
int get_object_bbox_brx(int channel, int object)
int get_code_num(int channel, int object)
const char * get_object_data(int channel, int object)
point2 get_object_centroid(int channel, int object)
Definition: camera.h:24
int get_object_center_row(int channel, int object)
Definition: camera.h:35
int get_object_area(int channel, int object)
int g
Definition: camera.h:27
unsigned get_camera_element_size()
int get_object_center_column(int channel, int object)
int camera_update(void)
int b
Definition: camera.h:28
void set_camera_config_base_path(const char *const path)
int get_object_bbox_bry(int channel, int object)
int get_camera_width(void)
rectangle get_object_bbox(int channel, int object)
int get_object_centroid_row(int channel, int object)