├── .gitignore
├── .gitmodules
├── README.md
├── addon_config.mk
├── example-sender
├── addons.make
├── example-sender.sln
├── example-sender.vcxproj
├── example-sender.vcxproj.filters
├── icon.rc
└── src
│ ├── main.cpp
│ ├── ofApp.cpp
│ └── ofApp.h
├── example
├── Project.xcconfig
├── addons.make
├── example.sln
├── example.vcxproj
├── example.vcxproj.filters
├── example.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ ├── example Debug.xcscheme
│ │ └── example Release.xcscheme
├── icon.rc
├── openFrameworks-Info.plist
└── src
│ ├── main.cpp
│ ├── ofApp.cpp
│ └── ofApp.h
└── src
├── ofxBaseDepthCamera.cpp
├── ofxBaseDepthCamera.h
├── ofxDepthCameraKinect.cpp
├── ofxDepthCameraKinect.h
├── ofxDepthCameraKinectV2.cpp
├── ofxDepthCameraKinectV2.h
├── ofxDepthCameraOrbbecAstra.cpp
├── ofxDepthCameraOrbbecAstra.h
├── ofxDepthCameraProvider.cpp
├── ofxDepthCameraProvider.h
├── ofxDepthCameraReceiver.cpp
├── ofxDepthCameraReceiver.h
├── ofxDepthCameraSender.cpp
├── ofxDepthCameraSender.h
├── ofxDepthCameraUtils.cpp
└── ofxDepthCameraUtils.h
/.gitignore:
--------------------------------------------------------------------------------
1 | #########################
2 | # openFrameworks patterns
3 | #########################
4 |
5 | # build files
6 | openFrameworks.a
7 | openFrameworksDebug.a
8 | openFrameworksUniversal.a
9 | libs/openFrameworksCompiled/lib/*/*
10 | !libs/openFrameworksCompiled/lib/*/.gitkeep
11 |
12 | # apothecary
13 | scripts/apothecary/build
14 |
15 | # rule to avoid non-official addons going into git
16 | # see addons/.gitignore
17 | addons/*
18 |
19 | # rule to avoid non-official apps going into git
20 | # see apps/.gitignore
21 | apps/*
22 |
23 | # also, see examples/.gitignore
24 |
25 | #########################
26 | # general
27 | #########################
28 |
29 | [Bb]uild/
30 | [Oo]bj/
31 | *.o
32 | examples/**/[Dd]ebug*/
33 | examples/**/[Rr]elease*/
34 | examples/**/gcc-debug/
35 | examples/**/gcc-release/
36 | tests/**/[Dd]ebug*/
37 | tests/**/[Rr]elease*/
38 | tests/**/gcc-debug/
39 | tests/**/gcc-release/
40 | *.mode*
41 | *.app/
42 | *.pyc
43 | .svn/
44 | *.log
45 | *.cpp.eep
46 | *.cpp.elf
47 | *.cpp.hex
48 |
49 | #########################
50 | # IDE
51 | #########################
52 |
53 | # XCode
54 | *.pbxuser
55 | *.perspective
56 | *.perspectivev3
57 | *.mode1v3
58 | *.mode2v3
59 | # XCode 4
60 | xcuserdata
61 | *.xcworkspace
62 |
63 | # Code::Blocks
64 | *.depend
65 | *.layout
66 |
67 | # Visual Studio
68 | *.sdf
69 | *.opensdf
70 | *.suo
71 | *.pdb
72 | *.ilk
73 | *.aps
74 | ipch/
75 |
76 | # Eclipse
77 | .metadata
78 | local.properties
79 | .externalToolBuilders
80 |
81 | # Android Studio
82 | .idea
83 | .gradle
84 | gradle
85 | gradlew
86 | gradlew.bat
87 |
88 | # QtCreator
89 | *.qbs.user
90 | *.pro.user
91 | *.pri
92 |
93 |
94 | #########################
95 | # operating system
96 | #########################
97 |
98 | # Linux
99 | *~
100 | # KDE
101 | .directory
102 | .AppleDouble
103 |
104 | # OSX
105 | .DS_Store
106 | *.swp
107 | *~.nib
108 | # Thumbnails
109 | ._*
110 |
111 | # Windows
112 | # Windows image file caches
113 | Thumbs.db
114 | # Folder config file
115 | Desktop.ini
116 |
117 | # Android
118 | .csettings
119 | /libs/openFrameworksCompiled/project/android/paths.make
120 |
121 | # Android Studio
122 | *.iml
123 |
124 | #########################
125 | # miscellaneous
126 | #########################
127 |
128 | .mailmap
129 |
130 | #########################
131 | # ofxDepthCamera
132 | #########################
133 |
134 | *.dll
135 | *.lib
136 | *.exe
137 | *.exp
138 | *.iobj
139 | *.ipdb
140 | *.raw
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "addons/ofxImageSequence"]
2 | path = addons/ofxImageSequence
3 | url = https://github.com/mattfelsen/ofxImageSequence
4 | [submodule "addons/ofxImageSequencePlayback"]
5 | path = addons/ofxImageSequencePlayback
6 | url = https://github.com/mattfelsen/ofxImageSequencePlayback
7 | [submodule "addons/ofxImageSequenceRecorder"]
8 | path = addons/ofxImageSequenceRecorder
9 | url = https://github.com/mattfelsen/ofxImageSequenceRecorder
10 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ofxDepthCamera
2 |
3 | Device-independent library for working with depth cameras, recording, playback, and streaming remotely
4 |
5 | **This is a work in progress!** It's half-done (at best), so some stuff isn't implemented yes and the rest probably doesn't work :) Send a note if you're curious what this is about or want to help. More info coming soon.
6 |
7 | ## Update! Read this!
8 |
9 | **Look in this other branch** --> [refactor](http://github.com/mattfelsen/ofxDepthCamera/tree/refactor)! I have a significant rewrite that is mostly done, though I haven't been able to test everything as much as I'd like before considering it worthy of merging back to `master`. I think it's a much better architecture, and if you're using (or just looking!) at this addon at all, you should check that out. The instructions are somewhat out of date, but the example project should be a good starting point. Open an issue if you're having trouble or have questions!
10 |
11 | ## Motivation
12 |
13 | There are [a](https://github.com/genekogan/ofxKinectProjectorToolkit) [lot](https://github.com/kylemcdonald/ofxVirtualKinect) [of](https://github.com/dasaki/ofxKinectBlobTracker) [addons](https://github.com/toyoshim/ofxRemoteKinect) for using the Kinect & openFrameworks. Recently I've been working with the KinectV2 on Windows, and ended up looking into, modifying, and sometimes rewriting these addons to work with `ofxKinectForWindows2`, or with `ofxMultiKinectV2` on Mac. Many of these addons don't use camera- or SDK-specific features – they are just using the depth & color images, and the registration between them.
14 |
15 | With [so](http://www.xbox.com/en-US/xbox-360/accessories/kinect) [many](http://www.xbox.com/en-US/xbox-one/accessories/kinect-for-xbox-one) [depth](http://click.intel.com/intel-realsense-developer-kit.html) [cameras](https://orbbec3d.com) [available](http://structure.io) [now](https://www.asus.com/3D-Sensor/), separating the functionality of useful addons from the dependency of a specific camera or platform, and providing a consistent API to get needed data from the camera, seemed like a Very Good Idea. After all, isn't that what openFrameworks is about? There are already many different implementations of things encapsulated within consistent interfaces in `ofVideoPlayer`, `ofSoundPlayer`, etc.
16 |
17 | On top of that, being able to easily & seamlessly use multiple cameras together, record and play back in sync, and utilize directly-connected or remote cameras (on a different computer on the same LAN), is very attractive. And so this addon was born.
18 |
19 | More thoughts are articulated in [this openFrameworks forum post](http://forum.openframeworks.cc/t/new-addon-ofxdepthcamera/20987).
20 |
21 |
22 | ## Setup
23 |
24 | As mentioned, this is a work in progress, so hopefully this process gets simplified over time.
25 |
26 | Clone this addon, and then clone the dependencies which are set up as submodules. The dependencies include ofxImageSequence, ofxImageSequencePlayback, and ofxImageSequenceRecorder, which I've templated to work with various types of ofPixels (including ofShortPixels needed for the 16-bit depth data):
27 |
28 | ```
29 | git clone https://github.com/mattfelsen/ofxDepthCamera
30 | cd ofxDepthCamera
31 | git submodule update --init
32 | ```
33 |
34 | You will also need either [ofxLibwebsockets](https://github.com/labatrockwell/ofxLibwebsockets) or [ofxZmq](https://github.com/mattfelsen/ofxZmq/tree/vs2015-x64-precompiled-libs) if you are planning to use a remotely-connected camera and are streaming its data over the network:
35 |
36 | ```
37 | git clone https://github.com/labatrockwell/ofxLibwebsockets
38 | git clone https://github.com/mattfelsen/ofxZmq --branch vs2015-x64-precompiled-libs
39 | ```
40 |
41 | ## Usage
42 |
43 | Use the projectGenerator to create a new project. As addons, select ofxDepthCamera and the standalone addon for the camera you're interested in using, i.e. ofxKinect, ofxKinectForWindows2, etc. If you plan on streaming data from a remote camera, also add either ofxLibwebsockets or ofxZmq.
44 |
45 | Open your new project, and add the adapter for the camera you're using to your project. For example, if you're using a Kinect v1 device, add the header & source files for ofxDepthCameraKinect.
46 |
47 | If you are using a remote camera, also be sure to enable the streaming method you prefer by enabling the proper `#define` at the top of `ofxDepthCameraSender.h` and `ofxDepthCameraReceiver.h`
48 |
49 | ## Examples
50 |
51 | There is an `example` project which demonstrates switching between live playback, recording, playing recorded data (with folder drag & drop support), and streaming from a remote camera. To send data from a remote computer with a camera attached, use the `example-sender` project. You can switch between ofxLibwebsockets and ofxZmq with a `#define` in `ofxDepthCameraSender.h`
52 |
--------------------------------------------------------------------------------
/addon_config.mk:
--------------------------------------------------------------------------------
1 | meta:
2 | ADDON_NAME = ofxDepthCamera
3 | ADDON_DESCRIPTION = Device-independent library for working with multiple depth cameras, recording, playback, and streaming remotely
4 | ADDON_AUTHOR = Matt Felsen
5 | ADDON_TAGS = "kinect" "depth camera" "middleware"
6 | ADDON_URL = http://github.com/mattfelsen/ofxDepthCamera
7 |
8 | common:
9 | ADDON_INCLUDES += addons/ofxImageSequence/src
10 | ADDON_INCLUDES += addons/ofxImageSequencePlayback/src
11 | ADDON_INCLUDES += addons/ofxImageSequenceRecorder/src
12 |
13 | ADDON_SOURCES += addons/ofxImageSequence/src/ofxImageSequence.h
14 | ADDON_SOURCES += addons/ofxImageSequence/src/ofxImageSequence.cpp
15 | ADDON_SOURCES += addons/ofxImageSequencePlayback/src/ofxImageSequencePlayback.h
16 | ADDON_SOURCES += addons/ofxImageSequencePlayback/src/ofxImageSequencePlayback.cpp
17 | ADDON_SOURCES += addons/ofxImageSequenceRecorder/src/ofxImageSequenceRecorder.h
18 |
19 | ADDON_SOURCES_EXCLUDE = src/ofxDepthCameraSender.h
20 | ADDON_SOURCES_EXCLUDE += src/ofxDepthCameraSender.cpp
21 | ADDON_SOURCES_EXCLUDE += src/ofxDepthCameraKinect.h
22 | ADDON_SOURCES_EXCLUDE += src/ofxDepthCameraKinect.cpp
23 | ADDON_SOURCES_EXCLUDE += src/ofxDepthCameraKinectV2.h
24 | ADDON_SOURCES_EXCLUDE += src/ofxDepthCameraKinectV2.cpp
25 | ADDON_SOURCES_EXCLUDE += src/ofxDepthCameraOrbbecAstra.h
26 | ADDON_SOURCES_EXCLUDE += src/ofxDepthCameraOrbbecAstra.cpp
27 |
--------------------------------------------------------------------------------
/example-sender/addons.make:
--------------------------------------------------------------------------------
1 | ofxDepthCamera
2 | ofxImageSequence
3 | ofxImageSequencePlayback
4 | ofxImageSequenceRecorder
5 | ofxLibwebsockets
6 | ofxZmq
7 |
--------------------------------------------------------------------------------
/example-sender/example-sender.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio 14
3 | VisualStudioVersion = 14.0.23107.0
4 | MinimumVisualStudioVersion = 10.0.40219.1
5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example-sender", "example-sender.vcxproj", "{7FD42DF7-442E-479A-BA76-D0022F99702A}"
6 | EndProject
7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openframeworksLib", "..\..\..\libs\openFrameworksCompiled\project\vs\openframeworksLib.vcxproj", "{5837595D-ACA9-485C-8E76-729040CE4B0B}"
8 | EndProject
9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ofxKinectForWindows2Lib", "..\..\ofxKinectForWindows2\ofxKinectForWindows2Lib\ofxKinectForWindows2Lib.vcxproj", "{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}"
10 | EndProject
11 | Global
12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
13 | Debug|Win32 = Debug|Win32
14 | Debug|x64 = Debug|x64
15 | Release|Win32 = Release|Win32
16 | Release|x64 = Release|x64
17 | EndGlobalSection
18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
19 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32
20 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32
21 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64
22 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64
23 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32
24 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32
25 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64
26 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64
27 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32
28 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32
29 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64
30 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64
31 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32
32 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32
33 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64
34 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64
35 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.ActiveCfg = Debug|Win32
36 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.Build.0 = Debug|Win32
37 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.ActiveCfg = Debug|x64
38 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.Build.0 = Debug|x64
39 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.ActiveCfg = Release|Win32
40 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.Build.0 = Release|Win32
41 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.ActiveCfg = Release|x64
42 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.Build.0 = Release|x64
43 | EndGlobalSection
44 | GlobalSection(SolutionProperties) = preSolution
45 | HideSolutionNode = FALSE
46 | EndGlobalSection
47 | EndGlobal
48 |
--------------------------------------------------------------------------------
/example-sender/example-sender.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Debug
10 | x64
11 |
12 |
13 | Release
14 | Win32
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | {7FD42DF7-442E-479A-BA76-D0022F99702A}
23 | Win32Proj
24 | example-sender
25 |
26 |
27 |
28 | Application
29 | Unicode
30 | v140
31 |
32 |
33 | Application
34 | Unicode
35 | v140
36 |
37 |
38 | Application
39 | Unicode
40 | true
41 | v140
42 |
43 |
44 | Application
45 | Unicode
46 | true
47 | v140
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 | bin\
73 | obj\$(Configuration)\
74 | $(ProjectName)_debug
75 | true
76 | true
77 |
78 |
79 | bin\
80 | obj\$(Configuration)\
81 | $(ProjectName)_debug
82 | true
83 | true
84 |
85 |
86 | bin\
87 | obj\$(Configuration)\
88 | false
89 |
90 |
91 | bin\
92 | obj\$(Configuration)\
93 | false
94 |
95 |
96 |
97 | Disabled
98 | EnableFastChecks
99 | %(PreprocessorDefinitions)
100 | MultiThreadedDebugDLL
101 | Level3
102 | %(AdditionalIncludeDirectories);..\..\..\addons\ofxDepthCamera\src;..\..\..\addons\ofxImageSequence\src;..\..\..\addons\ofxImageSequencePlayback\src;..\..\..\addons\ofxImageSequenceRecorder\src;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json;..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src;..\..\..\addons\ofxLibwebsockets\src;..\..\..\addons\ofxZmq\libs;..\..\..\addons\ofxZmq\libs\zmq;..\..\..\addons\ofxZmq\libs\zmq\include;..\..\..\addons\ofxZmq\libs\zmq\lib;..\..\..\addons\ofxZmq\libs\zmq\lib\vs;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Debug;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Release;..\..\..\addons\ofxZmq\src
103 | CompileAsCpp
104 |
105 |
106 | true
107 | Console
108 | false
109 | %(AdditionalDependencies);websockets_static.lib;ZLIB.lib
110 | %(AdditionalLibraryDirectories);..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\vs\Win32\Debug
111 |
112 |
113 |
114 |
115 |
116 | Disabled
117 | EnableFastChecks
118 | %(PreprocessorDefinitions)
119 | MultiThreadedDebugDLL
120 | Level3
121 | %(AdditionalIncludeDirectories);..\..\..\addons\ofxDepthCamera\src;..\..\..\addons\ofxImageSequence\src;..\..\..\addons\ofxImageSequencePlayback\src;..\..\..\addons\ofxImageSequenceRecorder\src;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json;..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src;..\..\..\addons\ofxLibwebsockets\src;..\..\..\addons\ofxZmq\libs;..\..\..\addons\ofxZmq\libs\zmq;..\..\..\addons\ofxZmq\libs\zmq\include;..\..\..\addons\ofxZmq\libs\zmq\lib;..\..\..\addons\ofxZmq\libs\zmq\lib\vs;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Debug;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Release;..\..\..\addons\ofxZmq\src
122 | CompileAsCpp
123 | true
124 |
125 |
126 | true
127 | Console
128 | false
129 | %(AdditionalDependencies);websockets_static.lib;ZLIB.lib;libzmq-v120-mt-4_0_4.lib
130 | %(AdditionalLibraryDirectories);..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\vs\x64\Debug;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Release
131 |
132 |
133 |
134 |
135 |
136 | false
137 | %(PreprocessorDefinitions)
138 | MultiThreadedDLL
139 | Level3
140 | %(AdditionalIncludeDirectories);..\..\..\addons\ofxDepthCamera\src;..\..\..\addons\ofxImageSequence\src;..\..\..\addons\ofxImageSequencePlayback\src;..\..\..\addons\ofxImageSequenceRecorder\src;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json;..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src;..\..\..\addons\ofxLibwebsockets\src;..\..\..\addons\ofxZmq\libs;..\..\..\addons\ofxZmq\libs\zmq;..\..\..\addons\ofxZmq\libs\zmq\include;..\..\..\addons\ofxZmq\libs\zmq\lib;..\..\..\addons\ofxZmq\libs\zmq\lib\vs;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Debug;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Release;..\..\..\addons\ofxZmq\src
141 | CompileAsCpp
142 | true
143 |
144 |
145 | false
146 | false
147 | Console
148 | true
149 | true
150 | false
151 | %(AdditionalDependencies);websockets_static.lib;ZLIB.lib
152 | %(AdditionalLibraryDirectories);..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\vs\Win32\Release
153 |
154 |
155 |
156 |
157 |
158 | false
159 | %(PreprocessorDefinitions)
160 | MultiThreadedDLL
161 | Level3
162 | %(AdditionalIncludeDirectories);..\..\..\addons\ofxDepthCamera\src;..\..\..\addons\ofxImageSequence\src;..\..\..\addons\ofxImageSequencePlayback\src;..\..\..\addons\ofxImageSequenceRecorder\src;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json;..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src;..\..\..\addons\ofxLibwebsockets\src;..\..\..\addons\ofxZmq\libs;..\..\..\addons\ofxZmq\libs\zmq;..\..\..\addons\ofxZmq\libs\zmq\include;..\..\..\addons\ofxZmq\libs\zmq\lib;..\..\..\addons\ofxZmq\libs\zmq\lib\vs;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Debug;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Release;..\..\..\addons\ofxZmq\src
163 | CompileAsCpp
164 |
165 |
166 | false
167 | false
168 | Console
169 | true
170 | true
171 | false
172 | %(AdditionalDependencies);websockets_static.lib;ZLIB.lib;libzmq-v120-mt-4_0_4.lib
173 | %(AdditionalLibraryDirectories);..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\vs\x64\Release;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64\Release
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 | {5837595d-aca9-485c-8e76-729040ce4b0b}
241 |
242 |
243 | {f6008d6a-6d39-4b68-840e-e7ac8ed855da}
244 |
245 |
246 |
247 |
248 | /D_DEBUG %(AdditionalOptions)
249 | /D_DEBUG %(AdditionalOptions)
250 | $(OF_ROOT)\libs\openFrameworksCompiled\project\vs
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
--------------------------------------------------------------------------------
/example-sender/example-sender.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | src
6 |
7 |
8 | src
9 |
10 |
11 | addons\ofxDepthCamera\src
12 |
13 |
14 | addons\ofxDepthCamera\src
15 |
16 |
17 | addons\ofxDepthCamera\src
18 |
19 |
20 | addons\ofxDepthCamera\src
21 |
22 |
23 | addons\ofxImageSequence\src
24 |
25 |
26 | addons\ofxImageSequencePlayback\src
27 |
28 |
29 | addons\ofxLibwebsockets\libs\jsoncpp
30 |
31 |
32 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
33 |
34 |
35 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
36 |
37 |
38 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
39 |
40 |
41 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
42 |
43 |
44 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
45 |
46 |
47 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
48 |
49 |
50 | addons\ofxZmq\src
51 |
52 |
53 | addons\ofxZmq\src
54 |
55 |
56 | addons\ofxZmq\src
57 |
58 |
59 | addons\ofxZmq\src
60 |
61 |
62 | addons\ofxZmq\src
63 |
64 |
65 | addons\ofxZmq\src
66 |
67 |
68 | addons\ofxZmq\src
69 |
70 |
71 | addons\ofxDepthCamera\src
72 |
73 |
74 | addons\ofxDepthCamera\src
75 |
76 |
77 |
78 |
79 | {d8376475-7454-4a24-b08a-aac121d3ad6f}
80 |
81 |
82 | {71834F65-F3A9-211E-73B8-DC85}
83 |
84 |
85 | {C3FE4EA0-8EC6-A17D-5A99-A9DC}
86 |
87 |
88 | {F15C11AB-1DC1-8C35-391B-6D40}
89 |
90 |
91 | {CE11D2C6-AAAF-2D45-15D6-B2D2}
92 |
93 |
94 | {DA7A4FE4-7E4A-2E2D-E9CC-41C2}
95 |
96 |
97 | {BA1BE552-FE46-AFB1-5D15-EC36}
98 |
99 |
100 | {38021462-BA4F-C53B-4047-C6CA}
101 |
102 |
103 | {897CE904-3E5E-71B2-4126-2C08}
104 |
105 |
106 | {6A7F5284-57D4-5052-B04A-943F}
107 |
108 |
109 | {04A0ABD3-BEB0-79C1-78DC-1B0C}
110 |
111 |
112 | {BD45AF89-23CA-D761-87B2-E28B}
113 |
114 |
115 | {93A2255B-E819-7999-658F-5C8B}
116 |
117 |
118 | {EDF3DFA8-3A48-F2BE-828A-56B4}
119 |
120 |
121 | {E61DA5C1-FC26-09C7-51F3-45B4}
122 |
123 |
124 | {F5CB4033-7B46-FD26-E6BF-225D}
125 |
126 |
127 | {A9821612-3A92-AF18-4416-E910}
128 |
129 |
130 | {246E3DDA-BF78-504E-9BF2-6FA8}
131 |
132 |
133 | {D876D8D2-B863-D307-0F4A-F791}
134 |
135 |
136 | {A5834E6F-4120-53E7-CD52-711C}
137 |
138 |
139 | {D616296F-164E-00EF-4F39-D224}
140 |
141 |
142 | {2C32EA5F-B9FA-46A5-A44F-571D}
143 |
144 |
145 | {89A03147-8C27-F1AD-564D-81EA}
146 |
147 |
148 | {06526874-7766-2AD8-06AE-ECBC}
149 |
150 |
151 | {3AB84A02-FD16-2DDF-020C-90EC}
152 |
153 |
154 | {E011EB5F-CE89-86A8-B762-177A}
155 |
156 |
157 |
158 |
159 | src
160 |
161 |
162 | addons\ofxDepthCamera\src
163 |
164 |
165 | addons\ofxDepthCamera\src
166 |
167 |
168 | addons\ofxDepthCamera\src
169 |
170 |
171 | addons\ofxDepthCamera\src
172 |
173 |
174 | addons\ofxImageSequence\src
175 |
176 |
177 | addons\ofxImageSequencePlayback\src
178 |
179 |
180 | addons\ofxImageSequenceRecorder\src
181 |
182 |
183 | addons\ofxLibwebsockets\src
184 |
185 |
186 | addons\ofxLibwebsockets\libs\jsoncpp\json
187 |
188 |
189 | addons\ofxLibwebsockets\libs\jsoncpp\json
190 |
191 |
192 | addons\ofxLibwebsockets\libs\libwebsockets\include
193 |
194 |
195 | addons\ofxLibwebsockets\libs\libwebsockets\include
196 |
197 |
198 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
199 |
200 |
201 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
202 |
203 |
204 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
205 |
206 |
207 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
208 |
209 |
210 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
211 |
212 |
213 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
214 |
215 |
216 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
217 |
218 |
219 | addons\ofxZmq\src
220 |
221 |
222 | addons\ofxZmq\src
223 |
224 |
225 | addons\ofxZmq\src
226 |
227 |
228 | addons\ofxZmq\src
229 |
230 |
231 | addons\ofxZmq\src
232 |
233 |
234 | addons\ofxZmq\src
235 |
236 |
237 | addons\ofxZmq\src
238 |
239 |
240 | addons\ofxZmq\src
241 |
242 |
243 | addons\ofxZmq\libs\zmq\include
244 |
245 |
246 | addons\ofxZmq\libs\zmq\include
247 |
248 |
249 | addons\ofxZmq\libs\zmq\include
250 |
251 |
252 | addons\ofxDepthCamera\src
253 |
254 |
255 | addons\ofxDepthCamera\src
256 |
257 |
258 |
259 |
260 |
261 |
--------------------------------------------------------------------------------
/example-sender/icon.rc:
--------------------------------------------------------------------------------
1 | // Icon Resource Definition
2 | #define MAIN_ICON 102
3 |
4 | #if defined(_DEBUG)
5 | MAIN_ICON ICON "icon_debug.ico"
6 | #else
7 | MAIN_ICON ICON "icon.ico"
8 | #endif
9 |
--------------------------------------------------------------------------------
/example-sender/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/example-sender/src/ofApp.cpp:
--------------------------------------------------------------------------------
1 | #include "ofApp.h"
2 |
3 | //--------------------------------------------------------------
4 | void ofApp::setup(){
5 | device.setup();
6 | sender.setup(device, 9200);
7 | }
8 |
9 | //--------------------------------------------------------------
10 | void ofApp::update(){
11 | sender.update();
12 | }
13 |
14 | //--------------------------------------------------------------
15 | void ofApp::draw(){
16 | device.getDepthImage().draw(0, 0);
17 | }
18 |
19 | //--------------------------------------------------------------
20 | void ofApp::keyPressed(int key){
21 |
22 | }
23 |
24 | //--------------------------------------------------------------
25 | void ofApp::keyReleased(int key){
26 |
27 | }
28 |
29 | //--------------------------------------------------------------
30 | void ofApp::mouseMoved(int x, int y ){
31 |
32 | }
33 |
34 | //--------------------------------------------------------------
35 | void ofApp::mouseDragged(int x, int y, int button){
36 |
37 | }
38 |
39 | //--------------------------------------------------------------
40 | void ofApp::mousePressed(int x, int y, int button){
41 |
42 | }
43 |
44 | //--------------------------------------------------------------
45 | void ofApp::mouseReleased(int x, int y, int button){
46 |
47 | }
48 |
49 | //--------------------------------------------------------------
50 | void ofApp::mouseEntered(int x, int y){
51 |
52 | }
53 |
54 | //--------------------------------------------------------------
55 | void ofApp::mouseExited(int x, int y){
56 |
57 | }
58 |
59 | //--------------------------------------------------------------
60 | void ofApp::windowResized(int w, int h){
61 |
62 | }
63 |
64 | //--------------------------------------------------------------
65 | void ofApp::gotMessage(ofMessage msg){
66 |
67 | }
68 |
69 | //--------------------------------------------------------------
70 | void ofApp::dragEvent(ofDragInfo dragInfo){
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/example-sender/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxDepthCameraKinectV2.h"
5 | #include "ofxDepthCameraSender.h"
6 |
7 | class ofApp : public ofBaseApp{
8 |
9 | public:
10 | void setup();
11 | void update();
12 | void draw();
13 |
14 | void keyPressed(int key);
15 | void keyReleased(int key);
16 | void mouseMoved(int x, int y );
17 | void mouseDragged(int x, int y, int button);
18 | void mousePressed(int x, int y, int button);
19 | void mouseReleased(int x, int y, int button);
20 | void mouseEntered(int x, int y);
21 | void mouseExited(int x, int y);
22 | void windowResized(int w, int h);
23 | void dragEvent(ofDragInfo dragInfo);
24 | void gotMessage(ofMessage msg);
25 |
26 | ofxDepthCameraKinectV2 device;
27 | ofxDepthCameraSender sender;
28 |
29 | };
30 |
--------------------------------------------------------------------------------
/example/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/example/addons.make:
--------------------------------------------------------------------------------
1 | ofxDepthCamera
2 |
--------------------------------------------------------------------------------
/example/example.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio 14
3 | VisualStudioVersion = 14.0.23107.0
4 | MinimumVisualStudioVersion = 10.0.40219.1
5 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcxproj", "{7FD42DF7-442E-479A-BA76-D0022F99702A}"
6 | EndProject
7 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openframeworksLib", "..\..\..\libs\openFrameworksCompiled\project\vs\openframeworksLib.vcxproj", "{5837595D-ACA9-485C-8E76-729040CE4B0B}"
8 | EndProject
9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ofxKinectForWindows2Lib", "..\..\ofxKinectForWindows2\ofxKinectForWindows2Lib\ofxKinectForWindows2Lib.vcxproj", "{F6008D6A-6D39-4B68-840E-E7AC8ED855DA}"
10 | EndProject
11 | Global
12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
13 | Debug|Win32 = Debug|Win32
14 | Debug|x64 = Debug|x64
15 | Release|Win32 = Release|Win32
16 | Release|x64 = Release|x64
17 | EndGlobalSection
18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
19 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.ActiveCfg = Debug|Win32
20 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|Win32.Build.0 = Debug|Win32
21 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.ActiveCfg = Debug|x64
22 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Debug|x64.Build.0 = Debug|x64
23 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.ActiveCfg = Release|Win32
24 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|Win32.Build.0 = Release|Win32
25 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.ActiveCfg = Release|x64
26 | {7FD42DF7-442E-479A-BA76-D0022F99702A}.Release|x64.Build.0 = Release|x64
27 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.ActiveCfg = Debug|Win32
28 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|Win32.Build.0 = Debug|Win32
29 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.ActiveCfg = Debug|x64
30 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Debug|x64.Build.0 = Debug|x64
31 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.ActiveCfg = Release|Win32
32 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|Win32.Build.0 = Release|Win32
33 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.ActiveCfg = Release|x64
34 | {5837595D-ACA9-485C-8E76-729040CE4B0B}.Release|x64.Build.0 = Release|x64
35 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.ActiveCfg = Debug|Win32
36 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|Win32.Build.0 = Debug|Win32
37 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.ActiveCfg = Debug|x64
38 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Debug|x64.Build.0 = Debug|x64
39 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.ActiveCfg = Release|Win32
40 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|Win32.Build.0 = Release|Win32
41 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.ActiveCfg = Release|x64
42 | {F6008D6A-6D39-4B68-840E-E7AC8ED855DA}.Release|x64.Build.0 = Release|x64
43 | EndGlobalSection
44 | GlobalSection(SolutionProperties) = preSolution
45 | HideSolutionNode = FALSE
46 | EndGlobalSection
47 | EndGlobal
48 |
--------------------------------------------------------------------------------
/example/example.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Debug
10 | x64
11 |
12 |
13 | Release
14 | Win32
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | {7FD42DF7-442E-479A-BA76-D0022F99702A}
23 | Win32Proj
24 | example
25 |
26 |
27 |
28 | Application
29 | Unicode
30 | v140
31 |
32 |
33 | Application
34 | Unicode
35 | v140
36 |
37 |
38 | Application
39 | Unicode
40 | true
41 | v140
42 |
43 |
44 | Application
45 | Unicode
46 | true
47 | v140
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 | bin\
73 | obj\$(Configuration)\
74 | $(ProjectName)_debug
75 | true
76 | true
77 |
78 |
79 | bin\
80 | obj\$(Configuration)\
81 | $(ProjectName)_debug
82 | true
83 | true
84 |
85 |
86 | bin\
87 | obj\$(Configuration)\
88 | false
89 |
90 |
91 | bin\
92 | obj\$(Configuration)\
93 | false
94 |
95 |
96 |
97 | Disabled
98 | EnableFastChecks
99 | %(PreprocessorDefinitions)
100 | MultiThreadedDebugDLL
101 | Level3
102 | %(AdditionalIncludeDirectories);src;..\..\..\addons\ofxDepthCamera\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequence\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequencePlayback\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequenceRecorder\src;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json;..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src;..\..\..\addons\ofxLibwebsockets\src;..\..\..\addons\ofxZmq\libs;..\..\..\addons\ofxZmq\libs\zmq;..\..\..\addons\ofxZmq\libs\zmq\include;..\..\..\addons\ofxZmq\libs\zmq\lib;..\..\..\addons\ofxZmq\libs\zmq\lib\vs;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64;..\..\..\addons\ofxZmq\src
103 | CompileAsCpp
104 |
105 |
106 | true
107 | Console
108 | false
109 | %(AdditionalDependencies);websockets_static.lib;ZLIB.lib
110 | %(AdditionalLibraryDirectories);..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\vs\Win32\Debug
111 |
112 |
113 |
114 |
115 |
116 | Disabled
117 | EnableFastChecks
118 | %(PreprocessorDefinitions)
119 | MultiThreadedDebugDLL
120 | Level3
121 | %(AdditionalIncludeDirectories);src;..\..\..\addons\ofxDepthCamera\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequence\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequencePlayback\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequenceRecorder\src;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json;..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src;..\..\..\addons\ofxLibwebsockets\src;..\..\..\addons\ofxZmq\libs;..\..\..\addons\ofxZmq\libs\zmq;..\..\..\addons\ofxZmq\libs\zmq\include;..\..\..\addons\ofxZmq\libs\zmq\lib;..\..\..\addons\ofxZmq\libs\zmq\lib\vs;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64;..\..\..\addons\ofxZmq\src
122 | CompileAsCpp
123 | true
124 |
125 |
126 | true
127 | Console
128 | false
129 | %(AdditionalDependencies);websockets_static.lib;ZLIB.lib;libzmq-v120-mt-4_0_4.lib
130 | %(AdditionalLibraryDirectories);..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\vs\x64\Debug;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64
131 |
132 |
133 |
134 |
135 |
136 | false
137 | %(PreprocessorDefinitions)
138 | MultiThreadedDLL
139 | Level3
140 | %(AdditionalIncludeDirectories);src;..\..\..\addons\ofxDepthCamera\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequence\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequencePlayback\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequenceRecorder\src;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json;..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src;..\..\..\addons\ofxLibwebsockets\src;..\..\..\addons\ofxZmq\libs;..\..\..\addons\ofxZmq\libs\zmq;..\..\..\addons\ofxZmq\libs\zmq\include;..\..\..\addons\ofxZmq\libs\zmq\lib;..\..\..\addons\ofxZmq\libs\zmq\lib\vs;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64;..\..\..\addons\ofxZmq\src
141 | CompileAsCpp
142 | true
143 |
144 |
145 | false
146 | false
147 | Console
148 | true
149 | true
150 | false
151 | %(AdditionalDependencies);websockets_static.lib;ZLIB.lib
152 | %(AdditionalLibraryDirectories);..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\vs\Win32\Release
153 |
154 |
155 |
156 |
157 |
158 | false
159 | %(PreprocessorDefinitions)
160 | MultiThreadedDLL
161 | Level3
162 | %(AdditionalIncludeDirectories);src;..\..\..\addons\ofxDepthCamera\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequence\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequencePlayback\src;..\..\..\addons\ofxDepthCamera\addons\ofxImageSequenceRecorder\src;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp;..\..\..\addons\ofxLibwebsockets\libs\jsoncpp\json;..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\include\;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets;..\..\..\addons\ofxLibwebsockets\libs\ofxLibwebsockets\src;..\..\..\addons\ofxLibwebsockets\src;..\..\..\addons\ofxZmq\libs;..\..\..\addons\ofxZmq\libs\zmq;..\..\..\addons\ofxZmq\libs\zmq\include;..\..\..\addons\ofxZmq\libs\zmq\lib;..\..\..\addons\ofxZmq\libs\zmq\lib\vs;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64;..\..\..\addons\ofxZmq\src
163 | CompileAsCpp
164 |
165 |
166 | false
167 | false
168 | Console
169 | true
170 | true
171 | false
172 | %(AdditionalDependencies);websockets_static.lib;ZLIB.lib;libzmq-v120-mt-4_0_4.lib
173 | %(AdditionalLibraryDirectories);..\..\..\addons\ofxLibwebsockets\libs\libwebsockets\lib\vs\x64\Release;..\..\..\addons\ofxZmq\libs\zmq\lib\vs\x64
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 | {5837595d-aca9-485c-8e76-729040ce4b0b}
239 |
240 |
241 | {f6008d6a-6d39-4b68-840e-e7ac8ed855da}
242 |
243 |
244 |
245 |
246 | /D_DEBUG %(AdditionalOptions)
247 | /D_DEBUG %(AdditionalOptions)
248 | $(OF_ROOT)\libs\openFrameworksCompiled\project\vs
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
--------------------------------------------------------------------------------
/example/example.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | src
6 |
7 |
8 | src
9 |
10 |
11 | src
12 |
13 |
14 | src
15 |
16 |
17 | addons\ofxDepthCamera\src
18 |
19 |
20 | addons\ofxDepthCamera\src
21 |
22 |
23 | addons\ofxDepthCamera\src
24 |
25 |
26 | addons\ofxDepthCamera\src
27 |
28 |
29 | other
30 |
31 |
32 | other
33 |
34 |
35 | addons\ofxLibwebsockets\libs\jsoncpp
36 |
37 |
38 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
39 |
40 |
41 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
42 |
43 |
44 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
45 |
46 |
47 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
48 |
49 |
50 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
51 |
52 |
53 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\src
54 |
55 |
56 | addons\ofxZmq\src
57 |
58 |
59 | addons\ofxZmq\src
60 |
61 |
62 | addons\ofxZmq\src
63 |
64 |
65 | addons\ofxZmq\src
66 |
67 |
68 | addons\ofxZmq\src
69 |
70 |
71 | addons\ofxZmq\src
72 |
73 |
74 | addons\ofxZmq\src
75 |
76 |
77 | addons\ofxDepthCamera\src
78 |
79 |
80 |
81 |
82 | {d8376475-7454-4a24-b08a-aac121d3ad6f}
83 |
84 |
85 | {71834F65-F3A9-211E-73B8-DC85}
86 |
87 |
88 | {C3FE4EA0-8EC6-A17D-5A99-A9DC}
89 |
90 |
91 | {F15C11AB-1DC1-8C35-391B-6D40}
92 |
93 |
94 | {A2230F47-9F6B-908F-FF0E-E006}
95 |
96 |
97 | {04A0ABD3-BEB0-79C1-78DC-1B0C}
98 |
99 |
100 | {BD45AF89-23CA-D761-87B2-E28B}
101 |
102 |
103 | {93A2255B-E819-7999-658F-5C8B}
104 |
105 |
106 | {EDF3DFA8-3A48-F2BE-828A-56B4}
107 |
108 |
109 | {E61DA5C1-FC26-09C7-51F3-45B4}
110 |
111 |
112 | {F5CB4033-7B46-FD26-E6BF-225D}
113 |
114 |
115 | {A9821612-3A92-AF18-4416-E910}
116 |
117 |
118 | {246E3DDA-BF78-504E-9BF2-6FA8}
119 |
120 |
121 | {D876D8D2-B863-D307-0F4A-F791}
122 |
123 |
124 | {A5834E6F-4120-53E7-CD52-711C}
125 |
126 |
127 | {D616296F-164E-00EF-4F39-D224}
128 |
129 |
130 | {2C32EA5F-B9FA-46A5-A44F-571D}
131 |
132 |
133 | {89A03147-8C27-F1AD-564D-81EA}
134 |
135 |
136 | {06526874-7766-2AD8-06AE-ECBC}
137 |
138 |
139 | {3AB84A02-FD16-2DDF-020C-90EC}
140 |
141 |
142 | {E011EB5F-CE89-86A8-B762-177A}
143 |
144 |
145 |
146 |
147 | src
148 |
149 |
150 | src
151 |
152 |
153 | addons\ofxDepthCamera\src
154 |
155 |
156 | addons\ofxDepthCamera\src
157 |
158 |
159 | addons\ofxDepthCamera\src
160 |
161 |
162 | addons\ofxDepthCamera\src
163 |
164 |
165 | other
166 |
167 |
168 | other
169 |
170 |
171 | other
172 |
173 |
174 | addons\ofxLibwebsockets\src
175 |
176 |
177 | addons\ofxLibwebsockets\libs\jsoncpp\json
178 |
179 |
180 | addons\ofxLibwebsockets\libs\jsoncpp\json
181 |
182 |
183 | addons\ofxLibwebsockets\libs\libwebsockets\include
184 |
185 |
186 | addons\ofxLibwebsockets\libs\libwebsockets\include
187 |
188 |
189 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
190 |
191 |
192 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
193 |
194 |
195 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
196 |
197 |
198 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
199 |
200 |
201 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
202 |
203 |
204 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
205 |
206 |
207 | addons\ofxLibwebsockets\libs\ofxLibwebsockets\include\ofxLibwebsockets
208 |
209 |
210 | addons\ofxZmq\src
211 |
212 |
213 | addons\ofxZmq\src
214 |
215 |
216 | addons\ofxZmq\src
217 |
218 |
219 | addons\ofxZmq\src
220 |
221 |
222 | addons\ofxZmq\src
223 |
224 |
225 | addons\ofxZmq\src
226 |
227 |
228 | addons\ofxZmq\src
229 |
230 |
231 | addons\ofxZmq\src
232 |
233 |
234 | addons\ofxZmq\libs\zmq\include
235 |
236 |
237 | addons\ofxZmq\libs\zmq\include
238 |
239 |
240 | addons\ofxZmq\libs\zmq\include
241 |
242 |
243 | addons\ofxDepthCamera\src
244 |
245 |
246 |
247 |
248 |
249 |
--------------------------------------------------------------------------------
/example/example.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1C5F682C24F6BA67EE31098E /* ofxDepthCameraUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40ED1C334354E170FCD27C2F /* ofxDepthCameraUtils.cpp */; };
11 | 3C3529677EB4B0AAEEDF2D0A /* ofxBaseDepthCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0795BBDBE8DB567E69809EAA /* ofxBaseDepthCamera.cpp */; };
12 | 5F642CC020FC6E25D5145D88 /* ofxDepthCameraOrbbecAstra.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C3795648E57AB37F6FDA028E /* ofxDepthCameraOrbbecAstra.cpp */; };
13 | BDF4EDBA88906D824D8884F0 /* ofxImageSequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 037B64A4635A2F94413C9E3B /* ofxImageSequence.cpp */; };
14 | C970C9D61BE9B0C7008D9411 /* libAstra.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C970C9D51BE9B0C7008D9411 /* libAstra.dylib */; };
15 | C970C9DA1BE9B0EF008D9411 /* libAstraUL.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C970C9D91BE9B0EF008D9411 /* libAstraUL.dylib */; };
16 | C970C9DB1BE9B101008D9411 /* libAstraAPI.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = C970C9D71BE9B0DE008D9411 /* libAstraAPI.dylib */; };
17 | CBFA105A79C6462E71304E02 /* ofxDepthCameraReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD33DE47C4698496F6F5E138 /* ofxDepthCameraReceiver.cpp */; };
18 | DCCDD3EAFFA3BB05C6C1AC1A /* ofxImageSequencePlayback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB40411520E6C317A156CEDF /* ofxImageSequencePlayback.cpp */; };
19 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; };
20 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; };
21 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */; };
22 | E878BD3FB6A9D57638059280 /* ofxDepthCameraProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7E01BE401D8F38429AC53726 /* ofxDepthCameraProvider.cpp */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXContainerItemProxy section */
26 | E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = {
27 | isa = PBXContainerItemProxy;
28 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */;
29 | proxyType = 2;
30 | remoteGlobalIDString = E4B27C1510CBEB8E00536013;
31 | remoteInfo = openFrameworks;
32 | };
33 | E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */ = {
34 | isa = PBXContainerItemProxy;
35 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */;
36 | proxyType = 1;
37 | remoteGlobalIDString = E4B27C1410CBEB8E00536013;
38 | remoteInfo = openFrameworks;
39 | };
40 | /* End PBXContainerItemProxy section */
41 |
42 | /* Begin PBXCopyFilesBuildPhase section */
43 | E4C2427710CC5ABF004149E2 /* CopyFiles */ = {
44 | isa = PBXCopyFilesBuildPhase;
45 | buildActionMask = 2147483647;
46 | dstPath = "";
47 | dstSubfolderSpec = 10;
48 | files = (
49 | );
50 | runOnlyForDeploymentPostprocessing = 0;
51 | };
52 | /* End PBXCopyFilesBuildPhase section */
53 |
54 | /* Begin PBXFileReference section */
55 | 037B64A4635A2F94413C9E3B /* ofxImageSequence.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxImageSequence.cpp; path = ../../../addons/ofxDepthCamera/addons/ofxImageSequence/src/ofxImageSequence.cpp; sourceTree = SOURCE_ROOT; };
56 | 0795BBDBE8DB567E69809EAA /* ofxBaseDepthCamera.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxBaseDepthCamera.cpp; path = ../../../addons/ofxDepthCamera/src/ofxBaseDepthCamera.cpp; sourceTree = SOURCE_ROOT; };
57 | 40ED1C334354E170FCD27C2F /* ofxDepthCameraUtils.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxDepthCameraUtils.cpp; path = ../../../addons/ofxDepthCamera/src/ofxDepthCameraUtils.cpp; sourceTree = SOURCE_ROOT; };
58 | 7E01BE401D8F38429AC53726 /* ofxDepthCameraProvider.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxDepthCameraProvider.cpp; path = ../../../addons/ofxDepthCamera/src/ofxDepthCameraProvider.cpp; sourceTree = SOURCE_ROOT; };
59 | AAFC1C0616BCEDC0D040BF80 /* ofxBaseDepthCamera.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxBaseDepthCamera.h; path = ../../../addons/ofxDepthCamera/src/ofxBaseDepthCamera.h; sourceTree = SOURCE_ROOT; };
60 | AD33DE47C4698496F6F5E138 /* ofxDepthCameraReceiver.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxDepthCameraReceiver.cpp; path = ../../../addons/ofxDepthCamera/src/ofxDepthCameraReceiver.cpp; sourceTree = SOURCE_ROOT; };
61 | C11C005C8061841BBB5952EC /* ofxDepthCameraProvider.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxDepthCameraProvider.h; path = ../../../addons/ofxDepthCamera/src/ofxDepthCameraProvider.h; sourceTree = SOURCE_ROOT; };
62 | C3795648E57AB37F6FDA028E /* ofxDepthCameraOrbbecAstra.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxDepthCameraOrbbecAstra.cpp; path = ../../../addons/ofxDepthCamera/src/ofxDepthCameraOrbbecAstra.cpp; sourceTree = SOURCE_ROOT; };
63 | C61FAD04AA8862CDFF42DA38 /* ofxDepthCameraUtils.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxDepthCameraUtils.h; path = ../../../addons/ofxDepthCamera/src/ofxDepthCameraUtils.h; sourceTree = SOURCE_ROOT; };
64 | C970C9D51BE9B0C7008D9411 /* libAstra.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libAstra.dylib; path = "../../../../../AstraSDK-0.4.0/lib/libAstra.dylib"; sourceTree = ""; };
65 | C970C9D71BE9B0DE008D9411 /* libAstraAPI.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libAstraAPI.dylib; path = "../../../../../AstraSDK-0.4.0/lib/libAstraAPI.dylib"; sourceTree = ""; };
66 | C970C9D91BE9B0EF008D9411 /* libAstraUL.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libAstraUL.dylib; path = "../../../../../AstraSDK-0.4.0/lib/libAstraUL.dylib"; sourceTree = ""; };
67 | DB40411520E6C317A156CEDF /* ofxImageSequencePlayback.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofxImageSequencePlayback.cpp; path = ../../../addons/ofxDepthCamera/addons/ofxImageSequencePlayback/src/ofxImageSequencePlayback.cpp; sourceTree = SOURCE_ROOT; };
68 | E3371D5EB0C295263951AE41 /* ofxDepthCameraOrbbecAstra.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxDepthCameraOrbbecAstra.h; path = ../../../addons/ofxDepthCamera/src/ofxDepthCameraOrbbecAstra.h; sourceTree = SOURCE_ROOT; };
69 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; };
70 | E4B69B5B0A3A1756003C02F2 /* exampleDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = exampleDebug.app; sourceTree = BUILT_PRODUCTS_DIR; };
71 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; };
72 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; };
73 | E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; };
74 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; };
75 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; };
76 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; };
77 | F955F9DF7693898B5F412990 /* ofxDepthCameraReceiver.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxDepthCameraReceiver.h; path = ../../../addons/ofxDepthCamera/src/ofxDepthCameraReceiver.h; sourceTree = SOURCE_ROOT; };
78 | /* End PBXFileReference section */
79 |
80 | /* Begin PBXFrameworksBuildPhase section */
81 | E4B69B590A3A1756003C02F2 /* Frameworks */ = {
82 | isa = PBXFrameworksBuildPhase;
83 | buildActionMask = 2147483647;
84 | files = (
85 | C970C9DA1BE9B0EF008D9411 /* libAstraUL.dylib in Frameworks */,
86 | C970C9DB1BE9B101008D9411 /* libAstraAPI.dylib in Frameworks */,
87 | C970C9D61BE9B0C7008D9411 /* libAstra.dylib in Frameworks */,
88 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */,
89 | );
90 | runOnlyForDeploymentPostprocessing = 0;
91 | };
92 | /* End PBXFrameworksBuildPhase section */
93 |
94 | /* Begin PBXGroup section */
95 | 6948EE371B920CB800B5AC1A /* local_addons */ = {
96 | isa = PBXGroup;
97 | children = (
98 | );
99 | name = local_addons;
100 | sourceTree = "";
101 | };
102 | BB4B014C10F69532006C3DED /* addons */ = {
103 | isa = PBXGroup;
104 | children = (
105 | D335FA899A1CDE4564B9FE45 /* ofxDepthCamera */,
106 | );
107 | name = addons;
108 | sourceTree = "";
109 | };
110 | C13AEA223C1F7E5DEB66A8D6 /* src */ = {
111 | isa = PBXGroup;
112 | children = (
113 | 0795BBDBE8DB567E69809EAA /* ofxBaseDepthCamera.cpp */,
114 | AAFC1C0616BCEDC0D040BF80 /* ofxBaseDepthCamera.h */,
115 | C3795648E57AB37F6FDA028E /* ofxDepthCameraOrbbecAstra.cpp */,
116 | E3371D5EB0C295263951AE41 /* ofxDepthCameraOrbbecAstra.h */,
117 | 7E01BE401D8F38429AC53726 /* ofxDepthCameraProvider.cpp */,
118 | C11C005C8061841BBB5952EC /* ofxDepthCameraProvider.h */,
119 | AD33DE47C4698496F6F5E138 /* ofxDepthCameraReceiver.cpp */,
120 | F955F9DF7693898B5F412990 /* ofxDepthCameraReceiver.h */,
121 | 40ED1C334354E170FCD27C2F /* ofxDepthCameraUtils.cpp */,
122 | C61FAD04AA8862CDFF42DA38 /* ofxDepthCameraUtils.h */,
123 | );
124 | name = src;
125 | sourceTree = "";
126 | };
127 | C970C9DC1BE9B50A008D9411 /* libs */ = {
128 | isa = PBXGroup;
129 | children = (
130 | C970C9D91BE9B0EF008D9411 /* libAstraUL.dylib */,
131 | C970C9D71BE9B0DE008D9411 /* libAstraAPI.dylib */,
132 | C970C9D51BE9B0C7008D9411 /* libAstra.dylib */,
133 | );
134 | name = libs;
135 | sourceTree = "";
136 | };
137 | D335FA899A1CDE4564B9FE45 /* ofxDepthCamera */ = {
138 | isa = PBXGroup;
139 | children = (
140 | C13AEA223C1F7E5DEB66A8D6 /* src */,
141 | );
142 | name = ofxDepthCamera;
143 | sourceTree = "";
144 | };
145 | E4328144138ABC890047C5CB /* Products */ = {
146 | isa = PBXGroup;
147 | children = (
148 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */,
149 | );
150 | name = Products;
151 | sourceTree = "";
152 | };
153 | E4B69B4A0A3A1720003C02F2 = {
154 | isa = PBXGroup;
155 | children = (
156 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */,
157 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */,
158 | E4B69E1C0A3A1BDC003C02F2 /* src */,
159 | E4EEC9E9138DF44700A80321 /* openFrameworks */,
160 | BB4B014C10F69532006C3DED /* addons */,
161 | 6948EE371B920CB800B5AC1A /* local_addons */,
162 | C970C9DC1BE9B50A008D9411 /* libs */,
163 | E4B69B5B0A3A1756003C02F2 /* exampleDebug.app */,
164 | );
165 | sourceTree = "";
166 | };
167 | E4B69E1C0A3A1BDC003C02F2 /* src */ = {
168 | isa = PBXGroup;
169 | children = (
170 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */,
171 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */,
172 | E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */,
173 | );
174 | path = src;
175 | sourceTree = SOURCE_ROOT;
176 | };
177 | E4EEC9E9138DF44700A80321 /* openFrameworks */ = {
178 | isa = PBXGroup;
179 | children = (
180 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */,
181 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */,
182 | );
183 | name = openFrameworks;
184 | sourceTree = "";
185 | };
186 | /* End PBXGroup section */
187 |
188 | /* Begin PBXNativeTarget section */
189 | E4B69B5A0A3A1756003C02F2 /* example */ = {
190 | isa = PBXNativeTarget;
191 | buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "example" */;
192 | buildPhases = (
193 | E4B69B580A3A1756003C02F2 /* Sources */,
194 | E4B69B590A3A1756003C02F2 /* Frameworks */,
195 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */,
196 | E4C2427710CC5ABF004149E2 /* CopyFiles */,
197 | );
198 | buildRules = (
199 | );
200 | dependencies = (
201 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */,
202 | );
203 | name = example;
204 | productName = myOFApp;
205 | productReference = E4B69B5B0A3A1756003C02F2 /* exampleDebug.app */;
206 | productType = "com.apple.product-type.application";
207 | };
208 | /* End PBXNativeTarget section */
209 |
210 | /* Begin PBXProject section */
211 | E4B69B4C0A3A1720003C02F2 /* Project object */ = {
212 | isa = PBXProject;
213 | attributes = {
214 | LastUpgradeCheck = 0600;
215 | };
216 | buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "example" */;
217 | compatibilityVersion = "Xcode 3.2";
218 | developmentRegion = English;
219 | hasScannedForEncodings = 0;
220 | knownRegions = (
221 | English,
222 | Japanese,
223 | French,
224 | German,
225 | );
226 | mainGroup = E4B69B4A0A3A1720003C02F2;
227 | productRefGroup = E4B69B4A0A3A1720003C02F2;
228 | projectDirPath = "";
229 | projectReferences = (
230 | {
231 | ProductGroup = E4328144138ABC890047C5CB /* Products */;
232 | ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */;
233 | },
234 | );
235 | projectRoot = "";
236 | targets = (
237 | E4B69B5A0A3A1756003C02F2 /* example */,
238 | );
239 | };
240 | /* End PBXProject section */
241 |
242 | /* Begin PBXReferenceProxy section */
243 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */ = {
244 | isa = PBXReferenceProxy;
245 | fileType = archive.ar;
246 | path = openFrameworksDebug.a;
247 | remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */;
248 | sourceTree = BUILT_PRODUCTS_DIR;
249 | };
250 | /* End PBXReferenceProxy section */
251 |
252 | /* Begin PBXShellScriptBuildPhase section */
253 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = {
254 | isa = PBXShellScriptBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | );
258 | inputPaths = (
259 | );
260 | outputPaths = (
261 | );
262 | runOnlyForDeploymentPostprocessing = 0;
263 | shellPath = /bin/sh;
264 | shellScript = "rsync -aved ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/\"; install_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\";\nmkdir -p \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\nrsync -aved \"$ICON_FILE\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\nrsync -aved ../../../libs/glut/lib/osx/GLUT.framework \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/\"\n";
265 | };
266 | /* End PBXShellScriptBuildPhase section */
267 |
268 | /* Begin PBXSourcesBuildPhase section */
269 | E4B69B580A3A1756003C02F2 /* Sources */ = {
270 | isa = PBXSourcesBuildPhase;
271 | buildActionMask = 2147483647;
272 | files = (
273 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */,
274 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */,
275 | 3C3529677EB4B0AAEEDF2D0A /* ofxBaseDepthCamera.cpp in Sources */,
276 | 5F642CC020FC6E25D5145D88 /* ofxDepthCameraOrbbecAstra.cpp in Sources */,
277 | E878BD3FB6A9D57638059280 /* ofxDepthCameraProvider.cpp in Sources */,
278 | CBFA105A79C6462E71304E02 /* ofxDepthCameraReceiver.cpp in Sources */,
279 | 1C5F682C24F6BA67EE31098E /* ofxDepthCameraUtils.cpp in Sources */,
280 | BDF4EDBA88906D824D8884F0 /* ofxImageSequence.cpp in Sources */,
281 | DCCDD3EAFFA3BB05C6C1AC1A /* ofxImageSequencePlayback.cpp in Sources */,
282 | );
283 | runOnlyForDeploymentPostprocessing = 0;
284 | };
285 | /* End PBXSourcesBuildPhase section */
286 |
287 | /* Begin PBXTargetDependency section */
288 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */ = {
289 | isa = PBXTargetDependency;
290 | name = openFrameworks;
291 | targetProxy = E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */;
292 | };
293 | /* End PBXTargetDependency section */
294 |
295 | /* Begin XCBuildConfiguration section */
296 | E4B69B4E0A3A1720003C02F2 /* Debug */ = {
297 | isa = XCBuildConfiguration;
298 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
299 | buildSettings = {
300 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/";
301 | COPY_PHASE_STRIP = NO;
302 | DEAD_CODE_STRIPPING = YES;
303 | GCC_AUTO_VECTORIZATION = YES;
304 | GCC_ENABLE_SSE3_EXTENSIONS = YES;
305 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES;
306 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
307 | GCC_OPTIMIZATION_LEVEL = 0;
308 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
309 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
310 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO;
311 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
312 | GCC_WARN_UNINITIALIZED_AUTOS = NO;
313 | GCC_WARN_UNUSED_VALUE = NO;
314 | GCC_WARN_UNUSED_VARIABLE = NO;
315 | HEADER_SEARCH_PATHS = (
316 | "$(OF_CORE_HEADERS)",
317 | src,
318 | ../../../addons/ofxDepthCamera/src,
319 | ../../../addons/ofxDepthCamera/addons/ofxImageSequence/src,
320 | ../../../addons/ofxDepthCamera/addons/ofxImageSequencePlayback/src,
321 | ../../../addons/ofxDepthCamera/addons/ofxImageSequenceRecorder/src,
322 | );
323 | MACOSX_DEPLOYMENT_TARGET = 10.8;
324 | ONLY_ACTIVE_ARCH = YES;
325 | OTHER_CPLUSPLUSFLAGS = (
326 | "-D__MACOSX_CORE__",
327 | "-mtune=native",
328 | );
329 | SDKROOT = macosx;
330 | };
331 | name = Debug;
332 | };
333 | E4B69B4F0A3A1720003C02F2 /* Release */ = {
334 | isa = XCBuildConfiguration;
335 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
336 | buildSettings = {
337 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/";
338 | COPY_PHASE_STRIP = YES;
339 | DEAD_CODE_STRIPPING = YES;
340 | GCC_AUTO_VECTORIZATION = YES;
341 | GCC_ENABLE_SSE3_EXTENSIONS = YES;
342 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES;
343 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
344 | GCC_OPTIMIZATION_LEVEL = 3;
345 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
346 | GCC_UNROLL_LOOPS = YES;
347 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
348 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO;
349 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
350 | GCC_WARN_UNINITIALIZED_AUTOS = NO;
351 | GCC_WARN_UNUSED_VALUE = NO;
352 | GCC_WARN_UNUSED_VARIABLE = NO;
353 | HEADER_SEARCH_PATHS = (
354 | "$(OF_CORE_HEADERS)",
355 | src,
356 | ../../../addons/ofxDepthCamera/src,
357 | ../../../addons/ofxDepthCamera/addons/ofxImageSequence/src,
358 | ../../../addons/ofxDepthCamera/addons/ofxImageSequencePlayback/src,
359 | ../../../addons/ofxDepthCamera/addons/ofxImageSequenceRecorder/src,
360 | );
361 | MACOSX_DEPLOYMENT_TARGET = 10.8;
362 | OTHER_CPLUSPLUSFLAGS = (
363 | "-D__MACOSX_CORE__",
364 | "-mtune=native",
365 | );
366 | SDKROOT = macosx;
367 | };
368 | name = Release;
369 | };
370 | E4B69B600A3A1757003C02F2 /* Debug */ = {
371 | isa = XCBuildConfiguration;
372 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
373 | buildSettings = {
374 | COMBINE_HIDPI_IMAGES = YES;
375 | COPY_PHASE_STRIP = NO;
376 | FRAMEWORK_SEARCH_PATHS = (
377 | "$(inherited)",
378 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
379 | );
380 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\"";
381 | GCC_DYNAMIC_NO_PIC = NO;
382 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
383 | GCC_MODEL_TUNING = NONE;
384 | HEADER_SEARCH_PATHS = (
385 | "$(OF_CORE_HEADERS)",
386 | src,
387 | ../../../addons/ofxDepthCamera/src,
388 | ../../../addons/ofxDepthCamera/addons/ofxImageSequence/src,
389 | ../../../addons/ofxDepthCamera/addons/ofxImageSequencePlayback/src,
390 | ../../../addons/ofxDepthCamera/addons/ofxImageSequenceRecorder/src,
391 | "~/Documents/Code/openFrameworks/github/apps/OrbbecAstra/include",
392 | );
393 | ICON = "$(ICON_NAME_DEBUG)";
394 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)";
395 | INFOPLIST_FILE = "openFrameworks-Info.plist";
396 | INSTALL_PATH = "$(HOME)/Applications";
397 | LIBRARY_SEARCH_PATHS = (
398 | "$(inherited)",
399 | "/Users/matt/Documents/Code/AstraSDK-0.4.0/lib",
400 | );
401 | PRODUCT_NAME = "$(TARGET_NAME)Debug";
402 | WRAPPER_EXTENSION = app;
403 | };
404 | name = Debug;
405 | };
406 | E4B69B610A3A1757003C02F2 /* Release */ = {
407 | isa = XCBuildConfiguration;
408 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
409 | buildSettings = {
410 | COMBINE_HIDPI_IMAGES = YES;
411 | COPY_PHASE_STRIP = YES;
412 | FRAMEWORK_SEARCH_PATHS = (
413 | "$(inherited)",
414 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
415 | );
416 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\"";
417 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
418 | GCC_MODEL_TUNING = NONE;
419 | HEADER_SEARCH_PATHS = (
420 | "$(OF_CORE_HEADERS)",
421 | src,
422 | ../../../addons/ofxDepthCamera/src,
423 | ../../../addons/ofxDepthCamera/addons/ofxImageSequence/src,
424 | ../../../addons/ofxDepthCamera/addons/ofxImageSequencePlayback/src,
425 | ../../../addons/ofxDepthCamera/addons/ofxImageSequenceRecorder/src,
426 | "~/Documents/Code/openFrameworks/github/apps/OrbbecAstra/include",
427 | );
428 | ICON = "$(ICON_NAME_RELEASE)";
429 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)";
430 | INFOPLIST_FILE = "openFrameworks-Info.plist";
431 | INSTALL_PATH = "$(HOME)/Applications";
432 | LIBRARY_SEARCH_PATHS = (
433 | "$(inherited)",
434 | "/Users/matt/Documents/Code/AstraSDK-0.4.0/lib",
435 | );
436 | PRODUCT_NAME = "$(TARGET_NAME)";
437 | WRAPPER_EXTENSION = app;
438 | baseConfigurationReference = E4EB6923138AFD0F00A09F29;
439 | };
440 | name = Release;
441 | };
442 | /* End XCBuildConfiguration section */
443 |
444 | /* Begin XCConfigurationList section */
445 | E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "example" */ = {
446 | isa = XCConfigurationList;
447 | buildConfigurations = (
448 | E4B69B4E0A3A1720003C02F2 /* Debug */,
449 | E4B69B4F0A3A1720003C02F2 /* Release */,
450 | );
451 | defaultConfigurationIsVisible = 0;
452 | defaultConfigurationName = Release;
453 | };
454 | E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "example" */ = {
455 | isa = XCConfigurationList;
456 | buildConfigurations = (
457 | E4B69B600A3A1757003C02F2 /* Debug */,
458 | E4B69B610A3A1757003C02F2 /* Release */,
459 | );
460 | defaultConfigurationIsVisible = 0;
461 | defaultConfigurationName = Release;
462 | };
463 | /* End XCConfigurationList section */
464 | };
465 | rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */;
466 | }
467 |
--------------------------------------------------------------------------------
/example/example.xcodeproj/xcshareddata/xcschemes/example Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/example/example.xcodeproj/xcshareddata/xcschemes/example Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/example/icon.rc:
--------------------------------------------------------------------------------
1 | // Icon Resource Definition
2 | #define MAIN_ICON 102
3 |
4 | #if defined(_DEBUG)
5 | MAIN_ICON ICON "icon_debug.ico"
6 | #else
7 | MAIN_ICON ICON "icon.ico"
8 | #endif
9 |
--------------------------------------------------------------------------------
/example/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/example/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/example/src/ofApp.cpp:
--------------------------------------------------------------------------------
1 | #include "ofApp.h"
2 |
3 | //--------------------------------------------------------------
4 | void ofApp::setup() {
5 | device.setup(0, true);
6 | device.setDepthClipping(1000, 2500);
7 | cam.setup(&device);
8 |
9 | // Provider defaults to live, directly connected device. You can manually set with:
10 | //cam.setLive();
11 |
12 | // Use this to specify a remote device running a sender
13 | //cam.setRemote("192.168.0.1", 9200);
14 |
15 | // Use this for playback of recorded data
16 | //cam.setPlaybackPath("recordings/2015-09-15-15-45-32");
17 | //cam.play();
18 |
19 | }
20 |
21 | //--------------------------------------------------------------
22 | void ofApp::update(){
23 | cam.update();
24 | }
25 |
26 | //--------------------------------------------------------------
27 | void ofApp::draw(){
28 | cam.getDepthImage().draw(0, 0);
29 | cam.getColorImage().draw(0, cam.getDepthImage().getHeight());
30 | }
31 |
32 | //--------------------------------------------------------------
33 | void ofApp::keyPressed(int key){
34 | if (key == 'r') {
35 | cam.beginRecording();
36 | }
37 | if (key == 'R') {
38 | cam.endRecording();
39 | }
40 | if (key == ' ') {
41 | if (!ofGetKeyPressed(OF_KEY_SHIFT)) {
42 | cam.play();
43 | }
44 | else {
45 | cam.pause();
46 | }
47 | }
48 | if (key == 'l') {
49 | ofFileDialogResult result = ofSystemLoadDialog("Choose a folder of recorded data", true, ofToDataPath(""));
50 | if (result.getPath() != "") {
51 | cam.setPlaybackPath(result.getPath());
52 | }
53 | }
54 | if (key == 'L') {
55 | cam.setLive();
56 | }
57 | }
58 |
59 | //--------------------------------------------------------------
60 | void ofApp::keyReleased(int key){
61 |
62 | }
63 |
64 | //--------------------------------------------------------------
65 | void ofApp::mouseMoved(int x, int y ){
66 |
67 | }
68 |
69 | //--------------------------------------------------------------
70 | void ofApp::mouseDragged(int x, int y, int button){
71 |
72 | }
73 |
74 | //--------------------------------------------------------------
75 | void ofApp::mousePressed(int x, int y, int button){
76 |
77 | }
78 |
79 | //--------------------------------------------------------------
80 | void ofApp::mouseReleased(int x, int y, int button){
81 |
82 | }
83 |
84 | //--------------------------------------------------------------
85 | void ofApp::mouseEntered(int x, int y){
86 |
87 | }
88 |
89 | //--------------------------------------------------------------
90 | void ofApp::mouseExited(int x, int y){
91 |
92 | }
93 |
94 | //--------------------------------------------------------------
95 | void ofApp::windowResized(int w, int h){
96 |
97 | }
98 |
99 | //--------------------------------------------------------------
100 | void ofApp::gotMessage(ofMessage msg){
101 |
102 | }
103 |
104 | //--------------------------------------------------------------
105 | void ofApp::dragEvent(ofDragInfo dragInfo){
106 | for (auto& file : dragInfo.files) {
107 | if (ofFile(file).isDirectory()) {
108 | cam.setPlaybackPath(file);
109 | return;
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/example/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxDepthCameraOrbbecAstra.h"
5 | #include "ofxDepthCameraProvider.h"
6 |
7 | class ofApp : public ofBaseApp {
8 |
9 | public:
10 | void setup();
11 | void update();
12 | void draw();
13 |
14 | void keyPressed(int key);
15 | void keyReleased(int key);
16 | void mouseMoved(int x, int y );
17 | void mouseDragged(int x, int y, int button);
18 | void mousePressed(int x, int y, int button);
19 | void mouseReleased(int x, int y, int button);
20 | void mouseEntered(int x, int y);
21 | void mouseExited(int x, int y);
22 | void windowResized(int w, int h);
23 | void dragEvent(ofDragInfo dragInfo);
24 | void gotMessage(ofMessage msg);
25 |
26 | ofxDepthCameraOrbbecAstra device;
27 | ofxDepthCameraProvider cam;
28 |
29 | };
30 |
--------------------------------------------------------------------------------
/src/ofxBaseDepthCamera.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * ofxBaseDepthCamera.h
3 | * ofxDepthCamera
4 | *
5 | * Created by Jim George on 3/13/12 for ofxDepthKit
6 | * Copyright 2012 FlightPhase. All rights reserved.
7 | * Modified by Matt Felsen 10/2015
8 | *
9 | */
10 |
11 | #include "ofxBaseDepthCamera.h"
12 |
13 | ofxBaseDepthCamera::ofxBaseDepthCamera() {
14 | bDepthImageDirty = false;
15 | bDeviceFound = false;
16 | bNewFrame = false;
17 | }
18 |
19 | void ofxBaseDepthCamera::setup() {
20 | depthPixels.allocate(depthWidth, depthHeight, OF_IMAGE_GRAYSCALE);
21 | depthImage.allocate(depthWidth, depthHeight, OF_IMAGE_GRAYSCALE);
22 | colorImage.allocate(colorWidth, colorHeight, OF_IMAGE_COLOR);
23 | }
24 |
25 | ofxBaseDepthCamera::~ofxBaseDepthCamera() {
26 | close();
27 | }
28 |
29 | void ofxBaseDepthCamera::close() {
30 |
31 | }
32 |
33 | void ofxBaseDepthCamera::setDepthClipping(unsigned short nearClip, unsigned short farClip) {
34 | this->nearClip = nearClip;
35 | this->farClip = farClip;
36 | }
37 |
38 | bool ofxBaseDepthCamera::isFrameNew() {
39 | bool ret = bNewFrame;
40 | bNewFrame = false;
41 | return ret;
42 | }
43 |
44 | bool ofxBaseDepthCamera::deviceFound() {
45 | return bDeviceFound;
46 | }
47 |
48 | float ofxBaseDepthCamera::frameRate() {
49 | return fr;
50 | }
51 |
52 | int ofxBaseDepthCamera::getDepthWidth() {
53 | return depthWidth;
54 | }
55 |
56 | int ofxBaseDepthCamera::getDepthHeight() {
57 | return depthHeight;
58 | }
59 |
60 | int ofxBaseDepthCamera::getColorWidth() {
61 | return colorWidth;
62 | }
63 |
64 | int ofxBaseDepthCamera::getColorHeight() {
65 | return colorHeight;
66 | }
67 |
68 | unsigned short ofxBaseDepthCamera::getNearClip() {
69 | return nearClip;
70 | }
71 |
72 | unsigned short ofxBaseDepthCamera::getFarClip() {
73 | return farClip;
74 | }
75 |
76 | ofShortPixels& ofxBaseDepthCamera::getRawDepth() {
77 | return depthPixels;
78 | }
79 |
80 | ofImage& ofxBaseDepthCamera::getDepthImage() {
81 | if (bDepthImageDirty) {
82 | ofxDepthCameraUtils::updateDepthImage(depthImage, depthPixels, nearClip, farClip);
83 | }
84 |
85 | return depthImage;
86 | }
87 |
88 | ofImage& ofxBaseDepthCamera::getColorImage() {
89 | return colorImage;
90 | }
91 |
92 |
--------------------------------------------------------------------------------
/src/ofxBaseDepthCamera.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ofxBaseDepthCamera.h
3 | * ofxDepthCamera
4 | *
5 | * Created by Jim George on 3/13/12 for ofxDepthKit
6 | * Modified by Matt Felsen 10/2015
7 | *
8 | */
9 |
10 | #pragma once
11 |
12 | #include "ofMain.h"
13 | #include "ofxDepthCameraUtils.h"
14 |
15 | class ofxBaseDepthCamera {
16 | public:
17 | ofxBaseDepthCamera();
18 | ~ofxBaseDepthCamera();
19 |
20 | virtual void setup();
21 | virtual void close() = 0;
22 | virtual void update() = 0;
23 |
24 | float frameRate();
25 | virtual int maxDepth() = 0;
26 | virtual ofVec3f getWorldCoordinateAt(int x, int y) = 0;
27 |
28 | void setDepthClipping(unsigned short nearClip, unsigned short farClip);
29 | bool isFrameNew();
30 | bool deviceFound();
31 |
32 | int getDepthWidth();
33 | int getDepthHeight();
34 | int getColorWidth();
35 | int getColorHeight();
36 |
37 | unsigned short getNearClip();
38 | unsigned short getFarClip();
39 |
40 | ofShortPixels& getRawDepth();
41 | ofImage& getDepthImage();
42 | ofImage& getColorImage();
43 |
44 | protected:
45 | bool bDeviceFound;
46 |
47 | bool bDepthImageDirty;
48 | bool bNewFrame;
49 |
50 | unsigned short nearClip;
51 | unsigned short farClip;
52 |
53 | float fr;
54 |
55 | int depthWidth;
56 | int depthHeight;
57 | int colorWidth;
58 | int colorHeight;
59 |
60 | ofShortPixels depthPixels;
61 | ofImage depthImage;
62 | ofImage colorImage;
63 |
64 | };
--------------------------------------------------------------------------------
/src/ofxDepthCameraKinect.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * ofxDepthCameraKinect.cpp
3 | * ofxDepthCamera
4 | *
5 | * Created by Jim George on 3/13/12 for ofxDepthKit
6 | * Copyright 2014 FlightPhase. All rights reserved.
7 | * Modified by Matt Felsen 10/2015
8 | *
9 | */
10 |
11 | #include "ofxDepthCameraKinect.h"
12 |
13 | ofxDepthCameraKinect::ofxDepthCameraKinect() {
14 | fr = 30;
15 | depthWidth = 640;
16 | depthHeight = 480;
17 | colorWidth = 640;
18 | colorHeight = 480;
19 | }
20 |
21 | ofxKinect& ofxDepthCameraKinect::getSensor() {
22 | return kinect;
23 | }
24 |
25 | void ofxDepthCameraKinect::setup(int deviceId, bool useColor) {
26 | ofxBaseDepthCamera::setup();
27 |
28 | bDeviceFound = kinect.init(!useColor, true); // shows infrared instead of RGB video image
29 | bDeviceFound &= kinect.open();
30 | }
31 |
32 | void ofxDepthCameraKinect::close() {
33 | kinect.close();
34 | }
35 |
36 | void ofxDepthCameraKinect::update() {
37 | kinect.update();
38 | // there is a new frame and we are connected
39 | if (kinect.isFrameNewDepth()) {
40 | bNewFrame = true;
41 | bDepthImageDirty = true;
42 | depthPixels.setFromPixels(kinect.getRawDepthPixels(), kinect.getWidth(), kinect.getHeight(), OF_IMAGE_GRAYSCALE);
43 | }
44 |
45 | if (kinect.isFrameNewVideo()) {
46 | colorImage.setFromPixels(kinect.getPixels());
47 | }
48 | }
49 |
50 | ofVec3f ofxDepthCameraKinect::getWorldCoordinateAt(int x, int y) {
51 | return kinect.getWorldCoordinateAt(x, y);
52 | }
53 |
54 | int ofxDepthCameraKinect::maxDepth() {
55 | return 10000; //taken from looking into how ofxKinect calculates it's look up tables.
56 | }
--------------------------------------------------------------------------------
/src/ofxDepthCameraKinect.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ofxDepthCameraKinect.h
3 | * ofxDepthCamera
4 | *
5 | * Created by Jim George on 3/13/12 for ofxDepthKit
6 | * Copyright 2012 FlightPhase. All rights reserved.
7 | * Modified by Matt Felsen 10/2015
8 | *
9 | */
10 |
11 | #pragma once
12 |
13 | #include "ofMain.h"
14 | #include "ofxBaseDepthCamera.h"
15 | #include "ofxKinect.h"
16 |
17 | class ofxDepthCameraKinect: public ofxBaseDepthCamera {
18 | public:
19 | ofxDepthCameraKinect();
20 | ofxKinect& getSensor();
21 |
22 | void setup(int deviceId = 0, bool useColor = false);
23 | void close();
24 | void update();
25 |
26 | int maxDepth();
27 | ofVec3f getWorldCoordinateAt(int x, int y);
28 |
29 | protected:
30 | ofxKinect kinect;
31 |
32 | };
--------------------------------------------------------------------------------
/src/ofxDepthCameraKinectV2.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * ofxDepthCameraKinectV2.cpp
3 | * ofxDepthCamera
4 | *
5 | * Created by Jim George on 5/15/14 for ofxDepthKit
6 | * Copyright 2014 FlightPhase. All rights reserved.
7 | * Modified by Matt Felsen 10/2015
8 | *
9 | */
10 |
11 | #include "ofxDepthCameraKinectV2.h"
12 |
13 | ofxDepthCameraKinectV2::ofxDepthCameraKinectV2() {
14 | fr = 30;
15 | depthWidth = 512;
16 | depthHeight = 424;
17 | colorWidth = 1920;
18 | colorHeight = 1080;
19 | }
20 |
21 | ofxKFW2::Device& ofxDepthCameraKinectV2::getSensor() {
22 | return kinect;
23 | }
24 |
25 | void ofxDepthCameraKinectV2::setup(int deviceId, bool useColor) {
26 | ofxBaseDepthCamera::setup();
27 |
28 | coordsDirty = true;
29 | cachedCoords.resize(depthWidth * depthHeight);
30 |
31 | kinect.open();
32 | kinect.initInfraredSource();
33 | kinect.initDepthSource();
34 |
35 | if (useColor) {
36 | kinect.initColorSource();
37 | }
38 |
39 | kinect.getSensor()->get_CoordinateMapper(&mapper);
40 |
41 | //simple start
42 | bDeviceFound = kinect.isOpen();
43 |
44 | }
45 |
46 | void ofxDepthCameraKinectV2::close() {
47 | if (kinect.isOpen()) {
48 | kinect.close();
49 | }
50 | }
51 |
52 | void ofxDepthCameraKinectV2::update() {
53 | kinect.update();
54 |
55 | // there is a new frame and we are connected
56 | if (kinect.getDepthSource()->isFrameNew()) {
57 | coordsDirty = true;
58 | bNewFrame = true;
59 | bDepthImageDirty = true;
60 |
61 | depthPixels = kinect.getDepthSource()->getPixels();
62 | depthPixels.mirror(false, true);
63 | depthImage.setFromPixels(depthPixels);
64 |
65 | rawIRImage.setFromPixels(kinect.getInfraredSource()->getPixels());
66 | rawIRImage.mirror(false, true);
67 | }
68 |
69 | if (kinect.getColorSource()) {
70 | colorImage.setFromPixels(kinect.getColorSource()->getPixels());
71 | }
72 | }
73 |
74 | ofVec3f ofxDepthCameraKinectV2::getWorldCoordinateAt(int x, int y) {
75 | if (coordsDirty) {
76 | mapper->MapDepthFrameToCameraSpace(cachedCoords.size(), (UINT16*) depthPixels.getData(), cachedCoords.size(), (CameraSpacePoint*) cachedCoords.data());
77 | coordsDirty = false;
78 | }
79 |
80 | return cachedCoords[int(y) * depthWidth + int(x)];
81 | }
82 |
83 | int ofxDepthCameraKinectV2::maxDepth() {
84 | // Kinect for Windows 2.0 SDK says max depth is 8 meters
85 | // Units in the DepthFrame are in millimeters
86 | // https://msdn.microsoft.com/en-us/library/windowspreview.kinect.depthframe.aspx
87 | return 8 * 1000;
88 | }
--------------------------------------------------------------------------------
/src/ofxDepthCameraKinectV2.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ofxDepthCameraKinectV2.h
3 | * ofxDepthCamera
4 | *
5 | * Created by Jim George on 3/13/12 for ofxDepthKit
6 | * Copyright 2012 FlightPhase. All rights reserved.
7 | * Modified by Matt Felsen 10/2015
8 | *
9 | */
10 |
11 | #pragma once
12 |
13 | #include "ofMain.h"
14 | #include "ofxBaseDepthCamera.h"
15 | #include "ofxKinectForWindows2.h"
16 |
17 | class ofxDepthCameraKinectV2: public ofxBaseDepthCamera {
18 | public:
19 | ofxDepthCameraKinectV2();
20 | ofxKFW2::Device& getSensor();
21 |
22 | void setup(int deviceId = 0, bool useColor = false);
23 | void close();
24 | void update();
25 |
26 | int maxDepth();
27 | ofVec3f getWorldCoordinateAt(int x, int y);
28 |
29 | protected:
30 | ofxKFW2::Device kinect;
31 | ICoordinateMapper* mapper;
32 |
33 | vector cachedCoords;
34 | bool coordsDirty;
35 | };
--------------------------------------------------------------------------------
/src/ofxDepthCameraOrbbecAstra.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * ofxDepthCameraOrbbecAstra.cpp
3 | * ofxDepthCamera
4 | *
5 | * Created by Matt Felsen on 11/3/15
6 | *
7 | */
8 |
9 | #include "ofxDepthCameraOrbbecAstra.h"
10 |
11 | ofxDepthCameraOrbbecAstra::ofxDepthCameraOrbbecAstra() {
12 | fr = 30;
13 | depthWidth = 640;
14 | depthHeight = 480;
15 | colorWidth = 640;
16 | colorHeight = 480;
17 | }
18 |
19 | ofxDepthCameraOrbbecAstra::~ofxDepthCameraOrbbecAstra() {
20 |
21 | }
22 |
23 | void ofxDepthCameraOrbbecAstra::setup(int deviceId, bool useColor) {
24 | ofxBaseDepthCamera::setup();
25 |
26 | astra.setup();
27 | astra.setRegistration(true);
28 | astra.initColorStream();
29 | astra.initDepthStream();
30 | astra.initPointStream();
31 |
32 | bDeviceFound = true; // TODO: Better initialization status
33 | }
34 |
35 | void ofxDepthCameraOrbbecAstra::close() {
36 | astra::Astra::terminate();
37 | }
38 |
39 | void ofxDepthCameraOrbbecAstra::update() {
40 | astra.update();
41 |
42 | if (astra.isFrameNew()) {
43 | bNewFrame = true;
44 | depthPixels = astra.getRawDepth();
45 | depthImage = astra.getDepthImage();
46 | colorImage = astra.getColorImage();
47 | }
48 | }
49 |
50 | ofVec3f ofxDepthCameraOrbbecAstra::getWorldCoordinateAt(int x, int y) {
51 | return astra.getWorldCoordinateAt(x, y);
52 | }
53 |
54 | int ofxDepthCameraOrbbecAstra::maxDepth() {
55 | // 8m range as documented here:
56 | // https://orbbec3d.com/product-persee/
57 | // https://orbbec3d.com/product-astra/
58 | // https://orbbec3d.com/product-astra-pro/
59 | return 8000;
60 | }
--------------------------------------------------------------------------------
/src/ofxDepthCameraOrbbecAstra.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ofxDepthCameraOrbbecAstra.h
3 | * ofxDepthCamera
4 | *
5 | * Created by Matt Felsen on 11/3/15
6 | *
7 | */
8 |
9 | #pragma once
10 |
11 | #include "ofMain.h"
12 | #include "ofxBaseDepthCamera.h"
13 | #include "ofxOrbbecAstra.h"
14 |
15 | class ofxDepthCameraOrbbecAstra : public ofxBaseDepthCamera {
16 | public:
17 | ofxDepthCameraOrbbecAstra();
18 | ~ofxDepthCameraOrbbecAstra();
19 |
20 | void setup(int deviceId = 0, bool useColor = false);
21 | void close();
22 | void update();
23 |
24 | int maxDepth();
25 | ofVec3f getWorldCoordinateAt(int x, int y);
26 |
27 | protected:
28 | ofxOrbbecAstra astra;
29 |
30 | };
--------------------------------------------------------------------------------
/src/ofxDepthCameraProvider.cpp:
--------------------------------------------------------------------------------
1 | #include "ofxDepthCameraProvider.h"
2 |
3 | ofxDepthCameraProvider::ofxDepthCameraProvider() {
4 | bLive = true;
5 | bRemote = false;
6 | bRecording = false;
7 | bPlaying = false;
8 | bPlayerLoaded = false;
9 |
10 | name = "cam";
11 | recorder.setFormat("raw");
12 | }
13 |
14 | ofxDepthCameraProvider::~ofxDepthCameraProvider() {
15 | device->close();
16 | }
17 |
18 | void ofxDepthCameraProvider::setup(ofxBaseDepthCamera* baseCam) {
19 | device = baseCam;
20 |
21 | player.setSize(device->getDepthWidth(), device->getDepthHeight());
22 | player.setImageType(OF_IMAGE_GRAYSCALE);
23 | player.setShouldLoop(true);
24 | }
25 |
26 | void ofxDepthCameraProvider::update() {
27 | if (bLive) {
28 | if (!bRemote) {
29 | device->update();
30 |
31 | if (bRecording && device->isFrameNew()) {
32 | recorder.addFrame(device->getRawDepth());
33 | }
34 | } else {
35 | receiver.update();
36 |
37 | // TODO Check for new frames when recording
38 | if (bRecording) {
39 | recorder.addFrame(receiver.getDepthPixels());
40 | }
41 | }
42 | } else {
43 | player.update();
44 | }
45 |
46 | if (!bRecording && recorder.isThreadRunning() && !recorder.getQueueLength()) {
47 | recorder.stopThread();
48 | }
49 | }
50 |
51 | void ofxDepthCameraProvider::draw(int x, int y, int w, int h) {
52 | w = w ? w : device->getDepthWidth();
53 | h = h ? h : device->getDepthHeight();
54 | getDepthImage().draw(x, y, w, h);
55 | }
56 |
57 | void ofxDepthCameraProvider::setName(string name) {
58 | this->name = name;
59 | }
60 |
61 | void ofxDepthCameraProvider::setLive() {
62 | bLive = true;
63 |
64 | if (bPlaying) {
65 | pause();
66 | }
67 | if (bRecording) {
68 | endRecording();
69 | }
70 | }
71 |
72 | void ofxDepthCameraProvider::setLocal() {
73 | bRemote = false;
74 | receiver.disconnect();
75 | }
76 |
77 | void ofxDepthCameraProvider::setRemote(string host, int port) {
78 | if (receiver.getHost().empty() || !receiver.getPort()) {
79 | if (host.empty() || !port) {
80 | ofLogError("ofxDepthCameraProvider", "Set remote params with setRemote(\"host\", port) first");
81 | return;
82 | }
83 |
84 | receiver.setup(device->getDepthWidth(), device->getDepthHeight(), host, port);
85 | }
86 |
87 | bRemote = true;
88 | //receiver.connect();
89 | }
90 |
91 | void ofxDepthCameraProvider::setRecordPath(string path) {
92 | recordPath = ofFilePath::addTrailingSlash(path);
93 | recorder.setPrefix(recordPath);
94 | }
95 |
96 | void ofxDepthCameraProvider::beginRecording(string path) {
97 | if (path.empty()) {
98 | path = "recordings/" + ofGetTimestampString("%Y-%m-%d-%H-%M-%S");
99 | }
100 |
101 | bLive = true;
102 | bRecording = true;
103 | setRecordPath(path);
104 | recorder.resetCounter();
105 | recorder.startThread();
106 | }
107 |
108 | void ofxDepthCameraProvider::endRecording() {
109 | bRecording = false;
110 | player.loadSequence(recordPath, "raw", 0, recorder.getFrameCount(), 4, device->frameRate());
111 | bPlayerLoaded = player.getTotalFrames() > 0;
112 | }
113 |
114 | void ofxDepthCameraProvider::setPlaybackPath(string path) {
115 | player.loadSequence(path);
116 | player.setFPS(device->frameRate());
117 | bPlayerLoaded = player.getTotalFrames() > 0;
118 |
119 | if (bPlayerLoaded) {
120 | playbackPath = path;
121 | } else {
122 | ofLogWarning("ofxDepthCameraProvider", "Failed to set playback path to: %s", path.c_str());
123 | }
124 | }
125 |
126 | void ofxDepthCameraProvider::play(string path) {
127 | if (path.empty()) {
128 | if (!bPlayerLoaded) {
129 | ofLogError("ofxDepthCameraProvider", "Call setPlaybackPath(\"path\") first");
130 | return;
131 | }
132 | } else {
133 | setPlaybackPath(path);
134 | }
135 |
136 | bLive = false;
137 | bPlaying = true;
138 | player.play();
139 | }
140 |
141 | void ofxDepthCameraProvider::pause() {
142 | bPlaying = false;
143 | player.pause();
144 |
145 | }
146 | void ofxDepthCameraProvider::stop() {
147 | bPlaying = false;
148 | player.stop();
149 | }
150 |
151 | ofShortPixels& ofxDepthCameraProvider::getRawDepth() {
152 | if (bLive) {
153 | if (!bRemote) {
154 | return device->getRawDepth();
155 | } else {
156 | return receiver.getDepthPixels();
157 | }
158 | } else {
159 | return player.getSequence().getPixels();
160 | }
161 | }
162 |
163 | ofImage& ofxDepthCameraProvider::getDepthImage() {
164 | if (bLive) {
165 | if (!bRemote) {
166 | // Don't need to call ofxDepthCameraUtils::updateDepthImage() here because this is
167 | // already done in ofxBaseDepthCamera in case you're using that standalone without
168 | // ofxDepthCameraProvider
169 | return device->getDepthImage();
170 | }
171 | else {
172 | ofxDepthCameraUtils::updateDepthImage(depthImage, receiver.getDepthPixels(), device->getNearClip(), device->getFarClip());
173 | }
174 | } else {
175 | ofxDepthCameraUtils::updateDepthImage(depthImage, player.getSequence().getPixels(), device->getNearClip(), device->getFarClip());
176 | }
177 |
178 | return depthImage;
179 | }
180 |
181 | ofImage& ofxDepthCameraProvider::getColorImage() {
182 | if (bLive) {
183 | if (!bRemote) {
184 | return device->getColorImage();
185 | }
186 | else {
187 | // Not supporting remote color
188 | //return receiver.getPixels();
189 | }
190 | }
191 | else {
192 | // Not supporting playback of color
193 | //return player.getSequence().getPixels();
194 | }
195 | }
--------------------------------------------------------------------------------
/src/ofxDepthCameraProvider.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | #include "ofxBaseDepthCamera.h"
6 | #include "ofxDepthCameraReceiver.h"
7 |
8 | #include "ofxImageSequence.h"
9 | #include "ofxImageSequencePlayback.h"
10 | #include "ofxImageSequenceRecorder.h"
11 |
12 | class ofxDepthCameraProvider {
13 |
14 | public:
15 |
16 | ofxDepthCameraProvider();
17 | ~ofxDepthCameraProvider();
18 |
19 | void setup(ofxBaseDepthCamera* baseCam);
20 | void update();
21 | void draw(int x = 0, int y = 0, int w = 0, int h = 0);
22 |
23 | void setName(string name);
24 | void setLive();
25 | void setLocal();
26 | void setRemote(string host = "", int port = 0);
27 |
28 | void setRecordPath(string path);
29 | void beginRecording(string recordPath = "");
30 | void endRecording();
31 |
32 | void setPlaybackPath(string path);
33 | void play(string path = "");
34 | void pause();
35 | void stop();
36 |
37 | string& getName() { return name; }
38 |
39 | ofShortPixels& getRawDepth();
40 | ofImage& getDepthImage();
41 | ofImage& getColorImage();
42 |
43 | ofxShortImageSequenceRecorder& getRecorder() { return recorder; }
44 | ofxShortImageSequencePlayback& getPlayer() { return player; }
45 |
46 | protected:
47 | // Live camera input, local & remote
48 | ofxBaseDepthCamera* device;
49 | ofxDepthCameraReceiver receiver;
50 |
51 | // Record & playback
52 | ofxShortImageSequenceRecorder recorder;
53 | ofxShortImageSequencePlayback player;
54 |
55 | // Local copy of image to copy pixels into from player & receiver,
56 | // which only keep pixel data and can't be drawn directly to screen
57 | ofImage depthImage;
58 |
59 | bool bLive;
60 | bool bRemote;
61 | bool bRecording;
62 | bool bPlaying;
63 | bool bPlayerLoaded;
64 |
65 | string name;
66 | string recordPath;
67 | string playbackPath;
68 |
69 | };
--------------------------------------------------------------------------------
/src/ofxDepthCameraReceiver.cpp:
--------------------------------------------------------------------------------
1 | #include "ofxDepthCameraReceiver.h"
2 |
3 | void ofxDepthCameraReceiver::setup(int depthWidth, int depthHeight, string host, int port) {
4 | this->depthWidth = depthWidth;
5 | this->depthHeight = depthHeight;
6 | this->host = host;
7 | this->port = port;
8 | connect();
9 |
10 | depthImage.allocate(depthWidth, depthHeight, OF_IMAGE_GRAYSCALE);
11 | depthPixels.allocate(depthWidth, depthHeight, OF_IMAGE_GRAYSCALE);
12 | }
13 |
14 | void ofxDepthCameraReceiver::connect() {
15 |
16 | if (host.empty()) {
17 | ofLogError("ofxDepthCameraReceiver", "No host is set");
18 | return;
19 | }
20 | if (!port) {
21 | ofLogError("ofxDepthCameraReceiver", "No port is set");
22 | return;
23 | }
24 |
25 | #ifdef STREAM_LWS
26 | receiver.connect(host, port);
27 | receiver.addListener(this);
28 | #endif
29 |
30 | #ifdef STREAM_ZMQ
31 | string addr = "tcp://" + host + ":" + ofToString(port);
32 | receiver.connect(addr);
33 | #endif
34 | }
35 |
36 | void ofxDepthCameraReceiver::disconnect() {
37 | #ifdef STREAM_LWS
38 | receiver.close();
39 | #endif
40 |
41 | #ifdef STREAM_ZMQ
42 | receiver.disconnect();
43 | #endif
44 | }
45 |
46 | void ofxDepthCameraReceiver::update() {
47 | #ifdef STREAM_LWS
48 | if (bNeedToLoad) {
49 | depthPixels.setFromPixels((unsigned short*) buffer.getData(), depthWidth, depthHeight, OF_IMAGE_GRAYSCALE);
50 | depthImage.setFromPixels(depthPixels);
51 | bLocked = false;
52 | bNeedToLoad = false;
53 | }
54 | #endif
55 |
56 | #ifdef STREAM_ZMQ
57 | while (receiver.hasWaitingMessage()) {
58 | receiver.getNextMessage(buffer);
59 | depthPixels.setFromPixels((unsigned short*) buffer.getData(), depthWidth, depthHeight, OF_IMAGE_GRAYSCALE);
60 | depthImage.setFromPixels(depthPixels);
61 | }
62 | #endif
63 | }
64 |
65 | #ifdef STREAM_LWS
66 | void ofxDepthCameraReceiver::onConnect(ofxLibwebsockets::Event& args) {
67 | ofLogVerbose() << "on connected";
68 | }
69 |
70 | void ofxDepthCameraReceiver::onOpen(ofxLibwebsockets::Event& args) {
71 | ofLogVerbose() << "on open";
72 | }
73 |
74 | void ofxDepthCameraReceiver::onClose(ofxLibwebsockets::Event& args) {
75 | ofLogVerbose() << "on close";
76 | }
77 |
78 | void ofxDepthCameraReceiver::onIdle(ofxLibwebsockets::Event& args) {
79 | ofLogVerbose() << "on idle";
80 | }
81 |
82 | void ofxDepthCameraReceiver::onMessage(ofxLibwebsockets::Event& args) {
83 | if (bLocked) return;
84 |
85 | // need to load this next frame!
86 | if (args.isBinary) {
87 | buffer.clear();
88 | buffer.set(args.data.getData(), args.data.size());
89 | bLocked = true;
90 | bNeedToLoad = true;
91 | }
92 | else {
93 | // got a string message
94 | }
95 | }
96 |
97 | void ofxDepthCameraReceiver::onBroadcast(ofxLibwebsockets::Event& args) {
98 | cout << "got broadcast " << args.message << endl;
99 | }
100 | #endif
--------------------------------------------------------------------------------
/src/ofxDepthCameraReceiver.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | //#define STREAM_LWS
6 | //#define STREAM_ZMQ
7 |
8 | #ifdef STREAM_LWS
9 | #include "ofxLibwebsockets.h"
10 | #endif
11 |
12 | #ifdef STREAM_ZMQ
13 | #include "ofxZmq.h"
14 | #endif
15 |
16 | class ofxDepthCameraReceiver {
17 | public:
18 | void setup(int depthWidth, int depthHeight, string host = "", int port = 0);
19 | void update();
20 |
21 | void connect();
22 | void disconnect();
23 |
24 | string& getHost() { return host; }
25 | int getPort() { return port; }
26 |
27 | ofImage& getDepthImage() { return depthImage; }
28 | ofShortPixels& getDepthPixels() { return depthPixels; }
29 |
30 | ofBuffer buffer;
31 |
32 | #ifdef STREAM_LWS
33 | void onConnect(ofxLibwebsockets::Event& args);
34 | void onOpen(ofxLibwebsockets::Event& args);
35 | void onClose(ofxLibwebsockets::Event& args);
36 | void onIdle(ofxLibwebsockets::Event& args);
37 | void onMessage(ofxLibwebsockets::Event& args);
38 | void onBroadcast(ofxLibwebsockets::Event& args);
39 |
40 | bool bNeedToLoad, bLocked;
41 | #endif
42 |
43 | protected:
44 | string host;
45 | int port;
46 |
47 | int depthWidth, depthHeight;
48 |
49 | ofImage depthImage;
50 | ofShortPixels depthPixels;
51 |
52 | #ifdef STREAM_LWS
53 | ofxLibwebsockets::Client receiver;
54 | #endif
55 |
56 | #ifdef STREAM_ZMQ
57 | ofxZmqSubscriber receiver;
58 | #endif
59 | };
--------------------------------------------------------------------------------
/src/ofxDepthCameraSender.cpp:
--------------------------------------------------------------------------------
1 | #include "ofxDepthCameraSender.h"
2 |
3 | void ofxDepthCameraSender::setup(ofxBaseDepthCamera& baseCam, int port) {
4 | this->device = &baseCam;
5 | this->port = port;
6 | connect();
7 | }
8 |
9 | void ofxDepthCameraSender::connect() {
10 |
11 | if (!port) {
12 | ofLogError("ofxDepthCameraSender", "No port is set");
13 | return;
14 | }
15 |
16 | #ifdef STREAM_LWS
17 | sender.setup(port);
18 | #endif
19 |
20 | #ifdef STREAM_ZMQ
21 | string addr = "tcp://*:" + ofToString(port);
22 | sender.bind(addr);
23 | #endif
24 |
25 | }
26 |
27 | void ofxDepthCameraSender::disconnect() {
28 | #ifdef STREAM_LWS
29 | sender.close();
30 | #endif
31 |
32 | #ifdef STREAM_ZMQ
33 | // TODO disconnect/unbind/stop serving
34 | //sender.unbind();
35 | #endif
36 | }
37 |
38 | void ofxDepthCameraSender::update() {
39 | device->update();
40 |
41 | #ifdef STREAM_LWS
42 | if (sender.getConnections().size() && device->isFrameNew()) {
43 | sender.sendBinary((unsigned char*) device->getRawDepth().getData(), device->getRawDepth().size() * device->getRawDepth().getBytesPerPixel());
44 | }
45 | #endif
46 |
47 | #ifdef STREAM_ZMQ
48 | if (sender.getConnected() && device->isFrameNew()) {
49 | sender.send((void*) device->getRawDepth(), device->getRawDepth().size() * device->getRawDepth().getBytesPerPixel());
50 | }
51 | #endif
52 | }
--------------------------------------------------------------------------------
/src/ofxDepthCameraSender.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxBaseDepthCamera.h"
5 |
6 | #define STREAM_LWS
7 | //#define STREAM_ZMQ
8 |
9 | #ifdef STREAM_LWS
10 | #include "ofxLibwebsockets.h"
11 | #endif
12 |
13 | #ifdef STREAM_ZMQ
14 | #include "ofxZmq.h"
15 | #endif
16 |
17 | class ofxDepthCameraSender {
18 | public:
19 | void setup(ofxBaseDepthCamera& baseCam, int port = 0);
20 | void update();
21 |
22 | void connect();
23 | void disconnect();
24 |
25 | int getPort() { return port; }
26 |
27 | protected:
28 | ofxBaseDepthCamera* device;
29 |
30 | int port;
31 |
32 | #ifdef STREAM_LWS
33 | ofxLibwebsockets::Server sender;
34 | #endif
35 |
36 | #ifdef STREAM_ZMQ
37 | ofxZmqPublisher sender;
38 | #endif
39 | };
--------------------------------------------------------------------------------
/src/ofxDepthCameraUtils.cpp:
--------------------------------------------------------------------------------
1 | #include "ofxDepthCameraUtils.h"
2 |
3 | void ofxDepthCameraUtils::updateDepthImage(ofImage& depthImage, ofShortPixels& depthPixels, unsigned short nearClip, unsigned short farClip) {
4 | // TODO Use lookup table instead
5 | // Calculate a lookup table when clipping bounds change and use that
6 | // instead of calling ofMap() every time
7 |
8 | if (!depthPixels.isAllocated()) return;
9 | if (!depthImage.isAllocated()) {
10 | depthImage.allocate(depthPixels.getWidth(), depthPixels.getHeight(), OF_IMAGE_GRAYSCALE);
11 | }
12 |
13 | for (int y = 0; y < depthPixels.getHeight(); y++) {
14 | for (int x = 0; x < depthPixels.getWidth(); x++) {
15 | int index = x + (y*depthPixels.getWidth());
16 | float depth = depthPixels[index];
17 | float val = depth == 0 ? 0 : ofMap(depth, nearClip, farClip, 255, 0, true);
18 | depthImage.setColor(x, y, ofColor(val));
19 | }
20 | }
21 | depthImage.update();
22 | }
--------------------------------------------------------------------------------
/src/ofxDepthCameraUtils.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxBaseDepthCamera.h"
5 |
6 | class ofxDepthCameraUtils {
7 | public:
8 | static void updateDepthImage(ofImage& depthImage, ofShortPixels& depthPixels, unsigned short nearClip, unsigned short farClip);
9 | };
--------------------------------------------------------------------------------