diff --git a/src/openalpr/motiondetector.cpp b/src/openalpr/motiondetector.cpp index 2f00d3f..c28b051 100644 --- a/src/openalpr/motiondetector.cpp +++ b/src/openalpr/motiondetector.cpp @@ -2,6 +2,9 @@ using namespace cv; +namespace alpr +{ + MotionDetector::MotionDetector() { pMOG2 = new BackgroundSubtractorMOG2(); @@ -63,3 +66,5 @@ cv::Rect MotionDetector::MotionDetect(cv::Mat* frame) // imshow("Motion detect", fgMaskMOG2); return expandRect(largest_rect, 0, 0, frame->cols, frame->rows); } + +} \ No newline at end of file diff --git a/src/openalpr/motiondetector.h b/src/openalpr/motiondetector.h index 7522f53..6d63227 100644 --- a/src/openalpr/motiondetector.h +++ b/src/openalpr/motiondetector.h @@ -1,13 +1,22 @@ + +#ifndef OPENALPR_MOTIONDETECTOR_H +#define OPENALPR_MOTIONDETECTOR_H + #include "opencv2/opencv.hpp" -class MotionDetector +namespace alpr { - private: cv::Ptr pMOG2; //MOG2 Background subtractor - private: cv::Mat fgMaskMOG2; - public: - MotionDetector(); - virtual ~MotionDetector(); + class MotionDetector + { + private: cv::Ptr pMOG2; //MOG2 Background subtractor + private: cv::Mat fgMaskMOG2; + public: + MotionDetector(); + virtual ~MotionDetector(); - void ResetMotionDetection(cv::Mat* frame); - cv::Rect MotionDetect(cv::Mat* frame); -}; + void ResetMotionDetection(cv::Mat* frame); + cv::Rect MotionDetect(cv::Mat* frame); + }; +} + +#endif // OPENALPR_MOTIONDETECTOR_H \ No newline at end of file