Tracker

Objective-C

@interface Tracker : Algorithm

Swift

class Tracker : Algorithm

Base abstract class for the long-term tracker:

Member of Tracking

Methods

  • Initialize the tracker with a known bounding box that surrounded the target

    Declaration

    Objective-C

    - (BOOL)init:(nonnull Mat *)image boundingBox:(nonnull Rect2d *)boundingBox;

    Parameters

    image

    The initial frame

    boundingBox

    The initial bounding box

    Return Value

    True if initialization went succesfully, false otherwise

  • Update the tracker, find the new most likely bounding box for the target

    Declaration

    Objective-C

    - (BOOL)update:(nonnull Mat *)image boundingBox:(nonnull Rect2d *)boundingBox;

    Swift

    func update(image: Mat, boundingBox: Rect2d) -> Bool

    Parameters

    image

    The current frame

    boundingBox

    The bounding box that represent the new target location, if true was returned, not modified otherwise

    Return Value

    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)