【问题标题】:saving RGB and depth images in Intel RealSense在英特尔实感中保存 RGB 和深度图像
【发布时间】:2015-11-24 04:00:45
【问题描述】:

我正在使用 SetFileName() 函数将 RGB 和深度图像保存到指定的文件位置。但这并不能节省任何东西。代码运行没有错误,但没有保存任何内容。

这是我的代码:

void RecordORPlayback(pxcCHAR *file, pxcBool record)
{
// Create a SenseManager instance
 PXCSenseManager *sm=PXCSenseManager::CreateInstance();

 // Set file recording or playback
sm->QueryCaptureManager()->SetFileName(file,record);

// Select the color stream

sm->EnableStream(PXCCapture::STREAM_TYPE_COLOR,640,480,0); 
sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH,640,480,0);

PXCImage *colorIm, *depthIm;
// Initialize and Record 300 frames

sm->Init(); 

 for (int i=0;i<300;i++) {

   // This function blocks until a color 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->color
    colorIm=sample->color;
    depthIm=sample->depth;

   // Go fetching the next sample
   sm->ReleaseFrame();

 }
 // close down
sm->Release();

}

我不知道如何保存输出。有什么建议吗?

【问题讨论】:

    标签: visual-c++ rgb intel saving-data realsense


    【解决方案1】:

    布尔记录必须设置为 true 用于录制和 false 用于回放。当你不给它一个值时,默认情况下它是假的。试着把真实的。

    【讨论】:

    • 我已将值指定为“1”,这意味着正确吗?但是图像仍然没有保存!
    猜你喜欢
    • 1970-01-01
    • 2015-11-17
    • 1970-01-01
    • 1970-01-01
    • 2019-12-24
    • 2015-11-27
    • 1970-01-01
    • 2015-02-13
    • 2021-02-18
    相关资源
    最近更新 更多