OpenCV 5.0.0-pre
Open Source Computer Vision
Loading...
Searching...
No Matches
cv::gapi::ot Namespace Reference

This namespace contains G-API Operation Types for VAS Object Tracking module functionality. More...

Namespaces

namespace  cpu
 

Classes

struct  ObjectTrackerParams
 

Typedefs

using GTrackedInfo = std::tuple<cv::GArray<cv::Rect>, cv::GArray<int32_t>, cv::GArray<uint64_t>, cv::GArray<int>>
 

Enumerations

enum  TrackingStatus {
  NEW = 0 ,
  TRACKED ,
  LOST
}
 

Functions

std::tuple< cv::GArray< cv::Rect >, cv::GArray< int >, cv::GArray< uint64_t >, cv::GArray< int > > track (const cv::GFrame &frame, const cv::GArray< cv::Rect > &detected_rects, const cv::GArray< int > &detected_class_labels, float delta)
 Tracks objects with video frames. Overload of track(...) for frame as GFrame.
 
std::tuple< cv::GArray< cv::Rect >, cv::GArray< int >, cv::GArray< uint64_t >, cv::GArray< int > > track (const cv::GMat &mat, const cv::GArray< cv::Rect > &detected_rects, const cv::GArray< int > &detected_class_labels, float delta)
 Tracks objects with video frames. If a detected object is overlapped enough with one of tracked object, the tracked object's informationis updated with the input detected object. On the other hand, if a detected object is overlapped with none of tracked objects, the detected object is newly added and ObjectTracker starts to track the object. In zero term tracking type, ObjectTracker clears tracked objects in case that empty list of detected objects is passed in.
 

Detailed Description

This namespace contains G-API Operation Types for VAS Object Tracking module functionality.

Typedef Documentation

◆ GTrackedInfo

using cv::gapi::ot::GTrackedInfo = std::tuple<cv::GArray<cv::Rect>, cv::GArray<int32_t>, cv::GArray<uint64_t>, cv::GArray<int>>

Enumeration Type Documentation

◆ TrackingStatus

Tracking status twin for vas::ot::TrackingStatus

Enumerator
NEW 
Python: cv.gapi.ot.NEW

The object is newly added.

TRACKED 
Python: cv.gapi.ot.TRACKED

The object is being tracked.

LOST 
Python: cv.gapi.ot.LOST

The object gets lost now. The object can be tracked again by specifying detected object manually.

Function Documentation

◆ track() [1/2]

std::tuple< cv::GArray< cv::Rect >, cv::GArray< int >, cv::GArray< uint64_t >, cv::GArray< int > > cv::gapi::ot::track ( const cv::GFrame & frame,
const cv::GArray< cv::Rect > & detected_rects,
const cv::GArray< int > & detected_class_labels,
float delta )
Python:
cv.gapi.ot.track(mat, detected_rects, detected_class_labels, delta) -> retval
cv.gapi.ot.track(frame, detected_rects, detected_class_labels, delta) -> retval

Tracks objects with video frames. Overload of track(...) for frame as GFrame.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
frameInput frame.
detected_rectsDetected objects rectangles in the input frame.
detected_class_labelsDetected objects class labels in the input frame.
deltaFrame_delta_t Delta time between two consecutive tracking in seconds. The valid range is [0.005 ~ 0.5].
Returns
Tracking results of target objects.
Tracking results of target objects. cv::GArray<cv::Rect> Array of rectangles for tracked objects. cv::GArray<int32_t> Array of detected objects labels. cv::GArray<uint64_t> Array of tracking IDs for objects. Numbering sequence starts from 1. The value 0 means the tracking ID of this object has not been assigned. cv::GArray<int> Array of tracking statuses for objects.

◆ track() [2/2]

std::tuple< cv::GArray< cv::Rect >, cv::GArray< int >, cv::GArray< uint64_t >, cv::GArray< int > > cv::gapi::ot::track ( const cv::GMat & mat,
const cv::GArray< cv::Rect > & detected_rects,
const cv::GArray< int > & detected_class_labels,
float delta )
Python:
cv.gapi.ot.track(mat, detected_rects, detected_class_labels, delta) -> retval
cv.gapi.ot.track(frame, detected_rects, detected_class_labels, delta) -> retval

Tracks objects with video frames. If a detected object is overlapped enough with one of tracked object, the tracked object's informationis updated with the input detected object. On the other hand, if a detected object is overlapped with none of tracked objects, the detected object is newly added and ObjectTracker starts to track the object. In zero term tracking type, ObjectTracker clears tracked objects in case that empty list of detected objects is passed in.

Parameters
matInput frame.
detected_rectsDetected objects rectangles in the input frame.
detected_class_labelsDetected objects class labels in the input frame.
deltaFrame_delta_t Delta time between two consecutive tracking in seconds. The valid range is [0.005 ~ 0.5].
Returns
Tracking results of target objects. cv::GArray<cv::Rect> Array of rectangles for tracked objects. cv::GArray<int32_t> Array of detected objects labels. cv::GArray<uint64_t> Array of tracking IDs for objects. Numbering sequence starts from 1. The value 0 means the tracking ID of this object has not been assigned. cv::GArray<int> Array of tracking statuses for objects.