diff --git a/src/openalpr/licenseplatecandidate.cpp b/src/openalpr/licenseplatecandidate.cpp index 44e1855..62b1a4c 100644 --- a/src/openalpr/licenseplatecandidate.cpp +++ b/src/openalpr/licenseplatecandidate.cpp @@ -109,8 +109,6 @@ void LicensePlateCandidate::recognize() pipeline_data->textLines.push_back(newLines[i]); - Mat debugImg = pipeline_data->textLines[0].drawDebugImage(pipeline_data->crop_gray); - drawAndWait(&debugImg); if (config->debugTiming) { diff --git a/src/openalpr/platecorners.cpp b/src/openalpr/platecorners.cpp index e9e3cdb..52e0e7c 100644 --- a/src/openalpr/platecorners.cpp +++ b/src/openalpr/platecorners.cpp @@ -478,11 +478,14 @@ TextLineCollection::TextLineCollection(PipelineData* pipelineData) { findCenterVertical(); // Center Vertical Line - Mat debugImage = Mat::zeros(pipelineData->crop_gray.size(), CV_8U); - line(debugImage, this->centerHorizontalLine.p1, this->centerHorizontalLine.p2, Scalar(255,255,255), 2); - line(debugImage, this->centerVerticalLine.p1, this->centerVerticalLine.p2, Scalar(255,255,255), 2); - - drawAndWait(&debugImage); + if (pipelineData->config->debugPlateCorners) + { + Mat debugImage = Mat::zeros(pipelineData->crop_gray.size(), CV_8U); + line(debugImage, this->centerHorizontalLine.p1, this->centerHorizontalLine.p2, Scalar(255,255,255), 2); + line(debugImage, this->centerVerticalLine.p1, this->centerVerticalLine.p2, Scalar(255,255,255), 2); + + displayImage(pipelineData->config, "Plate Corner Center lines", debugImage); + } } // Returns 1 for above, 0 for within, and -1 for below diff --git a/src/openalpr/segmentation/charactersegmenter.cpp b/src/openalpr/segmentation/charactersegmenter.cpp index 6bad207..0010eaf 100644 --- a/src/openalpr/segmentation/charactersegmenter.cpp +++ b/src/openalpr/segmentation/charactersegmenter.cpp @@ -219,7 +219,6 @@ CharacterSegmenter::CharacterSegmenter(PipelineData* pipeline_data) } cleanCharRegions(pipeline_data->thresholds, pipeline_data->charRegions); - drawAndWait(&pipeline_data->thresholds[0]); if (config->debugTiming) { diff --git a/src/openalpr/textdetection/characteranalysis.cpp b/src/openalpr/textdetection/characteranalysis.cpp index d78255a..fd6a66b 100644 --- a/src/openalpr/textdetection/characteranalysis.cpp +++ b/src/openalpr/textdetection/characteranalysis.cpp @@ -167,12 +167,8 @@ void CharacterAnalysis::analyze() vector linePolygon = tempTextLines[i].linePolygon; pipeline_data->textLines.push_back(TextLine(updatedTextArea, linePolygon)); - - cout << "Test1" << endl; Mat debugImage = pipeline_data->textLines[i].drawDebugImage(bestThreshold); - cout << "Test2" << endl; - drawAndWait(&debugImage); } cout << "Good contours inverted left: " << bestContours.getGoodIndicesCount() << endl; @@ -522,7 +518,6 @@ bool CharacterAnalysis::isPlateInverted() { Mat charMask = getCharacterMask(); - drawAndWait(&charMask); Scalar meanVal = mean(bestThreshold, charMask)[0]; diff --git a/src/openalpr/textdetection/linefinder.cpp b/src/openalpr/textdetection/linefinder.cpp index 6e81abc..3ef2b7f 100644 --- a/src/openalpr/textdetection/linefinder.cpp +++ b/src/openalpr/textdetection/linefinder.cpp @@ -204,7 +204,7 @@ vector LineFinder::getBestLine(const TextContours contours, vectorconfig->debugCharAnalysis) { cout << "The winning score is: " << bestScore << endl; // Draw the winning line segment @@ -215,7 +215,7 @@ vector LineFinder::getBestLine(const TextContours contours, vectorconfig, "Winning lines", tempImg); } Point topLeft = Point(0, topLines[bestScoreIndex].getPointAt(0) );