From 53b2c5cff7b861e0b2b777378d5040812ffcc8e0 Mon Sep 17 00:00:00 2001 From: Brian Rosenberg Date: Fri, 25 Aug 2023 13:45:22 -0400 Subject: [PATCH 1/2] Replace GetDetectionType with trackType --- cpp/motion/MogMotionDetection/MotionDetection_MOG2.cpp | 5 ----- cpp/motion/MogMotionDetection/MotionDetection_MOG2.h | 2 -- .../plugin-files/descriptor/descriptor.json | 1 + .../SubsenseMotionDetection/MotionDetection_Subsense.cpp | 4 ---- .../SubsenseMotionDetection/MotionDetection_Subsense.h | 2 -- .../plugin-files/descriptor/descriptor.json | 1 + 6 files changed, 2 insertions(+), 13 deletions(-) diff --git a/cpp/motion/MogMotionDetection/MotionDetection_MOG2.cpp b/cpp/motion/MogMotionDetection/MotionDetection_MOG2.cpp index 84e3e71..c9279bb 100644 --- a/cpp/motion/MogMotionDetection/MotionDetection_MOG2.cpp +++ b/cpp/motion/MogMotionDetection/MotionDetection_MOG2.cpp @@ -109,11 +109,6 @@ void displayTracks(const std::string& origPath, int frameCount, const std::vector &tracks); - -std::string MotionDetection_MOG2::GetDetectionType() { - return "MOTION"; -} - bool MotionDetection_MOG2::Init() { motion_logger_ = log4cxx::Logger::getLogger("MogMotionDetection"); return true; diff --git a/cpp/motion/MogMotionDetection/MotionDetection_MOG2.h b/cpp/motion/MogMotionDetection/MotionDetection_MOG2.h index 541a6d3..f96a601 100644 --- a/cpp/motion/MogMotionDetection/MotionDetection_MOG2.h +++ b/cpp/motion/MogMotionDetection/MotionDetection_MOG2.h @@ -58,8 +58,6 @@ class MotionDetection_MOG2 : public MPF::COMPONENT::MPFImageAndVideoDetectionCom std::vector GetDetections( const MPF::COMPONENT::MPFImageJob &job) override; - std::string GetDetectionType() override; - private: log4cxx::LoggerPtr motion_logger_; diff --git a/cpp/motion/MogMotionDetection/plugin-files/descriptor/descriptor.json b/cpp/motion/MogMotionDetection/plugin-files/descriptor/descriptor.json index 5828013..3be4629 100644 --- a/cpp/motion/MogMotionDetection/plugin-files/descriptor/descriptor.json +++ b/cpp/motion/MogMotionDetection/plugin-files/descriptor/descriptor.json @@ -14,6 +14,7 @@ "name": "MOG", "description": "Detects motion in videos using a Mixture of Gaussians (MOG) model.", "actionType": "DETECTION", + "trackType": "MOTION", "outputChangedCounter" : 1, "requiresCollection": { "states": [] diff --git a/cpp/motion/SubsenseMotionDetection/MotionDetection_Subsense.cpp b/cpp/motion/SubsenseMotionDetection/MotionDetection_Subsense.cpp index 6f3d019..4b6c791 100644 --- a/cpp/motion/SubsenseMotionDetection/MotionDetection_Subsense.cpp +++ b/cpp/motion/SubsenseMotionDetection/MotionDetection_Subsense.cpp @@ -49,10 +49,6 @@ using namespace COMPONENT; void displayTracks(const std::string &origPath, int frameCount, const std::vector &tracks); -std::string MotionDetection_Subsense::GetDetectionType() { - return "MOTION"; -} - bool MotionDetection_Subsense::Init() { motion_logger_ = log4cxx::Logger::getLogger("SubsenseMotionDetection"); return true; diff --git a/cpp/motion/SubsenseMotionDetection/MotionDetection_Subsense.h b/cpp/motion/SubsenseMotionDetection/MotionDetection_Subsense.h index 7b51201..c88e003 100644 --- a/cpp/motion/SubsenseMotionDetection/MotionDetection_Subsense.h +++ b/cpp/motion/SubsenseMotionDetection/MotionDetection_Subsense.h @@ -54,8 +54,6 @@ class MotionDetection_Subsense : public MPF::COMPONENT::MPFImageAndVideoDetectio std::vector GetDetections( const MPF::COMPONENT::MPFImageJob &job) override ; - std::string GetDetectionType() override; - private: log4cxx::LoggerPtr motion_logger_; diff --git a/cpp/motion/SubsenseMotionDetection/plugin-files/descriptor/descriptor.json b/cpp/motion/SubsenseMotionDetection/plugin-files/descriptor/descriptor.json index f732915..0c258b1 100644 --- a/cpp/motion/SubsenseMotionDetection/plugin-files/descriptor/descriptor.json +++ b/cpp/motion/SubsenseMotionDetection/plugin-files/descriptor/descriptor.json @@ -15,6 +15,7 @@ "name": "SUBSENSE", "description": "Detects motion in videos using a Self-Balanced SENsitivity SEgmenter (SuBSENSE).", "actionType": "DETECTION", + "trackType": "MOTION", "outputChangedCounter" : 1, "requiresCollection": { "states": [] From 0b1877f252fca8ab71b39d4d574877698537baa5 Mon Sep 17 00:00:00 2001 From: Brian Rosenberg Date: Mon, 28 Aug 2023 12:07:21 -0400 Subject: [PATCH 2/2] Remove GetDetectionType from streaming --- .../SubsenseMotionDetection/StreamingMotionDetection_Subsense.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/cpp/motion/SubsenseMotionDetection/StreamingMotionDetection_Subsense.h b/cpp/motion/SubsenseMotionDetection/StreamingMotionDetection_Subsense.h index 0c14143..0ee9d16 100644 --- a/cpp/motion/SubsenseMotionDetection/StreamingMotionDetection_Subsense.h +++ b/cpp/motion/SubsenseMotionDetection/StreamingMotionDetection_Subsense.h @@ -57,8 +57,6 @@ class SubsenseStreamingDetection : public MPF::COMPONENT::MPFStreamingDetectionC bool ProcessFrame(const cv::Mat &frame, int frame_number) override; std::vector EndSegment() override; - std::string GetDetectionType() override { return "MOTION"; } - private: SubsenseStreamingDetection(const MPF::COMPONENT::MPFStreamingVideoJob &job, const SubsenseConfig &config);