From 149f1e26e7b2186bbdb6eeef2c04e4af27830b56 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Fri, 15 May 2015 05:52:10 -0400 Subject: [PATCH] Making sure motion rect is in-bounds --- src/openalpr/motiondetector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openalpr/motiondetector.cpp b/src/openalpr/motiondetector.cpp index af42075..2f00d3f 100644 --- a/src/openalpr/motiondetector.cpp +++ b/src/openalpr/motiondetector.cpp @@ -61,5 +61,5 @@ cv::Rect MotionDetector::MotionDetect(cv::Mat* frame) } // imshow("Motion detect", fgMaskMOG2); - return largest_rect; + return expandRect(largest_rect, 0, 0, frame->cols, frame->rows); }