Halcon字符识别专题
先开个篇,后期逐步加入
1、注重识别准确率的,用cnn。
对应案例及关键代码
do_ocr_word_cnn (CharRegion, CharImage, OCRHandleCNN, '[a-z.]', 3, 2, ClassRead, Confidence, ClassCorrectedReadCNN, Score)
do_ocr_single_class_cnn (ObjectSelected, ImageInvert, OCRHandle, 1, Class, Confidence)
*创建候选字符 create_lexicon ('label', ['BEST','BEFORE','END'], LexiconHandle) *识别结果会从候选字符中选取最相似的作为结果 do_ocr_word_cnn (Word, ImageOCR, OCRHandle, '<label>', 1, 5, Class, Confidence, WordText, WordScore)
do_ocr_word_cnn (SortedDate, ImageOCR, OCRHandle, '^([0-2][0-9]|30|31)/(0[1-9]|10|11|12)/0[0-5]$', 10, 5, Class, Confidence, DateText, DateScore)