Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c#中的Helix工具箱显示ply点云_C#_Point Clouds_Helix 3d Toolkit - Fatal编程技术网

c#中的Helix工具箱显示ply点云

c#中的Helix工具箱显示ply点云,c#,point-clouds,helix-3d-toolkit,C#,Point Clouds,Helix 3d Toolkit,在老师的帮助下,我做了一个厚锉刀 我是如何制作ply文件的,如下所示: using (var frames = pipeline.WaitForFrames()) { var colorFrame = frames.ColorFrame.DisposeWith(frames); var depthFrame = frames.DepthFrame.DisposeWith(frames); var points = pc.Process(depthFrame).As<

在老师的帮助下,我做了一个厚锉刀

我是如何制作ply文件的,如下所示:

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");
}
但是我在
HViewPort.Children.Add(cloudPoints)行得到了错误。据说:

它无法将Systems.Windows.Media.Media3D.Model3D转换为Systems.Windows.Media.Media3D.Visual3D


有人能帮助我如何使用helix toolkit显示点云吗?

我认为目前不可能在helix toolkit中显示一些ply文件 ()

您可以使用下面的代码显示ply文件,但不会看到所需的项目

Model3DGroup group = new Model3DGroup();
var hpVp3D = new HelixViewport3D();
ModelVisual3D visual3D = new ModelVisual3D();
var lights = new DefaultLights();
ModelImporter importer = new ModelImporter();
Model3D element;

element = importer.Load(@"pointcloud.ply")
group.Children.Add(element);

visual3D.Content = group;

hVp3D.Children.Add(visual3D);
hVp3D.Children.Add(lights);

this.AddChild(hVp3D);

我认为目前不可能在helix工具箱中显示一些ply文件 ()

您可以使用下面的代码显示ply文件,但不会看到所需的项目

Model3DGroup group = new Model3DGroup();
var hpVp3D = new HelixViewport3D();
ModelVisual3D visual3D = new ModelVisual3D();
var lights = new DefaultLights();
ModelImporter importer = new ModelImporter();
Model3D element;

element = importer.Load(@"pointcloud.ply")
group.Children.Add(element);

visual3D.Content = group;

hVp3D.Children.Add(visual3D);
hVp3D.Children.Add(lights);

this.AddChild(hVp3D);

我不知道这是否是方法,但我可以在ply文件中显示点云。 守则:

Model3DGroup model1 = import.Load("pointcloud.ply");
model.Content = model1;
XAML:


我不知道这是否是一种方式,但我可以在ply文件中显示点云。 守则:

Model3DGroup model1 = import.Load("pointcloud.ply");
model.Content = model1;
XAML: