Package org.opencv.video
Class Tracker
java.lang.Object
org.opencv.video.Tracker
- Direct Known Subclasses:
TrackerDaSiamRPN
,TrackerGOTURN
,TrackerMIL
public class Tracker extends Object
Base abstract class for the long-term tracker
-
Field Summary
Fields Modifier and Type Field Description protected long
nativeObj
-
Constructor Summary
Constructors Modifier Constructor Description protected
Tracker(long addr)
-
Method Summary
Modifier and Type Method Description static Tracker
__fromPtr__(long addr)
protected void
finalize()
long
getNativeObjAddr()
void
init(Mat image, Rect boundingBox)
Initialize the tracker with a known bounding box that surrounded the targetboolean
update(Mat image, Rect boundingBox)
Update the tracker, find the new most likely bounding box for the target
-
Field Details
-
Constructor Details
-
Method Details
-
getNativeObjAddr
-
__fromPtr__
-
init
Initialize the tracker with a known bounding box that surrounded the target- Parameters:
image
- The initial frameboundingBox
- The initial bounding box
-
update
Update the tracker, find the new most likely bounding box for the target- Parameters:
image
- The current frameboundingBox
- The bounding box that represent the new target location, if true was returned, not modified otherwise- Returns:
- 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)
-
finalize
-