Character string reading method, character string reading device, and program

The character string reading method addresses the challenge of inaccurate readings in portable devices by employing advanced graphic recognition and character identification techniques, coupled with effective notification mechanisms for potential misreadings, thereby enhancing accuracy and reliability.

JP2025040924AActive Publication Date: 2025-03-25OPTOELECTRONICS CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
JP2024015541
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-05
Publication Date
2025-03-25
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

Existing character string reading methods, particularly in portable devices, face challenges in accurately reading character strings due to varying imaging environments, leading to potential misreadings and the need for appropriate notification mechanisms.

Method used

The proposed character string reading method includes an image acquisition process, format acquisition, character recognition condition setting, character recognition, and string acquisition. It employs graphic recognition, character candidate identification, and character identification procedures to improve accuracy and notify potential misreadings by analyzing matching rates and format compliance.

Benefits of technology

This method enhances the accuracy of character recognition in captured images through simple and low-load processing, while also effectively notifying operators of potential misreadings, thereby improving overall reading reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025040924000001_ABST
    Figure 2025040924000001_ABST
Patent Text Reader

Abstract

To appropriately notify an operator of a possibility of misreading in character recognition for recognizing a character in a captured image by simple and low-load processing.SOLUTION: An imaging portion 141 acquires an image of an object to be read, and a character string recognizing portion 143 recognizes a character string in the acquired image. An output format setting portion 147 acquires one or more formats of the character string to be read from the image and to be output. A character extracting portion 144 acquires a second character string for output at a portion matching a first format, which is one of the one or more acquired formats, among the recognized first character string. At this time, a notifying portion 153 notifies of a possibility of misreading in a case where the second character string having a number of characters less than the number of notification reference characters set by a reference character number setting portion 151 is acquired.SELECTED DRAWING: Figure 10
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a character string reading method for acquiring an image of an object to be read by an image acquisition unit and reading a character string in the acquired image, a character string reading device for reading such a character string, and a program for causing a computer to execute the above-mentioned character string reading method. [Background technology]

[0002] Conventionally, OCR (Optical Character Recognition) is used to read character strings contained in a captured image. In addition, when reading, a possibility that an erroneous reading has been made is notified to an operator. For example, Patent Document 1 describes a method of storing multiple reading formats that define the attributes of character strings, searching for a first reading format that matches a character string recognized in character string recognition, and also searching for a second reading format in which the character string that matches the first reading format matches as a partial character string, and if such a second reading format is found, notifying the possibility of misreading.

[0003] Patent Document 2 describes that when reading a group of character strings in which characters contained in different character strings are arranged in a row perpendicular to the direction in which the characters are arranged in the character strings, the presence or absence of misrecognition is determined based on the result of calculating the number of characters in the row, and information regarding the misrecognized characters is notified. Patent Document 3 describes that when the matching rate between a character image and a character template in character recognition falls within a predetermined range, the recognition result of the character image is notified as a character that may be misread. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] Patent No. 6403417 [Patent Document 2] JP 2020-24492 A [Patent Document 3] Patent No. 6524800 Summary of the Invention [Problem to be solved by the invention]

[0005] In particular, when using a portable reading device, the environment in which the character string to be read is captured varies widely, and therefore the image cannot often be captured under ideal conditions, limiting accurate reading. Therefore, it is preferable to be able to notify an operator when there is a possibility of a misreading. Even if a misreading does occur, the operator can easily determine the misreading by visually comparing the character string to be read with the read result, and the read result can also be corrected.

[0006] On the other hand, if the operator is notified of the possibility of misreading even when the reading is accurate, the operator may start to ignore the notification. Therefore, it is necessary to notify the operator at an appropriate frequency. It is also necessary to reduce the rate at which misreadings occur as much as possible, and of course the rate at which reading fails in the first place.

[0007] The present invention has been made in view of the above circumstances, and has an object to improve the accuracy of character recognition for recognizing characters in a captured image by simple processing with a low load. [Means for solving the problem]

[0008] In order to achieve the above object, the character string reading method of the present invention is a character string reading method executed by a character string reading device, which includes an image acquisition step of acquiring an image of an object to be read by an image acquisition unit, a format acquisition step of acquiring the format of a character string to be read from the image and output, a character recognition condition setting step of setting a character recognition condition to identify only a group of characters including all of the characters defined in the acquired format from among characters identifiable by the character string reading device, a character string recognition step of recognizing a character string in the acquired image in accordance with the set character recognition condition, and a character string acquisition step of acquiring for output a second character string from a first character string obtained by the recognition that matches the acquired format.

[0009] In such a character string reading method, it is preferable that the character string recognition procedure includes a graphic recognition procedure for recognizing graphics contained in the image, a character candidate identification procedure for identifying a character candidate formed by one graphic or a combination of a plurality of graphics from the recognized graphics, and a character identification procedure for identifying which character the character candidate is based on a matching rate obtained by comparing features of the identified character candidate with features of each of the group of characters, and recognizing a character candidate that is not identified as any of the characters as an undefined character, and that the identified characters and the undefined characters, which are arranged consecutively in a substantially straight line, are recognized as a character string composed of those characters.

[0010] Furthermore, in any of the character string reading methods described above, if there are multiple portions of the first character string obtained by the recognition in the character string acquisition procedure that match the acquired format, it is preferable to acquire, among those portions, the portion that has the highest match rate with character features recognized in the character string recognition procedure as the second character string. Furthermore, it is preferable to provide a notification procedure for notifying the possibility of misreading when a plurality of portions that match the above format are found in the above character string acquisition procedure.

[0011] Alternatively, in any of the character string reading methods described above, when there are multiple portions of the first character string obtained by the recognition that match the acquired format, a portion of those portions that includes the center of the acquired image when viewed in the direction of character arrangement in the first character string may be obtained as the second character string. Furthermore, it is preferable to provide a notification procedure for notifying the possibility of misreading when a plurality of portions that match the above format are found in the above character string acquisition procedure.

[0012] Furthermore, in any of the above character string reading methods, the format acquisition step may acquire a plurality of formats for the character string to be output, the character recognition condition setting step may set a character recognition condition to identify only a group of characters that includes all of the characters defined in any of the acquired plurality of formats, and the character string acquisition step may acquire, from among the first character string obtained by the recognition, a portion that matches at least one of the acquired plurality of formats as a candidate for the second character string.

[0013] Furthermore, in the character string acquisition step, a candidate that is detected as matching the format over the longest number of characters during the acquisition among the acquired candidates may be acquired as the second character string. In addition, in any of the above character string reading methods, the format may include rules for processing character strings, and if the acquired format includes the rules for processing, the second character string is processed in accordance with the rules for processing, and the processed character string is output.

[0014] The present invention also provides the following character string reading method, which aims to appropriately notify an operator of the possibility of misreading in character recognition that recognizes characters in a captured image, through simple, low-load processing. This character string reading method includes an image acquisition step of acquiring an image of an object to be read by an image acquisition unit, a format acquisition step of acquiring one or more formats of a character string to be read from the image and output, a character string recognition step of recognizing a character string in the acquired image, a character string acquisition step of acquiring a second character string for output at a portion of a first character string acquired by the recognition that matches a first format, which is one of the one or more acquired formats, and a notification step of notifying the possibility of a misreading when a second character string with a number of characters less than a notification reference number of characters is acquired in the character string acquisition step.

[0015] Such a character string reading method may include a setting step of determining the notification reference number of characters based on a maximum number of characters of a character string defined by the one or more acquired formats. Alternatively, the method may include a setting step of determining the maximum number of characters in a character string defined by the one or more acquired formats as the notification reference number of characters. Furthermore, in any of the above character string reading methods, it is preferable that at least one of the one or more acquired formats specifies a character string divided into a plurality of intervals, the notification reference number of characters is determined for each of the intervals, and the notification step is a step of notifying that there is a possibility of misreading when a second character string in which the number of characters in at least one interval is less than the notification reference number of characters for the interval is acquired in the character string acquisition step.

[0016] Furthermore, it is preferable to include a setting step of determining the notification reference character number for each of the sections based on the maximum character number for each of the sections of character strings defined by the one or more acquired formats. Alternatively, the method may include a setting step of determining the maximum number of characters in each section of the character string defined by the one or more acquired formats as the notification reference number of characters for each section.

[0017] Furthermore, any of the above character string reading methods may be a character string reading method executed by a character string reading device, and may include a character recognition condition setting step of setting a character recognition condition to identify only a group of characters including all of the characters defined in the one or more acquired formats, from among characters identifiable by the character string reading device, and in the character string recognition step, recognize a character string in the acquired image in accordance with the set character recognition condition.

[0018] The present invention also provides the following character string reading method, which aims to be able to appropriately notify an operator of the possibility of misreading in character recognition that recognizes characters in a captured image. This character string reading method includes an image acquisition step of acquiring an image of an object to be read by an image acquisition unit, a graphic recognition step of recognizing a graphic contained in the acquired image, a character string recognition step of recognizing a character string from the recognized graphic, and a notification step of notifying the possibility of a misreading if it is determined that a graphic that does not constitute a character is present within or near the recognized character string.

[0019] Such a character string reading method preferably includes a character string acquisition step of acquiring for output a second character string which is all or part of the first character string obtained by the recognition in the character string recognition step, and the notification step of notifying the possibility of a misreading when it is determined that a figure that does not constitute a character is present inside or near the second character string. In addition, in any of the character string reading methods described above, the character string recognition step may include a step of determining a height, which is a size in a direction perpendicular to an arrangement direction, of characters constituting the character string, and in the determination in the notification step, a figure whose size in the height direction is smaller than the size of the characters constituting the recognized character string by a predetermined threshold or more may be ignored.

[0020] In addition, in any of the character string reading methods described above, the character string recognition step may include a step of determining a height, which is a size in a direction perpendicular to an arrangement direction, of characters constituting the character string, and in the determination in the notification step, a figure whose size in the height direction is greater than the size of the characters constituting the recognized character string by a predetermined threshold or more may be ignored. In any of the character string reading methods described above, the graphic recognition step may include a step of determining a contrast of a graphic contained in the image against a background, and in the determination in the notification step, a graphic having a contrast against the background that differs by a predetermined threshold or more from the graphic constituting the recognized character string may be ignored.

[0021] In addition, in any of the character string reading methods described above, the graphic recognition step may include a step of determining edge sharpness of a graphic contained in the image, and in the judgment in the notification step, a graphic the edge sharpness of which differs by a predetermined threshold or more from the graphic constituting the recognized character string may be ignored. In addition, in any of the above character string reading methods, the character string recognition procedure is a procedure for recognizing character candidates whose identification is possible as well as character candidates whose identification is impossible as characters that constitute a character string, and the notification procedure may make the judgment that character candidates that are successively arranged from an end of the recognized character string are figures that do not constitute the character.

[0022] Furthermore, any of the above character string reading methods may be a character string reading method executed by a character string reading device, comprising: a format acquisition step of acquiring a format of a character string to be read from the image and output; and a character recognition condition setting step of setting a character recognition condition to identify only a group of characters including all of the characters defined in the acquired format, from among characters identifiable by the character string reading device, wherein in the character string recognition step, a character string in the acquired image is recognized in accordance with the set character recognition condition, and in the character string acquisition step, a portion of the first character string that matches the acquired format is acquired as the second character string.

[0023] Furthermore, any of the above character string reading methods may include a format acquisition step of acquiring one or more formats of a character string to be read and output from the image, wherein in the character string acquisition step, a portion of the first character string that matches a first format, which is one of the one or more acquired formats, is acquired as the second character string, and the notification step may be a step of notifying that there is a possibility of misreading even if the second character string acquired in the character string acquisition step has a number of characters less than a notification reference number of characters.

[0024] Furthermore, a character string reading method executed by a character string reading device may include a character recognition condition setting procedure for setting a character recognition condition to identify only a group of characters including all of the characters defined in the one or more acquired formats, from among characters that can be identified by the character string reading device, and in the character string recognition procedure, a character string in the acquired image may be recognized in accordance with the set character recognition condition.

[0025] Furthermore, the present invention can be embodied in any form, such as an apparatus, a system, a program, or a recording medium having a program recorded thereon, in addition to being embodied in the method aspect described above. Effect of the Invention

[0026] According to the configuration of the present invention as described above, it is possible to improve the accuracy of character recognition for recognizing characters in a captured image by simple processing with a low load. [Brief description of the drawings]

