问题描述
我正在尝试保存在Kinect Bridge for Matlab中创建的matlab颜色和深度矩阵。
I'm trying to save the matlab color and depth matrix created in Kinect Bridge for Matlab.
此代码不起作用:
hr = m_matlabHelper.MatlabPutVariable(" rgbIm",m_pColorMat);
if(FAILED(hr))
{
return hr;
}
const char * imwriteExpr =" imwrite(rgbIm,'C:\ KinectBridgeWithMATLABBasics-D2D \ data \colorIm.png','png');" ;;
hr = m_matlabHelper.MatlabEvalExpr(imwriteExpr) ; $
if(FAILED(hr))
{
返回hr;
跨度>}
hr = m_matlabHelper.MatlabPutVariable("rgbIm", m_pColorMat);
if (FAILED(hr))
{
return hr;
}
const char* imwriteExpr = "imwrite(rgbIm, 'C:\KinectBridgeWithMATLABBasics-D2D\data\colorIm.png', 'png');";
hr = m_matlabHelper.MatlabEvalExpr(imwriteExpr);
if (FAILED(hr))
{
return hr;
}
任何想法?
Any ideas?
提前致谢!
推荐答案
您是否能够运行样本没有任何修改?
Were you able to get the sample to run without any modifications?
这篇关于如何用Matlab Basics D2D保存Kinect桥中的matlab矩阵的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!