- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using SetFileName() function for recording the depth stream. I have followed every thing mentioned in the documentation. Still I'm not able to save the depth streams to the specified file location.
Here's what I have tried so far:
void RecordORPlayback(pxcCHAR *file, bool record){
// create a sensemanager instance
//set file record or playback
sm->QueryCaptureManager()->SetFileName(file,record);
//Enable the stream
PXCImage *depthIm;
//initialize and record 300 frames
sm->Init();
for(int i =0; i<300;i++){
//this function blocks until a depth sample is ready
if(sm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break;
//retrieve the sample
PXCCapture::Sample *sample=sm->QuerySample();
//work on the image sample->depth
depthIm=sample->depth;
//fetching the next frame/sample
sm->ReleaseFrame();
}
//closing
sm->Release();
}
In main function I have called the 'RecordORPlayback' like:
pxcCHAR *filename=(L"E:\\Output");
RecordORPlayback(filename,true);
Still I'm not able to save the output(correct me if I'm wrong). Is there any other way to store the frames to a specified location?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
In order to enable depth stream you should explicitly enable it using PXCSenseManager->EnableStream
I have updated your code below (line 13 under //Enable the stream)
void RecordORPlayback(pxcCHAR *file, bool record){ // create a sensemanager instance //set file record or playback sm->QueryCaptureManager()->SetFileName(file,record); //Enable the stream sm->EnableStream(PXCCapture::StreamType::STREAM_TYPE_DEPTH); PXCImage *depthIm; //initialize and record 300 frames sm->Init(); for(int i =0; i<300;i++){ //this function blocks until a depth sample is ready if(sm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break; //retrieve the sample PXCCapture::Sample *sample=sm->QuerySample(); //work on the image sample->depth depthIm=sample->depth; //fetching the next frame/sample sm->ReleaseFrame(); } //closing sm->Release(); }
Hope this helps,
Have a nice day,
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page