问题描述
我使用代码制作点云:
var points = pc.Process(depthFrame).As<Points>();
//float depth = depthFrame.Getdistance(x,y);
//bBox = (287,23,86,320);
// We colorize the depth frame for visualization purposes
var colorizedDepth = colorizer.Process<VideoFrame>(depthFrame).disposeWith(frames);
//var org = Cv2.ImRead(colorFrame);
// 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);
我想使用helixtoolkit显示点云,我发现您可以将上面代码中的点转换为Helixtoolkit支持的点。我想到了Point3D,但如果以这种方式运行它,则会出现错误:
var totalpoints = points.Count;
Point3DCollection pointss = new Point3DCollection();
int i = 0;
FrameMetadataValue k = 0;
while(i<totalpoints)
{
pointss.Add(new Point3D(points[k],points[k],points[k]));
k++;
i++;
}
但是我得到深度流的错误元数据不可用。有谁知道如何将这些点转换为helixtoolkit支持的点?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)