광고
광고
OCR Programming
Introduction
This chapter describes how to set up the scanner for OCR programming. The scanner can read 6 to 60 point OCR typeface. It supports font types OCR-A, OCR-B, MICR E13B, and US Currency Serial Number.
OCR is not as secure as a barcode. To decrease OCR misdecodes and speed OCR reading, set an accurate OCR template and character subset, and use a check digit.
All OCR fonts are disabled by default. Enabling OCR could slow barcode decoding. You can enable OCR-A and
OCR-B at the same time, but not other combined font types.
Setting Parameters
To set feature values, scan a single barcode or a short barcode sequence. The settings are stored in non-volatile memory and are preserved even when the imager powers down.
NOTE : Most computer monitors allow scanning barcodes directly on the screen. When scanning from the screen, be sure to set the document magnification to a level where you can see the barcode clearly, and bars and/or spaces do not merge.
To return all features to default values, scan the barcode menus, asterisks (
*
Set Factory Defaults on page 59
) indicate default values.
*
Indicates default
*
Enable Parameter
(1) Feature/option
Option value
309
OCR Programming
Scanning Sequence Examples
In most cases scanning one barcode sets the parameter value. For example, to enable OCR-B, scan the Enable
OCR-B
barcode under OCR-B on page 313 . The scanner issues a fast warble beep and the LED turns green,
signifying a successful parameter entry.
Other parameters require scanning several barcodes. See the parameter descriptions for this procedure.
Errors While Scanning
Unless otherwise specified, to correct an error during a scanning sequence, just re-scan the correct parameter.
OCR Parameter Defaults
lists the defaults for OCR parameters. Change these values in one of two ways:
• Scan the appropriate barcodes in this chapter. The new value replaces the standard default value in memory. To recall default parameter values, see
.
• Configure the scanner using the 123Scan
configuration program. See 123Scan and Software Tools .
NOTE : See
Parameter Defaults for all user preference, host, symbology, and miscellaneous default
parameters.
Table 24 OCR Programming Default Table
Parameter
Parameter
Number
OCR Programming Parameters
OCR-A 680
OCR-A Variant
OCR-B
684
681
OCR-B Variant
MICR E13B
US Currency Serial Number
OCR Orientation
685
682
683
687
OCR Lines
OCR Minimum Characters
OCR Maximum Characters
OCR Subset
691
689
690
686
OCR Quiet Zone 695
SSI Number
F1h A8h
F1h ACh
F1h A9h
F1h ADh
F1h AAh
F1h ABh
F1h AFh
F1h B3h
F1h B1h
F1h B2h
F1h AEh
F1h B7h
Default Page Number
0 o
1
3
Disable
OCR-A Full ASCII
Disable
OCR-B Full ASCII
Disable
Disable
100
Selected font variant
50
310
OCR Programming
Table 24 OCR Programming Default Table (Continued)
Parameter
Parameter
Number
SSI Number
OCR Template 547 F1h 23h
OCR Check Digit Modulus
OCR Check Digit Multiplier
688
700
F1h B0h
F1h BCh
OCR Check Digit Validation
Inverse OCR
OCR Redundancy
694
856
1770
F1h B6h
F2h 58h
F8h 06h EAh
Default
999999999
1
121212121212
None
Regular
Level 1
Page Number
OCR Programming Parameters
OCR-A
Parameter # 680
SSI # F1h A8h
NOTE : OCR is not as secure as a barcode. To decrease OCR misdecodes and speed OCR reading, set an
accurate OCR template and character subset, and use a check digit. See OCR Subset on page 321
and
.
Scan one of the following barcodes to enable or disable OCR-A.
Enable OCR-A
(1)
*Disable OCR-A
(0)
311
OCR Programming
OCR-A Variant
Parameter # 684
SSI # F1 ACh
NOTE : Enable OCR-A before setting this parameter. If disabling OCR-A, set the variant to its default
(OCR-A Full ASCII).
The font variant sets a processing algorithm and default character subset for the given font. To choose a variant, scan one of the following barcodes. Select the most appropriate font variant to optimize performance and accuracy.
OCR-A supports the following variants:
• OCR-A Full ASCII
!"#$()*+,-./0123456789<>ABCDEFGHIJKLMNOPQRSTUVWXYZ\^
• OCR-A Reserved 1
$*+-./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
• OCR-A Reserved 2
$*+-./0123456789<>ABCDEFGHIJKLMNOPQRSTUVWXYZ
• OCR-A Banking
-0123456789<>
Special banking characters output as the following representative characters:
outputs as f
outputs as c
outputs as h
*OCR-A Full ASCII
(0)
OCR-A Reserved 1
(1)
312
OCR-A Variant (continued)
OCR Programming
OCR-A Reserved 2
(2)
OCR-A Banking
(3)
OCR-B
Parameter # 681
SSI # F1h A9h
NOTE : OCR is not as secure as a barcode. To decrease OCR misdecodes and speed OCR reading, set an accurate OCR template and character subset, and use a check digit. See
and
.
Scan one of the following barcodes to enable or disable OCR-B.
Enable OCR-B
(1)
*Disable OCR-B
(0)
313
OCR Programming
OCR-B Variant
Parameter # 685
SSI # F1h ADh
NOTE : Enable OCR-B before setting this parameter. If disabling OCR-B, set the variant to its default
(OCR-B Full ASCII).
OCR-B has the following variants. Select the most appropriate font variant to optimize performance and accuracy.
• OCR-B Full ASCII
!#$%()*+,-./0123456789<>ABCDEFGHIJKLMNOPQRSTUVWXYZ^|Ñ
• OCR-B Banking
#+-0123456789<>JNP|
• OCR-B Limited
+,-./0123456789<>ACENPSTVX
• OCR-B ISBN 10-Digit Book Numbers
-0123456789>BCEINPSXz
• OCR-B ISBN 10 or 13-Digit Book Numbers
-0123456789>BCEINPSXz
• OCR-B Travel Document Version 1 (TD1) 3-Line ID Cards
-0123456789<ABCDEFGHIJKLMNOPQRSTUVWXYZ
• OCR-B Travel Document Version 2 (TD2) 2-Line ID Cards
-0123456789<ABCDEFGHIJKLMNOPQRSTUVWXYZ
• OCR-B Travel Document 2 or 3-Line ID Cards Auto-Detect
!#$%()*+,-./0123456789<>ABCDEFGHIJKLMNOPQRSTUVWXYZ^|Ñ
• OCR-B Passport
-0123456789<ABCDEFGHIJKLMNOPQRSTUVWXYZÑ
• OCR-B Visa Type A
-0123456789<ABCDEFGHIJKLMNOPQRSTUVWXYZ
• OCR-B Visa Type B
-0123456789<ABCDEFGHIJKLMNOPQRSTUVWXYZÑ
• OCR-B ICAO Travel Documents
This allows reading either TD1, TD2, Passport, Visa Type A, or Visa Type B without switching between these options. It automatically recognizes the travel document read.
Scanning any ISBN Book Number automatically applies the appropriate ISBN checksum.
314
OCR Programming
To choose a variant, scan one of the barcodes below. Selecting the following OCR-B variants automatically sets the appropriate
. These five variants invoke extensive special algorithms and checking for that particular document type:
Variant
Passport
OCR Lines Setting
2
TD1 ID Cards
TD2 ID Cards
Visa Type A
Visa Type B
3
2
2
2
NOTE : When setting one of the variants above with both OCR-A and OCR-B enabled, the scanner reads the specified travel document but does not read OCR-A. When the OCR-B variant is set back to the default
(OCR-B Full ASCII), the scanner reads OCR-A.
*OCR-B Full ASCII
(0)
OCR-B Banking
(1)
OCR-B Limited
(2)
315
OCR-B ISBN 10-Digit Book Numbers
(6)
OCR-B Variant (continued)
OCR Programming
OCR-B ISBN 10 or 13-Digit Book Numbers
(7)
OCR-B Travel Document Version 1 (TD1)
3 Line ID Cards
(3)
OCR-B Travel Document Version 2 (TD2)
2-Line ID Cards
(8)
Travel Document 2 or 3-Line ID Cards Auto-Detect
(20)
OCR-B Passport
(4)
OCR-B Visa Type A
(9)
316
OCR-B Variant (continued)
OCR Programming
OCR-B Visa Type B
(10)
OCR-B ICAO Travel Documents
(11)
MICR E13B
Parameter # 682
SSI # F1h AAh
NOTE : OCR is not as secure as a barcode. To decrease OCR misdecodes and speed OCR reading, set an
accurate OCR template and character subset, and use a check digit. See OCR Subset on page 321
and
.
Scan one of the following barcodes to enable or disable MICR E13B.
MICR E 13B uses the following characters:
TOAD characters (Transit, On Us, Amount, and Dash) output as the following representative characters: outputs as t
outputs as a
outputs as o
outputs as d
Enable MICR E13B
(1)
317
*Disable MICR E13B
(0)
OCR Programming
US Currency Serial Number
Parameter # 683
SSI # F1h ABh
Scan one of the following barcodes to enable or disable US Currency Serial Number.
NOTE : OCR is not as secure as a barcode. To decrease OCR misdecodes and speed OCR reading, set an
accurate OCR template and character subset, and use a check digit. See OCR Subset on page 321
and
.
Enable US Currency
(1)
*Disable US Currency
(0)
OCR Orientation
Parameter # 687
SSI # F1h AFh
Select one of five options to specify the orientation of the OCR to read:
• 0 o to the imaging engine (default)
• 270 o clockwise (or 90 o counterclockwise) to the imaging engine
• 180 o (upside down) to the imaging engine
• 90 o clockwise to the imaging engine
• Omnidirectional
Setting an incorrect orientation can cause misdecodes.
318
OCR Orientation (continued)
OCR Programming
*OCR Orientation 0 o
(0)
OCR Orientation 270 o
(1)
Clockwise
OCR Orientation 180 o
(2)
Clockwise
OCR Orientation 90 o
(3)
Clockwise
OCR Orientation Omnidirectional
(4)
319
OCR Programming
OCR Lines
Parameter # 691
SSI # F1h B3h
To select the number of OCR lines to decode, scan one of the following barcodes. Selecting Visas, TD1, or TD2 ID cards automatically sets the appropriate OCR Lines . Also see
*OCR 1 Line
(1)
OCR 2 Lines
(2)
OCR 3 Lines
(3)
OCR Minimum Characters
Parameter # 689
SSI # F1h B1h
To select the minimum number of OCR characters (not including spaces) per line to decode, scan the following
barcode, then scan a three-digit number between 003 and 100 using the barcodes in Numeric Barcodes
representing the number of OCR characters to decode. Strings of OCR characters less than the minimum are ignored. The default is 003.
OCR Minimum Characters
320
OCR Programming
OCR Maximum Characters
Parameter # 690
SSI # F1h B2h
To select the maximum number of OCR characters (including spaces) per line to decode, scan the following
barcode, then scan a three-digit number between 003 and 100 using the barcodes in Numeric Barcodes
representing the number of OCR characters to decode. Strings of OCR characters greater than the maximum are ignored. The default is 100.
OCR Maximum Characters
OCR Subset
Parameter # 686
SSI # F1h AEh
3.
4.
1.
2.
Create an OCR subset to define a custom group of characters in place of a preset font variant. For example, if scanning only numbers and the letters A, B, and C, create a subset of just these characters to speed decoding.
This applies a designated OCR Subset across all enabled OCR fonts.
To set or modify the OCR font subset:
Enable the appropriate OCR font(s).
Scan the OCR Subset barcode.
Scan numbers and letters to form the OCR Subset from Alphanumeric Barcodes
.
Scan End of Message on page 322
.
OCR Subset
To cancel an OCR subset, for OCR-A or OCR-B, scan OCR-A variant Full ASCII , or OCR-B variant Full ASCII .
For MICR E13B or US Currency Serial Number, create a subset which includes all allowed characters in that
character set, or scan an option from the Default Parameters on page 59 and re-program the scanner.
321
OCR Programming
OCR Quiet Zone
Parameter # 695
SSI # F1h B7h
This option sets the OCR quiet zone. The scanner stops scanning a field when it detects a sufficiently wide blank space. The width of this space is defined by the End of Field option. Used with parsers that tolerate slanted characters, the End of Field count is approximately a count of 8 for a character width. For example, if set to 15, then two character widths are an end of line indicator for the parser. Larger end of field numbers require bigger quiet zones at each end of text line.
To set a quiet zone, scan the following barcode, then scan a two-digit number using the numeric keypad in
. The range of the quiet zone is 20 - 99 and the default is 50, indicating a six character width quiet zone.
OCR Quiet Zone
OCR Template
Parameter # 547
SSI # F1h 23h
This option creates a template for precisely matching scanned OCR characters to a desired input format. Carefully constructing an OCR template eliminates scanning errors.
To set or modify the OCR decode template, scan the OCR Template
barcode, and then scan barcodes on the following pages that correspond to numbers and letters to form the template expression. Then scan End of
Message . The default is 999999999 which accepts OCR strings containing any character.
OCR Template
End of Message
322
OCR Programming
Required Digit (9)
Only a numeric character is accepted in this position.
Template
99999
Valid data
12987
Valid data
30517
Invalid data
123AB
Required Alpha (A)
Only an alpha character is accepted in this position.
Template
AAAAA
Valid data
ABCDE
Valid data
UVWXY
Invalid data
12FGH
9
A
Optional Alphanumeric (1)
An alphanumeric character is accepted in this position if present. Optional characters are not allowed as the first character(s) in a field of like characters.
Template
99991
Valid data
1234A
Valid data
12345
Invalid data
1234<
1
323
OCR Programming
Optional Alpha (2)
An alpha character is accepted in this position if present. Optional characters are not allowed as the first character(s) in a field of like characters.
Template
AAAA2
Valid data
ABCDE
Valid data
WXYZ
Invalid data
ABCD6
2
Alpha or Digit (3)
An alphanumeric character is required in this position to validate the incoming data.
Template
33333
Valid data
12ABC
Valid data
WXY34
Invalid data
12AB<
3
Any Including Space & Reject (4)
Any character is accepted in this position, including space and reject. An underscore (_) represents rejects in the output. This is a good selection for troubleshooting.
Template
99499
Valid data
12$34
Valid data
34 98
4
324
OCR Programming
Any except Space & Reject (5)
Any character is accepted in this position, except a space or reject.
Template
55999
Valid data
A.123
Valid data
*Z456
Invalid data
A BCD
5
Optional Digit (7)
A numeric character is accepted if present. Optional characters are not allowed as the first character(s) in a field of like characters.
Template
99977
Valid data
12345
Valid data
789
Invalid data
789AB
Digit or Fill (8)
Any numeric or fill character is accepted in this position.
Template
88899
Valid data
12345
Valid data
>>789
Valid data
<<789
7
8
325
OCR Programming
Alpha or Fill (F)
Any alpha or fill character is accepted in this position.
Template
AAAFF
Valid data
ABCXY
Valid data
LMN>>
Valid data
ABC<5
F
Optional Space ( )
A space is accepted if present. Optional characters are not allowed as the first character(s) in a field of like characters.
Template
99 99
Valid data
12 34
Valid data
1234
Invalid data
67891
Space
Optional Small Special (.)
A special character is accepted if present. Optional characters are not allowed as the first character(s) in a field of like characters. Small special characters are , and .
Template
AA.99
Valid data
MN.35
Valid data
XY98
Invalid data
XYZ12
.
326
OCR Programming
Other Template Operators
These template operators assist in capturing, delimiting, and formatting scanned OCR data.
Literal String (" and +)
to define a literal string within a template that must be present in scanned OCR data. There are two characters used to delimit required literal strings; if one of the delimiter characters is present in the desired literal string, use the other delimiter.
Template
"35+BC"
Valid data
35+BC
Invalid data
AB+22
“
+
New Line (E)
To create a template of multiple lines, add E between the template of each single line.
Template
999EAAAA
Valid data
321
BCAD
Valid data
987
ZXYW
Invalid data
XYZW
12
E
String Extract (C)
This operator combined with others defines a string of characters to extract from the scanned data. The string extract is structured as follows:
CbPe
Where:
• C is the string extract operator
• b is the string begin delimiter
• P is the category (one or more numeric or alpha characters) describing the string representation
• e is the string end delimiter
327
OCR Programming
Values for b and e can be any scannable character. They are included in the output stream.
Template
C>A>
Incoming data
XQ3>ABCDE>
->ATHRUZ>123
1ABCZXYZ
Output
>ABCDE>
>ATHRUZ>
No Output
C
Ignore to End of Field (D)
This operator causes all characters after a template to be ignored. Use this as the last character in a template expression. Examples for the template 999D:
Template
999D
Incoming data
123-PED
357298
193
Output
123
357
193
D
Skip Until (P1)
This operator skips over characters until a specific character type or a literal string is detected. It can be used in two ways:
P1ct
Where:
• P1 is the Skip Until operator
• c is the type of character that triggers the start of output
• t is one or more template characters
P1"s"t
Where:
• P1 is the Skip Until operator
• "s"
output
• t is one or more template characters
328
OCR Programming
The trigger character or literal string is included in output from a Skip Until operator, and the first character in the template should accommodate this trigger.
Template
P1"PN"AA9999
Incoming data
123PN9876
PN1234
X-PN3592
Output
PN9876
PN1234
PN3592
P
1
Skip Until Not (P0)
This operator skips over characters until a specific character type or a literal string is not matched in the output stream. It can be used in two ways:
P0ct
Where:
• P0 is the Skip Until Not operator
• c is the type of character that triggers the start of output
• t is one or more template characters
P0"s"t
Where:
• P0 is the Skip Until Not operator
• "s"
is one or more literal string characters (see Literal String (" and +) on page 327
) that trigger the start of output
• t is one or more template characters
329
OCR Programming
The trigger character or literal string is not included in output from a Skip Until Not operator.
Template
P0A9999
Incoming data
BPN3456
PN1234
5341
Output
3456
1234
No output
Template
P0"PN"9999
Incoming data
PN3456
5341
PNPN7654
Output
3456
No output
7654
P
0
Repeat Previous (R)
This operator allows a template character to repeat one or more times, allowing the capture of variable-length scanned data. The following examples capture two required alpha characters followed by one or more required digits:
Template
AA9R
Incoming data
AB3
PN12345
32RM52700
Output
AB3
PN12345
No output
R
330
OCR Programming
Scroll Until Match (S)
This operator steps through scanned data one character at a time until the data matches the template.
Template
S99999
Incoming data
AB3
PN12345
32RM52700
Output
No Output
12345
52700
S
Multiple Templates
Template on page 322 (scan the OCR Template barcode, and then barcodes corresponding to numbers and
letters to form the template expression, and then End of Message ) for each template in the multiple template string, using a capital letter X as a separator between templates.
For example, set the
99999XAAAAA to decode OCR strings of either 12345 or ABCDE .
Template Examples
Following are sample templates with descriptions of valid data for each definition.
Field Definition Description
" M" 99977 M followed by three digits and two optional digits.
"X"997777"X" X followed by two digits, four optional digits, and an X.
9959775599 Two digits followed by any character, a digit, two optional digits, any two characters, and two digits.
A55"-"999"-"99 A letter followed by two characters, a dash, three digits, a dash, and two digits.
33A"."99 Two alphanumeric characters followed by a letter, a period, and two digits.
999992991 Five digits followed by an optional alpha, two digits, and an optional alphanumeric.
"PN98" Literal field - PN98
331
OCR Programming
OCR Check Digit Modulus
Parameter # 688
SSI # F1h B0h
The check digit is the last digit (in the right-most position) in an OCR string and improves the accuracy of the collected data. This option sets OCR module check digit calculation. The calculation is performed on incoming data
To choose the Check Digit Modulus, such as 10 for Modulus 10, scan the following barcode, and then scan a
The default is 1 .
OCR Check Digit
OCR Check Digit Multiplier
Parameter # 700
SSI # F1h BCh
This option sets OCR check digit multipliers for character positions. For check digit validation, each character in scanned data has an assigned weight to use in calculating the check digit. The scanner OCR ships with the following weight equivalents:
0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15
G = 16
H = 17
I = 18
J = 19
K = 20
L = 21
M = 22
N = 23
O = 24
P = 25
Q = 26
R = 27
S = 28
T = 29
U = 30
V = 31
W = 32
X = 33
Y = 34
Z = 35
Space = 0
All other characters are equivalent to one (1).
You can define the multiplier string if it is different from the default.
121212121212 (default)
123456789A (for ISBN, Product Add Right to Left. See
OCR Check Digit Validation on page 333
)
332
OCR Programming
For example:
ISBN
Multiplier
0 2 0 1 1 8 3 9 9 4
10 9 8 7 6 5 4 3 2 1
Product 0 18 0 7 6 40 12 27 18 4
Product add 0 + 18 + 0 + 7 + 6 + 40 + 12 + 27 + 18 + 4 = 132
ISBN uses Modulus 11 for the check digit. In this case, 132 is divisible by 11, so it passes the check digit.
To set the check digit multiplier, scan the following barcode, and then scan numbers and letters to form the multiplier string from
. Then scan
OCR Check Digit Multiplier
OCR Check Digit Validation
Parameter # 694
SSI # F1h B6h
Use the following options to protect against scanning errors by applying a check digit validation scheme.
None
No check digit validation, indicating no check digit is applied. This is the default.
*No Check Digit
(0)
333
OCR Programming
Product Add Left to Right
).
Each digit representing a character in the scanned data is multiplied by its corresponding digit in the multiplier, and the sum of these products is computed. The check digit passes if this sum modulo Check Digit Modulus is zero.
Example:
Scanned data numeric value is 132456 (check digit is 6)
Check digit multiplier string is 123456
Digit 1 3 2 4 5 6
Multiplier
Product
1
1
2
6
3
6
4
16
5
25
6
36
Product add 1+ 6+ 6+ 16+ 25+ 36= 90
The Check Digit Modulus is 10. It passes because 90 is divisible by 10 (the remainder is zero).
Product Add Left to Right
(3)
Product Add Right to Left
).
The check digit multiplier is reversed in order. Each value representing a character in the scanned data is multiplied by its corresponding digit in the reversed multiplier, resulting in a product for each character in the scanned data. The sum of these products is computed. The check digit passes if this sum modulo Check Digit
Modulus is zero.
Example:
Scanned data numeric value is 132459 (check digit is 9)
Check digit multiplier string is 123456
Digit 1 3 2 4 5 9
Multiplier
Product
6
6
5 4
15 8
3
12
2
10
1
9
Product add 6+ 15+ 8+ 12+ 10+ 9= 60
334
OCR Programming
The Check Digit Modulus is 10. It passes because 60 is divisible by 10 (the remainder is 0).
Product Add Right to Left
(1)
Digit Add Left to Right
).
Each value representing a character in the scanned data is multiplied by its corresponding digit in the multiplier, resulting in a product for each character in the scanned data. The sum of each individual digit in all of the products is then calculated. The check digit passes if this sum modulo Check Digit Modulus is zero.
Example:
Scanned data numeric value is 132456 (check digit is 6)
Check digit multiplier string is 123456
Digit 1 3 2 4 5 6
Multiplier 1 2 3 4 5 6
Product 1 6 6 16 25 36
Digit add 1+ 6+ 6+ 1+6+ 2+5+ 3+6= 36
The Check Digit Modulus is 12. It passes because 36 is divisible by 12 (the remainder is 0).
Digit Add Left to Right
(4)
335
OCR Programming
Digit Add Right to Left
).
The check digit multiplier is reversed in order. Each value representing a character in the scanned data is multiplied by its corresponding digit in the reversed multiplier, resulting in a product for each character in the scanned data. The sum of each individual digit in all of the products is then calculated. The check digit passes if this sum modulo Check Digit Modulus is zero.
Example:
Scanned data numeric value is 132456 (check digit is 6)
Check digit multiplier string is 123456
Digit
Multiplier
Product
Digit add
1
6
6
3
5
2
4
15 8
4
3
12
5
2
10
6
1
6
6+ 1+5+ 8+ 1+2+ 1+0+ 6= 30
The Check Digit Modulus is 10. It passes because 30 is divisible by 10 (the remainder is 0).
Digit Add Right to Left
(2)
Product Add Right to Left Simple Remainder
).
The check digit multiplier is reversed in order. Each value representing a character in the scanned data is multiplied by its corresponding digit in the reversed multiplier, resulting in a product for each character in the scanned data. The sum of these products except for the check digit's product is computed. The check digit passes if this sum modulo Check Digit Modulus is equal to the check digit's product.
Example:
Scanned data numeric value is 122456 (check digit is 6)
Check digit multiplier string is 123456
Digit
Multiplier
Product
1
6
6
2
5
2
4
10 8
4
3
12
5
2
10
Product add 6+ 10+ 8+ 12+ 10= 46
6
1
6
6
336
OCR Programming
The Check Digit Modulus is 10. It passes because 46 divided by 10 leaves a remainder of 6.
Product Add Right to Left Simple Remainder
(5)
Digit Add Right To Left Simple Remainder
).
The check digit multiplier is reversed in order. Each value representing a character in the scanned data is multiplied by its corresponding digit in the reversed multiplier, resulting in a product for each character in the scanned data. The sum of each individual digit in all of the products except for the check digit's product is then calculated. The check digit passes if this sum modulo Check Digit Modulus is equal to the check digit's product.
Example:
Scanned data numeric value is 122459 (check digit is 6)
Check digit multiplier string is 123456
Digit 1 2 2 4 5 9
Multiplier
Product
Digit add
6
6
5 4
10 8
3
12
2
10
6+ 1+0+ 8+ 1+2+ 1+0= 19
1
9
9
The Check Digit Modulus is 10. It passes because 19 divided by 10 leaves a remainder of 9.
Digit Add Right to Left Simple Remainder
(6)
337
OCR Programming
Health Industry - HIBCC43
This is the health industry module 43 check digit standard. The check digit is the modulus 43 sum of all the character values in a given message, and is printed as the last character in a given message.
Example:
Supplier Labeling Data Structure: + A 1 2 3 B J C 5 D 6 E 7 1
Sum of values: 41+10+1+2+3+11+19+12+5+13+6+14+7+1 = 145
Divide 145 by 43. The quotient is 3 with a remainder of 16. The check digit is the character corresponding to the value of the remainder (see
Table 25 ), which in this example is 16, or
G . The complete Supplier Labeling Data
Structure, including the check digit, therefore is:
A 1 2 3 B J C 5 D 6 E 7 1 G
Table 25 Table of Numeric Value Assignments for Computing HIBC LIC Data Format Check Digit
0 = 0 9 = 9 I = 18 R = 27 - = 36
1 = 1
2 = 2
A = 10
B = 11
J = 19
K = 20
S = 28
T = 29
. = 37
Space = 38
3 = 3
4 = 4
5 = 5
C = 12
D = 13
E = 14
L = 21
M = 22
N = 23
U =30
V = 31
W = 32
$ = 39
/ = 40
+ = 41
% = 42 6 = 6
7 = 7
8 = 8
F = 15
G = 16
H = 17
O = 24
P = 25
Q = 26
X = 33
Y = 34
Z = 35
Health Industry - HIBCC43
(9)
338
OCR Programming
Inverse OCR
Parameter # 856
SSI # F2h 58h
Inverse OCR is white or light words on a black or dark background. Select an option for decoding inverse OCR:
• Regular Only - Decode regular OCR (black on white) strings only.
• Inverse Only - Decode inverse OCR (white on black) strings only.
• Autodiscriminate - Decode both regular and inverse OCR strings.
*Regular Only
(0)
Inverse Only
(1)
Autodiscriminate
(2)
339
OCR Programming
OCR Redundancy
Parameter # 1770
SSI # F8h 06h EAh
This option adjusts the number of times to decode an OCR text string before transmission. There are three levels of OCR decode redundancy. There is an inverse relationship between the redundancy level and OCR decoding aggressiveness. Increasing the level of the redundancy can reduce OCR scanning aggressiveness, so select only the level of redundancy necessary.
• OCR Redundancy Level 1 : This default setting allows the scanner to operate in its most aggressive state while providing sufficient accuracy in decoding most in-spec OCR text strings.
• OCR Redundancy Level 2 : This setting eliminates most misdecodes while maintaining reasonable aggressiveness.
• OCR Redundancy Level 3 : Select this option with greater redundancy requirements if OCR Redundancy
Level 2 fails to eliminate misdecodes.
*
OCR Redundancy Level 1
(1)
OCR Redundancy Level 2
(2)
OCR Redundancy Level 3
(3)
340
다운로드
광고