02 1 OCRMax
02 1 OCRMax
Objectives
• The student will correctly:
Understand where OCRMax is used
Setup an OCRMax tool to read characters
Setup an OCRMax tool to verify characters
Analyze the results returned from the OCRMax tool
2-2
What is OCRMax?
• OCRMax is the latest tool from Cognex in the field of
optical character recognition and verification
• OCRMax allows users to train characters that can then
be read and/or verified by the tool
• OCRMax always performs a read and performs
verification through “fielding” after characters have been
recognized
2-3
What is traditional OCR?
• Optical Character Recognition is used to read printed
characters
• When recognizing (reading) the tool compares each
character against all trained characters in the database
of trained characters for a match
• Commonly used to read
– Date Codes
– Lot Codes
– Expiration Date
• Returns TRUE if all characters in the string are correctly
recognized; FALSE if not
2-4
What is traditional OCV?
• Optical Character Verification is used to verify that a
given character string is present
• When verifying the tool compares each character only
against the character designated as its identify for a
match
• Commonly used to verify
– Date Codes
– Lot Codes
– Expiration Date
• Returns TRUE if all characters in the string are correctly
matched; FALSE if not
2-5
Example
• Read and or verify the lot number “04149”
2-6
Adding an OCRMax Tool
• You’ll find the OCRMax
tool in the Palette’s
Functions tab under the
Vision ToolsOCV/OCR
category
2-7
General Settings
• OCRMax’s general
settings affect the overall
execution of the tool
• Allows for quick training of
characters
• Selects Read or
Read/Verify inspection
modes
• Configures space
handling options
2-8
Quick Training Settings
• The general settings tab features the ability to quickly
train characters detected by the OCRMax tool
2-9
Inspection Settings
• The general settings tab allows for the setting of the
inspection mode which controls how the tool will
perform its optical character work
2-10
Space Handling Settings
• Space handling settings will determine what the tool
does when it encounters a space in the string of
characters
2-11
Segmentation Tab
• OCRMax’s segmentation
settings affect how the
tool will separate
character features from
background features
• Allows for minimum and
maximum character
tolerances
• Sets character fragment
tolerances (dot matrix
printing)
2-12
Character Tolerance Settings
• Character tolerance
settings specify
minimum and maximum
sizes
• These settings help find
character features
and/or eliminate
unwanted features
(noise) from being
considered as
characters
2-13
Important Definitions
height
width
2-14
Character Fragment Settings
• These settings are used
to handle characters
which are made up of
separate dots or
segments
• Useful for dot matrix
printing
Inter intra
2-15
Advanced Settings
• Advanced settings
control the internal
processing of the image
used by the tool
• You can also set how
border fragments,
contrast, and character
pitch is handled
pitch
2-16
Train Font Tab
• The train font tab allows for the
management of the characters
currently trained
• You can import and export all
trained characters for use in
another application featuring the
same font
• You can view all trained
characters and instances
• You can also train more
characters to be added to the
font library
2-17
Fielding Tab
• The fielding tab specifies
rules for each character
position
• Only available when in Read
inspection mode
• Useful for eliminating
potentially confusing
characters like a 5 and an S
• Can also help to speed up
applications if used properly
• Use pre-existing rules or
create your own
2-18
Results Tab
• The results tab shows:
– overall string result
– evaluation results for each
character
• Status Definitions
– Good Read
– Bad Read
– Ignored
– Confused
– Mismatch
– Confused
– Validation Failed
2-19
What is OCRMaxSettings?
• The
OCRMaxSettings
tool is used to help
quickly duplicate
similar OCRMax
tool parameters
• Settings are very
similar to those
already in the
OCRMax tool
2-20
Adding an OCRMaxSettings Tool
• You’ll find the OCRMaxSettings tool in
the Palette’s Functions tab under the
Vision ToolsOCV/OCR category just
under the OCRMax tool
2-21
Using an OCRMaxSettings Tool
• Once the
OCRMaxSettings tool is
configured, you can
reference it directly from
the OCRMax tool and
inherit the preconfigured
settings
2-22
Using an OCRMaxSettings Tool
• If the OCRMax settings
are inherited from an
OCRMaxSettings tool,
then the local OCRMax
settings become disabled
and must be set using the
OCRMaxSettings tool
2-23
General Guidelines
• The ROI should only contain the characters to be read,
and not any extraneous strong features, such as other
characters or label edges.
2-24
General Guidelines
• For best results, all the characters in a line of
characters should have the same orientation and skew.
2-25
General Guidelines
• For well-separated dot-matrix print (e.g. where the dots
are not touching), adjusting parameters such as the
“Minimum Character Frapgment Size” may be
necessary to properly segment the characters.
2-26
General Guidelines
• Character stroke width
must be greater than or
equal to two pixels
• At least a four pixel
stroke width is
recommended
2-27
General Guidelines
• The minimum character size for large characters
(typically alphanumeric) is 8 x 8 pixels. The minimum
character size for small characters (such as periods) is
2 x 2 pixels.
2-28
Summary
• The OCRMax tool is useful for addressing a wide range
of OCR and OCV applications
• Fielding can be used to optimize the speed and
accuracy of the OCRMax tool
• The OCRMaxSettings tool allows for quick duplication
of OCRMax settings and universal control from one
location
2-29