OpenShot Library | libopenshot  0.7.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
openshot::CVObjectDetection Class Reference

This class runs trought a clip to detect objects and returns the bounding boxes and its properties. More...

#include <CVObjectDetection.h>

Public Member Functions

bool _LoadObjDetectdData ()
 
void AddFrameDataToProto (pb_objdetect::Frame *pbFrameData, CVDetectionData &dData)
 
 CVObjectDetection (std::string processInfoJson, ProcessingController &processingController)
 
void detectObjectsClip (openshot::Clip &video, size_t start=0, size_t end=0, bool process_interval=false)
 
CVDetectionData GetDetectionData (size_t frameId)
 
bool SaveObjDetectedData ()
 Protobuf Save and Load methods. More...
 
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...
 

Static Public Member Functions

static std::string ValidateONNXModel (std::string modelPath)
 

Public Attributes

std::map< size_t, CVDetectionDatadetectionsData
 

Detailed Description

This class runs trought a clip to detect objects and returns the bounding boxes and its properties.

Object detection is performed using a supported YOLO ONNX model with OpenCV DNN module.

Definition at line 81 of file CVObjectDetection.h.

Constructor & Destructor Documentation

◆ CVObjectDetection()

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

Definition at line 246 of file CVObjectDetection.cpp.

Member Function Documentation

◆ _LoadObjDetectdData()

bool CVObjectDetection::_LoadObjDetectdData ( )

Definition at line 921 of file CVObjectDetection.cpp.

◆ AddFrameDataToProto()

void CVObjectDetection::AddFrameDataToProto ( pb_objdetect::Frame *  pbFrameData,
CVDetectionData dData 
)

Definition at line 810 of file CVObjectDetection.cpp.

Referenced by SaveObjDetectedData().

◆ detectObjectsClip()

void CVObjectDetection::detectObjectsClip ( openshot::Clip video,
size_t  start = 0,
size_t  end = 0,
bool  process_interval = false 
)

Definition at line 278 of file CVObjectDetection.cpp.

◆ GetDetectionData()

CVDetectionData CVObjectDetection::GetDetectionData ( size_t  frameId)

Definition at line 705 of file CVObjectDetection.cpp.

◆ SaveObjDetectedData()

bool CVObjectDetection::SaveObjDetectedData ( )

Protobuf Save and Load methods.

Definition at line 767 of file CVObjectDetection.cpp.

◆ SetJson()

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

Load JSON string into this object.

Definition at line 839 of file CVObjectDetection.cpp.

Referenced by CVObjectDetection().

◆ SetJsonValue()

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

Load Json::Value into this object.

Definition at line 857 of file CVObjectDetection.cpp.

Referenced by SetJson().

◆ ValidateONNXModel()

std::string CVObjectDetection::ValidateONNXModel ( std::string  modelPath)
static

Member Data Documentation

◆ detectionsData

std::map<size_t, CVDetectionData> openshot::CVObjectDetection::detectionsData

Definition at line 127 of file CVObjectDetection.h.

Referenced by _LoadObjDetectdData(), GetDetectionData(), and SaveObjDetectedData().


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