Character string recognition device and character string recognition method
The character string recognition device and method improve accuracy by using a recognition-verification-selection process based on character rules, addressing errors in alphabet recognition to ensure precise output.
Patent Information
- Application Number
- JP2024114489
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2026-01-29
AI Technical Summary
Existing character string recognition systems face accuracy issues due to errors in recognizing the alphabet portion of container numbers, leading to incorrect dictionary selection and reduced overall recognition accuracy.
A character string recognition device and method that includes a recognition unit, verification unit, and selection unit to verify and select recognition results based on character description rules, ensuring accuracy by removing non-conforming candidates.
Enhances the accuracy of character string recognition by outputting a single, correctly verified result, even with multiple initial candidates, thereby improving overall recognition precision.
Smart Images

Figure 2026013827000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a character string recognition device and a character string recognition method for recognizing a character string included in an image. [Background technology]
[0002] Patent Document 1 describes a container number reading device as a technology for reading characters. This container number reading device recognizes the characters of a container number using the following procedure: A character area extraction unit extracts the image of the character area of the container number character by character from a binary image obtained by binarizing a photographed image of the character area of the container number. An owner code determination unit determines the owner of the container through character recognition of the image of the alphabetic characters included in the image of the character area of the alphabetic characters of the container number from the extracted character area image. A number dictionary and parameters corresponding to the owner code determined by the owner code determination unit are selected from number dictionaries and parameters for each owner code. A frame removal unit uses these parameters to remove the rectangular frame attached to the check digit. After the check digit has been removed, the image of the check digit and the image of the other numeric parts of the container number are subjected to character recognition based on the selected number dictionary. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 2018-147178 Summary of the Invention [Problem to be solved by the invention]
[0004] The container number reader described in Patent Document 1 improves the recognition rate of container numbers by performing recognition processing using a pre-prepared alphabet dictionary, a number dictionary for each owner code, and parameters in accordance with the recognition results of the first four characters of the container number. However, if an error occurs in the character recognition processing of the alphabet portion of the first four characters of the container number, the fifth and subsequent numbers in the container number may be recognized based on an incorrectly selected number dictionary, which may result in a deterioration in recognition accuracy. For this reason, there is a demand for improving the recognition accuracy of the entire character string, regardless of the recognition accuracy of some of the characters included in the character string to be recognized. The present invention has been made in view of the above background, and an object of the present invention is to provide a character string recognition device and a character string recognition method that enable improvement in the accuracy of character string recognition. [Means for solving the problem]
[0005] In order to solve the above-mentioned problems, the character string recognition device of the present invention includes a recognition unit that recognizes character strings appearing in an image and outputs recognition result candidates, a verification unit that verifies the plurality of recognition result candidates in accordance with character description rules, and a selection unit that outputs a recognition result candidate that has been successfully verified among the plurality of recognition result candidates as a character string recognition result via an input / output unit. [Effects of the Invention]
[0006] According to the present invention, it is possible to provide a character string recognition device and a character string recognition method that enable improvement in the accuracy of character string recognition. Problems, configurations, and effects other than those described above will become apparent from the following description of the embodiments. [Brief explanation of the drawings]
[0007] [Figure 1] 1 is a functional block diagram of a character string recognition device according to a first embodiment. [Figure 2] 1 is a diagram showing a character string image to be recognized by a character string recognition device according to a first embodiment; [Figure 3] 3A to 3C are diagrams for explaining the processing of a recognition unit, a verification unit, and a selection unit according to the first embodiment. [Figure 4] 4 is a flowchart of character string recognition processing according to the first embodiment. [Figure 5] 4 is a flowchart of character string recognition processing according to the first embodiment. [Figure 6] FIG. 10 is a functional block diagram of a character string recognition device according to a second embodiment. [Figure 7] 10 is a flowchart of a character string recognition process according to the second embodiment. [Figure 8] FIG. 10 is a functional block diagram of a character string recognition device according to a third embodiment. [Figure 9] FIG. 11 is a diagram for explaining processing by an adding unit according to the third embodiment. [Figure 10] 10 is a flowchart of a character string recognition process according to the third embodiment. [Figure 11] 10 is a flowchart of a character string recognition process according to the third embodiment. [Figure 12] FIG. 2 is a hardware configuration diagram illustrating an example of a computer that realizes the functions of the character string recognition device according to the above-described embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0008] <Outline of the character string recognition device> An overview of a character string recognition device in a mode (embodiment) for carrying out the present invention will be described below. The character string recognition device recognizes a character string contained in an image and obtains one or more recognition result candidates. The character string recognition device then verifies whether the recognition result candidates conform to character writing rules, and outputs conforming recognition result candidates as character string recognition results.
[0009] The string to be recognized may consist of multiple substrings, each of which may have its own character notation rules. For example, the first four characters may be uppercase letters, the next six characters may be numbers, and the last character may be a check digit. With this type of character string recognition device, even if there are multiple recognition result candidates when recognizing a character string contained in an image, a single character string recognition result that conforms to the character writing rules is output, enabling character string recognition with high recognition accuracy.
[0010] <Configuration of the character string recognition device> FIG. 1 is a functional block diagram of a string recognition device 100 according to the first embodiment. The string recognition device 100 is a computer, and includes a control unit 110, a storage unit 120, and an input / output unit 180. User interface devices such as a display, keyboard, and mouse are connected to the input / output unit 180. The input / output unit 180 also includes a communication device, and is capable of sending and receiving data to and from a camera 210. A media drive may also be connected to the input / output unit 180, enabling the exchange of data (for example, image data showing a string of characters to be recognized) using a recording medium. Below, a description is given of the string recognition device 100 that recognizes a string of characters indicating a container number captured by the camera 210 (see FIG. 2, described later).
[0011] <Container number> FIG. 2 is a diagram showing a character string image 310 to be recognized by the character string recognition device 100 according to the first embodiment. The character string image 310 indicates a container number. The container number is separated into three substrings by spaces. The first four characters of the container number are uppercase letters, the next six characters are numbers, and the last character is a check digit. The check digit is enclosed in a rectangle and is the check digit number for the first four characters and the next six characters. The first four characters indicate the owner code, and the next six characters indicate the serial number.
[0012] ≪Character string recognition device: storage unit≫ Returning to FIG. 1, the storage unit 120 will be described. The storage unit 120 is configured to include storage devices such as a read-only memory (ROM), a random access memory (RAM), and a solid-state drive (SSD). The storage unit 120 stores recognition result candidates 121, character description rules 122, and a program 128. The program 128 includes descriptions of processes to be executed by each functional unit of the control unit 110, which will be described later. Note that the various storage contents of the storage unit 120 may be stored in an external storage device, such as a cloud server, and read as needed.
[0013] ≪Storage unit: Recognition result candidates≫ The recognition result candidate 121 is a character string that is the output (recognition result) of the recognition process of the character string that appears in the character string image 310 captured by the camera 210. The recognition result is not limited to one, and may be multiple character strings, including the result of erroneous recognition. Furthermore, if the character string captured by the camera 210 is made up of multiple subcharacter strings, the recognition result candidate 121 may include the recognition results of each subcharacter string, including erroneous recognition. The substring in the container number (see Figure 2) consists of four capital letters at the beginning, six numbers, and one check digit at the end.
[0014] <Memory section: Character entry rules> Character description rules 122 are rules for character strings to be recognized. Character description rules 122 for character strings indicating container numbers (see Figure 2) include the following rules: The first rule is that the first four characters must be uppercase English letters. The second rule is that the next six characters must be numbers. The third rule is that the last character must be a single number. The fourth rule is that the last character is a check digit for the first four characters and the next six characters. The first and second rules are rules related to the owner code and serial number, respectively. The third and fourth rules are rules related to the check digit.
[0015] As described above, a character string (see character string image 310) includes multiple subcharacter strings. The character entry rules 122 include at least one of a rule regarding the number of characters in a substring or a string, a rule regarding the character type, and a rule regarding a check digit. The character string is a character string of a container number. The character entry rules 122 are rules relating to container numbers, and include rules for owner codes, serial numbers, and check digits.
[0016] <Character string recognition device: control unit> The control unit 110 is configured to include a CPU (Central Processing Unit) and is equipped with a recognition unit 111, a verification unit 112, and a selection unit 113. The control unit 110 may be configured to include a GPU (Graphics Processing Unit), an NPU (Neural (network) Processing Unit), an FPGA (Field Programmable Gate Array), an ASIC (Application Specific Integrated Circuit), etc.
[0017] 3 is a diagram for explaining the processing of the recognition unit 111, the verification unit 112, and the selection unit 113 according to the first embodiment. The character string image 310 is an image of a character string indicating a container number, and is an image captured by the camera 210 and output.
[0018] <Control unit: Recognition unit> The recognition unit 111 recognizes the character string that appears (is included) in the character string image 310 and outputs it as a recognition result candidate 320. The recognition unit 111 recognizes character strings using, for example, rule-based, machine learning, or image processing technology. The recognition result candidate 320 for the character string image 310 is a partial character string of "TRHU", "IRHU", "1RHU", "695336", and "0". "IRHU" and "1RHU" are the results of misrecognizing the first four characters, "TRHU".
[0019] <Control Unit: Verification Unit> The verification unit 112 verifies whether a character string including a subcharacter string included in the recognition result candidate 320 conforms to the character writing rules 122. Because the character string included in the recognition result candidate 320 is a subcharacter string of the character string included in the character string image 310, the verification unit 112 verifies the following rules: The first rule states that "the first four characters are uppercase letters," the second rule states that "the next six characters are numbers," and the third rule states that "the last character is a single number."
[0020] <Control: Selection> The selection unit 113 removes from the recognition result candidates 320 any substrings that have failed verification by the verification unit 112. The third substring in the recognition result candidates 320, "1RHU," violates the first rule and is therefore removed from the recognition result candidates 320. As a result, "TRHU" and "IRHU" remain as recognition result candidates 331 for the owner code. Furthermore, "695336" remains as recognition result candidate 332 for the serial number, and "0" remains as recognition result candidate 333 for the serial number.
[0021] The selection unit 113 combines the recognition result candidates 331, 332, and 333, which are partial character strings, to generate the character string recognition result candidates 340, "TRHU 695336 0" and "IRHU 695336 0." Next, the verification unit 112 verifies the recognition result candidate 340 in accordance with the fourth rule, "The last character is a check digit for the first four characters and the next six characters." The selection unit 113 selects and outputs the successfully verified character string "TRHU 695336 0" as the character string recognition result 350. The selection unit 113 outputs the character string recognition result 350 to, for example, a display connected to the input / output unit 180.
[0022] As described above, the character string recognition device 100 includes the recognition unit 111 that recognizes a character string appearing in an image (see character string image 310) and outputs the recognition result candidate 320. The character string recognition device 100 also includes a verification unit 112 that verifies the multiple recognition result candidates 320 and 340 in accordance with the character description rules 122 . The system includes a selection unit (113) that outputs a recognition result candidate that has been successfully verified from among the plurality of recognition result candidates (320, 340) as a character string recognition result (350) via an input / output unit (180).
[0023] <Character string recognition processing> 4 and 5 are flowcharts of the character string recognition process according to the first embodiment. At the start of the character string recognition process, the character string image 310 to be recognized has already been acquired.
[0024] In step S11, the recognition unit 111 recognizes a character string appearing in the character string image 310 (see FIG. 3) and outputs it as a recognition result candidate 320. In step S12, the verification unit 112 starts the process of repeating steps S13 to S19 for each subcharacter string included in the recognition result candidate 320.
[0025] In step S13, if the verification unit 112 succeeds in verifying the first rule of the character description rules 122, "the first four characters are uppercase English letters" (step S13→YES), the process proceeds to step S14. If the verification fails (step S13→NO), the verification unit 112 proceeds to step S15. In step S14, the selection unit 113 selects the partial character string as a recognition result candidate 331 of the owner code.
[0026] In step S15, if the verification unit 112 succeeds in verifying the second rule of the character writing rules 122, "the next six characters are numbers" (step S15→YES), the process proceeds to step S16. If the verification unit 112 fails to verify (step S15→NO), the process proceeds to step S17. In step S16, the selection unit 113 selects the partial character string as a recognition result candidate 332 of the serial number.
[0027] In step S17, if the verification unit 112 succeeds in verifying the third rule of the character writing rules 122, "the last character must be a number" (step S17→YES), the process proceeds to step S18. If the verification unit 112 fails to verify (step S17→NO), the process proceeds to step S19. In step S18, the selection unit 113 selects the partial character string as the recognition result candidate 333 of the check digit. In step S19 , the selection unit 113 removes the partial character string from the recognition result candidates 320 .
[0028] Proceeding to FIG. 5, the description of the character string recognition process continues. In step S20, the selection unit 113 combines the recognition result candidates 331, 332, and 333 to form a character string, which is the recognition result candidate 340. In step S21, the selection unit 113 starts the process of repeating step S22 for each character string included in the recognition result candidate 340.
[0029] In step S22, if the verification unit 112 succeeds in verifying the fourth rule of the character writing rules 122, "The check digit (the last character) is a check digit for the owner code and serial number" (step S22 → YES), the processing proceeds to step S23. If the verification unit 112 fails the verification (step S22 → NO), the processing returns to step S22 and the next character string included in the recognition result candidate 340 is processed. In step S23, the selection unit 113 outputs the character string as the character string recognition result 350 if the recognition is successful. In step S24, the selection unit 113 fails in the recognition and outputs an error.
[0030] <Characteristics of the character string recognition device> The character string recognition device 100 recognizes a character string appearing in a character string image 310 that is the recognition target, and acquires one or more recognition result candidates 320. Next, the character string recognition device 100 narrows down the recognition result candidates 320 using character description rules 122 to acquire recognition result candidates 331, 332, and 333. Next, the character string recognition device 100 generates recognition result candidates 340 based on the recognition result candidates 331, 332, and 333. The character string recognition device 100 further narrows down the recognition result candidates 340 using the character description rules 122, and outputs a character string recognition result 350.
[0031] According to such a character string recognition device 100, even if there are multiple recognition result candidates at the time of recognizing a character string contained in an image, one character string recognition result 350 conforming to the character description rule 122 is output. This enables character string recognition with high recognition accuracy.
[0032] Second Embodiment In the first embodiment, the recognition conditions are fixed when the recognition unit 111 recognizes the character string appearing in the character string image 310. The recognition unit 111 may recognize the character string while changing the recognition conditions, and output the recognition result candidate 320.
[0033] 6 is a functional block diagram of a character string recognition device 100A according to the second embodiment. The recognition unit 111A differs from the character string recognition device 100 according to the first embodiment (see FIG. 1). The recognition unit 111A recognizes character strings by changing the recognition conditions. Examples of the recognition conditions include a threshold value for dividing a character string image 310 into character regions and non-character regions, and parameter values related to machine learning or rule bases used for character recognition. These values or combinations of values constitute the recognition conditions.
[0034] FIG. 7 is a flowchart of the character string recognition process according to the second embodiment. In step S31, the recognition unit 111A starts the process of repeating steps S32 to S33 for each recognition condition. Step S32 is the character string recognition process according to the first embodiment (see FIGS. 4 and 5).
[0035] In step S33, if the character string recognition process in step S32 is successful (see step S23 in FIG. 5), the selection unit 113 advances the process to step S34 (step S33 → success). If the character string recognition process in step S32 fails (see step S24), the selection unit 113 returns the process to step S32 and performs the character string recognition process under the next recognition condition.
[0036] In step S34, the selection unit 113 outputs the character string that has been successfully recognized and that has been output by the character string recognition process in step S32 as the character string recognition result. In step S35, the selection unit 113 fails in the recognition and outputs an error.
[0037] <<Second embodiment: Features of character string recognition device>> The character string recognition device 100A recognizes character strings while changing the recognition conditions. Therefore, even if recognition fails under fixed recognition conditions, it may be possible to recognize the character string by changing the recognition conditions, which is expected to improve recognition accuracy.
[0038] <<Variation: Character String Recognition Processing>> In the character string recognition process according to the second embodiment (see FIG. 7), step S32, which is the character string recognition process according to the first embodiment, is repeated while changing the recognition conditions. Alternatively, the recognition unit 111A may recognize the character string image 310 (see FIG. 3) while changing the recognition conditions, and output the recognition result candidate 320. Since the process from step S12 onward is not repeated in the character string recognition process according to the first embodiment (see FIGS. 4 and 5) in step S32, it is possible to expect an increase in processing speed.
[0039] As described above, the recognition unit 111A recognizes character strings by changing the recognition conditions and outputs recognition result candidates.
[0040] Third Embodiment In the first embodiment, the recognition unit 111 outputs one or more recognition result candidates 320. Character pairs that are likely to cause erroneous recognition may be prepared, and partial character strings obtained by replacing characters of partial character strings included in the recognition result candidates with characters of the pair may also be included in the recognition result candidates.
[0041] 8 is a functional block diagram of a character string recognition device 100B according to the third embodiment. Compared to the character string recognition device 100 according to the first embodiment (see FIG. 1), an adding unit 114 is added to the control unit 110, and replacement rules 123 are added to the storage unit 120.
[0042] The substitution rule 123 is a pair of characters that are likely to be misrecognized. Examples of such pairs include the lowercase "l" of the letter "L" and the number "1," the letter "O" and the number "0," the letter "I" and the letter "T," etc.
[0043] The adding unit 114 adds a partial string obtained by replacing characters of a partial string included in the recognition result candidate 370 (see FIG. 9 described later) output by the recognition unit 111 with paired characters in the replacement rule 123 to the recognition result candidate 380.
[0044] FIG. 9 is a diagram for explaining the processing of the adding unit 114 according to the third embodiment. The recognition unit 111 recognizes the character string image 360 and outputs the recognition result candidates 370, which are "IRHU", "695336", and "0". The adding unit 114 replaces the "I" in "IRHU" with a "T" to add "TRHU" to the recognition result candidates. The adding unit 114 also replaces the numeral "0" with the English letter "O" to add to the recognition result candidates. The recognition result candidate 380 resulting from the addition is "IRHU", "TRHU", "695336", "0", and "O". The verification unit 112 verifies whether a character string including a subcharacter string included in the recognition result candidate 380 conforms to the character description rule 122.
[0045] 10 and 11 are flowcharts of the character string recognition process according to the third embodiment. Step S41 is the same process as step S11 (see FIG. 4). In step S42, the adding unit 114 adds to the recognition result candidate 380 a partial character string in which characters of a partial character string included in the recognition result candidate 370 (see FIG. 9 described later) are replaced with a pair of characters of the replacement rule 123. Step S43 and subsequent steps are the same as step S12 and subsequent steps described in Figures 4 and 5. However, the recognition result candidate 320 is a recognition result candidate 380 to which the adding unit 114 has added a partial character string.
[0046] As described above, character string recognition device 100B includes adding unit 114 that replaces a character included in recognition result candidate 370 with another character in accordance with a predetermined rule (see replacement rule 123) and adds the replaced character to the recognition result candidates.
[0047] <<Third embodiment: Features of the character string recognition device>> For character pairs that are prone to erroneous recognition, character string recognition device 100B also includes partial character strings in which characters of the partial character string included in recognition result candidate 370 are replaced with characters of the pair in recognition result candidate 380. As a result, a correct partial character string that is erroneously recognized by recognition unit 111 and not included in recognition result candidate 370 may be included in recognition result candidate 380, which is expected to improve recognition accuracy.
[0048] <Modification: Second Embodiment> The character string recognition process of step S32 according to the second embodiment is the character string recognition process according to the first embodiment (see FIGS. 4 and 5). This character string recognition process of step S32 may be the character string recognition process according to the third embodiment (see FIGS. 10 and 11).
[0049] <<Variation: String Composition>> In the above embodiment, the character string to be recognized is a character string indicating a container number composed of an owner code, a serial number, and a check digit, but is not limited to this. For example, the character string to be recognized may be a continuous character string that does not contain spaces, and the character description rule 122 may be "composed of 10 uppercase English letters and 10 numeric characters."
[0050] Other variations Although several embodiments of the present invention have been described above, these embodiments are merely illustrative and do not limit the technical scope of the present invention. The present invention can take on various other embodiments, and various modifications such as omissions and substitutions can be made without departing from the spirit of the present invention. These embodiments and their modifications are included within the scope and spirit of the invention described in this specification, etc., and are included in the invention described in the claims and their equivalents.
[0051] <Hardware configuration> The character string recognition devices 100, 100A, and 100B according to the above-described embodiments are realized by a computer 900 having a configuration as shown in FIG. 12, for example. FIG. 12 is a hardware configuration diagram showing an example of the computer 900 that realizes the functions of the character string recognition devices 100, 100A, and 100B according to the above-described embodiments. The computer 900 includes a CPU 901, a ROM 902, a RAM 903, an SSD 904, an input / output interface 905 (referred to as an input / output I / F (Interface) in FIG. 12), a communication interface 906 (referred to as a communication I / F in FIG. 12), and a media interface 907 (referred to as a media I / F in FIG. 12). The computer 900 may include a hard disk drive (HDD) instead of the SSD 904, or may include a HDD in addition to the SSD 904.
[0052] The CPU 901 operates based on a program stored in the ROM 902 or the SSD 904, and performs control by the control unit 110 in Fig. 1. The ROM 902 stores a boot program executed by the CPU 901 when the computer 900 starts up, programs related to the hardware of the computer 900, and the like.
[0053] The CPU 901 controls an input device 910 such as a mouse or keyboard, and an output device 911 such as a display or printer, via an input / output interface 905. The CPU 901 acquires data from the input device 910 via the input / output interface 905, and outputs generated data to the output device 911.
[0054] The SSD 904 stores programs executed by the CPU 901 and data used by the programs. The communication interface 906 receives data from other devices (not shown) (e.g., the camera 210) via a communication network and outputs the data to the CPU 901, and also transmits data generated by the CPU 901 to other devices via the communication network.
[0055] The media interface 907 reads a program or data stored in the recording medium 912 and outputs it to the CPU 901 via the RAM 903. The CPU 901 loads the program from the recording medium 912 onto the RAM 903 via the media interface 907 and executes the loaded program. The recording medium 912 is an optical recording medium such as a DVD (Digital Versatile Disk), a magneto-optical recording medium such as an MO (Magneto Optical disk), a magnetic recording medium, a conductive memory tape medium, a semiconductor memory, or the like.
[0056] For example, when the computer 900 functions as the character string recognition devices 100, 100A, and 100B according to the above-described embodiments, the CPU 901 of the computer 900 executes a program 128 (see FIG. 1) loaded onto the RAM 903, thereby realizing the functions of the character string recognition devices 100, 100A, and 100B. The CPU 901 reads the program from a recording medium 912 and executes it. Alternatively, the CPU 901 may read the program from another device via a communication network, or may install the program 128 from the recording medium 912 onto the SSD 904 and execute it. [Explanation of symbols]
[0057] 100,100A,100B string recognition device 111,111A recognition part 112 Verification Department 113 Selection Section 114 Additional Section 121,320,331,332,333,340,370,380 Recognition result candidates 122 Character writing rules 123 Replacement Rules (Prescribed Rules) 128 programs 180 Input / output section 310 String Images 350 string recognition results
Claims
1. a recognition unit that recognizes character strings appearing in an image and outputs recognition result candidates; a verification unit that verifies the plurality of recognition result candidates in accordance with character writing rules; a selection unit that outputs a recognition result candidate that has been successfully verified from among the plurality of recognition result candidates as a character string recognition result via an input / output unit. String recognizer.
2. The recognition unit The character string is recognized by changing the recognition conditions, and the recognition result candidates are output.
2. The character string recognition device according to claim 1.
3. The apparatus further includes an adding unit that replaces a character included in the recognition result candidate with another character according to a predetermined rule and adds the replaced character to the recognition result candidate.
2. The character string recognition device according to claim 1.
4. The string is: Contains multiple substrings, The character writing rules are: At least one of the rules for the number of characters, the character type, and the check digit related to the partial character string or the character string is included.
2. The character string recognition device according to claim 1.
5. The string is: A string of container numbers, The character writing rules are: A rule relating to the container number, Includes rules for owner code, serial number, and check digit 2. The character string recognition device according to claim 1.
6. The character string recognition device a step of recognizing a character string appearing in an image and outputting a recognition result candidate; verifying the plurality of recognition result candidates according to character writing rules; outputting a recognition result candidate that has been successfully verified from among the plurality of recognition result candidates as a character string recognition result via an input / output unit. String recognition method.
Citation Information
Patent Citations
Container number reading device, container number reading method and container number reading program
JP2018147178A