Class Tracker
Base abstract class for the long-term tracker
Inheritance
System.Object
Tracker
Implements
Inherited Members
Namespace: OpenCvSharp
Assembly: OpenCvSharp.dll
Syntax
public abstract class Tracker : Algorithm, ICvPtrHolder
Constructors
| Improve this Doc View SourceTracker(Ptr)
Declaration
protected Tracker(Ptr ptrObj)
Parameters
Type | Name | Description |
---|---|---|
Ptr | ptrObj |
Methods
| Improve this Doc View SourceDisposeManaged()
Releases managed resources
Declaration
protected override void DisposeManaged()
Overrides
| Improve this Doc View SourceInit(Mat, Rect)
Initialize the tracker with a know bounding box that surrounding the target
Declaration
public void Init(Mat image, Rect boundingBox)
Parameters
Type | Name | Description |
---|---|---|
Mat | image | The initial frame |
OpenCvSharp.Rect | boundingBox | The initial bounding box |
Update(Mat, ref Rect)
Update the tracker, find the new most likely bounding box for the target
Declaration
public bool Update(Mat image, ref Rect boundingBox)
Parameters
Type | Name | Description |
---|---|---|
Mat | image | The current frame |
OpenCvSharp.Rect | boundingBox | The bounding box that represent the new target location, if true was returned, not modified otherwise |
Returns
Type | Description |
---|---|
System.Boolean | True means that target was located and false means that tracker cannot locate target in current frame.Note, that latter does not imply that tracker has failed, maybe target is indeed missing from the frame (say, out of sight) |