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