mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-05 22:06:52 +08:00
Using debugDetector config option in detectors
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user