问题描述
我在this wrapper的帮助下制作了一个层板文件。
我如何制作层板文件如下所示:
using (var frames = pipeline.WaitForFrames())
{
var colorFrame = frames.ColorFrame.DisposeWith(frames);
var depthFrame = frames.DepthFrame.DisposeWith(frames);
var points = pc.Process(depthFrame).As<Points>();
// We colorize the depth frame for visualization purposes
var colorizedDepth = colorizer.Process<VideoFrame>(depthFrame).DisposeWith(frames);
// CopyVertices is extensible,any of these will do:
var vertices = new float[points.Count * 3];
// var vertices = new Intel.RealSense.Math.Vertex[points.Count];
// var vertices = new UnityEngine.Vector3[points.Count];
// var vertices = new System.Numerics.Vector3[points.Count]; // SIMD
// var vertices = new GlmSharp.vec3[points.Count];
// var vertices = new byte[points.Count * 3 * sizeof(float)];
points.CopyVertices(vertices);
points.ExportToPLY("pointcloud.ply",colorFrame);
// Render the frames.
cloudPoints = importer.Load(@"pointcloud.ply");
}
现在我要使用代码显示它:
private void Create3DViewPort()
{
var hVp3D = new HelixViewport3D();
var lights = new DefaultLights();
HViewPort.Children.Add(lights);
HViewPort.Children.Add(cloudPoints);
this.AddChild(HViewPort);
}
但是在HViewPort.Children.Add(cloudPoints);
行出现了错误。就是说:
它不能将Systems.Windows.Media.Media3D.Model3D转换为Systems.Windows.Media.Media3D.Visual3D。
有人可以帮助我如何使用helix工具包显示点云吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)