Making sure motion rect is in-bounds

This commit is contained in:
Matt Hill
2015-05-15 05:52:10 -04:00
parent 1653cee236
commit 149f1e26e7

View File

@@ -61,5 +61,5 @@ cv::Rect MotionDetector::MotionDetect(cv::Mat* frame)
} }
// imshow("Motion detect", fgMaskMOG2); // imshow("Motion detect", fgMaskMOG2);
return largest_rect; return expandRect(largest_rect, 0, 0, frame->cols, frame->rows);
} }