libwallaby  v24
The wallaby standard library
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
get_code_num
int get_code_num(int channel, int object)
camera_open_at_res
int camera_open_at_res(enum Resolution res)
get_object_data_length
int get_object_data_length(int channel, int object)
get_object_bbox_height
int get_object_bbox_height(int channel, int object)
pixel::g
int g
Definition: camera.h:27
camera_open_black
int camera_open_black()
point2
Definition: geom.h:19
set_camera_config_base_path
void set_camera_config_base_path(const char *const path)
HIGH_RES
Definition: camera.h:35
camera_load_config
int camera_load_config(const char *name)
get_camera_frame
const unsigned char * get_camera_frame()
get_object_area
int get_object_area(int channel, int object)
get_camera_element_size
unsigned get_camera_element_size()
get_channel_count
int get_channel_count(void)
get_object_centroid_row
int get_object_centroid_row(int channel, int object)
get_camera_pixel
pixel get_camera_pixel(point2 p)
get_object_bbox_bry
int get_object_bbox_bry(int channel, int object)
get_object_centroid
point2 get_object_centroid(int channel, int object)
camera_update
int camera_update(void)
get_object_bbox
rectangle get_object_bbox(int channel, int object)
Model
Model
Definition: camera.h:39
get_object_bbox_brx
int get_object_bbox_brx(int channel, int object)
NATIVE_RES
Definition: camera.h:36
get_camera_height
int get_camera_height(void)
get_object_center_row
int get_object_center_row(int channel, int object)
rectangle
Definition: geom.h:32
camera_open
int camera_open()
get_object_center_column
int get_object_center_column(int channel, int object)
set_camera_height
void set_camera_height(int height)
camera_open_device
int camera_open_device(int number, enum Resolution res)
get_object_count
int get_object_count(int channel)
geom.h
camera_open_device_model_at_res
int camera_open_device_model_at_res(int number, enum Model model, enum Resolution res)
LOW_RES
Definition: camera.h:33
get_object_centroid_y
int get_object_centroid_y(int channel, int object)
get_object_center_x
int get_object_center_x(int channel, int object)
get_object_bbox_ulx
int get_object_bbox_ulx(int channel, int object)
BLACK_2017
Definition: camera.h:42
pixel
Definition: camera.h:24
get_object_data
const char * get_object_data(int channel, int object)
get_object_center
point2 get_object_center(int channel, int object)
get_camera_width
int get_camera_width(void)
get_object_bbox_width
int get_object_bbox_width(int channel, int object)
get_object_centroid_x
int get_object_centroid_x(int channel, int object)
pixel::r
int r
Definition: camera.h:26
set_camera_width
void set_camera_width(int width)
get_object_bbox_uly
int get_object_bbox_uly(int channel, int object)
pixel::b
int b
Definition: camera.h:28
get_object_confidence
double get_object_confidence(int channel, int object)
pixel
struct pixel pixel
Resolution
Resolution
Definition: camera.h:31
get_camera_frame_row
const unsigned char * get_camera_frame_row(unsigned row)
get_object_center_y
int get_object_center_y(int channel, int object)
camera_close
void camera_close()
MED_RES
Definition: camera.h:34
get_object_centroid_column
int get_object_centroid_column(int channel, int object)
WHITE_2016
Definition: camera.h:41