In addition to using one of the pre-trained classifiers, custom classifiers can be built by creating a training file and selecting suitable features. More often than not, however, it is enough to use one of the pretrained classifiers. (The creation of a training file deserves its own blog post, and so will be addressed as a separate post in this blog.)
After fine-tuning the segmentation and selecting a suitable classifier, the last two steps of setting up an OCR application are rather easy. To define which features should be displayed in the results table (Results tab, Fig. 2), select parameters and options in Display Parameters. Postprocessing of the classification results is also possible by enabling Word Processing. The classified sequence of characters is then compared to a regular expression or words in a lexicon file.
After prototyping the OCR reader via point-and-click, go to the Code Generation tab which takes care of the rest. Simply set Generation Mode to Text Reading and select no alignment. If the goal is only to read the text in the image, alignment will not be necessary. If OCR is being used in an application where the text position changes, automatic localization of the corresponding region of interest might be necessary. Apply segmentation and classification in this new region, so that code can be generated to align the region. Be aware, however, that alignment only functions when a transformation matrix has been defined which localizes the new region of interest.
At this point, the generated code can be additionally fine-tuned. The next blog post in the series covers craeting text model readers and additional parameters. (Please see navigation at the top of this page for additional posts.)
Please click here to the download image.
Please click here to download the generated code.
Post published by TIS Marketing on October 24, 2019.
Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, video converters and embedded vision components for factory automation, quality assurance, medicine, science, security and a variety of other markets.
Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE, MIPI interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.