View Source Evision.Tracker (Evision v0.1.21)

Link to this section Summary

Types

t()

Type that represents an Evision.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

Link to this section Types

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

Type that represents an Evision.Tracker struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

Link to this function

init(self, image, boundingBox)

View Source
@spec init(t(), Evision.Mat.maybe_mat_in(), {number(), number(), number(), number()}) ::
  :ok | {: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(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