使用英特尔实感保存流 [英] Saving the stream using Intel RealSense

查看:188
本文介绍了使用英特尔实感保存流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是英特尔实感新手。我想学习如何将颜色和深度流保存到位图。我正在使用C ++作为我的语言。我已经知道有一个函数ToBitmap(),但它可以用于C#。

I'm new to Intel RealSense. I want to learn how to save the color and depth streams to bitmap. I'm using C++ as my language. I have learned that there is a function ToBitmap(), but it can be used for C#.

所以我想知道是否有任何方法或任何函数可以帮助我保存了这些流。

So I wanted to know is there any method or any function that will help me in saving the streams.

提前致谢。

推荐答案

我也在努力解决这个问题,似乎唯一的选择就是手动完成。我们需要从PXCImage获取ImageData。实际数据存储在ImageData.planes中,但我仍然不明白它是如何组织的。

I'm also working my way through this, It seems that the only option is to do it manually. We need to get ImageData from PXCImage. The actual data is stored in ImageData.planes but I still don't understand how it's organized.

https://software.intel.com/en-us/articles/dipping- in-the-intel-realsense-raw-data-stream?language = en 在这里你可以找到获取深度数据的例子。
但我仍然不知道什么是音高以及飞机内的数据是如何组织的。

https://software.intel.com/en-us/articles/dipping-into-the-intel-realsense-raw-data-stream?language=en Here you can find example of getting depth data. But I still have no idea what is pitches and how data inside planes is organized.

此处: https://software.intel.com/en-us/forums/intel-perceptual-computing-sdk/topic/332718 描述了一种向后的过程。

Here: https://software.intel.com/en-us/forums/intel-perceptual-computing-sdk/topic/332718 kind of backwards process is described.

如果您能从这些信息中获得一些见解,我将很高兴。
如果你发现了一些你可以分享的见解,我显然会很高兴:)。

I would be glad if you will be able to get some insight from this information. And I obviously would be glad if you've discovered some insight you can share :).

UPD:这是一些东西看起来像我们需要的东西,我还没有使用它,但它揭示了飞机的内部组织[0] https://software.intel.com/en-us/forums/intel-perceptual-computing-sdk/topic/514663

UPD: Here is something that looks like what we need, I haven't worked with it yet, but it sheds some light on internal organization of planes[0] https://software.intel.com/en-us/forums/intel-perceptual-computing-sdk/topic/514663

UPD2:为答案添加一些完整性:
然后,您可以从ImageData中的数据创建GDI +图像:

UPD2: To add some completeness to the answer: You then can create GDI+ image from data in ImageData:

auto colorData = PXCImage::ImageData();

if (image->AcquireAccess(PXCImage::ACCESS_READ, PXCImage::PIXEL_FORMAT_RGB24, &colorData) >= PXC_STATUS_NO_ERROR) {
    auto colorInfo = image->QueryInfo();
    auto colorPitch = colorData.pitches[0] / sizeof(pxcBYTE);
    Gdiplus::Bitmap tBitMap(colorInfo.width, colorInfo.height, colorPitch, PixelFormat24bppRGB, baseColorAddress);
}

Bitmap是Image的子类( https://msdn.microsoft.com/en-us/library/windows /desktop/ms534462(v=vs.85).aspx )。您可以将图像保存为不同格式的文件。

And Bitmap is subclass of Image (https://msdn.microsoft.com/en-us/library/windows/desktop/ms534462(v=vs.85).aspx). You can save Image to file in different formats.

这篇关于使用英特尔实感保存流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