libkipr  1.0.0
camera.h
Go to the documentation of this file.
1 
62 #ifndef _KIPR_CAMERA_CAMERA_H_
63 #define _KIPR_CAMERA_CAMERA_H_
64 
65 #include "kipr/geometry/geometry.h"
66 
67 #ifdef __cplusplus
68 extern "C"
69 {
70 #endif
71 
76 typedef struct pixel
77 {
78  int r;
79  int g;
80  int b;
82 
84 {
90 };
91 
92 enum Model
93 {
96  TELLO
97 };
98 
108 
119 
135 
150 int camera_open_device(int number, enum Resolution res);
151 
170 int camera_open_device_model_at_res(int number, enum Model model, enum Resolution res);
171 
180 int camera_load_config(const char *name);
181 
189 
197 
203 int camera_update(void);
204 
213 
220 
228 int get_object_count(int channel);
229 
238 const char *get_object_data(int channel, int object);
239 
244 int get_code_num(int channel, int object);
245 
252 int get_object_data_length(int channel, int object);
253 
259 double get_object_confidence(int channel, int object);
260 
265 int get_object_area(int channel, int object);
266 
271 rectangle get_object_bbox(int channel, int object);
272 int get_object_bbox_ulx(int channel, int object);
273 int get_object_bbox_uly(int channel, int object);
274 int get_object_bbox_brx(int channel, int object);
275 int get_object_bbox_bry(int channel, int object);
276 int get_object_bbox_width(int channel, int object);
277 int get_object_bbox_height(int channel, int object);
278 
283 point2 get_object_centroid(int channel, int object);
284 int get_object_centroid_column(int channel, int object);
285 int get_object_centroid_x(int channel, int object);
286 int get_object_centroid_row(int channel, int object);
287 int get_object_centroid_y(int channel, int object);
288 
293 point2 get_object_center(int channel, int object);
294 int get_object_center_column(int channel, int object);
295 int get_object_center_x(int channel, int object);
296 int get_object_center_row(int channel, int object);
297 int get_object_center_y(int channel, int object);
298 
307 
313 void set_camera_config_base_path(const char *const path);
314 
322 const unsigned char *get_camera_frame_row(unsigned row);
323 
331 const unsigned char *get_camera_frame();
332 
334 
335 #ifdef __cplusplus
336 }
337 #endif
338 
339 #endif
Model
Definition: camera.h:93
@ TELLO
Definition: camera.h:96
@ BLACK_2017
Definition: camera.h:95
@ WHITE_2016
Definition: camera.h:94
int get_object_centroid_y(int channel, int object)
int get_object_centroid_row(int channel, int object)
int get_object_center_row(int channel, int object)
int get_object_bbox_bry(int channel, int object)
int get_object_bbox_ulx(int channel, int object)
int get_object_center_x(int channel, int object)
Resolution
Definition: camera.h:84
@ LOW_RES
Definition: camera.h:85
@ NATIVE_RES
Definition: camera.h:89
@ MED_RES
Definition: camera.h:86
@ TELLO_RES
Definition: camera.h:88
@ HIGH_RES
Definition: camera.h:87
int get_object_bbox_brx(int channel, int object)
int get_object_centroid_column(int channel, int object)
int get_code_num(int channel, int object)
int get_object_bbox_height(int channel, int object)
int get_object_bbox_uly(int channel, int object)
int get_object_center_column(int channel, int object)
int get_object_center_y(int channel, int object)
unsigned get_camera_element_size()
int get_object_centroid_x(int channel, int object)
int get_object_bbox_width(int channel, int object)
struct pixel pixel
A struct that represents a pixel in an image.
point2 get_object_center(int channel, int object)
int get_channel_count(void)
int camera_open_black()
int get_camera_height(void)
rectangle get_object_bbox(int channel, int object)
int get_object_count(int channel)
int camera_open()
void set_camera_config_base_path(const char *const path)
int get_object_area(int channel, int object)
double get_object_confidence(int channel, int object)
int camera_update(void)
const unsigned char * get_camera_frame()
int camera_open_device_model_at_res(int number, enum Model model, enum Resolution res)
int get_object_data_length(int channel, int object)
const char * get_object_data(int channel, int object)
int get_camera_width(void)
int camera_load_config(const char *name)
const unsigned char * get_camera_frame_row(unsigned row)
void camera_close()
pixel get_camera_pixel(point2 p)
int camera_open_device(int number, enum Resolution res)
point2 get_object_centroid(int channel, int object)
int camera_open_at_res(enum Resolution res)
A struct that represents a pixel in an image.
Definition: camera.h:77
int b
the blue value of the pixel
Definition: camera.h:80
int r
the red value of the pixel
Definition: camera.h:78
int g
the green value of the pixel
Definition: camera.h:79
A 2D point; has x and y.
Definition: geometry.h:15
A rectangle object.
Definition: geometry.h:36