Accord.Vision.Tracking.Camshift.initialize C# (CSharp) Method

initialize() private method

private initialize ( UnmanagedImage frame, Rectangle objectArea, CamshiftMode colorMode ) : void
frame Accord.Imaging.UnmanagedImage
objectArea System.Drawing.Rectangle
colorMode CamshiftMode
return void
        private void initialize(UnmanagedImage frame, Rectangle objectArea, CamshiftMode colorMode)
        {
            this.trackingObject = new TrackingObject();
            this.searchWindow = objectArea;
            this.mode = colorMode;

            this.angleHistory = new MovingCircularStatistics(4);

            this.widthHistory = new MovingNormalStatistics(15);
            this.heightHistory = new MovingNormalStatistics(15);
            this.yHistory = new MovingNormalStatistics(15);
            this.xHistory = new MovingNormalStatistics(15);

            if (frame != null && objectArea != Rectangle.Empty)
            {
                this.originalHistogram = createHistogram(frame, objectArea);
            }
        }
        #endregion