- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recorded a .rssdk file using the Raw Streams example and am trying to programmatically read the data using the SDK. I recorded several files at various resolutions, framerates, and formats with the color stream only (depth, ir, left, right, all disabled). The files load fine in Clip Editor and I can export them through the interface to a directory of PNGs.
However, I can't seem to read it using the SDK. I followed the sample here: https://software.intel.com/en-us/blogs/2015/10/15/how-to-record-and-playback-streaming-sequences-in-intel-realsense-sdk
01 |
PXCSenseManager* sm = PXCSenseManager::CreateInstance(); |
02 |
pxcStatus sts; |
03 |
// Set file playback name |
04 |
sts = sm->QueryCaptureManager()->SetFileName(filename, false ); |
05 |
|
06 |
// Enable stream and Initialize |
07 |
sts = sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR, 0, 0); |
08 |
sts = sm->Init(); |
I can confirm that SetFileName succeeds: if I give it an invalid filename, it correctly returns PXC_STATUS_FILE_READ_FAILED. sm->EnableStream also succeeds with PXC_STATUS_NO_ERROR. However, no matter what I do, sm->Init() fails with PXC_STATUS_ITEM_UNAVAILABLE.
I tried various combinations of sm->QueryCaptureManager()->SetRealtime(true / false) and ->SetPause(true / false) without any success.
I can further confirm that sm->QueryCaptureManager()->QueryNumberOfFrames() works correctly - returning the correct number of frames.
Surprisingly, even though sm->Init() fails, sm->QueryCaptureManager()->QueryImageSize(PXCCapture::StreamType::STREAM_TYPE_COLOR) returns the correct image size (correctly varying with which filename I pass in).
What am I doing wrong?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried to playback the clip using Raw Streams sample? If it doesn't work, please upload small failing clip to some share so we can check it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I seem to have a similar problem trying to playback a recorded rssdk file. I use the example code from the documentation
01 |
PXCSenseManager* sm = PXCSenseManager::CreateInstance(); |
02 |
|
03 |
// Set file playback name |
04 |
sm->QueryCaptureManager()->SetFileName(filename, false ); |
05 |
|
06 |
// Enable stream and Initialize |
07 |
sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR, 0, 0); |
08 |
sm->Init(); |
09 |
|
10 |
// Set realtime=false and pause=true |
11 |
sm->QueryCaptureManager()->SetRealtime( false ); |
12 |
sm->QueryCaptureManager()->SetPause( true ); |
13 |
|
14 |
// Streaming loop |
15 |
for ( int i = 0; i < nframes; i+=3) { |
16 |
|
17 |
// Set to work on every 3rd frame of data |
18 |
sm->QueryCaptureManager()->SetFrameByIndex(i); |
19 |
sm->FlushFrame(); |
20 |
|
21 |
// Ready for the frame to be ready |
22 |
pxcStatus sts = sm->AcquireFrame( true ); |
23 |
if (sts < PXC_STATUS_NO_ERROR) break ; |
24 |
|
25 |
// Retrieve the sample and work on it. The image is in sample->color. |
26 |
PXCCapture::Sample* sample = sm->QuerySample(); |
27 |
.... |
28 |
|
29 |
// Resume processing the next frame |
30 |
sm->ReleaseFrame(); |
31 |
} |
32 |
|
33 |
// Clean up |
34 |
sm->Release(); |
The code works most of the time. However, when the recording includes any of the Depth + Confidence modes, the program crashes. It seems that the sense manager fails to initialize and line 8 sm->Init() returns error -3 PXC_STATUS_ITEM_UNAVAILABLE.
Curious if this problem has been resolved yet.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page