From c04dd4104da044c1d493171a766985e3201a705c Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Wed, 18 Mar 2015 18:17:02 -0400 Subject: [PATCH] Using debugDetector config option in detectors --- src/openalpr/detection/detectorcpu.cpp | 4 ++-- src/openalpr/detection/detectorcuda.cpp | 4 ++-- src/openalpr/detection/detectormorph.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/openalpr/detection/detectorcpu.cpp b/src/openalpr/detection/detectorcpu.cpp index 64a3a5e..4f33dc2 100644 --- a/src/openalpr/detection/detectorcpu.cpp +++ b/src/openalpr/detection/detectorcpu.cpp @@ -80,7 +80,7 @@ namespace alpr // The frame is too wide this->scale_factor = ((float) config->maxDetectionInputWidth) / ((float) frame.cols); - if (config->debugGeneral) + if (config->debugDetector) std::cout << "Input detection image is too wide. Resizing with scale: " << this->scale_factor << endl; } else if (frame.rows > config->maxDetectionInputHeight) @@ -88,7 +88,7 @@ namespace alpr // The frame is too tall this->scale_factor = ((float) config->maxDetectionInputHeight) / ((float) frame.rows); - if (config->debugGeneral) + if (config->debugDetector) std::cout << "Input detection image is too tall. Resizing with scale: " << this->scale_factor << endl; } diff --git a/src/openalpr/detection/detectorcuda.cpp b/src/openalpr/detection/detectorcuda.cpp index 956c0d6..40b8720 100644 --- a/src/openalpr/detection/detectorcuda.cpp +++ b/src/openalpr/detection/detectorcuda.cpp @@ -76,7 +76,7 @@ namespace alpr // The frame is too wide this->scale_factor = ((float) config->maxDetectionInputWidth) / ((float) frame.cols); - if (config->debugGeneral) + if (config->debugDetector) std::cout << "Input detection image is too wide. Resizing with scale: " << this->scale_factor << endl; } else if (frame.rows > config->maxDetectionInputHeight) @@ -84,7 +84,7 @@ namespace alpr // The frame is too tall this->scale_factor = ((float) config->maxDetectionInputHeight) / ((float) frame.rows); - if (config->debugGeneral) + if (config->debugDetector) std::cout << "Input detection image is too tall. Resizing with scale: " << this->scale_factor << endl; } diff --git a/src/openalpr/detection/detectormorph.cpp b/src/openalpr/detection/detectormorph.cpp index 4401bce..b16d0c8 100644 --- a/src/openalpr/detection/detectormorph.cpp +++ b/src/openalpr/detection/detectormorph.cpp @@ -50,7 +50,7 @@ namespace alpr img_result = frame_gray - img_open; - if (config->debugShowImages) + if (config->debugDetector && config->debugShowImages) { imshow("Opening", img_result); } @@ -59,7 +59,7 @@ namespace alpr Mat img_threshold, img_open2; threshold(img_result, img_threshold, 0, 255, CV_THRESH_OTSU + CV_THRESH_BINARY); - if (config->debugShowImages) + if (config->debugDetector && config->debugShowImages) { imshow("Threshold Detector", img_threshold); } @@ -69,7 +69,7 @@ namespace alpr Mat rectElement = getStructuringElement(cv::MORPH_RECT, Size(20, 4)); morphologyEx(img_open2, img_threshold, CV_MOP_CLOSE, rectElement, cv::Point(-1, -1)); - if (config->debugShowImages) + if (config->debugDetector && config->debugShowImages) { imshow("Close", img_threshold); waitKey(0);