[0027] [Figure 1] FIG. 1 is a block diagram showing the hardware configuration of a reading device 100 which is a character string reading device according to a first embodiment of the present invention. [Diagram 2] FIG. 2 is a functional block diagram showing a functional configuration of the reading device 100 shown in FIG. [Diagram 3] FIG. 3 is a diagram showing an example of an output format used by the reading device shown in FIG. [Figure 4]FIG. 4 is a flowchart of a process executed by the CPU 121 of the reading device 100 for reading a character string. [Diagram 5] FIG. 5 is a flowchart of the character recognition condition setting process shown in FIG. [Figure 6] FIG. 6 is a flowchart of the character string recognition process shown in FIG. [Figure 7] FIG. 7 is a flowchart of the output character string extraction process shown in FIG. [Figure 8] 8A to 8F are diagrams for explaining the effect of character recognition performed by the character string recognition process of FIG. [Figure 9] 9A to 9C are diagrams for explaining the effect of extraction of an output character string performed by the output character string extraction process of FIG. [Figure 10] FIG. 10 is a functional block diagram corresponding to FIG. 2 and showing the functional configuration of a reading device 100 which is a second embodiment of a character string reading device according to the present invention. [Figure 11] FIG. 11 is a flowchart of a process executed by the CPU 121 of the reading device 100 of the second embodiment, which corresponds to FIG. [Figure 12] FIG. 12 is a flowchart of the character string recognition process shown in FIG. [Figure 13] 13A and 13B are diagrams for explaining notification of the possibility of misreading by the process of FIG. [Figure 14] 14A and 14B are also diagrams for explaining notification of the possibility of misreading by the process of FIG. [Figure 15] FIG. 15 is a functional block diagram corresponding to FIG. 2, showing the functional configuration of a reading device 100 which is a third embodiment of a character string reading device according to the present invention. [Figure 16] 16A to 16D are diagrams showing examples of figures that do not constitute characters. [Figure 17] FIG. 17 is a flowchart of a process executed by the CPU 121 of the reading device 100 of the third embodiment, which corresponds to FIG. [Figure 18]FIG. 18 is a flowchart of the figure presence determination process shown in FIG. [Figure 19] 19A to 19D are diagrams for explaining notification of the possibility of misreading by the process of FIG. [Figure 20] FIG. 20 is a functional block diagram corresponding to FIG. 2 and showing the functional configuration of a reading device 100 which is a fourth embodiment of a character string reading device according to the present invention. [Figure 21] FIG. 21 is a flowchart of the process executed by the CPU 121 of the reading device 100 of the fourth embodiment, which corresponds to FIG. [Figure 22] FIG. 22 is a flowchart of the output character string extraction process shown in FIG. [Figure 23] FIG. 23 is a functional block diagram corresponding to FIG. 2 and showing the functional configuration of a reading device 100 which is a character string reading device according to a fifth embodiment of the present invention. [Figure 24] FIG. 24 is a flowchart of the process executed by the CPU 121 of the reading device 100 of the fifth embodiment, which corresponds to FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0028] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described with reference to the drawings. [First embodiment: Figs. 1 to 9C] First, a first embodiment of the present invention will be described. FIG. 1 is a block diagram showing the hardware configuration of a reading device 100 which is a first embodiment of a character string reading device.

[0029] 1 is a device for optically reading a character string 102 having a light reflectance different from that of the surroundings on a reading object 101, and also serves as an imaging device for imaging the reading object 101 during the reading process. The reading device 100 may also function as an optical information reading device for optically reading a one-dimensional or two-dimensional code symbol on the reading object 101, which is represented by a symbol having a light reflectance different from that of the surroundings. The read object 101 may be a record carrier statically carrying a character string 102 or a display dynamically displaying code symbols.

[0030] As shown in FIG. 1, the reading device 100 includes an optical unit 110, a control unit 120, an operation unit 131, a notification unit 132, and a display unit 133. Of these, the optical unit 110 is an imaging device that includes an image sensor 111, a lens 112, and a pulsed LED (light emitting diode) 113, and optically captures an image of the object 101 to be read that includes the character string .

[0031] The imaging sensor 111 is an imaging unit for capturing an image of an imaging target such as the read target 101, and can be configured, for example, by a CMOS (complementary metal-oxide semiconductor) image sensor. The imaging sensor 111 can generate image data indicating the gradation value of each pixel based on the charge accumulated in each pixel of the image sensor by imaging, and output the image data to the control unit 120. In the imaging sensor 111, the pixels are arranged two-dimensionally.

[0032] The lens 112 is an optical system for forming an image of reflected light from an object to be imaged on the imaging sensor 111 . The pulsed LED 113 is an illumination unit for irradiating an object to be imaged by the image sensor 111 with illumination light.

[0033] Next, the control unit 120 includes a CPU 121, a ROM 122 that stores programs executed by the CPU 121 and data such as various tables, a RAM 123 that the CPU 121 uses as a working area when executing various processes, and a communication I / F 124 for communicating with external devices.

[0034] The CPU 121 executes a program stored in the ROM 122 using the RAM 123 as a working area, thereby controlling the operation of the entire reading device 100 including the optical unit 110, the operation unit 131, the notification unit 132, and the display unit 133, and realizing various functions including those described below with reference to Fig. 2. These functions may include processes such as identification, display, external output or storage of the character string 102 included in the image data of the image captured by the imaging sensor 111, and detection and notification of the possibility of misreading. The communication I / F 124 is an interface for communicating with various external devices, such as a data processing device that uses the identification result of the character string 102 .

[0035] The operation unit 131 is an operation means such as a button or a trigger for accepting an operation from an operator. The notification unit 132 is a notification means for issuing various notifications to the operator. Specific notification methods include, but are not limited to, displaying a message or data on a display, turning on or blinking a lamp, outputting a sound from a speaker, and the like. The display unit 133 is a display means for displaying a character string identified by the reading device 100, and can be configured with a liquid crystal display or the like. The notification unit 132 and the display unit 133 may be configured as common hardware.

[0036] When the reading device 100 is operated automatically by control from an external device or autonomous control, the operation unit 131, the notification unit 132, and the display unit 133 do not need to be provided. The above-mentioned reading device 100 can be configured as, for example, a handheld or stationary character reading device or a code symbol reading device with a character reading function, but is not limited thereto. A general-purpose computer such as a smartphone or a personal computer may be used as all or part of the hardware.

[0037] One of the distinctive features of the above-described reading device 100 is the method for recognizing character strings contained in an image. This will be described next. First, the functions of the reading device 100 related to reading the character string 102 will be described. FIG. 2 is a functional block diagram showing the functional configuration.

[0038] 2, the reading device 100 includes the functions of an imaging unit 141, a graphic recognition unit 142, a character string recognition unit 143, a character extraction unit 144, a character processing unit 145, an output unit 146, an output format setting unit 147, and a character recognition condition setting unit 148. In the example described here, the functions of these units are realized by the CPU 121 executing software to control the various units of the reading device 100 including the optical unit 110, but some or all of the functions may be realized by a dedicated control circuit.

[0039] 2 has a function of an image acquisition unit that controls the optical unit 110 to capture an image, acquires image data obtained by the capture, and passes the acquired image data to the graphic recognition unit 142. The imaging conditions may be determined according to a known method as appropriate.

[0040] The figure recognition unit 142 has a function of recognizing figures present in the image data passed from the imaging unit 141, and passing information on the recognized figure to the character string recognition unit 143. The figure can be recognized, for example, by detecting the position of an edge in the image where the pixel value changes suddenly, and recognizing that the area surrounded by the edges forming a closed loop is a figure. In addition, any known method can be adopted, such as binarizing the image and then labeling the area where pixels with values ​​different from the background are continuous. When a figure is recognized, it is preferable to calculate and store its position (existence area), size, typical pixel value, and edge sharpness. It is also preferable to store the typical pixel value of the background surrounding the figure. The graphic recognition unit 142 passes data of each recognized graphic to the character string recognition unit 143 .

[0041] The character string recognition unit 143 has a function of recognizing a character string present in the image captured by the imaging unit 141 based on the graphic data passed from the graphic recognition unit 142, and passing the recognized character string to the character extraction unit 144. The character string can be recognized, for example, as follows.

[0042] First, an area where figures of similar size are lined up in a row is extracted. If the character strings to be read are expected to be lined up in a specific direction, for example horizontally, it is possible to extract only the area that is lined up in that direction. Then, a single shape in the extracted area or a combination of multiple shapes nearby is recognized as a character candidate shape, and the features of the character candidate shape and pre-registered characters are compared to recognize the character candidate shape as the character with the highest matching rate. A character string formed by concatenating characters that can be recognized within the extracted region is then recognized as a character string that exists within the extracted region.

[0043] In this process, only characters used for comparison of feature amounts can be recognized. All characters whose data are registered in the reading device 100 may be used for comparison of feature amounts. However, the reading device 100 is configured such that it is possible to set, as a character recognition condition, which characters among the registered characters are to be used for comparison of feature amounts. For example, if only numbers are used for comparison of feature amounts, even if other characters are present in the image, only the numbers among them can be recognized as specific characters. This is one of the features of this embodiment. Furthermore, among the character candidate patterns, those that have a low matching rate with the feature values ​​of any characters can be recognized as indeterminate characters. However, character candidate patterns that differ to some extent from characters that have been recognized in the same region, for example in width or height, may be recognized as patterns that are not characters.

[0044] The character recognition conditions are set by the character recognition condition setting unit 148. The details will be described later. Character extraction unit 144 has a function of a character string acquisition unit that extracts a character string to be output from the character string passed from character string recognition unit 143 and passes the character string to character processing unit 145 . Character processing unit 145 has a function of processing the character string to be output, which is passed from character extraction unit 144, as necessary, and passing the processed character string to output unit 146. Output unit 146 has a function of outputting the character string data passed from character processing unit 145 to an external device such as a data processing device using communication I / F 124 and notification unit 132, and notifying an operator of successful reading. The method of notifying the operator can be any method such as a buzzer or vibration, and may not be performed if notification is not necessary. Output unit 146 may also have a function of displaying the character string passed from character processing unit 145 on display unit 133.

[0045] The extraction of character strings in the character extraction unit 144 and the processing of character strings in the character processing unit 145 are performed according to an output format. The output format setting unit 147 functions as a format acquisition unit, and selects and sets which output format to use from among pre-registered output formats, either automatically or in response to an operator's operation.

[0046] FIG. 3 shows an example of the output format. 3, the output format includes an extracted character string that specifies a character string to be extracted and output by character extraction unit 144, and a processed output character string that specifies a character string to be generated by processing the extracted character string and finally output from output unit 146. The ID is identification information for identifying each output format. The reading device 100 stores an arbitrary number of such output formats, and the output format setting unit 147 can select one or more arbitrary output formats from the stored output formats and set the format for use.

[0047] The extracted character string and the processed output character string can be defined, for example, by the type and number of characters. The processed output character string can be defined by a processing rule that indicates how the character string extracted according to the extracted character string is processed and output, for example, by which part of the extracted character string is to be output. For example, in the output format of ID=1, the extracted character string specifies that four numeric characters are to be extracted as the character string to be output, and the processed output character string specifies that these four numeric characters are to be output without processing. The fact that the extracted character string and the processed output character string are the same indicates that processing by the character processing unit 145 is unnecessary.

[0048] Character types include commonly used types such as numbers, English letters (English alphabet, uppercase and lowercase letters may be used), and symbols, as well as the above-mentioned "unspecified characters." For example, in the output format of ID=2, the extracted string specifies that a string of three consecutive unspecified characters and four numeric characters should be extracted as the string to be output, and the processed output string specifies that the four numeric characters should be extracted and output after processing.

[0049] Additionally, a character group formed by combining any characters can be used as a character type. For example, the three letters "A," "B," and "C" can be defined as type X, and the extracted character string can be defined as "three characters of type X." Furthermore, as can be seen in the output formats of ID=3 and ID=4, it is possible to define that a fixed character string such as "ID:" is included. The extracted character string for ID=3 is defined as a string consisting of "ID:" followed by four numbers. It is also possible to specify that some characters be added to the extracted string as the processed output string. The output format for ID=4 specifies that the extracted string is processed by adding the string "ID:" before the four numeric characters.

[0050] Furthermore, multiple extraction character strings may be defined for one output format. In this case, it is defined that a portion matching any of the extraction character strings should be extracted from the character string passed from the character string recognition unit 143. Furthermore, it is also possible to define a special combination of numbers, symbols, etc., as the extraction character string. For example, this is used when creating a format that defines the format of a date.

[0051] In the extracted string in the output format of ID=8, "YYYY" and "YY" respectively indicate numeric strings representing the year in the Gregorian calendar using four digits and two digits, "MM" indicates a numeric string representing the month in the calendar using two digits or one digit, and "DD" indicates a numeric string representing the day in the calendar using two digits or one digit. " / ", "-", and "□ (space)" indicate delimiters that separate the year, month, and day. In this case, MM and DD cannot be just any numbers, and combinations that are inappropriate for representing a date, such as MM=02 and DD=31, are determined not to match the extracted string.

[0052] Such a complex output format may be adopted depending on the algorithm that the character extraction unit 144 uses to extract the character string. In addition, in the processed output string of ID=8, it is specified that regardless of which extraction string the string is extracted based on, the extracted string should be processed and output in the "YYYY-MM-DD" format.

[0053] Furthermore, for use in setting character recognition conditions described below, information on characters that may be extracted as specific characters according to the definition of the extracted character string may be included in the output format in association with the extracted character string. For example, the characters that may be extracted are only numbers in the output format of ID=1. In the output formats of ID=5 to 7, they are letters and numbers.

