mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 11:51:06 +08:00
Added multiline context for postprocessing
Pattern matching can now apply line by line patterns for greater accuracy
This commit is contained in:
@@ -337,7 +337,11 @@ bool detectandshow( Alpr* alpr, cv::Mat frame, std::string region, bool writeJso
|
||||
|
||||
for (int k = 0; k < results.plates[i].topNPlates.size(); k++)
|
||||
{
|
||||
std::cout << " - " << results.plates[i].topNPlates[k].characters << "\t confidence: " << results.plates[i].topNPlates[k].overall_confidence;
|
||||
// Replace the multiline newline character with a dash
|
||||
std::string no_newline = results.plates[i].topNPlates[k].characters;
|
||||
std::replace(no_newline.begin(), no_newline.end(), '\n','-');
|
||||
|
||||
std::cout << " - " << no_newline << "\t confidence: " << results.plates[i].topNPlates[k].overall_confidence;
|
||||
if (templatePattern.size() > 0 || results.plates[i].regionConfidence > 0)
|
||||
std::cout << "\t pattern_match: " << results.plates[i].topNPlates[k].matches_template;
|
||||
|
||||
|
Reference in New Issue
Block a user