Пример #1
0
        public VideoShot(ColorImageProcesser processer, MainWindow window, int videoNum,
            KinectSensor kinectDevice,
            int dWidht, int dHeight,
            int cWidth, int cHeight,
            DepthImageFormat dImageFormat, ColorImageFormat cImageFormat)
        {
            parentProcesser = processer;
            videoName = PadLeft(videoNum);
            _windowUI = window;
            _kinectDevice = kinectDevice;

            depthFrameWidth = dWidht;
            depthFrameHeight = dHeight;

            colorFrameWidth = cWidth;
            colorFrameHeight = cHeight;

            depthFrameStride = depthFrameWidth * BytesPerPixel;
            colorFrameStride = colorFrameWidth * BytesPerPixel;

            depthImageFormat = dImageFormat;
            colorImageFormat = cImageFormat;

            screenHeight = SystemParameters.PrimaryScreenHeight;
            screenWidth = SystemParameters.PrimaryScreenWidth;

            Start();
        }
        public ImagePlayer(MainWindow window, string filePath, string fileName, int startNum, int imageCount, bool isFading, float _fadingRate, int interval = 50, Image imageElement = null)
        {
            _windowUI = window;
            _fileName = fileName;
            _filePath = filePath;
            _startNum = startNum;
            _imageCount = imageCount;
            currentImageNum = startNum;
            intervalTime = 50;

            imagePlayerElement = imageElement;

            isFadeInAndOut = isFading;
            fadingRate = _fadingRate;
            if (isFadeInAndOut)
            {
                CalculateFadeFrame();
            }
        }
        public ColorImageProcesser(MainWindow window, KinectSensor kinectDevice,
            int depthDataLength, int colorDataLength,
            int dWidht, int dHeight,
            int cWidth, int cHeight,
            DepthImageFormat dImageFormat, ColorImageFormat cImageFormat)
        {
            _windowUI = window;
            _kinectDevice = kinectDevice;

            depthPixelData = new short[depthDataLength];
            colorPixelData = new byte[colorDataLength];

            depthFrameWidth = dWidht;
            depthFrameHeight = dHeight;

            colorFrameWidth = cWidth;
            colorFrameHeight = cHeight;

            depthFrameStride = depthFrameWidth * BytesPerPixel;
            colorFrameStride = colorFrameWidth * BytesPerPixel;

            depthImageFormat = dImageFormat;
            colorImageFormat = cImageFormat;
        }