[0054] In addition, since indefinite characters are not specific characters and cannot be detected, they are not included in the "characters that can be extracted". Therefore, even in the output format of ID=2, the only characters that can be extracted are numbers. When the extracted string contains a fixed string, such as ID=3, the characters that make up the fixed string also become "characters that may be extracted." Therefore, in the output format of ID=3, the characters that may be extracted are numbers, as well as the three characters "I," "D," and ":."

[0055] Furthermore, the characters that may be extracted in the output format of ID=8 are numbers, as well as three characters: " / ", "-", and "□ (space)". Since we only need to consider which characters they are, "Y", "M", and "D" in ID=8 can also be considered to be simple numbers.

[0056] Returning to the explanation of Fig. 2, character recognition condition setting unit 148 has a function of setting character recognition conditions that specify which characters are to be identified in character string recognition in character string recognition unit 143, based on the output format set by output format setting unit 147. Character recognition condition setting unit 148 sets the character recognition conditions so as to recognize all characters that may be extracted according to the extraction character string specified by the set output format.

[0057] For example, if the only characters that may be extracted are numbers, the character recognition conditions are set so that at least all numbers can be recognized. To achieve this, for example, a setting is made such that at least all numbers should be compared with character candidate patterns in character string recognition. With such a setting, all numbers contained in an image can be recognized in character string recognition, but characters other than numbers cannot be recognized as specific characters (they may be recognized as undefined characters). On the other hand, if only numbers can be recognized, there is no problem in extracting character strings to be output in character extraction unit 144.

[0058] In addition to numbers, even if characters other than numbers are compared with the character candidate patterns, it is considered that numbers can be recognized, and such a setting is not prevented. Even in this case, there is no problem in extracting the character string to be output in the character extraction unit 144. In other words, the character recognition condition can be set to identify only a group of characters that includes all of the characters specified in the extraction character string in the output format to be used, among the characters (i.e., identifiable characters) for which the reading device 100 holds data to be compared with the character candidate pattern.

[0059] The group of characters to be compared with the character candidate pattern can be specified using commonly used types such as numbers and alphabets, or can be specified by specifying individual characters. Specific characters such as "I", "D", and ":" can be added, or conversely excluded. It can also be specified using a range, such as only A to C among alphabets.

[0060] If multiple output formats are set, the range of the group of characters is determined so as to include all characters that may be extracted according to any of the output formats. For example, when using output formats ID=3 and ID=5, the range of the above group of characters is defined to include all letters, numbers, and ":", which are the union of "I", "D", ":", and numbers that can be extracted according to the output format of ID=3, and letters and numbers that can be extracted according to the output format of ID=5.

[0061] Next, a process for realizing the functions described above will be described with reference to Figures 4 to 7. The process described here is a process according to the first embodiment of the character string reading method of the present invention. First, FIG. 4 shows a flowchart of the process executed by the CPU 121 when the character reading mode is turned on in the reading device 100. In FIG.

[0062] In this process, the CPU 121 first judges whether or not an output format to be used has been set (S11). If an output format has been set in the past process of FIG. 4, this judgement is Yes. On the other hand, if an output format has not been set, the CPU 121 accepts the selection of an output format, acquires the selected output format, and sets the use of that output format (S12). In addition to output formats prepared in advance, newly created ones may be set. The above-described process of step S12 is the process of the output format acquisition procedure, and corresponds to the function of output format setting unit 147.

[0063] Thereafter, the CPU 121 executes a character recognition condition setting process to set character recognition conditions according to the output format to be used (S13). This character recognition condition setting process is, for example, as shown in FIG.

[0064] In the process of Fig. 5, if a number is defined in the extracted character string in any of the output formats to be used (Yes in S31), the CPU 121 first adds a number to the character to be specified, that is, the character to be compared with the character candidate pattern in character string recognition (S32). At the start of the process of Fig. 5, it is assumed that the character to be specified has not been defined.

[0065] Similarly, for each of alphabetical characters, symbols, and delimiters, if the character type is specified in the extracted character string in one of the output formats to be used, the character type is added to the characters to be specified (S33 to S38). Here, the delimiters are three characters, " / ", "-", and space, but are not limited to this. Also, as described above, it may be possible to add or delete characters to or from the characters to be specified not only for each character type but also for each individual character. After the above, CPU 121 creates character recognition conditions that stipulate the characters to be identified, which are determined by the processes up to step S38, and enables them (S39), and then returns to the original process. The above-described process in FIG. 5 is the character recognition condition setting procedure, and corresponds to the function of character recognition condition setting unit 148.

[0066] 4, after step S13 or if the answer is Yes in step S11, the CPU 121 waits until a trigger to start reading is detected (S14). As this trigger, for example, an operation of the operation unit 131 by an operator or a signal transmitted from an external device connected to the communication I / F 124 can be used. When the trigger is detected, the CPU 121 controls the optical unit 110 to capture an image and acquire image data (S15). The process of step S15 is an image acquisition procedure process, and corresponds to the function of the imaging unit 141.

[0067] Next, the CPU 121 performs character string recognition processing on the image data acquired in step S15 (S16). This character string recognition process is, for example, as shown in FIG.

[0068] 6, CPU 121 first detects edges in the image where pixel values ​​change suddenly, and recognizes the area surrounded by the edges of the closed loop as a figure (S51). The figures recognized here include those that form characters and those that do not. The processing of step S51 is a processing of a figure recognition procedure, and corresponds to the function of figure recognition unit 142. Next, the CPU 121 searches for a group of figures arranged in a straight line at a roughly constant height, starting from a position closest to the center of the image (S52). Since the character string to be read is assumed to be a straight line of characters at roughly the same height, the figures that make up such a group are considered to be candidates for figures that make up the arranged characters.

[0069] The height here refers to the direction perpendicular to the arrangement direction of the shapes. Also, when a character is composed of multiple shapes, such as the "i" and ":" shown in Fig. 8B, small shapes may also make up the character. Therefore, the height of each shape does not need to be close to the height of the area, and all shapes in the group do not need to be arranged in a straight line.

[0070] Furthermore, the search is performed starting from positions closer to the center because it is considered that the operator of the reading device 100 usually moves the reading device 100 or the object 101 to be read so that the character string to be read is located at the center of the imaging range and performs reading. By searching starting from positions closer to the center, it is possible to increase the possibility that the character string that is detected first and proceeds to the output character string extraction process in FIG. 7, which will be described later, is the character string that the operator wants to read. However, it is not essential to search starting from positions closer to the center. Conversely, the recognition of figures in step S51 may also be performed starting from positions closer to the center of the image together with the search for groups.

[0071] In any case, if a new group is detected in the search in step S52 (Yes in S53), the process proceeds to step S54 and subsequent steps. Then, the CPU 121 first selects one of the undetermined shapes in the detected group from the edge and sets it as a processing target (S54). As with the writing order of characters, if writing from left to right is expected, the selection should be made from the left edge.

[0072] Next, the CPU 121 compares the characteristics of the target graphic with the characteristics of the character to be identified as defined by the character recognition conditions (S55). This comparison may be performed between images, between features calculated from the images, or both. If the matching rate of the comparison result for a character exceeds a threshold value defined as a sufficient value for identifying the character (Yes in S56), CPU 121 recognizes the graphic to be processed as the character with the highest matching rate among them, and stores the correspondence between the graphic and the character and the matching rate (S57).

[0073] On the other hand, if the answer is No in step S56, the target graphic cannot be recognized as a character. In this case, CPU 121 judges whether or not the width of the entire target graphic will exceed a specified value when the next graphic in the group is combined with the target graphic (S58). The specified value can be calculated, for example, by multiplying the height of the region by the maximum aspect ratio that a standard character can have. If the answer is No in step S58, the graphic currently being processed can also be a character candidate if it is combined with the next graphic, so they are combined and set as the next graphic to be processed (S59), and the process returns to step S55 and is repeated.

[0074] If the answer is Yes in step S58, it is considered that if the graphic to be processed is combined with the next graphic, it will no longer be a character, so in order to decide how to handle the graphic to be processed without combining, it is determined whether the height of the graphic to be processed is within a predetermined range (S60). This predetermined range can be found, for example, by multiplying the height of the region by a value that a standard character can take as the ratio of the character height to the height in the region. The position of the graphic in the height direction within the region may also be taken into consideration. This is because there may be characters with an extremely small height, such as "·".

[0075] If the answer is Yes in step S60, the CPU 121 determines that the figure to be processed is some character, but cannot identify which character it is, and recognizes the figure to be processed as an indefinite character (S61). Since the characters to be identified are narrowed down by the character recognition conditions, it is naturally assumed that there will be characters that cannot be identified. In addition, characters that are not registered in the reading device 100 in the first place will also be characters that cannot be identified.

[0076] On the other hand, if the result in step S60 is No, the CPU 121 determines that the graphic to be processed is not a character, and recognizes it as such (S62). Since the processing for the target graphic is completed by the above-mentioned step S57, S61, or S62, the processing proceeds to step S63, and as long as there is a next graphic in the group (Yes in S63), the processing returns to step S54 and is repeated.

[0077] If the result in step S63 is No, CPU 121 connects each of the characters recognized up to this point in the order of arrangement, and recognizes it as a character string corresponding to the group detected in step S53. Also, if there is a space between characters in the character string that is about the same width as the recognized characters, the space is recognized as a blank character (space) (S64). A space that is about n times the width of a character may be recognized as n blank characters, where n is a natural number. After step S64, that is, when one character string is recognized in the image, the character string recognition process ends once, and the process returns to the original process. If a new group cannot be detected by the search in step S52, the determination in step S53 is No. A predetermined time, a predetermined number of trials, etc. may be used as the criterion. In this case, the character string recognition process also ends, and the process returns to the original process. The processing in steps S52 to S64 is a character string recognition procedure, and corresponds to the function of the character string recognition unit 143. This processing includes a character candidate identification procedure and a character identification procedure.

[0078] Returning to the explanation of FIG. 4, after step S16, if the CPU 121 recognizes a new character string in step S16 (Yes in S17), the CPU 121 performs an output character string extraction process with the recognized character string as the processing target (S18). This output character string extraction process is shown in FIG.

[0079] In the process of FIG. 7, the CPU 121 first detects all portions of the character string (first character string) newly recognized in step S16 that match at least one of the conditions for an extracted character string defined by each output format set in step S12 for each output format set, and enters them in a candidate list for the output character string (second character string) (S81). At this time, if there is no portion that matches the condition in the character string to be processed, no candidates are detected. Conversely, multiple portions may be detected. Also, information on which output format's condition the character string matches is registered in the candidate list in association with the portion that matches the condition, and is output in step S89.

[0080] If there is only one element in the candidate list detected in step S81 (Yes in S82), the CPU 121 adopts that one candidate as the output character string (S89), ends the output character string extraction process, and returns to the original process. Although not essential, from the viewpoint of preventing misreading, it is preferable to set the output format so that Yes in step S82 is obtained when the expected reading is performed.

[0081] On the other hand, if the answer is No in step S82, CPU 121 removes from the candidate list any element that does not have the maximum number of characters (S83). In other words, only the element with the maximum number of characters remains in the candidate list. If there is only one element remaining in the candidate list (Yes in S84), CPU 121 adopts that one candidate as the output string (S89) and returns to the original process.

[0082] By the processes of steps S83 and S84, even if there are portions that match each of a plurality of output formats, it is possible to extract the output character string that matches the output format that matches the first character string over the longest range. An output format that matches the first character string over a long range is considered to be less likely to result in a false match due to a misreading than an output format that matches over a short range, and is also considered to have fewer candidate locations for the output character string. Therefore, by adopting this output format preferentially, it is considered possible to appropriately extract the location that the operator actually wants to read as the output character string.

[0083] On the other hand, if the result of step S84 is No, there are multiple elements with the same number of characters and they cannot be distinguished by the number of characters. Typically, this is the case when there are multiple locations in the first string where the number of characters in the extracted string matches the output format with the largest number of characters. If the result in step S84 is No, CPU 121 removes from the candidate list any elements that do not include the center of the image when viewed in the direction of the arrangement of the characters in the string (S85). In other words, only elements that include the center of the image are left in the candidate list. Then, if there is only one element remaining in the candidate list (Yes in S86), CPU 121 adopts that one candidate as the output string (S89) and returns to the original process. In this way, if there are multiple portions in the first string that match the output format, the portion closest to the center of the image can be extracted as the output string.

[0084] In step S85, for example, if characters are arranged horizontally, if the character string includes the center position of the image when viewed horizontally, it is determined that the character string "includes the center" even if it does not include the center position of the image vertically. When an operator images the character string 102 to be read, it is assumed that the operator images the character string so that the part to be actually read is located at the center of the imaging range, and therefore, by preferentially adopting candidates close to the center of the image, it is possible to appropriately extract the part to be actually read as the output character string, rather than unintended matching parts caused by partings, etc. Since the priority given to character strings close to the center of the entire image is taken into consideration in step S52 of Fig. 6, it is sufficient to consider only the position in the arrangement direction of the characters in S85.

