Exemplo n.º 1
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;
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
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);
            }
        }
Exemplo n.º 4
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();
 }