英特尔实感 C# 录制流到文件
Intel Real Sense C# Recording stream to a file
我正在尝试使用英特尔实感 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);
请参考解决方法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;
}
我正在尝试使用英特尔实感 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);
请参考解决方法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;
}