File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 31
31
32
32
#include < libfreenect2/config.h>
33
33
34
+ #include < stdlib.h>
35
+
34
36
namespace libfreenect2
35
37
{
36
38
@@ -71,6 +73,13 @@ class LIBFREENECT2_API PacketPipeline
71
73
public:
72
74
DumpPacketPipeline ();
73
75
virtual ~DumpPacketPipeline ();
76
+
77
+ // These are all required to decode depth data
78
+ const unsigned char * getDepthP0Tables (size_t * length);
79
+
80
+ const float * getDepthXTable (size_t * length);
81
+ const float * getDepthZTable (size_t * length);
82
+ const short * getDepthLookupTable (size_t * length);
74
83
};
75
84
76
85
/* * Pipeline with CPU depth processing. */
Original file line number Diff line number Diff line change 31
31
#include < libfreenect2/data_callback.h>
32
32
#include < libfreenect2/rgb_packet_stream_parser.h>
33
33
#include < libfreenect2/depth_packet_stream_parser.h>
34
+ #include < libfreenect2/protocol/response.h>
34
35
35
36
namespace libfreenect2
36
37
{
@@ -138,4 +139,24 @@ DumpPacketPipeline::DumpPacketPipeline()
138
139
139
140
DumpPacketPipeline::~DumpPacketPipeline () {}
140
141
142
+ const unsigned char * DumpPacketPipeline::getDepthP0Tables (size_t * length) {
143
+ *length = sizeof (libfreenect2::protocol::P0TablesResponse);
144
+ return static_cast <DumpDepthPacketProcessor*>(getDepthPacketProcessor ())->getP0Tables ();
145
+ }
146
+
147
+ const float * DumpPacketPipeline::getDepthXTable (size_t * length) {
148
+ *length = DepthPacketProcessor::TABLE_SIZE;
149
+ return static_cast <DumpDepthPacketProcessor*>(getDepthPacketProcessor ())->getXTable ();
150
+ }
151
+
152
+ const float * DumpPacketPipeline::getDepthZTable (size_t * length) {
153
+ *length = DepthPacketProcessor::TABLE_SIZE;
154
+ return static_cast <DumpDepthPacketProcessor*>(getDepthPacketProcessor ())->getZTable ();
155
+ }
156
+
157
+ const short * DumpPacketPipeline::getDepthLookupTable (size_t * length) {
158
+ *length = DepthPacketProcessor::LUT_SIZE;
159
+ return static_cast <DumpDepthPacketProcessor*>(getDepthPacketProcessor ())->getLookupTable ();
160
+ }
161
+
141
162
} /* namespace libfreenect2 */
You can’t perform that action at this time.
0 commit comments