我正在研究英特尔实感SDK(R2).我想从Camera_viewer保存图像.我一直在努力将帧保存到特定缓冲区并从中检索.我想知道如何将这些帧/图像保存到指定的位置/文件夹.
这是我的代码:
PXCImage *colorIm, *depthIm;
for (int i=0; i<MAX_FRAMES; i++) {
// This function blocks until all streams are ready (depth and color)
// if false streams will be unaligned
if (psm->AcquireFrame(true)<PXC_STATUS_NO_ERROR) break;
// retrieve all available image samples
PXCCapture::Sample *sample = psm->QuerySample();
// retrieve the image or frame by type from the sample
colorIm = sample->color;
depthIm = sample->depth;
// render the frame
if (!renderColor->RenderFrame(colorIm)) break;
if (!renderDepth->RenderFrame(depthIm)) break;
// release or unlock the current frame to fetch the …
Run Code Online (Sandbox Code Playgroud)