Fixed issue where detected region has a negative width/height

This commit is contained in:
Matt Hill
2015-05-15 05:37:10 -04:00
parent 00a00df05e
commit f66a1dfd56
5 changed files with 13 additions and 6 deletions

View File

@@ -0,0 +1,13 @@
#include "opencv2/opencv.hpp"
class MotionDetector
{
private: cv::Ptr<cv::BackgroundSubtractor> pMOG2; //MOG2 Background subtractor
private: cv::Mat fgMaskMOG2;
public:
MotionDetector();
virtual ~MotionDetector();
void ResetMotionDetection(cv::Mat* frame);
cv::Rect MotionDetect(cv::Mat* frame);
};