diff --git a/src/openalpr/licenseplatecandidate.cpp b/src/openalpr/licenseplatecandidate.cpp index 62b1a4c..bcee6f8 100644 --- a/src/openalpr/licenseplatecandidate.cpp +++ b/src/openalpr/licenseplatecandidate.cpp @@ -82,8 +82,7 @@ void LicensePlateCandidate::recognize() Mat transmtx = getTransformationMatrix(pipeline_data->plate_corners, outputImageSize); pipeline_data->crop_gray = deSkewPlate(this->pipeline_data->grayImg, outputImageSize, transmtx); - cout << "Size: " << outputImageSize.width << " - " << outputImageSize.height << endl; - + // Apply a perspective transformation to the TextLine objects // to match the newly deskewed license plate crop diff --git a/src/openalpr/segmentation/charactersegmenter.cpp b/src/openalpr/segmentation/charactersegmenter.cpp index 0010eaf..6e74e02 100644 --- a/src/openalpr/segmentation/charactersegmenter.cpp +++ b/src/openalpr/segmentation/charactersegmenter.cpp @@ -47,7 +47,9 @@ CharacterSegmenter::CharacterSegmenter(PipelineData* pipeline_data) medianBlur(pipeline_data->crop_gray, pipeline_data->crop_gray, 3); - cout << "Segmenter: inverted: " << pipeline_data->plate_inverted << endl; + if (this->config->debugCharSegmenter) + cout << "Segmenter: inverted: " << pipeline_data->plate_inverted << endl; + if (pipeline_data->plate_inverted) bitwise_not(pipeline_data->crop_gray, pipeline_data->crop_gray); diff --git a/src/openalpr/textdetection/characteranalysis.cpp b/src/openalpr/textdetection/characteranalysis.cpp index fd6a66b..c81c398 100644 --- a/src/openalpr/textdetection/characteranalysis.cpp +++ b/src/openalpr/textdetection/characteranalysis.cpp @@ -141,8 +141,6 @@ void CharacterAnalysis::analyze() { vector linePolygon = linePolygons[i]; - cout << "Polygon: " << linePolygon[0] << " - " << linePolygon[1] << " - " << linePolygon[2] << " - " << linePolygon[3] << endl; - LineSegment topLine = LineSegment(linePolygon[0].x, linePolygon[0].y, linePolygon[1].x, linePolygon[1].y); LineSegment bottomLine = LineSegment(linePolygon[3].x, linePolygon[3].y, linePolygon[2].x, linePolygon[2].y); @@ -153,8 +151,6 @@ void CharacterAnalysis::analyze() tempTextLines.push_back(textLine); } - cout << "Good contours inverted left: " << bestContours.getGoodIndicesCount() << endl; - filterBetweenLines(bestThreshold, bestContours, tempTextLines); // Sort the lines from top to bottom. @@ -171,10 +167,8 @@ void CharacterAnalysis::analyze() } - cout << "Good contours inverted left: " << bestContours.getGoodIndicesCount() << endl; this->thresholdsInverted = isPlateInverted(); - cout << "Plate inverted: " << this->thresholdsInverted << endl; } @@ -438,7 +432,6 @@ void CharacterAnalysis::filterBetweenLines(Mat img, TextContours& textContours, float maxDistance = textLines[i].lineHeight * MAX_DISTANCE_PERCENT_FROM_LINES; - cout << "Distances: " << absTopDistance << " : " << maxDistance << " - " << absBottomDistance << " : " << maxDistance << endl; if (absTopDistance < maxDistance && absBottomDistance < maxDistance) { // It's ok, leave it as-is.