[0085] On the other hand, the result of step S86 is No when there are multiple elements including the center of the image and it is not possible to distinguish between them based on the number of characters or whether they are in the center or not. Typically, for example, the extracted character string is four numeric characters, while the recognized character string includes a portion of five consecutive numeric characters such as "12345", among which multiple portions are detected that are slightly shifted (by one character in this example) such as "1234" and "2345", and all of them include the center of the image. In this case, it is possible to distinguish numerically which portion is closer to the center, but such a subtle difference does not necessarily reflect the operator's intention. Therefore, in the process of FIG. 7, when it is not possible to distinguish based on the criterion of "including the center", it is attempted to distinguish based on a criterion other than position.

[0086] If the result in step S86 is No, CPU 121 removes from the candidate list any element that does not have the highest matching rate during character string recognition (S87). Conversely, only the element with the highest matching rate remains in the candidate list. If only one element remains in the candidate list (Yes in S88), CPU 121 adopts that one candidate as the output character string (S89) and returns to the original process. In this way, if there are multiple portions in the first character string that match the output format, the portion with the highest matching rate can be extracted as the output character string.

[0087] When an element contains multiple characters, the matching rate of the entire element may be determined based on the values ​​of those multiple characters using an appropriate method such as the average value, the maximum value, etc. When comparing the magnitude of the matching rate, a value within a predetermined error range may be considered to be a match, or values ​​may be divided into classes and elements belonging to the same class may be considered to have the same matching rate. Generally, it is thought that the matching rate will be low where misreading has occurred. Therefore, by prioritizing candidates with a high matching rate in this way, it is thought that even in cases where misreading has resulted in multiple unexpected locations that match the output format, it is possible to extract the locations where the characters were correctly recognized as the output string.

[0088] If there are multiple elements that cannot be distinguished by the number of characters, the position in the image, or the matching rate, the result in step S88 will be No. In this case, since a valid output character string cannot be uniquely identified, an extraction error is returned (S90) and the process returns to the original process. If no candidates are detected in step S81, the determinations in steps S82, S84, S86, and S88 all return No. In this case, an extraction error is returned in step S90 and the process returns to the original. The extraction error in this case may be a different error from the error that occurs when multiple elements (candidates) cannot be distinguished. The above-described processing in FIG. 7 is the processing of the character string acquisition procedure, and corresponds to the function of character extraction unit 144.

[0089] 4, after step S18, CPU 121 determines whether extraction in the output character string extraction process was successful (S19). This determination is No if there was an extraction error, and Yes if the output character string was adopted. If the answer is No in step S19, the process returns to step S16, and the character string recognition process is performed again. At this time, the results of the graphic recognition performed in step S51 and the search history performed in step S52 are appropriately utilized. If a new character string is recognized in this process, step S17 becomes Yes, and the output character string extraction process in step S18 is performed again with that character string as the processing target. On the other hand, if the result in step S17 is No, the process returns to step S15 and starts over from imaging. If the number of retries exceeds a predetermined number, a read error may be returned and the process returns to step S14.

[0090] If the answer is Yes in step S19, CPU 121 processes the output character string adopted in the process of Fig. 7 as necessary in accordance with the provisions of the processed output character string in the corresponding output format (S20). This process is a process of the processing procedure, and corresponds to the function of character processing unit 145. Then, CPU 121 outputs the processed output character string data (S21), ends the process for one reading, and returns to step S14 to repeat the process. The process of step S21 is an output procedure process, and corresponds to the function of output unit 146.

[0091] Next, the effects of the first embodiment will be described with reference to FIGS. 8A to 9C. First, as an example, consider the case of reading a four-digit number from an object to be read, which has the characters "id:" followed by a four-digit number ("1234" in the example of FIG. 8A) printed as a string 21, as shown in FIG.

[0092] In this case, when graphic recognition is performed on an image of character string 21 as in step S51 in Fig. 6, if recognition is correct, graphic group 22 composed of the outlines of each character is detected as shown in Fig. 8B. This graphic group 22 is composed of graphics arranged in a straight line within an area of ​​approximately height h as shown in Fig. 8C, and graphic group 22 is detected by the search in step S52 in Fig. 6. 6, character string recognition is performed on this graphic group 22, thereby making it possible to recognize each character constituting the character string 21 and the character string composed of those characters. However, the character string that is actually recognized differs depending on the character recognition conditions used at this time.

[0093] FIG. 8C shows an example of recognition when a character recognition condition that specifies alphabets and numbers is used. In the character recognition process, the two figures (a dot and a line) that make up the "i" on the left side are combined in step S59 to become a single character candidate figure 23a (the target for processing in step S55), and the two figures (two dots) that make up the ":" are similarly combined to become a single character candidate figure 23b. For "d" and "4," the figure surrounded by the outer contour and the figure surrounded by the inner contour are different figures, but here they are recognized as a single character candidate figure.

[0094] Alternatively, if there is another figure contained within another figure (contour), first only the outer figure is processed and compared with the character features in step S55 of Fig. 6, and if there is a character whose matching rate is equal to or greater than a threshold (and is the highest), then both the outer and inner figures can be determined as figures that make up the character. It is also possible to compare the pair of the outer and inner figures with the character features again and update the matching rate (and the correspondence with the character) based on the results.

[0095] In any case, since the matching rate of letters and numbers with the correct characters is considered to exceed the threshold in step S56 of Fig. 6, the characters "i", "d", "1", "2", "3", and "4" are correctly identified. Fig. 8C also shows an example of the matching rate value at this time. On the other hand, since ":" is not included in the characters compared in step S55, step S56 returns No, and it is finally recognized as an undefined character in step S61. In Fig. 8C, the undefined character is shown as "?". Therefore, character string 21 is recognized as the character string "id?1234".

[0096] On the other hand, FIG. 8D shows a recognition example when a character recognition condition for specifying numbers is used. In this case, the characters "1", "2", "3", and "4" are correctly identified, but ":" as well as "i" and "d" are recognized as indefinite characters because they are not included in the characters compared in step S55. Therefore, the character string 21 is recognized as the character string "???1234".

[0097] Here, since the character string to be read is a four-digit number, the output format ID=1 shown in FIG. 3 can be used. In this way, in both cases of Figure 8C and Figure 8D, the only part in the recognized character string that matches the extracted character string of the output format is "1234", so this can be extracted and output as the output character string. Of course, the same applies if symbols are specified as well.

[0098] However, since it can be seen from the set output format that the characters to be actually read are numbers only, if the character recognition condition is set to specify only numbers, the processing load in the character recognition process, particularly in step S55, can be reduced, and character recognition can be performed with less load. Depending on the imaging conditions, an image may be captured that is slightly different from the actual character string 21 due to blurring, overexposure, or shadows during imaging, and the shape of the character string 21 may also be slightly different from the actual character as a result of graphic recognition.

[0099] 8E and 8F are examples of a case where the character "1" is recognized as a figure with a slightly different shape from the actual shape, as shown by reference numeral 23d. This shape is closer to the English character "I" (higher matching rate) than to the character "1." In this case, if the character recognition conditions are set to specify alphabets and numbers, the character "1" will be recognized as "I" as shown in Fig. 8E. In that case, the character string 21 will be recognized as "id?I234" and will not match the output character string of the output format.

[0100] On the other hand, if a character recognition condition is set to specify a number, no comparison with "I" is performed, and the matching rate with "1" is considered to be the highest. If this matching rate exceeds the threshold value in step S56, then "1" will be correctly recognized as shown in Fig. 8F, and "1234" can be extracted and output in the same manner as in Fig. 8C and Fig. 8D.

[0101] In this way, by setting character recognition conditions and limiting the characters that need to be identified as specific characters based on the output format and comparing them with the graphic, it is possible to correctly recognize the characters to be output even when the imaging conditions are not ideal, thereby improving the actual accuracy of character recognition. It should be noted that by limiting the characters to be compared to numbers, it is conceivable that the possibility of misrecognizing, for example, "i" as "1," may increase slightly, as opposed to the case in Fig. 8E. However, in the examples of Fig. 8A to Fig. 8F, even if this misrecognition occurs and the character string "1d?1234" is recognized, there is no effect on the output character string. In cases where such misrecognition may become a problem, by combining it with the function of notifying of the possibility of misrecognition as described in the second to fourth embodiments described below, it is possible to enjoy the effects of improved accuracy and reduced processing load while suppressing the decrease in convenience due to misrecognition.

[0102] Also, if you want to read the four digits in character string 21, distinguishing it from a portion where the four digits are printed alone, you can use the output format with ID=2 in Fig. 3. In this case, when character string 21 is recognized as "???1234" as shown in Fig. 8D and Fig. 8F, the entire string matches the extracted character string and is extracted as the output character string. Then, it can be processed into a character string consisting of only the four digits "1234" in accordance with the processed output character string, and output.

[0103] Even if the character string "1234" alone is simply read, it will not be extracted as an output character string because it does not match the extracted character string since there is no indefinite character string. In this way, even if an alphabetic character or symbol is not recognized as a specific character, by recognizing it as an indefinite character, extraction based on the existence of an alphabetic character or symbol is possible.

[0104] Note that characters such as "i" and ":" are prone to misrecognition and may not be correctly recognized as "undefined characters." Taking this into consideration, it is possible to define the extracted character string as "any one character + 1-2 undefined characters + 4 numeric characters." "any one character" means that it can be either an undefined character or a specific character (for example, "1"). "1-2 undefined characters" takes into consideration the case where ":" is not recognized and the character string 21 is recognized as "1?1234."

[0105] Next, consider the case where it is desired to read both character strings written in two rows on the reading target 101 as shown in Fig. 9A. The top row is three English letters and four numbers, and the bottom row is only four numbers. In this case, set an output format (format A1) in which the extracted character string is specified as "three English letters and four numbers" and an output format (format A2) in which the extracted character string is specified as "four numbers," and then aim at the character strings in the top and bottom rows in turn and give a read start trigger for each, thereby reading the character strings in the top and bottom rows respectively.

[0106] For example, when it is desired to read the character string in the lower section, it is considered normal to perform reading when the vicinity of the position of the code 21 is in the center of the imaging range. In this case, a group of figures corresponding to the character string in the lower section is first extracted in step S52 in Fig. 6, and the character string "5678" recognized in step S54 and thereafter is treated as the first processing target, and the processing in Fig. 7 is performed. In this case, even if both formats A1 and A2 are valid and the recognized character string is compared with both of these in step S81, only one, "5678" indicated by the code 22, will be included in the candidate list for the output character string, and this will be adopted as the output character string.

[0107] On the other hand, when it is desired to read the character string at the top, it is considered normal to perform reading when the vicinity of the position of the code 23 is at the center of the imaging range. In this case, a group of figures corresponding to the character string at the top end is first extracted in step S52 in Fig. 6, and the character string "ABC1234" recognized in step S54 and thereafter is treated as the first processing target, and the processing in Fig. 7 is performed. The candidate list for the output character string contains two items: "ABC1234" of the code 24 corresponding to the format A1, and "1234" of the code 25 corresponding to the format A2. However, "1234" is excluded in the processing in step S83, leaving only one candidate, and "ABC1234" is adopted as the output character string. In this way, by performing the process of step S82 in FIG. 7, even if there is a character string that can be applied to multiple output formats, it is possible to appropriately read the character string in accordance with the operator's intention.

[0108] Next, consider the case where you want to read only a part of a string written on one line as shown in Figure 9B. This string is 3 letters and 4 numbers, but you want to read the 4 numbers. In this case, you can set an output format (format B) in which the extracted string is specified as "4 numbers." Also, it is considered normal to perform reading in a state where the vicinity of the center of the entire character string as indicated by reference numeral 26 or the vicinity of the center of the portion to be read as indicated by reference numeral 27 is located in the center of the imaging range.

[0109] Then, in step S52 in Fig. 6, a group of shapes corresponding to the entire character string is extracted. If the characters are correctly recognized in step S54 and thereafter, the character string "ABC1234" is processed, and the processing in Fig. 7 is performed. Then, since only one character string, "1234" indicated by reference numeral 28, is included in the output character string candidate list that corresponds to format B, this is adopted as the output character string.

[0110] On the other hand, for example, in the character string recognition process of Fig. 6, suppose that the openings of the letter "C" are connected in the image as shown by the dashed line in Fig. 9B, and the letter "C" is erroneously recognized as a "0." In this case, the character string "AB01234" is the subject of the process of Fig. 7, and the candidate list for the output character string will include "1234" indicated by reference number 28 as well as "0123" indicated by reference number 29. Since the number of characters is the same, both remain in step S83, and regardless of whether the center of the image is code 26 or 27, both remain in step S85 because the character string includes the center of the image. However, since the "0" in "0123" is considered to have a low match rate due to misrecognition, "0123" is excluded in step S87, and only "1234" indicated by code 28 remains in the candidate list and is adopted as the output character string.

[0111] In this way, by performing the processing of step S87 in Figure 7, even if a part unintentionally fits into the output format due to misreading, the possibility of that part being adopted as the output string is reduced, and it is expected that reading that matches the operator's intentions will be performed frequently.

