August 2015
Beginner to intermediate
298 pages
5h 49m
English
Now that you have installed the prerequisite libraries and drivers, we will demonstrate how to capture raw data from your depth-sensing camera.
To capture sensor data directly in a binary format, implement the following function:
void writeDepthBuffer(openni::VideoFrameRef depthFrame){ static int depth_buffer_counter=0; char file_name [512]; sprintf(file_name, "%s%d.bin", "depth_frame", depth_buffer_counter); openni::DepthPixel *depthPixels = new openni::DepthPixel[depthFrame.getHeight()*depthFrame.getWidth()]; memcpy(depthPixels, depthFrame.getData(), depthFrame.getHeight()*depthFrame.getWidth()*sizeof(uint16_t)); std::fstream myFile (file_name, std::ios::out |std::ios::binary); myFile.write ...Read now
Unlock full access