-
Notifications
You must be signed in to change notification settings - Fork 2
/
leap.h
48 lines (33 loc) · 772 Bytes
/
leap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef LEAP_H_
#define LEAP_H_
#include <libuvc/libuvc.h>
#include <opencv2/core/core_c.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _leap_t leap_t;
typedef void (*leap_callback_t)(leap_t *);
typedef void (*leap_render_callback_t)(leap_t *, int key);
struct _leap_t
{
uvc_context_t *ctx;
uvc_device_t *dev;
uvc_device_handle_t *devh;
IplImage *left;
IplImage *right;
IplImage *work;
IplImage *i;
pthread_mutex_t lock;
leap_callback_t callback;
leap_render_callback_t render_callback;
uint64_t count;
};
int leap_open(leap_t **leap, leap_callback_t callback);
int leap_close(leap_t *leap);
void leap_diag(leap_t *leap);
int leap_run(leap_t *leap);
int leap_calibrate_frame(leap_t *leap);
#ifdef __cplusplus
}
#endif
#endif