From 4320e32469539ef08de2866585748b11a1367ad1 Mon Sep 17 00:00:00 2001 From: Anatoliy Bulukin Date: Tue, 19 May 2015 13:36:37 +0300 Subject: [PATCH] Fix: Variable hasPlateMask always false It seems like error. Are you forget 'else' statement? --- src/openalpr/textdetection/platemask.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/openalpr/textdetection/platemask.cpp b/src/openalpr/textdetection/platemask.cpp index c746610..f95734d 100644 --- a/src/openalpr/textdetection/platemask.cpp +++ b/src/openalpr/textdetection/platemask.cpp @@ -176,13 +176,12 @@ namespace alpr hasPlateMask = true; this->plateMask = mask; - } - - hasPlateMask = false; - Mat fullMask = Mat::zeros(pipeline_data->thresholds[0].size(), CV_8U); - bitwise_not(fullMask, fullMask); - - this->plateMask = fullMask; + } else { + hasPlateMask = false; + Mat fullMask = Mat::zeros(pipeline_data->thresholds[0].size(), CV_8U); + bitwise_not(fullMask, fullMask); + this->plateMask = fullMask; + } } -} \ No newline at end of file +}