Intel Real Sense C#将流传输到文件

时间:2017-04-20 21:03:45

标签: c# intel realsense 3dcamera

我正在尝试使用英特尔Real Sense SDK获取一些引导帧,然后我尝试使用英特尔拼接算法对它们进行拼接。 但是, SetFileName 函数不会将文件写入目录。 你能帮忙吗?

PXCMSenseManager pp = PXCMSenseManager.CreateInstance();

RaiseMessage("Starting...");

pp.EnableFace()
pp.Enable3DScan()

if (!string.IsNullOrEmpty(StreamOutputFilename))
{
    if (File.Exists(StreamOutputFilename)) throw new Exception("File already exists");

    {
        System.Diagnostics.Debug.WriteLine(StreamOutputFilename);
        pp.QueryCaptureManager().SetFileName(StreamOutputFilename,true);

1 个答案:

答案 0 :(得分:1)

请参阅解决方案here

int wmain(int argc, WCHAR* argv[]) {
// Create a SenseManager instance
    PXCPointF32 *uvmap = 0;
    pxcCHAR *file = L"C:\\new.rssdk";
    PXCSenseManager *sm = PXCSenseManager::CreateInstance();
    // Set file recording or playback
    sm->QueryCaptureManager()->SetFileName(file, 1);
    // Select the color stream
    sm->EnableStream(PXCCapture::STREAM_TYPE_DEPTH, 640, 480, 0);
    // 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();
        sm->ReleaseFrame();
    }
    // close down
    sm->Release();
    return 0;
}