OpenShot Library | libopenshot  0.5.0
Public Member Functions | List of all members
openshot::CVTracker Class Reference

The tracker class will receive one bounding box provided by the user and then iterate over the clip frames to return the object position in all the frames. More...

#include <CVTracker.h>

Public Member Functions

bool _LoadTrackedData ()
 
void AddFrameDataToProto (pb_tracker::Frame *pbFrameData, FrameData &fData)
 Add frame tracked data into protobuf message. More...
 
 CVTracker (std::string processInfoJson, ProcessingController &processingController)
 
FrameData GetTrackedData (size_t frameId)
 Get tracked data for a given frame. More...
 
bool initTracker (cv::Mat &frame, size_t frameId)
 
bool SaveTrackedData ()
 Save protobuf file. More...
 
cv::Ptr< OPENCV_TRACKER_TYPEselectTracker (std::string trackerType)
 
void SetJson (const std::string value)
 Load JSON string into this object. More...
 
void SetJsonValue (const Json::Value root)
 Load Json::Value into this object. More...
 
void trackClip (openshot::Clip &video, size_t _start=0, size_t _end=0, bool process_interval=false)
 
bool trackFrame (cv::Mat &frame, size_t frameId)
 

Detailed Description

The tracker class will receive one bounding box provided by the user and then iterate over the clip frames to return the object position in all the frames.

Definition at line 75 of file CVTracker.h.

Constructor & Destructor Documentation

◆ CVTracker()

CVTracker::CVTracker ( std::string  processInfoJson,
ProcessingController processingController 
)

Definition at line 40 of file CVTracker.cpp.

Member Function Documentation

◆ _LoadTrackedData()

bool CVTracker::_LoadTrackedData ( )

Definition at line 436 of file CVTracker.cpp.

◆ AddFrameDataToProto()

void CVTracker::AddFrameDataToProto ( pb_tracker::Frame *  pbFrameData,
FrameData fData 
)

Add frame tracked data into protobuf message.

Definition at line 348 of file CVTracker.cpp.

Referenced by SaveTrackedData().

◆ GetTrackedData()

FrameData CVTracker::GetTrackedData ( size_t  frameId)

Get tracked data for a given frame.

Definition at line 363 of file CVTracker.cpp.

Referenced by trackClip().

◆ initTracker()

bool CVTracker::initTracker ( cv::Mat &  frame,
size_t  frameId 
)

Definition at line 127 of file CVTracker.cpp.

Referenced by trackClip(), and trackFrame().

◆ SaveTrackedData()

bool CVTracker::SaveTrackedData ( )

Save protobuf file.

Definition at line 315 of file CVTracker.cpp.

◆ selectTracker()

cv::Ptr< OPENCV_TRACKER_TYPE > CVTracker::selectTracker ( std::string  trackerType)

Definition at line 49 of file CVTracker.cpp.

Referenced by initTracker().

◆ SetJson()

void CVTracker::SetJson ( const std::string  value)

Load JSON string into this object.

Definition at line 377 of file CVTracker.cpp.

Referenced by CVTracker().

◆ SetJsonValue()

void CVTracker::SetJsonValue ( const Json::Value  root)

Load Json::Value into this object.

Definition at line 394 of file CVTracker.cpp.

Referenced by SetJson().

◆ trackClip()

void CVTracker::trackClip ( openshot::Clip video,
size_t  _start = 0,
size_t  _end = 0,
bool  process_interval = false 
)

Track object in the hole clip or in a given interval

If start, end and process_interval are passed as argument, clip will be processed in [start,end)

Definition at line 70 of file CVTracker.cpp.

◆ trackFrame()

bool CVTracker::trackFrame ( cv::Mat &  frame,
size_t  frameId 
)

Definition at line 172 of file CVTracker.cpp.

Referenced by trackClip().


The documentation for this class was generated from the following files: