Exemplo n.º 1
0
        public string Header(PointCloudTemp temp, PointCloudRecorderOptions options)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("# .PCD v.7 - Point Cloud Data file format");
            sb.AppendLine("VERSION .7");
            if (!options.RecordRGB)
            {
                sb.AppendLine("FIELDS x y z");
                sb.AppendLine("SIZE 4 4 4");
                sb.AppendLine("TYPE F F F");
                sb.AppendLine("COUNT 1 1 1");
            }
            else
            {
                sb.AppendLine("FIELDS x y z rgb");
                sb.AppendLine("SIZE 4 4 4 4");
                sb.AppendLine("TYPE F F F F");
                sb.AppendLine("COUNT 1 1 1 1");
            }

            sb.AppendLine("WIDTH 1");
            sb.AppendLine("HEIGHT " + temp.PointCount);
            sb.AppendLine("VIEWPOINT 0 0 0 1 0 0 0");
            sb.AppendLine("POINTS " + temp.PointCount);
            sb.Append("DATA ascii");
            return sb.ToString();
        }
Exemplo n.º 2
0
        public string Header(PointCloudTemp temp, PointCloudRecorderOptions options)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("ply");
            sb.AppendLine("format ascii 1.0");
            sb.AppendLine(String.Concat("element vertex ", temp.PointCount));
            sb.AppendLine("property float x");
            sb.AppendLine("property float y");
            sb.AppendLine("property float z");
            sb.AppendLine("property uchar red");
            sb.AppendLine("property uchar green");
            sb.AppendLine("property uchar blue");
            sb.AppendLine("end_header");

            return sb.ToString();
        }
 string FileType.Header(PointCloudTemp temp, PointCloudRecorderOptions options)
 {
     return "";
 }
 /// <summary>
 /// Appends a temporary point cloud for processing
 /// </summary>
 /// <param name="temp">temp point cloud object</param>
 public void AddCloud(PointCloudTemp temp)
 {
     this.TempClouds.Push(temp);
     this.FrameIds.Add(temp.Id, temp.PointCount);
 }