Emgu.CV.KinectCapture.GetColorPoints C# (CSharp) Метод

GetColorPoints() публичный Метод

Get an enumerator of the colored points from Kinect. This function can only be called after the Grab() function.
public GetColorPoints ( Byte>.Image mask ) : Emgu.CV.Structure.ColorPoint[]
mask Byte>.Image The mask that controls which points should be returned. You can use the result from RetrieveValidDepthMap() function. Use null if you want all points to be returned
Результат Emgu.CV.Structure.ColorPoint[]
        public ColorPoint[] GetColorPoints(Image<Gray, Byte> mask)
        {
            using (MemStorage stor = new MemStorage())
             {
            Seq<ColorPoint> seq = new Seq<ColorPoint>(stor);
            CvInvoke.OpenniGetColorPoints(Ptr, seq, mask);
            return seq.ToArray();
             }
             /*
             MCvPoint3D32f[] positions = RetrievePointCloudMap();
             if (positions == null)
            yield break;

             using (Image<Bgr, Byte> image = RetrieveBgrFrame())
             using (Image<Gray, Byte> validDepthMap = RetrieveValidDepthMap())
             {
            int imageWidth = image.Width;
            int imageHeight = image.Height;
            Byte[] mask = validDepthMap.Bytes;

            int i = 0;
            for (int h = 0; h < imageHeight; h++)
               for (int w = 0; w < imageWidth; w++, i++)
                  if (mask[i] != 0)
                  {
                     ColorPoint cp = new ColorPoint();
                     cp.Color = new Bgr(image.Data[h, w, 0], image.Data[h, w, 1], image.Data[h, w, 2]);
                     cp.Position = positions[i];
                     yield return cp;
                  }
             }*/
        }