[0112] Next, consider the case where you want to read only a part of a string written on one line as shown in Figure 9C. This string is 3 letters + 3 numbers + hyphen + 4 numbers, but you want to read the last 4 numbers. In this case, you can also set Format B, which extracts "4 numbers". In this case, since the written character string is longer than the location to be read, it is considered normal to perform reading in a state where the center of the location to be read, as shown by reference numeral 31, is located at the center of the imaging range.

[0113] Even in this case, a group of shapes corresponding to the entire character string is extracted in step S52 in Fig. 6, and the entire character string is processed to carry out the process in Fig. 7. If the character string is correctly recognized, then the only character string that fits format B and is included in the output character string candidate list is "4567" indicated by the reference numeral 32, and this is adopted as the output character string.

[0114] On the other hand, if the character “C” is misrecognized as a “0” as in the case of FIG. 9B, the candidate list for the output string will include “4567” indicated by reference number 32 as well as “0123” indicated by reference number 33. Since these have the same number of characters, both remain in step S83, but since "0123" does not include the center of the image in the string, it is excluded in step S85. Only "4567" indicated by the reference symbol 32 remains in the candidate list, and it is considered to be adopted as the output string. In this way, by performing the processing of step S85 in Figure 7, it is possible to reduce the possibility that a part that unintentionally fits the output format due to misreading will be adopted as the output string, and it is expected that reading that matches the operator's intention will be performed frequently.

[0115] In the process of Fig. 7, three elements, the number of characters, the matching rate, and the position in the image, are considered when adopting the output character string, but the effect can be obtained even if only some of these are considered. Also, the order in which the elements are considered is preferably the order shown in Fig. 7, but a different order may be used.

[0116] [Second embodiment: Figs. 10 to 14B] Next, a second embodiment of the present invention will be described. The reading device 100 of the second embodiment differs from the first embodiment in that it does not use character recognition conditions and notifies the possibility of misreading when the number of characters (number of digits) of the character string extracted in the output character string extraction process is less than the notification reference character number. Since the other points are the same as in the first embodiment, matters related to the differences will be described and descriptions of the common points will be omitted as appropriate. Furthermore, in the description of the second embodiment, the same symbols as in the first embodiment will be used for parts that are common to or correspond to the configuration of the first embodiment. This also applies to the third and subsequent embodiments.

[0117] First, the functions related to reading the character string 102 provided in the reading device 100 of the second embodiment will be described. FIG. 10 is a functional block diagram showing the functional configuration thereof and corresponding to FIG. As shown in Fig. 10, the reading device 100 of the second embodiment includes a reference character number setting unit 151, a character number determination unit 152, and a notification unit 153, instead of the character recognition condition setting unit 148 in Fig. 2. Also, the character string recognition unit 143 performs character string recognition without using character recognition conditions, which will be described later with reference to Fig. 12.

[0118] The reference character number setting unit 151 has a function of setting a notification reference character number that is used as a criterion for whether or not to notify of the possibility of misreading, based on the output format that is set to be used. The character count determination unit 152 has a function of obtaining the number of characters in the output string extracted by the character extraction unit 144, and if this is less than the set notification standard character count, instructing the notification unit 153 to notify of the possibility of misreading. The notification unit 153 has a function of controlling the notification unit 132 based on an instruction from the character number determination unit 152 to notify the operator of the reading device 100 that a character string may have been misread in the current reading by any means such as light, sound, or display of a message or mark. This notification may be performed in synchronization with the output of the character string by the output unit 146 or the notification of successful reading.

[0119] Next, a process for realizing the functions described above will be described with reference to Figures 11 and 12. The process described here is a process according to a second embodiment of the character string reading method of the present invention. First, FIG. 11 shows a flowchart of the process corresponding to FIG. 4, which is executed by the CPU 121 when the character reading mode is turned on in the reading device 100. In FIG.

[0120] The process in FIG. 11 differs from that in FIG. 4 only in that there is no step S13 after step S12, step S16' is executed instead of step S16, and if the answer is Yes in step S19, steps S101 to S103 are executed before step S20. First, the absence of step S13 corresponds to the fact that character recognition conditions are not used.

[0121] The character string recognition process in step S16' is shown in Fig. 12, and this process is almost the same as the process in Fig. 6, except that step S55' is executed instead of step S55. The only difference is that character recognition conditions are not taken into account. In step S55', the characteristics of the target figure are compared with the characteristics of each character to be identified. The characters to be identified are, for example, all characters for which the reading device 100 has data. However, it is not essential to always compare with all characters, and the characters to be identified can be limited to a part by the operator's settings. Since character recognition conditions are not taken into consideration, it is simply not necessary to dynamically determine the characters to be identified according to the output format to be used.

[0122] 11, if the answer is Yes in step S19, CPU 121 sets the notification reference character number based on the number of characters of the extracted character string defined by each output format used in the output character string extraction process in step S18 (S101). The process in step S101 is a setting procedure process, and corresponds to the function of reference character number setting unit 151.

[0123] Next, when the CPU 121 extracts a character string less than the notification reference character number in the output character extraction process (Yes in S102), it controls the notification unit 132 to notify the operator of the possibility of misreading (S103). The processes of steps S102 and S103 are notification procedure processes, and correspond to the functions of the character number determination unit 152 and the notification unit 153. Thereafter, the process proceeds to step S20. If the result in step S102 is No, the process proceeds to step S20 without issuing a notification.

[0124] The notification of the possibility of misreading performed by the above process is basically intended to notify the possibility that a character string has been output in an unexpected position due to misreading when output is performed according to the output format with the fewer characters of the extracted character string, assuming that multiple output formats are used. However, by setting the notification reference number of characters, it is also possible to notify under more complicated conditions. Next, this point will be explained with reference to Figures 13A to 14B and Tables 1 to 3.

[0125] First, as an example, consider a case where an extracted character string uses two output formats, format C in which "3 letters + 3 numbers" and format D in which "4 numbers" are used. 13A, when an image of the character string "ABC123" arranged within an imaging range 40 of the image is captured and the image is correctly recognized as a character string, the entire character string 41 matches format C and is extracted as an output character string. Also, there is no output character string that matches format D.

[0126] On the other hand, if the openings of the letter "C" are connected and photographed as shown by the dashed line in Fig. 13B, and this is erroneously recognized as a "0," the character string will be recognized as "AB0123." In this case, there is no output character string that matches format C, and character string 42 shown by the dashed line matches format D. Therefore, due to the misreading, a character string that matches format D, which should not exist, is output. However, when a character string such as "1234" is read, it is normal for a character string that matches format D to be output, and the fact that a character string that matches format D is output cannot in itself be considered abnormal.

[0127] Therefore, in the second embodiment, when an output character string that matches (the extracted character string of) format D is extracted, the operator is notified of the possibility of a misreading, and the operator can compare the actually read character string 102 with the output reading result to check whether the reading was performed correctly. If the operator notices the misreading, he or she can easily perform a re-read or correct the reading result by operating the reading device 100 or the data processing device of the output destination.

[0128] Cases like format D mentioned above typically occur when multiple output formats are used and the output is performed according to the output format with fewer characters in the extracted string. Even when the output is performed according to the output format with more characters, misreadings do not occur at all, but the frequency is considered to be low. For example, this is limited to cases where, despite trying to read four numbers, a string containing characters other than those four characters, such as "AB0123," is read and "0" is misread as "C."

[0129] Therefore, in this embodiment, attention is paid to the number of characters in the extracted output character string, and if this number of characters is less than the notification reference number of characters, a notification of the possibility of misreading is made. The notification reference number of characters may be the number of characters in the longest extracted character string of each output format used (6 characters for format C in the above example). If a notification is made based on this standard, a possible misreading will be notified even if a character string such as "1234" is read and a character string that matches format D is normally output. However, in the case of a handheld reading device 100, for example, it is easy for an operator to confirm the read result by comparing the actual character string 102 in response to the notification, and notifying a possible misreading in the case of normal output is not a major problem. What is more important is to be able to discover the misreading in response to the notification and correct it.

[0130] In the above explanation, we have used an example in which the length of the extracted string in the output format is fixed, but the length of the extracted string can be variable. For example, you can specify an extracted string such as "4 to 6 numeric characters." In this case, even if only one output format is used, there are cases where a possible misreading should be reported. For example, even if a five-digit numeric character string such as "12345" is recognized and output as matching the output format, the actual character string being read may be "123456," with the "6" omitted.

[0131] Therefore, when a character string shorter than the maximum number of six characters matches the output format (the extracted character string) and is adopted and extracted as the output character string, it is preferable to notify the possibility of misreading using a similar approach as in the case of format D described above. Therefore, when the length of the extracted character string is variable, it is advisable to perform the process of FIG. 11 using the maximum length of the extracted character string as the notification reference number of characters. Also, for example, it may be the case that the output character string is frequently five characters long when correctly read, and it is preferable to notify only when the character string is four characters. In this case, the notification reference number of characters may be set to a shorter value, five characters, rather than the maximum length itself.

[0132] Also, when an extracted character string is divided into a plurality of intervals, such as the output format (date format) of ID=8 in Fig. 3, a notification reference number of characters may be set for each interval. In this case, in the judgment in step S102 in Fig. 11, a comparison between the output character string and the notification reference number of characters is performed for each interval, and if the number of characters in the output character string is less than the notification reference number in at least one interval, the judgment result may be Yes.

[0133] For example, in the date format of Figure 3, the maximum number of characters in the entire extracted string is 10 characters, such as "YYYY / MM / DD". However, when looking at each section separated by the delimiter " / ", the leftmost section for the year is 4 characters, the middle section for the month is 2 characters, and the rightmost section for the day is 2 characters. These can also be used as the notification standard character count for each section. However, since the year is expected to be written as "YY," it is thought that in many cases it will not be a problem if only the last two digits of the four digits can be read, even if the top two digits are cut off. Therefore, it is possible to set the notification standard character count for the year section at two characters. If we simply consider the year to be two characters and consider the longest character count for the entire extracted string, it will be eight characters. However, if an output string of eight characters is extracted overall, there may be cases where it is desirable to notify of the possibility of a misreading.

[0134] For example, suppose that character strings 43 and 44 shown in Figures 14A and 14B are recognized in the character string recognition process. If spaces are represented by squares, character string 43 is "2020□1□2" and character string 44 is "2020□12." At least character string 43 matches the date format, and if it is allowed that the DD for the day is 0 characters, character string 44 also matches. On the other hand, if the delimiter is a space, it may be difficult to accurately determine the presence or absence of spaces and the number of spaces depending on the angle at which the character string is imaged. Therefore, when character string 43 or character string 44 is recognized, it is difficult to determine which character string is the actual character string. In other words, there is a possibility of misreading, and it is desirable to report this.

[0135] However, since the character string 43 is eight characters long, if the notification reference number of characters in the entire extracted character string is set to eight characters as described above, the possibility of misreading will not be notified. In contrast, if the notification reference number of characters is set for each section as 2 characters / 2 characters / 2 characters, the possibility of misreading can be notified for both character string 43 and character string 44. This is because character string 43 has one character each for the month and day, and character string 44 has zero characters for the day, both of which are less than the notification reference number of characters for the corresponding section.

[0136] In this way, by making it possible to determine the notification reference number of characters for each section of the extracted character string, it is possible to more flexibly control whether or not to notify the possibility of misreading. In addition, as shown in the following Tables 1 to 3, there may be output formats in which the extracted character string has a variable number of characters in each of multiple sections. There may also be cases in which output formats with different numbers of sections are used simultaneously. Below, we will explain how to determine the notification reference number of characters in these cases.

[0137] [Table 1]

[0138] When using output formats No. 1 and No. 2 in Table 1, with "-" as the delimiter, the maximum number of characters for each section is as shown in the second line of the table. Notification standard character count example #1 simply takes the maximum number of characters for each section among the output formats. The third section of No. 1 does not exist, so it is set to 0 characters.

[0139] However, if the possibility of misreading was notified according to this notification standard number of characters, the notification would always be made except when a character string with the maximum number of characters matching output format No. 2 was read, which is thought to be too frequent. On the other hand, if there is only one output format with characters in the third section, the operator would likely pay more attention than usual to whether the reading was successful when reading a character string with characters in the third section, and would likely pay particular attention to the number of characters in the third section in the read result.

[0140] Therefore, for the third section, i.e., the section in which only one output format specifies characters, it is not necessary to set the notification reference number of characters. Notification reference number example #2 is an example of this. In this case, the judgment of step S102 in FIG. 11 is not performed for the third section, and notification of the possibility of misreading is not performed based on the small number of characters in the third section. By doing so, the frequency of notification of the possibility of misreading can be kept within a reasonable range.

[0141] [Table 2]

[0142] In the case of Table 2, if the notification standard number of characters is set to four by taking the maximum number of characters among the output formats for the third section, the possibility of misreading will be notified no matter what output character string is extracted according to output format No. 1 or No. 2. Therefore, in the case of Table 2, the appropriateness of not setting a notification standard number of characters for the third section, i.e., the section in which only one output format specifies characters, is higher than in the case of Table 1.

[0143] [Table 3]

