diff --git a/src/openalpr/textdetection/characteranalysis.cpp b/src/openalpr/textdetection/characteranalysis.cpp index c81c398..d959ff5 100644 --- a/src/openalpr/textdetection/characteranalysis.cpp +++ b/src/openalpr/textdetection/characteranalysis.cpp @@ -161,9 +161,10 @@ void CharacterAnalysis::analyze() { vector updatedTextArea = getCharArea(tempTextLines[i].topLine, tempTextLines[i].bottomLine); vector linePolygon = tempTextLines[i].linePolygon; - pipeline_data->textLines.push_back(TextLine(updatedTextArea, linePolygon)); - - Mat debugImage = pipeline_data->textLines[i].drawDebugImage(bestThreshold); + if (updatedTextArea.size() > 0 && linePolygon.size() > 0) + { + pipeline_data->textLines.push_back(TextLine(updatedTextArea, linePolygon)); + } }