HandInput.Util.PlayerDetector.FilterPlayerContourSkin C# (CSharp) Method

FilterPlayerContourSkin() public method

public FilterPlayerContourSkin ( short depthFrame, byte colorFrame ) : void
depthFrame short
colorFrame byte
return void
        public void FilterPlayerContourSkin(short[] depthFrame, byte[] colorFrame)
        {
            if (skinDetector == null)
            skinDetector = new SkinDetector(width, height);

              if (DepthSkinMask == null)
            DepthSkinMask = new Image<Gray, Byte>(width, height);

              UpdatePlayerMask(depthFrame);
              var contour = FindPlayerContour(DepthPlayerMask);

              var skinMask = skinDetector.DetectSkin(colorFrame);
              ImageUtil.AlignImageColorToDepth(skinMask, DepthSkinMask, depthFrame, mapper);
              CvInvoke.cvAnd(skinDetector.SkinImage.Ptr, ColorPlayerMask.Ptr, skinDetector.SkinImage.Ptr,
                     IntPtr.Zero);
              dataBuffer.EnqueueAndCopy(skinDetector.SkinImage);

              UpdatePlayerDepthImage(depthFrame, contour, DepthSkinMask.Data);
        }