[0144] In the case of Table 3, multiple output formats define characters in all sections. Therefore, in this case, it is preferable to determine the notification reference character count by taking the maximum number of characters in each output format in all sections. In this way, in the case of Table 3, the possibility of misreading will be notified no matter what output character string is extracted according to any of the output formats No. 1 to No. 3. However, the output format settings such as those in Table 3 make misreading more likely to occur, and this can be seen as an appropriate notification that reflects this fact.

[0145] As described above, the reading device 100 of this embodiment is configured to notify the operator of the possibility of misreading if the output character string extracted by the character extraction unit 144 is less than the notification reference number of characters, and can therefore notify the operator of the possibility of misreading at an appropriate frequency through simple processing.

[0146] [Third embodiment: Figs. 15 to 19D] Next, a third embodiment of the present invention will be described. The reading device 100 of the third embodiment differs from the first embodiment in that it does not use character recognition conditions and that it notifies the possibility of misreading when a figure that does not constitute a character is present inside or near a character string recognized by character string recognition. Since the other points are the same as those of the first embodiment, only matters related to the differences will be described, and descriptions of the common points will be omitted as appropriate.

[0147] First, the functions related to reading the character string 102 provided in the reading device 100 of the third embodiment will be described. FIG. 15 is a functional block diagram showing the functional configuration thereof and corresponding to FIG. As shown in Fig. 15, the reading device 100 of the third embodiment includes a figure position determination unit 161 and a notification unit 162 instead of the character recognition condition setting unit 148 of Fig. 2. Also, the character string recognition unit 143 performs character string recognition without using character recognition conditions, which is the same as in the second embodiment.

[0148] The graphic position determination unit 161 acquires information on the graphic recognized by the graphic recognition unit 142, the character string (first character string) recognized by the character string recognition unit 143, and the output character string (second character string) extracted from the first character string by the character extraction unit 144, and has a function of instructing the notification unit 162 to notify of the possibility of misreading if it determines, based on this information, that there is a graphic that does not constitute a character inside or near the second character string. The function of the notification unit 162 is similar to that of the notification unit 153 in the second embodiment.

[0149] Here, a figure that does not constitute a character is, for example, a figure that is not included in the group detected in step S53 or that is recognized as not being a character in step S62 in the character string recognition process in Fig. 6. It may also be said that, among the figures recognized in step S51, a figure is a figure that is not recognized as a specific character or an undefined character in step S57 or S61.

[0150] 16A to 16D show examples of such figures that do not form characters. 16A to 16D are examples in which a character string 53 is recognized by character string recognition processing in an image 50 captured by the imaging unit 141, and is extracted as is as an output character string. The specific characters that make up the character string 53 vary from figure to figure. In the character string 53, individual characters 51 made up of figures are shown surrounded by solid lines, including those without symbols. Blank characters 52 recognized in the spaces between characters are shown by dashed lines.

[0151] In addition to these, image 50 may contain figures that do not form characters, as indicated by reference numeral 55. The positions at which figure 55 may exist and the sizes that figure 55 may take are various. In the examples of Figures 16A and 16B, figure 55 is located near character string 53, and in the examples of Figures 16C and 16D, figure 55 is located inside character string 53. In addition, when notifying of the possibility of misreading, there is little need to distinguish whether the figure 55 is inside the character string or nearby. In the character string recognition process, if the figure 55 overlaps even partially with an area in which the group of figures detected in step S53 are arranged, it may be considered that the figure 55 is inside the character string 53 existing in that area.

[0152] Such a figure 55 that does not form a character may be generated by dust attached to the object 101 to be read, a pattern or a ruled line on the object 101 to be read, a shadow or unevenness formed on the object 101 to be read, blown-out highlights during imaging, etc. Regardless of the cause, when such a figure 55 is present near the recognized character string 53, it suggests the possibility that the presence of the figure 55 may cause an obstacle to the recognition of the characters that form the character string 53, that a part of the existing character may not be recognized as a figure, and the rest may be recognized as a figure 55 that does not form a character, or that multiple characters may be recognized as a single figure and not recognized as a character. All of these are considered to lead to misreading.

[0153] In particular, if there is a graphic figure 55 that does not constitute a character inside or near the output character string extracted by the character extraction unit 144, there is a possibility that a misreading has occurred in a location that is directly reflected in the output, and there is a high risk that an incorrect output will be produced as the reading result. Therefore, in the third embodiment, if there is a graphic figure 55 that does not constitute a character inside or near the output character string extracted by the character extraction unit 144, the possibility of misreading is notified, thereby appropriately drawing the operator's attention.

[0154] Next, a process for realizing the above-described functions will be described using Figures 17 and 18, with reference to Figures 19A to 19D as well. The process described here is a process according to the third embodiment of the character string reading method of the present invention. First, FIG. 17 shows a flowchart of the process corresponding to FIG. 4, which is executed by the CPU 121 when the character reading mode is turned on in the reading device 100.

[0155] The process in FIG. 17 differs from that in FIG. 4 only in that there is no step S13 after step S12, step S16' is executed instead of step S16, and if the answer is Yes in step S19, steps S121 to S123 are executed before step S20. Among these, the absence of step S13 and the execution of step S16' instead of step S16 are the same as in the case of FIG. 11 described in the second embodiment.

[0156] If the answer is Yes in step S19, the CPU 121 executes a feature presence determination process (S121). This process is, for example, as shown in FIG. In the graphic existence determination process of FIG. 18, the CPU 121 first adds a graphic that constitutes an undefined character to graphics that do not constitute characters for an undefined character that exists consecutively from the end of the character string among the character strings processed in the output character string extraction process of step S17 and is not included in the output character string adopted in step S89 of FIG. 7 (S141).

[0157] A figure constituting an indefinite character is basically considered to be a figure constituting a character. In particular, as shown by reference numeral 58 in Fig. 19C, an indefinite character recognized at a position sandwiched between specified characters is highly likely to be some character that constitutes a series of characters including the specified characters, but is simply not a specified character. On the other hand, as shown by reference numeral 57 in Fig. 19C, an indefinite character recognized at the end of a character string may not constitute a continuous character string including a specified character, as compared with the case of reference numeral 58, and the possibility that the character was recognized as an indefinite character because dust, patterns, etc. happened to match the size of the character cannot be ignored. This applies not only to the end of a character string, but also to all indefinite characters that exist consecutively from the end and are not sandwiched between specified characters. The three indefinite characters from the left shown by reference numeral 57 in Fig. 19B fall into this category.

[0158] Therefore, in the process of Fig. 18, such an indefinite character is regarded as a figure that does not actually constitute a character, and the presence of a figure is judged. At this time, if an indefinite character is composed of multiple figures, it is possible to either treat each of the figures as a separate figure and proceed to the following process, or to treat the multiple figures together as a single figure and proceed to the following process. However, if an undefined character is specified in the extracted character string of the output format, the extracted output character string will also contain an undefined character. The undefined character included in the output character string is a character whose existence was expected in advance, and is not considered to have been recognized as a result of misreading. Therefore, in step S141, figures that constitute such undefined characters are not considered to be included in figures that do not constitute characters.

[0159] Next, the CPU 121 identifies non-character-constituting figures that are present inside or near the character string to be processed (S142). For example, a figure that is at least partially within a predetermined distance from any character in the character string may be identified as a figure that is inside or near the character string. The number of the predetermined distance may be determined from experiments or empirical rules to an appropriate distance that is not negligible in terms of the possibility of affecting character recognition of the character string to be processed. For example, the number may be set based on the maximum character spacing in the character string to be read. As described above, there is little need to distinguish between inside and near.

[0160] Then, CPU 121 excludes small figures whose height (h direction in FIG. 8) size is equal to or smaller than threshold value T1 (<1) times the size h of the output character string from the figures identified in step S142 (S143). The height size is the height size of the output character string. Since figures smaller than the dots that make up a character, such as those shown by reference numeral 61 in Fig. 19D, are considered to have little effect on character recognition even if they are present without making up a character, it is advisable to determine the value of T1 so as to at least exclude such figures. It is also possible to determine the value of T1 so that the threshold value is a size somewhat smaller than the smallest dot contained in a character, depending on the font of the character to be read, etc. Alternatively, it is possible to set the value of T1 to 1 / 2. To allow for some leeway, a slightly smaller value such as 1 / 3 may be used.

[0161] Furthermore, the CPU 121 also excludes from the graphics identified in step S142 graphics whose contrast against the background differs by a predetermined threshold or more compared to the graphics constituting the output character string, and graphics whose edge sharpness differs by a predetermined threshold or more (S144, S145). These figures are also considered to have little effect on character recognition if their characteristics are significantly different from those of the figures that make up characters, and there is nothing particularly strange about them being classified as figures other than characters, so they are excluded. Each threshold value can be determined based on the degree to which differences in contrast and edge sharpness can cause negligible effects on character recognition.

[0162] Next, CPU 121 may exclude large figures whose height size is equal to or greater than threshold value T2 (>1) times the size h of the output character string from the figures identified in step S142 (S146). The height size is the height size of the output character string. A figure with a large height is, as shown in Fig. 19D by reference numerals 54a and 54b, a case where there are multiple character strings located close to each other in the height direction, and multiple characters adjacent to each other in the height direction are connected and recognized as a single figure, as shown by reference numerals 59a and 59b. If such a figure exists, there is a high possibility that a misreading has occurred.

[0163] On the other hand, there may be figures such as those shown by reference numeral 60 that are assumed to be ruled lines or patterns. In many cases, such figures, when placed near characters, are more likely to cause misreading than the figures shown by reference numerals 59a and 59b. However, for example, when the object 101 to be read has a linear or mesh pattern, if a figure such as that shown by the reference numeral 60 is used as a trigger for a misreading possibility notification, the notification may be issued very frequently. In such a case, it may be possible to keep the notification frequency within a reasonable range by excluding large figures.

[0164] The value of T2 used in this case may be, for example, 2. This is because it is considered rare for three or more characters to be recognized as connected, and the size in the height direction of figures such as the symbols 59a and 59b is generally less than twice the height of the character string. The operator may be allowed to arbitrarily set whether or not to notify the large figure, i.e., whether or not to perform the process of step S146. This also applies to each of the processes of steps S143 to S145.

[0165] In any case, if the figure specified in step S142 remains at the time of step S147, CPU 121 decides to notify the possibility of misreading (S148) and returns to the original process. If not, CPU 121 returns to the original process as it is.

[0166] Returning to the explanation of Fig. 17, after the figure existence determination process of Fig. 18, if the CPU 121 determines to notify the operator of the possibility of misreading in the process of Fig. 18 (Yes in S122), it controls the notification unit 132 to notify the operator of the possibility of misreading (S123). Thereafter, the process proceeds to step S20. If the result of step S122 is No, the process proceeds to step S20 without issuing a notification. The processing in steps S121 to S123 is a notification procedure, and corresponds to the functions of the figure position determination unit 161 and the notification unit 162.

[0167] By the above process, when the possibility of misreading is recognized based on the results of the graphic recognition and character string recognition, this can be appropriately notified to the operator. In the process described here, a notification is given when a graphic that does not constitute a character is present inside or near the output character string extracted in the output character string extraction process. However, a notification may also be given when a graphic that does not constitute a character is present inside or near the character string recognized in the character string recognition process.

[0168] Although it is the output character string that is ultimately reflected in the output, if a character is misrecognized during the character string recognition process in character string recognition unit 143 even in a location other than the output character string, the output character string cannot be properly extracted, and the final output may also be erroneous.

[0169] For example, in Fig. 19A, consider a case where code 54 is a character string recognized by character string recognition processing, and code 53 is an output character string extracted from that. In this case, if we consider only the inside or vicinity of output character string 53, only figure 55 is a figure that is inside or nearby and does not constitute a character, but if we consider the inside or vicinity of character string 54, in addition to figure 55, figure 56 also corresponds to a figure that is inside or nearby and does not constitute a character. If any graphic elements that do not constitute characters are present within this range, the possibility of misreading may also be notified.

[0170] It is also possible to omit some or all of the processes in steps S143 to S146 in Fig. 18. Since the figures excluded in steps S143 to S146 do not have no effect on character recognition, such figures may be used as triggers for notifying the possibility of misreading without being excluded.

[0171] Also, if an indefinite character at the end of a character string is always treated as a "figure not constituting a character," the frequency of misreading possibility notifications may become too high. Therefore, an indefinite character may be treated as a figure constituting a character, except for adjacent characters recognized as one figure in a connected state, such as those shown by reference numerals 59a and 59b in FIG. 19D. For example, if the height size of an indefinite character is approximately equal to the size of a character constituting a character string (if the size difference is equal to or less than a predetermined threshold), it may be treated as a figure constituting a character.

[0172] [Fourth embodiment: Figs. 20 to 22] Next, a fourth embodiment of the present invention will be described. The reading device 100 of the fourth embodiment differs from the first embodiment in that it notifies the possibility of misreading when there are multiple elements in the candidate list at a certain stage during the output character string extraction process. Since the other points are the same as the first embodiment, only matters related to the differences will be described, and descriptions of the common points will be omitted as appropriate.

