OCR Functions

NI Vision for LabWindows/CVI Function

OCR Functions

The following functions are available only with a licensed version of NI Vision.

Use the optical character recognition (OCR) functions to develop an OCR read application.

OCR is the process by which the machine vision software reads text and/or characters in an image. OCR consists of the following two procedures:

  • Training characters
  • Reading characters

Training characters is the process by which you teach the machine vision software the types of characters and/or patterns you want to read in the image during the reading procedure. You can use NI Vision to train any number of characters, creating a character set, which is the set of characters that you later compare with objects during the reading procedure. You store the character set you create in a character set file. Training might be a one-time process, or it might be a process you repeat several times, creating several character sets to broaden the scope of characters you want to detect in an image.

Reading characters is the process by which the machine vision application you create analyzes an image to determine if the objects match the characters you trained. The machine vision application reads characters in an image using the character set that you created when you trained characters.

The following table lists the OCR functions. The functions in the OCR class are grouped according to the types of operations they perform. The first column contains the name of the class. The second column contains names of individual function panels. Each OCR function panel represents one function.

Class LabWindows/CVI Equivalent Function Name
OCRCreate Character SetimaqCreateCharSet
OCRDelete CharacterimaqDeleteChar
OCRGet Character CountimaqGetCharCount
OCRGet Character Info 2imaqGetCharInfo2
OCRRead OCR FileimaqReadOCRFile
OCRRead Text 3imaqReadText3
OCRRename CharacterimaqRenameChar
OCRSet Reference CharacterimaqSetReferenceChar
OCRTrain CharactersimaqTrainChars
OCRVerify PatternsimaqVerifyPatterns
OCRVerify TextimaqVerifyText
OCRWrite OCR FileimaqWriteOCRFile