Class MultiTrackerTLD
- Namespace
- OpenCvSharp.Tracking.Legacy
- Assembly
- OpenCvSharp.dll
Base class for objects that own a single native OpenCV pointer through an OpenCvSafeHandle. The SafeHandle is the single source of truth for the native handle value and is responsible for releasing it (including from its own finalizer when the managed object is dropped without Dispose()).
public sealed class MultiTrackerTLD : MultiTrackerAlt, IDisposable
- Inheritance
-
MultiTrackerTLD
- Implements
- Inherited Members
Remarks
Unlike MultiTracker, cv::legacy::MultiTracker_Alt does not derive from
cv::Algorithm and has no create() factory - it is a plain, directly-constructed
C++ class with public fields, so this wrapper follows the direct-allocation
(CvObject-based) pattern instead of the CvPtrObject/cv::Ptr
factory pattern used elsewhere in this module.
Constructors
MultiTrackerTLD()
Constructor for Multitracker-TLD.
public MultiTrackerTLD()
Methods
UpdateOpt(Mat)
Update all trackers from the tracking-list, finding new most likely bounding boxes for the targets using an optimized update method that speeds up calculations specifically for multi-object TLD. The only limitation is that all target bounding boxes should have approximately the same aspect ratio. Speed boost is around 20%.
public bool UpdateOpt(Mat image)
Parameters
imageMatThe current frame.
Returns
- bool
True means that all targets were located and false means that tracker couldn't locate one of the targets in the current frame. Note that the latter does not imply that tracker has failed - the target may indeed be missing from the frame (say, out of sight).