From 7355ac3c558f82e1884846463d41b053213cc47c Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Tue, 21 Jun 2022 11:30:30 -0500 Subject: [PATCH] Fix regression caused by https://github.com/OpenShot/libopenshot/pull/827, where we changed the class_name of Object Detector --- examples/Example_opencv.cpp | 2 +- src/ClipProcessingJobs.cpp | 2 +- src/EffectInfo.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Example_opencv.cpp b/examples/Example_opencv.cpp index cdea4f59..f25c01e0 100644 --- a/examples/Example_opencv.cpp +++ b/examples/Example_opencv.cpp @@ -152,7 +152,7 @@ int main(int argc, char* argv[]) { objectDetection.SaveObjDetectedData(); // Create a object detector effect - EffectBase* e = EffectInfo().CreateEffect("Object Detector"); + EffectBase* e = EffectInfo().CreateEffect("ObjectDetection"); // Pass a JSON string with the saved detections data // The effect will read and save the detections in a map:: diff --git a/src/ClipProcessingJobs.cpp b/src/ClipProcessingJobs.cpp index 7ee2f609..c90e1a15 100644 --- a/src/ClipProcessingJobs.cpp +++ b/src/ClipProcessingJobs.cpp @@ -30,7 +30,7 @@ void ClipProcessingJobs::processClip(Clip& clip, std::string json){ if(processingType == "Tracker"){ t = std::thread(&ClipProcessingJobs::trackClip, this, std::ref(clip), std::ref(this->processingController)); } - if(processingType == "Object Detector"){ + if(processingType == "ObjectDetection"){ t = std::thread(&ClipProcessingJobs::detectObjectsClip, this, std::ref(clip), std::ref(this->processingController)); } } diff --git a/src/EffectInfo.cpp b/src/EffectInfo.cpp index 7512084d..658450b0 100644 --- a/src/EffectInfo.cpp +++ b/src/EffectInfo.cpp @@ -104,7 +104,7 @@ EffectBase* EffectInfo::CreateEffect(std::string effect_type) { else if(effect_type == "Tracker") return new Tracker(); - else if(effect_type == "Object Detector") + else if(effect_type == "ObjectDetection") return new ObjectDetection(); #endif