Exemplo n.º 1
0
        public Image <Bgr, Byte> GetImage()
        {
            if (_camera.Handle == IntPtr.Zero)
            {
                return(null);
            }

            IntPtr    frame      = PsMoveApi.psmove_tracker_get_frame(_camera.Handle);
            MIplImage rgb32Image = (MIplImage)Marshal.PtrToStructure(frame, typeof(MIplImage));

            return(new Image <Bgr, byte>(rgb32Image.width, rgb32Image.height, rgb32Image.widthStep, rgb32Image.imageData));
        }