mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 07:37:00 +08:00
Removed misc debugging cout statements
This commit is contained in:
@@ -82,8 +82,7 @@ void LicensePlateCandidate::recognize()
|
|||||||
Mat transmtx = getTransformationMatrix(pipeline_data->plate_corners, outputImageSize);
|
Mat transmtx = getTransformationMatrix(pipeline_data->plate_corners, outputImageSize);
|
||||||
pipeline_data->crop_gray = deSkewPlate(this->pipeline_data->grayImg, outputImageSize, transmtx);
|
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
|
// Apply a perspective transformation to the TextLine objects
|
||||||
// to match the newly deskewed license plate crop
|
// to match the newly deskewed license plate crop
|
||||||
|
@@ -47,7 +47,9 @@ CharacterSegmenter::CharacterSegmenter(PipelineData* pipeline_data)
|
|||||||
|
|
||||||
medianBlur(pipeline_data->crop_gray, pipeline_data->crop_gray, 3);
|
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)
|
if (pipeline_data->plate_inverted)
|
||||||
bitwise_not(pipeline_data->crop_gray, pipeline_data->crop_gray);
|
bitwise_not(pipeline_data->crop_gray, pipeline_data->crop_gray);
|
||||||
|
|
||||||
|
@@ -141,8 +141,6 @@ void CharacterAnalysis::analyze()
|
|||||||
{
|
{
|
||||||
vector<Point> linePolygon = linePolygons[i];
|
vector<Point> 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 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);
|
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);
|
tempTextLines.push_back(textLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "Good contours inverted left: " << bestContours.getGoodIndicesCount() << endl;
|
|
||||||
|
|
||||||
filterBetweenLines(bestThreshold, bestContours, tempTextLines);
|
filterBetweenLines(bestThreshold, bestContours, tempTextLines);
|
||||||
|
|
||||||
// Sort the lines from top to bottom.
|
// 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();
|
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;
|
float maxDistance = textLines[i].lineHeight * MAX_DISTANCE_PERCENT_FROM_LINES;
|
||||||
|
|
||||||
cout << "Distances: " << absTopDistance << " : " << maxDistance << " - " << absBottomDistance << " : " << maxDistance << endl;
|
|
||||||
if (absTopDistance < maxDistance && absBottomDistance < maxDistance)
|
if (absTopDistance < maxDistance && absBottomDistance < maxDistance)
|
||||||
{
|
{
|
||||||
// It's ok, leave it as-is.
|
// It's ok, leave it as-is.
|
||||||
|
Reference in New Issue
Block a user