licornea_tools
Main Page
Classes
Files
File List
File Members
src
kinect
close_kinect.cc
Go to the documentation of this file.
1
#include "
lib/freenect2.h
"
2
#include <iostream>
3
#include <stdexcept>
4
5
using namespace
tlz
;
6
7
int
main
() {
8
using namespace
libfreenect2;
9
10
Freenect2 context;
11
int
count = context.enumerateDevices();
12
std::cout << count <<
" Kinect devices found.\n"
;
13
if
(count == 0)
throw
std::runtime_error(
"Kinect not found"
);
14
15
Freenect2Device* device = context.openDevice(0);
16
if
(device ==
nullptr
)
throw
std::runtime_error(
"could not open device"
);
17
18
device->start();
19
device->close();
20
delete
device;
21
}
main
int main()
Definition:
close_kinect.cc:7
freenect2.h
tlz
Definition:
feature_slopes.cc:7
Generated by
1.8.11