View Source Evision.Tracker (Evision v0.2.9)

Summary

Types

t()

Type that represents an Tracker struct.

Functions

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

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

Types

@type t() :: %Evision.Tracker{ref: reference()}

Type that represents an Tracker struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec init(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

init(self, image, boundingBox)

View Source
@spec init(t(), Evision.Mat.maybe_mat_in(), {number(), number(), number(), number()}) ::
  t() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.Tracker.t()

  • image: Evision.Mat.

    The initial frame

  • boundingBox: Rect.

    The initial bounding box

Python prototype (for reference only):

init(image, boundingBox) -> None
@spec update(Keyword.t()) :: any() | {:error, String.t()}
@spec update(t(), Evision.Mat.maybe_mat_in()) ::
  {number(), number(), number(), number()} | false | {:error, String.t()}

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

Positional Arguments
  • self: Evision.Tracker.t()

  • image: Evision.Mat.

    The current frame

Return
  • retval: bool

  • boundingBox: Rect.

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

@return 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)

Python prototype (for reference only):

update(image) -> retval, boundingBox