visual-c++ - 在英特尔实感中保存 RGB 和深度图像

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

我正在使用 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();

}

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

最佳答案

bool 记录必须设置为 true 才能录制,false 才能播放。当你不给它一个值时,它默认为 false。尝试把真。

关于visual-c++ - 在英特尔实感中保存 RGB 和深度图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32288870/

相关文章:

c# - 使用 Cloo(OpenCL 的 C# 包装器)和 Intel SDK 的 OpenCL 内核中断点不起作用

windows - 如何在使用 Visual C++ 2010 命令提示符时包含/链接 DLL

c++ - C++基本内容。什么东西少了???不可能那么明显

c# - 如何在 Windows 机器上制作虚拟扩展屏幕?

c++ - vector storing lambdas——CLANG 与其他两个

Python - 使用 OpenCV 将图像保存在文件中后,窗口中的图像外观有所不同

android - RGB 值到 HSL 转换器

linux - 并行程序给出错误 "Undefined reference to _Kmpc_ok_to_fork"

java - 从负 int 值中获取 RGB 值

c - x86汇编代码混淆