Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 /// <summary>
 ///   Constructs a new Camshift tracking algorithm.
 /// </summary>
 ///
 public Camshift(Rectangle objectArea, CamshiftMode colorMode)
 {
     initialize(null, objectArea, colorMode);
 }
Esempio n. 3
0
 /// <summary>
 ///   Constructs a new Camshift tracking algorithm.
 /// </summary>
 ///
 public Camshift(UnmanagedImage frame, Rectangle objectArea, CamshiftMode colorMode)
 {
     initialize(frame, objectArea, colorMode);
 }
Esempio n. 4
0
        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);
            }
        }
Esempio n. 5
0
 /// <summary>
 ///   Constructs a new Camshift tracking algorithm.
 /// </summary>
 /// 
 public Camshift(Rectangle objectArea, CamshiftMode colorMode)
 {
     initialize(null, objectArea, colorMode);
 }
Esempio n. 6
0
 /// <summary>
 ///   Constructs a new Camshift tracking algorithm.
 /// </summary>
 /// 
 public Camshift(UnmanagedImage frame, Rectangle objectArea, CamshiftMode colorMode)
 {
     initialize(frame, objectArea, colorMode);
 }