Exemplo n.º 1
0
        /// <summary>
        /// Handler for new frames from the depth camera
        /// </summary>
        /// <param name="replace">A depthcamsensor Replace message containing the depth data</param>
        private void DepthCameraUpdateFrameHandler(depthcamsensor.Replace replace)
        {
            // Make sure that there is a form to display the image on
            if (this.depthCameraForm == null)
            {
                return;
            }

            int    width  = replace.Body.DepthImageSize.Width;
            int    height = replace.Body.DepthImageSize.Height;
            Bitmap bmp    = this.MakeDepthBitmap(width, height, replace.Body.DepthImage);

            this.DisplayDepthImage(bmp);

            return;
        }
 public void ReplaceHandler(depthcam.Replace replace)
 {
     this.depthCamPartner.Post(replace);
 }