View Source Evision.Tracker (Evision v0.1.12)
Link to this section Summary
Types
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
@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
image:
Evision.Mat
.The initial frame
boundingBox:
Rect
.The initial bounding box
Python prototype (for reference):
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
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):
update(image) -> retval, boundingBox