-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathpyfreenect2.cpp
47 lines (43 loc) · 2.42 KB
/
pyfreenect2.cpp
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
#include "pyfreenect2.hpp"
#include <iostream>
static PyMethodDef pyfreenect2Methods[] = {
// Freenect2
{ "numberOfDevices", py_numberOfDevices, METH_VARARGS, NULL },
{ "getDefaultDeviceSerialNumber", py_getDefaultDeviceSerialNumber, METH_VARARGS, NULL },
// Freenect2Device
{ "Freenect2Device_new", py_Freenect2Device_new, METH_VARARGS, NULL },
{ "Freenect2Device_start", py_Freenect2Device_start, METH_VARARGS, NULL },
{ "Freenect2Device_stop", py_Freenect2Device_stop, METH_VARARGS, NULL },
{ "Freenect2Device_close", py_Freenect2Device_close, METH_VARARGS, NULL },
{ "Freenect2Device_setColorFrameListener", py_Freenect2Device_setColorFrameListener, METH_VARARGS, NULL },
{ "Freenect2Device_setIrAndDepthFrameListener", py_Freenect2Device_setIrAndDepthFrameListener, METH_VARARGS, NULL },
/** Configure depth processing. */
{ "Freenect2Device_setDeepConfiguration", py_Freenect2Device_setDeepConfiguration, METH_VARARGS, NULL },
{ "Freenect2Device_getSerialNumber", py_Freenect2Device_getSerialNumber, METH_VARARGS, NULL },
{ "Freenect2Device_getFirmwareVersion", py_Freenect2Device_getFirmwareVersion, METH_VARARGS, NULL },
{ "Freenect2Device_getColorCameraParams", py_Freenect2Device_getColorCameraParams, METH_VARARGS, NULL },
{ "Freenect2Device_getIRCameraParams", py_Freenect2Device_getIRCameraParams, METH_VARARGS, NULL },
// SyncMultiFrameListener
{ "SyncMultiFrameListener_new", py_SyncMultiFrameListener_new, METH_VARARGS, NULL },
{ "SyncMultiFrameListener_waitForNewFrame", py_SyncMultiFrameListener_waitForNewFrame, METH_VARARGS, NULL },
{ "SyncMultiFrameListener_release", py_SyncMultiFrameListener_release, METH_VARARGS, NULL },
// Registration
{ "Registration_new", py_Registration_new, METH_VARARGS, NULL },
{ "Registration_apply", py_Registration_apply, METH_VARARGS, NULL },
// FrameMap
{ "FrameMap_getFrame", py_FrameMap_getFrame, METH_VARARGS, NULL },
// Frame
{ "Frame_getHeight", py_Frame_getHeight, METH_VARARGS, NULL },
{ "Frame_getWidth", py_Frame_getWidth, METH_VARARGS, NULL },
{ "Frame_getData", py_Frame_getData, METH_VARARGS, NULL },
{ "Frame_getDepthData", py_Frame_getDepthData, METH_VARARGS, NULL },
// Sentinel
{ NULL, NULL, 0, NULL}
};
PyMODINIT_FUNC init_pyfreenect2() {
/// enables debug of libfreenect2
///libfreenect2::setGlobalLogger(libfreenect2::createConsoleLogger(libfreenect2::Logger::Debug));
import_array();
Py_InitModule("_pyfreenect2", pyfreenect2Methods);
import_array();
}