Inheritance: ICloneable
Esempio n. 1
0
 /// <summary>
 ///   Constructs a new <see cref="MatchingTracker"/> object tracker.
 /// </summary>
 ///
 public MatchingTracker()
 {
     matcher               = new ExhaustiveTemplateMatching(0);
     crop                  = new Crop(Rectangle.Empty);
     trackingObject        = new TrackingObject();
     RegistrationThreshold = 0.99;
 }
Esempio n. 2
0
        /// <summary>
        ///   Initializes a new instance of the <see cref="HslBlobTracker"/> class.
        /// </summary>
        /// <param name="filter">The filter.</param>
        public HslBlobTracker(HSLFiltering filter)
        {
            this.filter         = filter;
            this.blobCounter    = new BlobCounter();
            this.trackingObject = new TrackingObject();

            blobCounter.CoupledSizeFiltering = false;
            blobCounter.FilterBlobs          = true;
        }
Esempio n. 3
0
        /// <summary>
        ///   Creates a new object that is a copy of the current instance.
        /// </summary>
        ///
        /// <returns>
        ///   A new object that is a copy of this instance.
        /// </returns>
        ///
        /// <param name="excludeImage">Pass true to not include
        ///   the <see cref="Image"/> in the copy object.</param>
        ///
        public TrackingObject Clone(bool excludeImage = true)
        {
            TrackingObject obj = new TrackingObject();

            obj.Angle     = Angle;
            obj.Center    = Center;
            obj.Rectangle = Rectangle;
            obj.Tag       = Tag;

            if (!excludeImage)
            {
                obj.Image = Image.Clone();
            }

            return(obj);
        }
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>
        ///   Initializes a new instance of the <see cref="HslBlobTracker"/> class.
        /// </summary>
        /// <param name="filter">The filter.</param>
        public HslBlobTracker(HSLFiltering filter)
        {
            this.filter = filter;
            this.blobCounter = new BlobCounter();
            this.trackingObject = new TrackingObject();

            blobCounter.CoupledSizeFiltering = false;
            blobCounter.FilterBlobs = true;
        }
Esempio n. 6
0
 /// <summary>
 ///   Constructs a new <see cref="MatchingTracker"/> object tracker.
 /// </summary>
 ///
 public MatchingTracker()
 {
     matcher        = new ExhaustiveTemplateMatching(0);
     crop           = new Crop(Rectangle.Empty);
     trackingObject = new TrackingObject();
 }
Esempio n. 7
0
 /// <summary>
 ///   Constructs a new <see cref="MatchingTracker"/> object tracker.
 /// </summary>
 /// 
 public MatchingTracker()
 {
     matcher = new ExhaustiveTemplateMatching(0);
     crop = new Crop(Rectangle.Empty);
     trackingObject = new TrackingObject();
 }
Esempio n. 8
0
        /// <summary>
        ///   Creates a new object that is a copy of the current instance.
        /// </summary>
        /// 
        /// <returns>
        ///   A new object that is a copy of this instance.
        /// </returns>
        /// 
        /// <param name="excludeImage">Pass true to not include
        ///   the <see cref="Image"/> in the copy object.</param>
        /// 
        public TrackingObject Clone(bool excludeImage = true)
        {
            TrackingObject obj = new TrackingObject();
            obj.Angle = Angle;
            obj.Center = Center;
            obj.Rectangle = Rectangle;
            obj.Tag = Tag;

            if (!excludeImage)
                obj.Image = Image.Clone();

            return obj;
        }
Esempio n. 9
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);
            }
        }