Index:.../Applications/OCR/find_text_dongle.hdev
這個和上一篇文章的例程本質相同,唯一不同點就是介紹了一個別的算子。
* The OCR uses regular expressions to read the text
* more robustly.
do_ocr_word_mlp (Line, ImageRotate, OCRHandle, Expression, 3, 5, Class, Confidence, Word, Score)
這個算子特點就是
* Define the regular expression, which is later used
* in do_ocr_word_mlp to increase the robustness of the OCR.
TextPattern1 := '(FLEXID[0-9][A-Z][0-9]{3}[A-F0-9]{4})'
TextPattern2 := '([A-Z]{3}[0-9]{5}.?[A-Z][0-9]{4}[A-Z][0-9]{4})'
Expression := TextPattern1 + '|' + TextPattern2
定義了Expression的內容,這樣在處理時他說魯棒性就比較好。
對於這種裏面內容比較複雜的文字識別魯棒性更好。