20 processingType(processingType), processInfoJson(processInfoJson){
27 return "OpenShot was not compiled with OpenCV support.";
37 (void)processInfoJson;
39 return std::shared_ptr<Frame>();
44 processInfoJson = json;
47 if(processingType ==
"Stabilizer"){
48 t = std::thread(&ClipProcessingJobs::stabilizeClip,
this, std::ref(clip), std::ref(this->processingController));
50 if(processingType ==
"Tracker"){
51 t = std::thread(&ClipProcessingJobs::trackClip,
this, std::ref(clip), std::ref(this->processingController));
53 if(processingType ==
"ObjectDetection"){
54 t = std::thread(&ClipProcessingJobs::detectObjectsClip,
this, std::ref(clip), std::ref(this->processingController));
56 if(processingType ==
"ObjectMask"){
57 t = std::thread(&ClipProcessingJobs::maskObjectClip,
this, std::ref(clip), std::ref(this->processingController));
65 CVTracker tracker(processInfoJson, controller);
67 tracker.trackClip(clip);
77 tracker.SaveTrackedData();
87 CVObjectDetection objDetector(processInfoJson, controller);
89 objDetector.detectObjectsClip(clip);
99 objDetector.SaveObjDetectedData();
107 CVObjectMask objectMask(processInfoJson, controller);
108 objectMask.maskClip(clip);
115 objectMask.SaveObjMaskData();
124 stabilizer.stabilizeClip(clip);
134 stabilizer.SaveStabilizedData();
162 return processingController.
GetError();
Header for ClipProcessingJobs class.
This class stabilizes a video frame using optical flow.
std::string GetErrorMessage()
static std::string ValidateONNXModel(std::string modelPath)
Preprocess a clip into EfficientSAM/Cutie object masks stored in the object-detection protobuf format...
std::shared_ptr< Frame > PreviewSeedMask(std::shared_ptr< Frame > frame)
The tracker class will receive one bounding box provided by the user and then iterate over the clip f...
void processClip(Clip &clip, std::string json)
static std::shared_ptr< Frame > PreviewObjectMask(std::string processInfoJson, std::shared_ptr< Frame > frame)
ClipProcessingJobs(std::string processingType, std::string processInfoJson)
static std::string ValidateONNXModel(std::string modelPath)
std::string GetErrorMessage()
This class represents a clip (used to arrange readers on the timeline)
This namespace is the default namespace for all code in the openshot library.