-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathofApp.h
More file actions
92 lines (68 loc) · 2.07 KB
/
ofApp.h
File metadata and controls
92 lines (68 loc) · 2.07 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#pragma once
#include "ofMain.h"
#include "ofxOpenCv.h"
#include "ofxKinect.h"
#include "ofxGui.h"
#include "ofxCameraSaveLoad.h"
// Windows users:
// You MUST install the libfreenect kinect drivers in order to be able to use
// ofxKinect. Plug in the kinect and point your Windows Device Manager to the
// driver folder in:
//
// ofxKinect/libs/libfreenect/platform/windows/inf
//
// This should install the Kinect camera, motor, & audio drivers.
//
// You CANNOT use this driver and the OpenNI driver with the same device. You
// will have to manually update the kinect device to use the libfreenect drivers
// and/or uninstall/reinstall it in Device Manager.
//
// No way around the Windows driver dance, sorry.
// uncomment this to read from two kinects simultaneously
#define USE_TWO_KINECTS
class ofApp : public ofBaseApp {
public:
void setup();
void update();
void draw();
void exit();
void drawThePointCloud1();
void drawThePointCloud2();
void keyPressed(int key);
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void mouseEntered(int x, int y);
void mouseExited(int x, int y);
void windowResized(int w, int h);
ofxKinect kinect;
#ifdef USE_TWO_KINECTS
ofxKinect kinect2;
#endif
ofxCvColorImage colorImg;
ofxCvGrayscaleImage grayImage; // grayscale depth image
ofxCvGrayscaleImage grayThreshNear; // the near thresholded image
ofxCvGrayscaleImage grayThreshFar; // the far thresholded image
ofxCvContourFinder contourFinder;
bool bThreshWithOpenCV;
bool bDrawPointCloud;
int nearThreshold;
int farThreshold;
int angle;
// used for viewing the point cloud
ofEasyCam easyCam;
//gui basics
ofxPanel gui;
ofxToggle bTopVP;
ofxToggle bSideVP;
ofxToggle b3DVP;
ofNode kinect2cam;
ofxToggle k2FreezeMotion;
ofxFloatSlider k2Dolly;
ofxFloatSlider k2Truck;
ofxFloatSlider k2Boom;
ofxFloatSlider k2Rotate;
ofxFloatSlider k2Tilt;
ofxIntSlider k2RotatePoint;
ofxToggle bUseColor;
};