[0173] First, the functions related to reading the character string 102 provided in the reading device 100 of the fourth embodiment will be described. FIG. 20 is a functional block diagram showing the functional configuration thereof and corresponds to FIG. As shown in FIG. 20, the reading device 100 of the fourth embodiment includes a notification necessity determining unit 163 and a notification unit 162 in addition to the components shown in FIG. The notification necessity determination unit 163 has a function of receiving information indicating whether or not a notification of the possibility of misreading is necessary from the character extraction unit 144, and instructing the notification unit 162 to notify of the possibility of misreading if a notification is necessary. The function of the notification unit 162 is the same as in the third embodiment.

[0174] Next, a process for realizing the above functions will be described with reference to Figures 21 and 22. The process described here is a process according to a fourth embodiment of the character string reading method of the present invention. First, FIG. 21 shows a flowchart of the process corresponding to FIG. 4, which is executed by the CPU 121 when the character reading mode is turned on in the reading device 100.

[0175] The process in FIG. 21 differs from that in FIG. 4 only in that step S18' is executed instead of step S18, and in that steps S122 and S123 are executed before step S20 if the result of step S19 is Yes. The output character string extraction process of step S18' is shown in FIG. 22, and this process is obtained by adding steps SA1, SA2, SB, and SC indicated by dashed lines to the process of FIG.

[0176] Among these, step SB is a process for determining whether to notify the possibility of misreading when it is not possible to narrow down the output character string candidates to one based on the number of characters and an attempt is made to narrow down the candidates based on whether they include the center of the image. Similarly, step SC is a process for determining whether to notify the possibility of misreading when an attempt is made to narrow down the candidates based on the matching rate.

[0177] 9B and 9C in the first embodiment, when a misreading occurs, it is likely that the candidates must be narrowed down to one based on these criteria. In addition, even if character string recognition is accurate, if the candidates are narrowed down based on whether the center of the image is included or not, or on the matching rate, which of the multiple candidates is adopted as the output character string is relatively likely to vary depending on the position and accuracy of the image capture, so it can be said that there is a non-negligible possibility that the output character string intended by the operator will not be obtained. Steps SB and SC are processes provided to notify the operator of the possibility of misreading in such a case and have him / her carefully check the read result.

[0178] Furthermore, steps SA1 and SA2 are processes for deciding to notify of the possibility of misreading when multiple candidates are found in the initial detection in step S81, even though only one output format has been set. When multiple output formats are set, the settings are often made assuming that output character string candidates are detected for each of the multiple output formats, and then narrowed down to one based on the number of characters, as in the case of reading the character string in the upper row described in the example of Figure 9A. However, if multiple candidates are detected in step S81 even though there is only one output format, the possibility cannot be ignored that this is due to the occurrence of an unexpected event, such as a misreading, as described in the examples of Figures 9B and 9C.

[0179] Steps SA1 and SA2 are processes provided to notify the operator of the possibility of misreading even in such a case, and to encourage the operator to carefully check the read result. The set of steps SA1 and SA2 and steps SB and SC may be provided only partially.

[0180] Furthermore, the processing of steps S122 and S123 in FIG. 21 is similar to that of steps S122 and S123 in FIG. 17, with the only difference being that the decision as to whether or not to notify of the possibility of misreading is made based on whether or not it has been decided in the processing of step S18' in FIG. 22 to notify of the possibility of misreading.

[0181] By the above process, when the possibility of misreading is recognized based on the detection status and narrowing down status of output character string candidates, this can be appropriately notified to the operator. It should be noted that in the process of Fig. 22, the decision to notify of the possibility of misreading made in the past does not need to be reset at the start of the process. If an extraction error occurs, the process of Fig. 22 may be performed again with the next recognized character string as the processing target, but even in such a case, it is considered that misreading is likely to occur, so in the second and subsequent processes of Fig. 22, it is useful to notify of the possibility of misreading even if the candidates for the output character string have been narrowed down to one at the stage of step S82. However, this is not essential, and the decision to notify may be reset at the start of the processing in Fig. 22. In any case, after the notification is performed in step S123, the decision to notify is reset.

[0182] 21 includes step S13, and character recognition conditions are used in the fourth embodiment, but this is not essential. As in the second and third embodiments, character recognition conditions may not be used, step S13 may not be executed, and the character string recognition process of FIG. 12 may be performed in step S16' instead of step S16.

[0183] [Fifth embodiment: Figs. 23 and 24] Next, a fifth embodiment of the present invention will be described. The reading device 100 of the fifth embodiment has the functions of character string recognition using character recognition conditions, which have been described in the first to third embodiments, notification of the possibility of misreading based on the number of characters in the output character string extracted by the character extraction unit 144, and notification of the possibility of misreading when a figure that does not constitute a character is present inside or near the output character string. Therefore, the description will be given while quoting the descriptions of each embodiment.

[0184] First, the functions related to reading the character string 102 provided in the reading device 100 of the fifth embodiment will be described. FIG. 23 is a functional block diagram showing the functional configuration thereof and corresponds to FIG. As shown in Fig. 23, the reading device 100 of the fifth embodiment includes, in addition to the units shown in Fig. 2, a reference character number setting unit 151 and a character number determination unit 152 shown in Fig. 10, and a figure position determination unit 161 and a notification unit 162 shown in Fig. 15. The functions of the units are the same as those shown in these figures, so detailed explanations will be omitted. The function of the notification unit 153 in Fig. 10 can be realized by the notification unit 162.

[0185] Next, a process for realizing the above functions will be described with reference to Fig. 24. The process described here is a process according to a fifth embodiment of the character string reading method of the present invention. FIG. 24 shows a flowchart of the process corresponding to FIG. 4, which is executed by the CPU 121 when the character reading mode is turned on in the reading device 100. In FIG.

[0186] The processing in Figure 24 is the same as that in Figure 4 except that steps S101 to S103 similar to those in Figure 11 are added (S123 is the same processing as S103), and further, if the answer is No in step S102, steps S121 to S123 similar to those in Figure 17 are added. By carrying out the above processing, it is possible to realize all of the functions described in the first to third embodiments, and thus it is possible to realize all of the effects of those functions. Moreover, by performing the process of FIG. 22 as the output character string extraction process of step S18, it is possible to further combine the function of the fourth embodiment and realize the effect thereof.

[0187] In addition, for example, by combining the use of the character recognition conditions of the first embodiment with the notification of the possibility of misreading when a non-character-constituting figure is present within or near a recognized character string of the third embodiment, the following additional effects can be obtained. First, consider the case where an output format is set with the extracted string being "four numeric characters" with the intention of reading a string of only four numeric characters. In this case, if the string "BOOING" is correctly recognized, it will not match the output format, but if the "BOOI" portion is misrecognized as "8001", for example, the string will be recognized as "8001NG", and the "8001" portion will match the output format and be extracted and output as the output string, resulting in a misread. If there are no other shapes that do not constitute characters, the possibility of a misread will not be reported.

[0188] Here, if "numbers only" is set as the character recognition condition, even if the above-mentioned misrecognition occurs, the character string will be recognized as "8001??", and since there is an indefinite character that is recognized as a figure that does not constitute a character next to the output character string "8001," the possibility of misreading is notified and the operator can be alerted. In other words, by appropriately setting the character recognition conditions so as not to recognize characters that are not necessary for reading, in cases where an unintentional misrecognition results in a location that matches the output format, the possibility that an undefined character is present in the vicinity can be increased, making it possible to make even more meaningful use of the function of notifying of the possibility of misreading when there are figures that do not constitute characters.

[0189] [Modifications] This concludes the explanation of the embodiment, but in this invention, the specific configuration of the device, the specific processing procedures, the data format including the output format, the specific data and character string contents, the types of characters handled, etc. are not limited to those described in the embodiment. For example, when reading alphabets other than English, or Japanese hiragana, katakana, and kanji, the functions of the above-described embodiments can be similarly demonstrated. In addition, in the fourth embodiment, a reading device 100 having all of the functions described in the first, second, and third embodiments has been described, but a reading device 100 having the functions of any two of these embodiments can also be configured in the same manner. Furthermore, the functions of the reading device 100 in each of the above-described embodiments may be distributed among a plurality of devices, and for example, some of the functions shown in FIG. 2 may be provided in a connected data processing device.

[0190] Moreover, it is not essential to acquire an image of the reading target 101 by imaging. The above-described embodiment can be applied even when an image is acquired by scanning using a flatbed scanner, a handy scanner that is slid over the reading target by hand, or the like, or when an image is acquired by any other method.

[0191] Furthermore, an embodiment of the program of the present invention is a program for causing one computer, or multiple computers working in cooperation, to control the required hardware and realize the functions of the reading device 100 in the above-mentioned embodiment, or to execute the processing described in the above-mentioned embodiment.

[0192] Such a program may be stored in a ROM or other non-volatile storage medium (flash memory, EEPROM, etc.) that is included in the computer from the beginning. It may also be provided by recording it on any non-volatile recording medium such as a memory card, CD, DVD, or Blu-ray disc. Furthermore, it may be downloaded from an external device connected to a network and installed on a computer to be executed.

[0193] Furthermore, it goes without saying that the configurations of the embodiments and modified examples described above can be implemented in any combination as long as they are not mutually inconsistent, and that only some of them can be extracted and implemented. [Explanation of symbols]

[0194] 40...imaging range, 50...image, 100...reading device, 101...reading target, 102...character string, 110...optical unit, 111...imaging sensor, 112...lens, 113...pulse LED, 120...control unit, 131...operation unit, 132...notification unit, 133...display unit, 141...imaging unit, 142...figure recognition unit, 143...character string recognition unit, 144...character extraction unit, 145...character processing unit, 146...output unit, 151...reference character number setting unit, 152...character number determination unit, 153, 162...notification unit, 161...figure position determination unit

Claims

1. A character string reading method executed by a character string reading device, comprising: an image acquisition step of acquiring an image of an object to be read by an image acquisition unit; a format acquisition step for acquiring a format of a character string to be read and output from the image; a character recognition condition setting step of setting, as a character recognition condition, a character recognition condition for identifying only a group of characters including all characters defined in the acquired format among characters that can be identified by the character string reading device; a character string recognition step of recognizing a character string in the acquired image in accordance with the character recognition conditions that have been set; and a character string acquisition step of acquiring, from the first character string acquired by the recognition, a second character string that matches the acquired format for output.

2. The character string reading method according to claim 1, The character string recognition step includes: a pattern recognition step for recognizing a pattern contained in the image; a character candidate identifying step of identifying a character candidate formed by one or a combination of a plurality of recognized figures from the figures; a character identification step of identifying which character candidate the identified character candidate is based on a matching rate obtained by comparing the characteristics of the identified character candidate with the characteristics of each of the group of characters, and recognizing a character candidate that is not identified as any of the characters as an indefinite character; A character string reading method, comprising the step of recognizing the specified characters and the unspecified characters, which are arranged consecutively in a generally straight line, as a character string composed of those characters.

3. The character string reading method according to claim 1, a character string acquisition step of acquiring a character string from among the first character string obtained by the recognition, the character string acquisition step of acquiring a character string having a highest match rate with character features recognized in the character string recognition step as the second character string.

4. The character string reading method according to claim 3, A character string reading method comprising a notification step of notifying the possibility of misreading when a plurality of portions that match the format are found in the character string acquisition step.

5. The character string reading method according to claim 1, a character string obtaining step of obtaining a character string from among the first character string obtained by the recognition, the character string obtaining step being a step of obtaining a character string that includes a center of the obtained image when viewed in a direction in which characters are arranged in the first character string, as the second character string.

6. The character string reading method according to claim 5, A character string reading method comprising a notification step of notifying the possibility of misreading when a plurality of portions that match the format are found in the character string acquisition step.

7. The character string reading method according to claim 1, In the format acquisition step, a plurality of formats of a character string to be output are acquired; In the character recognition condition setting step, a character recognition condition is set to identify only a group of characters that includes all characters defined in any one of the acquired multiple formats; a character string acquisition step of acquiring a portion of the first character string obtained by the recognition that matches at least one of the acquired formats as a candidate for the second character string.

8. The character string reading method according to claim 7, a character string acquisition step of acquiring, among the acquired candidates, a candidate that is detected to match the format over the longest number of characters during the acquisition, as the second character string.

9. The character string reading method according to claim 1, The format may include rules for processing character strings, A character string reading method comprising the steps of: if the acquired format includes the processing rule, processing the second character string in accordance with the processing rule and outputting the processed character string.

10. A character string reading device, an image acquisition unit that acquires an image of an object to be read; a format acquisition unit that acquires a format of a character string to be read and output from the image; a character recognition condition setting unit that sets, as a character recognition condition, a character group including all characters defined in the acquired format among characters that the character string reading device can recognize; a character string recognition unit that recognizes a character string in the acquired image according to the set character recognition conditions; a character string acquisition unit that acquires, from the first character string acquired by the recognition, a second character string that matches the acquired format for output.

