コード例 #1
0
        /// <summary>
        /// Formats the pointcloud with a given Format
        /// </summary>
        /// <param name="pointCloud">Point Cloud to be formatter</param>
        /// <returns>String representation of the formatted Point Cloud</returns>
        public String formatPointCloud(PointCloud pointCloud)
        {
            String header = getHeader(pointCloud.getSize());

            String points = pointCloud.generateString(getPointFormat());

            String result = header + points;

            if (format == Format.VRML)
            {
                result += getVRMLFooter();
            }

            return(result);
        }
コード例 #2
0
        //Captures Point Cloud
        private void capturePointCloud(DepthFrame df, BodyIndexFrame bif)
        {
            CoordinateMapper coordinateMapper = sensor.getCoordinateMapper();

            if (df != null && bif != null && coordinateMapper != null)
            {
                //Generate pointCloud using the frames.
                PointCloudGenerator pcg        = new PointCloudGenerator(coordinateMapper);
                PointCloud          pointCloud = pcg.generate(df, bif);
                Log.Write(Log.Tag.INFO, pointCloud.getSize());

                saveFile(pointCloud);
                startNextWindow();
            }
            else
            {
                Log.Write(Log.Tag.ERROR, "There was problem capturing the frames. Arrays containg FrameData or/and the CoordinateMapper are NULL");
            }
        }