|
Description  |
|
|
BACKGROUND OF THE INVENTION
The present invention generally relates to data reading apparatuses, and
more particularly to a data reading apparatus for reading data from a form
sheet and applicable to the so-called optical character reader
(hereinafter simply referred to as OCR) which optically reads an image
information.
In the present specification, the term "form sheet" is used to refer to a
sheet which has a fixed form having spaces which are to be filled in or
entered with data. The form sheet includes slips, tickets, debit notes,
questionnaires, various kinds of sheets printed with a frame (fixed or
standard form), headings and the like, and the data are entered into
predetermined spaces in the form sheet identified by a line, a box and the
like.
Various OCRs have been developed. The OCR scans a document by use of an
image scanner, and reads an image information from the document as image
data. The image information may include printed or hand-written characters
on a sheet of paper. The characters are recognized from the image data,
and the image data corresponding to the recognized characters are
converted into character code data.
Compared to the case where an entry of data is made from a keyboard, the
efficiency with which the data are entered is improved when the OCR is
used as input means for entering character information and the like to
processing systems which process character information and the like or to
communication systems such as data communication systems which transmit
character data. Such processing systems include word processing systems,
automatic translating systems, systems for totalling form sheets and
systems for producing data files for searches.
The OCR is provided with a dictionary for recognizing characters, and image
data of character fonts are pre-registered in the dictionary as reference
image information. A character recognition means compares image data of an
entered character with image data in the dictionary and finds a pattern
which matches that of the entered character. When a matching pattern is
found, the character recognition means recognizes the entered character as
a predetermined character and generates character code data corresponding
to the predetermined character.
Generally, many kinds of character fonts, that is, many kinds of character
designs such as types are used. For this reason, the dictionary for
recognizing characters must be provided for each of the kinds of character
designs.
However, when reading the writing in the document on the OCR, it is
impossible to recognize the characters when characters and image
information other than the characters coexist in one document, characters
of different character designs coexist in one document, no existing format
is available on the writing style or the like.
In addition, even when the document contains necessary data which need to
be recognized and unwanted data which require no recognition, the
character recognition means also recognizes the unwanted data. For this
reason, there is a problem in that time is wasted for recognitions which
actually do not need to be carried out, and it is difficult to increase
the reading speed.
Especially when the OCR is used to total form sheets to process data on the
form sheets by reading characters and the like entered on the form sheets,
the conventional OCR requires a long reading time because the OCR also
reads the fixed form of the form sheet. Furthermore, there is a problem in
that the processing of the read information becomes complex.
SUMMARY OF THE INVENTION
Accordingly, it is a general object of the present invention to provide a
novel and useful form sheet reading apparatus in which the problems
described heretofore are eliminated.
Another and more specific object of the present invention is to provide a
form sheet reading apparatus comprising storing means for storing form
information on form sheets, and means for automatically discriminating a
frame line of a form sheet which is read and detected by comparing the
detected frame line with a frame line information within the form
information stored in the storing means, so that data entered within
predetermined regions of the form sheet are read under reading conditions
determined by the form information for the form sheet. According to the
data reading apparatus of the present invention, it is possible to read a
plurality of kinds of form sheets having mutually different fixed forms
because the discriminating means automatically discriminates the kind of
form sheet from the detected frame line. In addition, it is possible to
quickly read only the data entered within the predetermined regions of the
form sheet based on the form information.
Still another object of the present invention is to provide a data reading
apparatus for reading data from a form sheet, where the form sheet has a
fixed form with spaces which are to be entered with the data, and the data
reading apparatus comprises scanning means for optically scanning the form
sheet and for outputting image data read from the form sheet, storing
means for storing form informations on different kinds of model form
sheets having different fixed forms, discriminating means for
discriminating the kind of the form sheet which is scanned by the scanning
means by comparing a form information on the form sheet included in the
image data from the scanning means with the form informations stored in
the storing means, and reading means for reading from the image data
outputted from the scanning means data in predetermined reading areas of
the form sheet depending on the form information of a model form sheet
which is discriminated in the discriminating means as being identical to
the kind of form sheet scanned by the scanning means.
Other objects and further features of the present invention will be
apparent from the following detailed description when read in conjunction
with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a perspective view generally showing an embodiment of the data
reading apparatus according to the present invention applied to a data
processing system;
FIG. 2 is a system block diagram showing the data processing system shown
in FIG. 1;
FIGS. 3 and 4A through 4E are flow charts showing embodiments of the
operation of a main processing unit of the data processing system shown in
FIG. 2;
FIG. 5 shows an image of a read document displayed on a CRT display device
of the data processing system;
FIG. 6 shows a writing style designation menu displayed on the CRT display
device;
FIG. 7 shows an embodiment of the structure of files for storing area
information;
FIG. 8 shows an embodiment of the structure of the area information;
FIG. 9 is a functional block diagram showing essential functions of the
embodiment for registering form information;
FIG. 10 is a functional block diagram showing essential functions of the
embodiment for reading data from the form sheet;
FIG. 11 is a flow chart showing an embodiment of the operation of the main
processing unit for registering form information;
FIG. 12 is a flow chart showing an embodiment of the operation of the main
processing unit for reading data from the form sheet;
FIG. 13 shows an example of a frame line;
FIG. 14 shows a case where a skew exists in the image data read by an image
scanner;
FIG. 15 is a diagram for explaining a reference position of the frame line;
FIGS. 16A through 16D are diagrams for explaining the designation of the
reading area;
FIG. 17 shows an embodiment of the form file format;
FIG. 18 shows an embodiment of the data on the kind of character;
FIG. 19 shows an embodiment of the hand-written field information;
FIG. 20 is a flow chart showing an embodiment of the form discriminating
process of the main processing unit;
FIG. 21 is a flow chart showing an embodiment of the parameter evaluation
process of the main processing unit; and
FIG. 22 shows an embodiment of the format of data stored in read result
files.
DETAILED DESCRIPTION
FIG. 1 generally shows an embodiment of the data reading apparatus
according to the present invention applied to a data processing system.
The data processing system comprises a keyboard 1 for entering instructions
of an operator, an image scanner 2, a cathode ray tube (hereinafter simply
referred to as CRT) display device 3, a printer 4 and a main processing
unit 5.
The keyboard 1 is used as an input device and comprises alpha-numeric keys,
Japanese alphabet ("kana") keys, character keys, cursor moving keys,
various function keys and the like.
The image scanner 2 optically scans a document and enters image information
including character information into the main processing unit 5 as image
data.
The CRT display device 3 displays various characters and images including
guidances for the operator.
The printer 4 is used to print out various information processed on the
data processing system. In the present embodiment, a laser printer which
prints the image by use of a laser beam is used as the printer 4.
As shown in FIG. 2 which shows a system block diagram of the data
processing system shown in FIG. 1, the main processing unit 5 comprises an
OCR pre-processing and recognition part 10, a hard disc drive (hereinafter
simply referred to as HDD) 11, a central processing unit (hereinafter
simply referred to as CPU) 12, a video random access memory (hereinafter
simply referred to as VRAM) 13, a CRT controller 14, a memory 15 and a
printer controller 16.
The part 10 carries out pre-processing and character recognition on the
image data received from the image scanner 2, and converts the image data
of characters into character code data. Although not shown, the part 10
comprises a buffer memory for temporarily storing the image data entered
from the image scanner 2, a dictionary memory for storing dictionaries for
recognizing characters and the like.
The HDD 11 is used as a data storage device, and other means for storing
data may be used in place of the HDD 11.
The CPU 12 is made up of a microcomputer or the like and controls the
operation of the entire data processing system. The CPU 12 carries out a
control so that until a code conversion instruction is received from the
keyboard 1, the image data of the read document obtained from the image
scanner 2 are stored into the HDD 13 as they are through the part 10.
After the code conversion instruction is received from the keyboard 1, the
CPU 12 controls the part 10 so as to convert the image data of the
characters entered from the image scanner 2 into the character code data
and to store the character code data into the HDD 11.
The stored image data or character code data are read out from the HDD 11
and are transferred into the VRAM 13 under the control of the CPU 12. The
VRAM 13 is used as a video memory for developing the image data or
character code data into a dot pattern.
A video signal describing the dot pattern obtained in the VRAM 13 is
successively supplied to the CRT controller 12 and is displayed on the CRT
display device 3.
The memory 15 is used to temporarily store the image data to be printed out
under the control of the CPU 12. The image data to be printed are
converted into a form suited for the printing and are supplied to the
printer controller 16 which controls the printer 4 to print the image data
from the memory 15.
Next, a description will be given on the pre-processing, that is, the
designation of reading areas and designation of reading conditions for
each reading area.
In the present embodiment, the preprocessing comprises an edit mode, a list
mode, and a process end mode. In the edit mode, the reading of the
document by the image scanner 2, the reading areas in the document to be
read by the image scanner 2, the reading conditions under which the data
entered in each reading area are to scanned and the like are designated.
In the list mode, the designations made in the edit mode are displayed on
the CRT display device 3. The pre-processing is ended in the process end
mode.
In the edit mode, there are various submodes such as "document read",
"create", "revise", "add", "delete", "display contents" and "end". The
submodes "document read", "create" and "display contents" are used to
designate the reading areas in the document to be scanned and the reading
conditions under which the data entered in each reading area are to be
scanned. The contents of the designations may be revised, added or deleted
by use of the submodes "revise", "add" and "delete". The submode "end"
ends the edit mode.
FIG. 3 is a flowchart showing an embodiment of the operation of the main
processing unit 5. A step S1 operates the image scanner 2 to read the
image information including characters in the document and enters the read
image data into the part 10. In this case, the reading density with which
the image information is read is set rough so as to increase the reading
speed. A step S2 displays the image data of the document on the CRT
display device 3. A step S3 designates the reading areas in the document
to be scanned by making sectioning lines or boxes on the screen of the CRT
display device 3, and designates the reading conditions under which the
data entered in each reading area are to be scanned by entering the
reading conditions from the keyboard 1. A step S4 stores the reading areas
and reading conditions designated in the step S3 into the HDD 11 in the
form of a file.
The designation of the reading areas in the document to be scanned by
making sectioning lines or boxes on the screen will be described later.
The designation of the reading conditions include the designation of a
type mode or a hand-written mode, the designation of the kind of
dictionary (character font) in the case of the type mode, the designation
of the kind of character in the case of the hand-written mode, the
designation of the reading density, the designation of the reading tone
and the like. However, a detailed description on the designation of the
reading conditions will be given later in conjunction with FIG. 4.
The steps S1 through S4 described above correspond to the pre-processing in
the edit mode carried out by the part 10.
Next, a step S5 reads out the stored reading areas and the reading
conditions from the file in the HDD 11. A step S6 operates the image
scanner 2 again to read the image information from at least the designated
reading areas of the document with the designated reading density. A step
S7 discriminates whether or not the read image data are to be subjected to
the character recognition. Such data to be subjected to the character
recognition will be referred hereunder as "OCR data". The operation
advances to a step S8 when the read image data are OCR data and the
discrimination result in the step S7 is YES, and the step S8 carries out a
character recognition. The step S8 selects the dictionary for the
character recognition according to the various designated reading
conditions and recognizes each character by a known pattern matching
method, for example.
On the other hand, when the read image data are not OCR data and the
discrimination result in the step S7 is NO, the operation jumps to a step
S9. The step S9 discriminates whether or not other designated data exist,
and the operation is returned to the step S7 to repeat the process for the
character recognition when the discrimination result in the step S9 is
YES. When the character recognition of all of the OCR data within the
designated reading areas are completed and the discrimination result in
the step S9 becomes NO, a step S10 executes an application program, and
the operation is thereafter ended.
The steps S5 through S9 described above correspond to the character
recognition process.
In the step S8, the character code data obtained by the data conversion
carried out during the character recognition, and those image data within
the designated reading areas which are not the OCR data, if any, may be
stored in the HDD 11, for example.
The application program carries out necessary processings by use of the
read data. In this case, the application program processes the data on the
form sheet, and such processing includes calculation of tables and
totalling of data.
Next, a description will be given on specific examples of the reading areas
and the reading conditions which are designated by the pre-processing, by
referring to FIGS. 4A through 4E. FIGS. 4A through 4E show an embodiment
of the operation of the main processing unit 5.
Although not shown, a pre-processing menu is displayed on the CRT display
device 3. For example, the pre-processing menu includes the list mode
which may be selected by a numeric key "1", the edit mode which may be
selected by a numeric key "2" and the process end mode which may be
selected by a numeric key 9. In the case where the edit mode is selected
by the numeric key "2" of the keyboard 1, an edit menu is displayed on the
CRT display device 3. This edit menu includes the submodes described
before. The process shown in FIG. 4A is started when the reading of the
document by the image scanner 2 is finished and the submode "create" is
selected.
A step S11 discriminates whether or not the submode "end" is selected. The
submode "end" is selected only when an end key of the keyboard 1 is
pushed. Hence, the discrimination result in the step S11 is NO in this
case, and steps S12 and S13 designate the reading area.
The image information read from the document by the image scanner 2 is
displayed on the CRT display device 3 as the image data, and the reading
area is designated by making sectioning lines. In other words, when a
start point at a top left of the reading area and an end point at a bottom
right of the reading area are designated, it is possible to form a
rectangular frame (or box) defined by two parallel horizontal lines
respectively passing through the start and end points along the
x-direction and two parallel vertical lines respectively passing through
the start and end points along the y-direction in the x-y coordinates. A
region within the frame is designated as the reading area. The step S12
sets the start point, and the step S13 sets the end point.
When the displayed image of the read document includes a picture portion
and characters on the CRT display device 3 as shown in FIG. 5, for
example, it is possible to designate only the writing portion as the
reading area by designating a start point a and an end point b to define a
rectangular frame (box) F.sub.1 thereby designating a reading area A.sub.1
within the frame F.sub.1 in this case. Similarly, when a start point c and
an end point d are designated to define a rectangular frame F.sub.2, it is
possible to designate a reading area A.sub.2 within the frame F.sub.2.
There are various methods of designating the start and end points. Examples
of such methods are a method of entering x-y coordinates of the start and
end points from the keyboard 1, a method of moving a cursor to the start
and end points and pushing an execution key of the keyboard 1, and a
method of touching by a write pen the screen of the CRT display device 3
at the start and end points.
In the case where the cursor is to be moved, it is possible to move the
cursor by pushing cursor moving keys of the keyboard 1 or by using a mouse
and the like.
One rectangular area may easily be designated as the reading area by
designating two points, namely, the start and end points. It is of course
possible to designate a plurality of reading areas.
Next, steps S14 through S17 designate the recognition mode. In this case,
although not shown, a recognition mode menu is displayed on the CRT
display device 3. For example, the recognition mode menu includes a "type"
mode which may be selected by the numeric key "1", a "hand-writing" mode
which may be selected by the numeric key "2" and an "image" mode which may
be selected by a numeric key 3. The recognition is carried out for one of
the "type", "hand-writing" and "image" modes depending on the numeric key
which is pushed.
The step S14 designates the recognition mode, the step S15 discriminates
whether or not the "type" mode is designated, the step S16 discriminates
whether or not the "hand-writing" mode is designated and the step S17
discriminates whether or not the "image" mode is designated.
In the case where the "type" mode is selected by the numeric key "1" of the
keyboard 1, the discrimination result in the step S15 is YES, and the
operation advances to a step S24 shown in FIG. 4B. Steps S24 through S30
set the recognition mode. The step S24 sets the recognition mode, the step
S25 designates the kind of dictionary, the step S26 discriminates whether
or not the multi-font is designated, the step S27 discriminates whether or
not the writing style is designated, the step S28 designates the writing
style, the step S29 sets each mode, and the step S30 sets the reading
mode.
For example, a dictionary designation menu displayed on the CRT display
device 3 includes the multi-font mode which may be selected by the numeric
key "1" and the writing style designation mode which may be selected by
the numeric key "2". When the multi-font mode is designated, the
discrimination result in the step S26 is YES, and the step S29 sets the
kind of dictionary to multi-font.
When the multi-font is set, it is possible to automatically discriminate
the writing style even when the writing style is unknown, as long as the
writing style is one of six predetermined kinds which are frequently used.
The kind of dictionary is selected depending on the discriminated writing
style, and the character recognition is carried out based on the
automatically selected kind of dictionary.
On the other hand, when the writing style designation mode is selected, the
discrimination result in the step S27 is YES, and a writing style
designation menu is displayed on the CRT display device 3. For example,
the writing style designation menu permits the selection of the writing
style from eighteen kinds of writing styles (fonts) as shown in FIG. 6.
When the writing style is designated in the step S28, the step S29 sets
the kind of dictionary to the designated writing style.
However, when the "hand-writing" mode is designated, the discrimination
result in the step S16 is YES, and the operation advances to a step S37
shown in FIG. 4C. Steps S37 through S45 and a step S30 shown in FIG. 4B
set the "hand-writing" mode. For example, a hand-writing kind designation
menu displayed on the CRT display device 3 includes "alphabet" which may
be selected by the numeric key "1", "number" which may be selected by the
numeric key "2", "symbol" which may be selected by the numeric key "3",
"Japanese alphabet ("kana")" which may be selected by the numeric key "4",
"Chinese character ("kanji")" which may be selected by the numeric key
"5", "hand-written type" which may be selected by the numeric key "6", and
"end" which may be selected by the numeric key "9".
In this case, when a plurality of kinds of characters such as alphabets,
numbers and symbols coexist within the same area, it is possible to
designate all of the kinds of characters.
The "hand-written type" refers to characters which are hand-written
according to a predetermined form to resemble the type.
On the other hand, when the "image" mode is selected, the discrimination
result in the step S17 is YES, and the operation advances to a step S18
shown in FIG. 4A. Steps S18 through S23 designate the reading mode. A
reading mode selection menu is displayed on the CRT display device 3 so
that the reading mode may be selected from the "binary", "multi-value" and
"half-tone" modes by pushing a corresponding numeric key of the keyboard
1.
The "binary" mode reads the image data as binary values (1 or 0), that is,
black or white, depending on whether or not the signal level is greater
than a predetermined threshold level. The "multi-value" mode reads the
image data as multigradation data of 64 gradation levels, for example. The
"half-tone" mode reads the image data as pseudohalf-tone data by
converting the read data into binary data by use of a dither matrix.
When the "type" mode or the "hand-writing" mode is set, the reading mode is
automatically set to the "binary" mode.
After the step S23 shown in FIG. 4A or the step S30 shown in FIG. 4B, steps
S31 through S36 shown in FIG. 4B set the reading density. In this case, a
reading density selection menu is displayed on the CRT display device 3 so
that the reading density mode may be selected to one of 300 dpi
(dots/inch), 240 dpi, 200 dpi and 180 dpi by pushing a corresponding
numeric key of the keyboard 1.
After the step S36, the operation advances to a step S46 shown in FIG. 4D.
Steps S46 through S51 set the reading tone. In this case, a reading tone
selection menu is displayed on the CRT display device 3 so that the
reading tone may be selected to one of high (dark) tone, intermediate
(medium) tone and low (light) tone or to one of sixteen intermediate
gradation levels "0" to "F" between two tones. It is possible to normally
set the reading tone to intermediate tone, and set the reading tone to the
high and low tones when the characters of the document are light and dark,
respectively.
The operation returns to the step S11 shown in FIG. 4A when all of the
reading conditions for one designated reading area are designated. Then,
another reading area is designated, and the reading conditions for this
other reading area are designated similarly. When all of the reading areas
and all of the reading conditions therefor are designated and the end key
of the keyboard 1 is pushed, the operation advances to a step S52 shown in
FIG. 4E.
The step S52 rearranges the set area information (coordinates of the start
and end points of the reading area and the information on each of the
reading conditions set for the reading area) according to a scanning
sequence of the image scanner 2, and a step S53 adds file names or the
like to the set area information and stores the set area information in
the files of the HDD 11. After the step S53, the CRT display device 3
displays an edit menu.
Thereafter, when the contents of the area information need to be revised, a
revise menu is selected from the edit menu. In this case, the file name is
designated to display the contents of the area information on the CRT
display device 3, and the revising item is selected to revise the content.
When an area information needs to be added, the submode "add" is selected
from the edit menu. The area information is added similarly as in the case
of the submode "create", and the added area information is stored in the
files of the HDD 11.
When a portion of the area information needs to be deleted, the submode
"delete" is selected from the edit menu. In this case, all of the
designated reading areas are displayed on the CRT display device 3, and
the area information of a certain reading area to be deleted is picked by
moving the mouse into the certain reading area, for example, and the area
information is deleted.
Next, a description will be given on the structure of the files for storing
the area information set as described before, by referring to FIG. 7.
Each file comprises a 32-byte header part in which the file name and the
operator name are entered by the operator, and n 16-byte area information
storage parts which follow the header part. The area information is
written into the area information storage parts in the sequence in which
the reading areas are scanned by the image scanner 2. In FIG. 7, a 2-byte
discrimination code is provided for use in discriminating the files.
As shown in FIG. 8, each area information comprises a 4-byte coordinate
information made up of 2-byte x-coordinate information and 2-byte
y-coordinate information on the start and end points of the reading area,
seven 1-byte reading condition designating information made up of the
recognition mode, the kind of dictionary, the kind of writing style, the
kind of hand-written character, the reading mode, the reading density and
the reading tone, and a 1-byte dummy region.
Next, a description will be given on the operation of totalling the form
sheets by reading the entered characters and the like from the form
sheets, by referring to FIGS. 9 and 10. FIG. 9 is a functional block
diagram showing the essential functions of the embodiment of the data
reading apparatus (data processing system) for registering form
information including the information on the reading areas and the reading
conditions for each reading area. On the other hand, FIG. 10 is a
functional block diagram showing the essential functions of the embodiment
of the data reading apparatus for reading the data from the form sheets.
In FIG. 9, reading area designating means 30 and reading condition
designating means 31 constitute the keyboard 1. On the other hand, frame
line recognition means 31, frame line data memory 32, form information
registering means 33 and form file 34 constitute the main processing unit
5.
In the present embodiment, it is necessary to register the form information
for each kind of form sheet from which the data are to be read.
Hence, a model form sheet is set in the image scanner 2, and the frame line
of the model form sheet is recognized by the frame line recognition means
31 from the image data received from the image scanner 2. The frame line,
that is, the fixed form, is recognized from the boxes and lines on the
form sheet. The frame line information recognized in the frame line
recognition means 31 is temporarily stored in the frame line data memory
32.
The recognized frame line is displa | | |