11. The character string reader according to claim 10, The character string recognition unit includes: a pattern recognition unit for recognizing patterns included in the image; a character candidate specification unit that specifies a character candidate formed by one or a combination of a plurality of recognized figures from among the figures; a character specification unit that specifies which character the character candidate is based on a matching rate obtained by comparing the characteristics of the specified character candidate with the characteristics of each of the group of characters, and recognizes a character candidate that is not specified as any character as an indefinite character, A character string reading device that recognizes the specified characters and the unspecified characters, which are arranged consecutively in a substantially straight line, as a character string composed of those characters.

12. The character string reader according to claim 10, When a plurality of portions of the first character string obtained by the recognition that match the acquired format are found, the character string acquisition unit acquires, among those portions, the portion that has the highest match rate with character features recognized by the character string recognition unit as the second character string.

13. The character string reader according to claim 12, A character string reading device comprising: a notification unit that notifies the user of the possibility of misreading when the character string acquisition unit finds multiple locations that match the format.

14. The character string reader according to claim 10, When the character string extraction unit finds multiple portions of the first character string obtained by the recognition that match the acquired format, it acquires as the second character string a portion of the first character string that includes the center of the acquired image when viewed in the direction of character arrangement in the first character string.

15. The character string reader according to claim 14, A character string reading device comprising: a notification unit that notifies the user of the possibility of misreading when the character string acquisition unit finds multiple locations that match the format.

16. The character string reader according to claim 10, the format acquisition unit acquires a plurality of formats of a character string to be output; the character recognition condition setting unit sets, as a character recognition condition, a character recognition condition that identifies only a group of characters that includes all characters defined in any one of the acquired multiple formats; a character string acquisition unit that acquires, from the first character string obtained by the recognition, a portion that matches at least one of the acquired formats as a candidate for the second character string.

17. The character string reader according to claim 16, a character string acquisition unit that acquires, from among the acquired candidates, a candidate that is detected to match the format over the longest number of characters during the acquisition, as the second character string.

18. The character string reader according to claim 10, The format may include rules for processing character strings, a processing unit configured to process the second character string in accordance with the processing rule when the acquired format includes the processing rule, and to output the processed character string,

19. A program for causing a processor that controls the image acquisition unit to execute the character string reading method according to claim 1 .

20. an image acquisition step of acquiring an image of an object to be read by an image acquisition unit; a format acquisition step of acquiring one or more formats of character strings to be read and output from the image; a character string recognition step of recognizing a character string in the acquired image; a character string acquisition step of acquiring, for output, a second character string at a portion of the first character string acquired by the recognition that matches a first format, which is one of the one or more acquired formats; a notification step of notifying the possibility of misreading when a second character string having a number of characters less than a notification reference number of characters is acquired in the character string acquisition step.

21. The character string reading method according to claim 20, A character string reading method comprising the steps of: determining the notification reference number of characters based on a maximum number of characters in a character string defined by the one or more acquired formats.

22. The character string reading method according to claim 20, A character string reading method comprising the step of determining a maximum number of characters in a character string defined by the one or more acquired formats as the notification reference number of characters.

23. The character string reading method according to claim 20, At least one of the one or more acquired formats specifies a character string divided into a plurality of sections, and the notification reference number of characters is determined for each of the sections; the notification step is a step of notifying that there is a possibility of misreading when a second character string is acquired in at least one section in which the number of characters in the section is less than a notification reference character number for the section in the character string acquisition step.

24. The character string reading method according to claim 23, A character string reading method comprising: a setting step of determining the notification reference number of characters for each section based on the maximum number of characters in each section of a character string defined by the one or more acquired formats.

25. The character string reading method according to claim 23, A character string reading method comprising the steps of: determining a maximum number of characters in each section of a character string defined by the one or more acquired formats as the notification reference character number for each section.

26. 21. The character string reading method according to claim 20, which is executed by a character string reading device, comprising: a character recognition condition setting step of setting, as a character recognition condition, a character recognition condition for identifying only a group of characters including all of the characters defined in the one or more acquired formats, among the characters that the character string reading device can identify; A character string reading method, wherein in the character string recognition step, the character string in the acquired image is recognized in accordance with the character recognition conditions that have been set.

27. an image acquisition unit that acquires an image of an object to be read; a format acquisition unit that acquires one or more formats of character strings to be read and output from the image; a character recognition unit that recognizes character strings in the acquired image; a character string acquisition unit that acquires, from the first character string acquired by the recognition, a second character string at a portion that matches a first format, which is one of the one or more acquired formats, for output; a notification unit that notifies the user that there is a possibility of misreading when the character string acquisition unit acquires a second character string having a number of characters less than a notification reference number of characters.

28. 28. The character string reader according to claim 27, A character string reading device comprising: a setting unit that determines the notification reference number of characters based on a maximum number of characters in a character string defined by the one or more acquired formats.

29. 28. The character string reader according to claim 27, A character string reading device comprising: a setting unit that determines a maximum number of characters in a character string defined by the one or more acquired formats as the notification reference number of characters.

30. 28. The character string reader according to claim 27, At least one of the one or more acquired formats specifies a character string divided into a plurality of sections, and the notification reference number of characters is determined for each of the sections; The notification unit notifies of a possibility of misreading when the character string acquisition unit acquires a second character string in at least one section in which the number of characters in the section is less than a notification reference character number for the section.

31. 31. The character string reader according to claim 30, a setting unit that determines the notification reference number of characters for each section based on a maximum number of characters in each section of a string defined by the one or more acquired formats.

32. 31. The character string reader according to claim 30, a setting unit that sets a maximum number of characters in each section of a character string defined by the one or more acquired formats as the notification reference number of characters for each section.

33. 28. The character string reader according to claim 27, a character recognition condition setting unit that sets, as a character recognition condition, a character recognition condition that specifies only a group of characters that includes all of the characters defined in the one or more acquired formats, among characters that the character string reading device can specify; a character string recognition unit that recognizes a character string in the acquired image according to the character recognition conditions that have been set;

34. 27. A program for causing a processor that controls the image acquisition unit to execute the character string reading method according to claim 20.

35. an image acquisition step of acquiring an image of an object to be read by an image acquisition unit; A pattern recognition step for recognizing a pattern included in the acquired image; a character string recognition step of recognizing a character string from the recognized graphic; and a notification step of notifying the possibility of misreading when it is determined that a graphic figure that does not constitute a character is present inside or near the recognized character string.

36. The character string reading method according to claim 35, a character string acquisition step of acquiring, for output, a second character string which is a whole or a part of the first character string obtained by the recognition in the character string recognition step; The character string reading method is characterized in that the notification step is a step of notifying that there is a possibility of misreading when it is determined that a graphic figure that does not constitute a character is present inside or near the second character string.

37. The character string reading method according to claim 35, the character string recognition step includes a step of calculating a height of a character constituting the character string in a direction perpendicular to an arrangement direction; a character string reading method comprising: ignoring, in the judgment in the notification step, any figure whose size in the height direction is smaller than the size of a character constituting the recognized character string by a predetermined threshold or more.

38. The character string reading method according to claim 35, the character string recognition step includes a step of calculating a height of a character constituting the character string in a direction perpendicular to an arrangement direction; a character string reading method comprising: ignoring, in the judgment in the notification step, a figure whose size in the height direction is greater than the size of a character constituting the recognized character string by a predetermined threshold or more.

39. The character string reading method according to claim 35, The figure recognition step includes a step of determining contrast of a figure included in the image against a background, a character string reading method comprising the steps of: ignoring a graphic having a contrast with a background different from that of the graphic constituting the recognized character string by a predetermined threshold or more in said judgment in said notification step;

40. The character string reading method according to claim 35, the graphic recognition step comprises a step of determining edge sharpness of a graphic included in the image; A character string reading method, comprising the step of ignoring, in the determination in the notification step, any figure having an edge sharpness different from that of the figure constituting the recognized character string by a predetermined threshold value or more.

41. The character string reading method according to claim 35, the character string recognition step is a step of recognizing character candidates that cannot be identified as well as identified characters as characters that constitute a character string; a character string reading method comprising: performing the determination in the notification step by determining that character candidates arranged consecutively from an end of the recognized character string are figures that do not constitute the character;

42. 37. The character string reading method according to claim 36, which is executed by a character string reading device, comprising: a format acquisition step for acquiring a format of a character string to be read and output from the image; a character recognition condition setting step of setting, as a character recognition condition, a character recognition condition for identifying only a group of characters including all characters defined in the acquired format among characters that can be identified by the character string reading device, In the character string recognition step, a character string in the acquired image is recognized in accordance with the set character recognition conditions; a character string acquisition step of acquiring, as the second character string, a portion of the first character string that matches the acquired format;

43. The character string reading method according to claim 36, a format acquisition step of acquiring one or more formats of character strings to be read and output from the image; In the character string acquisition step, a portion of the first character string that matches a first format, which is one of the one or more acquired formats, is acquired as the second character string; The character string reading method according to the present invention, characterized in that the notification step is a step of notifying that there is a possibility of misreading even when a second character string having a number of characters less than a notification reference number of characters is acquired in the character string acquisition step.

44. 44. The character string reading method according to claim 43, which is executed by a character string reading device, comprising: a character recognition condition setting step of setting, as a character recognition condition, a character recognition condition for identifying only a group of characters including all of the characters defined in the one or more acquired formats, among the characters that the character string reading device can identify; A character string reading method, wherein in the character string recognition step, the character string in the acquired image is recognized in accordance with the character recognition conditions that have been set.

45. an image acquisition unit that acquires an image of an object to be read; a pattern recognition unit for recognizing patterns included in the acquired image; a character string recognition unit for recognizing a character string from within the recognized graphic; a notification unit that notifies the user of the possibility of misreading when it is determined that a graphic figure that does not constitute a character is present inside or near the recognized character string.

46. 46. ​​The character string reader according to claim 45, a character string acquisition unit that acquires, for output, a second character string that is all or a part of the first character string obtained by the recognition by the character string recognition unit; The character string reading device is characterized in that the notification unit notifies the user of the possibility of misreading when it determines that a graphic figure that does not constitute a character is present inside or near the second character string.

47. 46. ​​The character string reader according to claim 45, the character string recognition unit determines a height of a character constituting the character string, the height being a size in a direction perpendicular to an arrangement direction; a character string reading device, characterized in that, in the judgment made by the notification unit, a figure whose size in the height direction is smaller than the size of a character constituting the recognized character string by a predetermined threshold or more is ignored.

48. 46. ​​The character string reader according to claim 45, the character string recognition unit determines a height of a character constituting the character string, the height being a size in a direction perpendicular to an arrangement direction; a character string reading device, characterized in that, in the judgment made by the notification unit, a figure whose size in the height direction is greater than a predetermined threshold value or more compared to the size of characters constituting the recognized character string is ignored.

49. 46. ​​The character string reader according to claim 45, The graphic recognition unit determines a contrast of a graphic included in the image with respect to a background, a character string reading device, characterized in that, in the judgment made by the notification unit, a graphic having a contrast with a background different from that of the graphic constituting the recognized character string by a predetermined threshold value or more is ignored.

50. 46. ​​The character string reader according to claim 45, The graphic recognition unit determines the sharpness of edges of the graphic included in the image, A character string reading device, characterized in that, in the judgment made by the notification unit, a graphic having an edge sharpness different from that of the graphic constituting the recognized character string by a predetermined threshold value or more is ignored.

51. 46. ​​The character string reader according to claim 45, the character string recognition unit recognizes character candidates whose identification is not possible as well as character candidates whose identification is not possible as characters constituting the character string; The character string reading device according to claim 1, wherein the notification unit makes the determination that character candidates arranged consecutively from an end of the recognized character string are figures that do not constitute the character.

52. 47. The character string reader according to claim 46, a format acquisition unit that acquires a format of a character string to be read and output from the image; a character recognition condition setting unit that sets, as a character recognition condition, a character recognition condition that identifies only a group of characters that includes all of the characters defined in the acquired format, among characters that the character string reading device can identify; the character string recognition unit recognizes a character string in the acquired image in accordance with the set character recognition conditions; The character string obtaining unit obtains, as the second character string, a portion of the first character string that matches the obtained format.

53. 47. The character string reader according to claim 46, a format acquisition unit that acquires one or more formats of character strings to be read and output from the image; the character string acquisition unit acquires, from the first character string, a portion that matches a first format, which is one of the acquired one or more formats, as the second character string; The character string reading device according to claim 1, wherein the notification unit notifies the user of the possibility of misreading even when the character string acquisition unit acquires a second character string having a number of characters less than a notification reference number of characters.

54. 54. The character string reader according to claim 53, a character recognition condition setting unit that sets, as a character recognition condition, a character recognition condition that specifies only a group of characters that includes all of the characters defined in the one or more acquired formats, among characters that the character string reading device can specify; a character string recognition unit that recognizes a character string in the acquired image according to the character recognition conditions that have been set;

55. A program for causing a processor that controls the image acquisition unit to execute the character string reading method according to any one of claims 35 to 44.

Citation Information

Patent Citations

  • Image processing apparatus and image processing method

    JP2014071698A

  • Portable optical reader, optical reading method using portable optical reader, and computer program

    JP2015210542A

  • Information reading device

    JP2016224602A

  • Component mounting apparatus and component mounting method

    JP2019129167A

  • Character recognition device

    JP2020024492A