From 3fde593240852bcae1aa12921aaed319289d224e Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Wed, 20 Jan 2016 23:15:45 -0800 Subject: [PATCH] Fixing issue #261 --- src/openalpr/ocr.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/openalpr/ocr.cpp b/src/openalpr/ocr.cpp index 1bb1ccd..e9450ec 100644 --- a/src/openalpr/ocr.cpp +++ b/src/openalpr/ocr.cpp @@ -114,8 +114,9 @@ namespace alpr do { const char* choice = ci.GetUTF8Text(); - - postProcessor.addLetter(string(choice), line_idx, absolute_charpos, ci.Confidence()); + //1/17/2016 adt adding check to avoid double adding same character if ci is same as symbol. Otherwise first choice from ResultsIterator will get added twice when choiceIterator run. + if (string(symbol) != string(choice)) + postProcessor.addLetter(string(choice), line_idx, absolute_charpos, ci.Confidence()); if (this->config->debugOcr) { @@ -152,4 +153,4 @@ namespace alpr } } -} \ No newline at end of file +}