Word recognition device
The character recognition device effectively processes multi-line character strings without a known format by detecting and connecting character regions, enabling accurate cable-terminal connection identification.
Patent Information
- Application Number
- JP2025502118
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2023-02-20
- Filing Date
- 2023-12-04
- Publication Date
- 2025-12-01
- Estimated Expiration
- 2043-12-04
AI Technical Summary
Existing character recognition systems struggle to accurately process character strings that span multiple lines and do not have a known format, as they rely on pre-defined formats stored in databases.
A character recognition device that detects terminal blocks, terminals, and connected cables in an input image, determines the orientation of characters, connects adjacent character regions with the same direction, and concatenates them to recognize multi-line character strings, comparing the recognized strings with master data to determine correct connections.
Enables accurate recognition of character strings across multiple lines without a known format, allowing for efficient determination of cable connections to terminals based on matching character strings.
Smart Images

Figure 0007777801000001 
Figure 0007777801000002 
Figure 0007777801000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a character recognition device, a character recognition method, and a program. [Background technology]
[0002] When attempting to automatically recognize character strings in an image using a computer, the character strings do not necessarily have a known format. For example, due to dimensional constraints on labels or other devices on which character strings are printed, character strings may be printed across multiple lines with breaks at the beginning of each character.
[0003] For example, Patent Document 1 discloses a mail processing device, in particular a mail address area detection device used to read the addresses on mail and sort them according to their delivery destinations. The device in Patent Document 1 detects address area candidates by integrating adjacent lines among the detected lines, and applies the size and relative position of each line in the address area candidate to pre-prepared evaluation criteria stored in a database, and selects the address area candidate with the highest similarity or evaluation value as the address writing line candidate. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent No. 3673034 [Non-patent literature]
[0005] [Non-Patent Document 1] Kaiming He et al., "Mask R-CNN", [Retrieved January 31, 2023], Internet<URL:https: / / arxiv.org / pdf / 1703.06870.pdf> [Non-patent document 2] Minghui Liao, "Real-time Scene Text Detection with Differentiable Binarization", [Retrieved January 31, 2023], Internet<URL:https: / / arxiv.org / abs / 1911.08947> [Non-patent document 3] Z. Zhou et al., "Text Orientation Detection Based on Multi Neural Network", 2020 Chinese Automation Congress (CAC), Shanghai, China, pp. 6175-6179, 2020 [Non-patent document 4] Baoguang Shi et al., "An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition", [Retrieved January 31, 2023], Internet<URL:https: / / arxiv.org / pdf / 1507.05717> Summary of the Invention [Problem to be solved by the invention]
[0006] The device in Patent Document 1 processes addresses on mail pieces that have a known format stored in a database, but it has difficulty processing character strings that do not have a known format, such as character strings printed on labels of objects included in any photographed image. Therefore, there is a need for a system that can recognize multi-line character strings that do not have a known format without needing to refer to a format database.
[0007] An object of the present disclosure is to provide a character recognition device, a character recognition method, and a program that can recognize a character string that spans multiple lines and does not have a known format. [Means for solving the problem]
[0008] According to one aspect of the present disclosure, there is provided a character recognition device that processes an input image of a distribution board, detects a terminal block, a terminal on the terminal block, and a cable connected to the terminal as an object area, and recognizes characters within the object area, the character recognition device comprising: an arithmetic circuit; a memory storing instructions executable by the arithmetic circuit; When the instruction is executed, the arithmetic circuit In the input image, the terminal block is detected as a first object region, the terminal is detected as a second object region, and the cable is detected as a third object region; Detecting a character string consisting of a plurality of characters or a plurality of character regions each including one character from the first object region and the third object region; determining the orientation of the characters or character strings in each of the character regions; Recognizing a character or a character string in each of the character regions; generating a connected region by connecting at least two character regions each including a character or a character string having the same direction and adjacent to each other with a distance less than a threshold value; Concatenating the characters or character strings included in the concatenated region with each other; determining the character region or the connected region detected in the first object region as a first character region or a first connected region, and recognizing a first character or character string included in the first character region or the first connected region; determining the character region or the connected region detected in the third object region as a second character region or a second connected region, and recognizing a second character or character string included in the second character region or the second connected region; comparing the first character or character string with the terminal number stored as master data; comparing the second character or character string with the cable number stored as the master data; If the first character or character string matches the terminal number and the second character or character string matches the cable number, The cable is connected to the terminal and Make a decision. [Effects of the Invention]
[0009] A character recognition device according to an aspect of the present disclosure can recognize a character string spanning multiple lines that does not have a known format. [Brief explanation of the drawings]
[0010] [Figure 1] 1 is a block diagram showing a configuration of a character recognition device 1 according to a first embodiment. [Figure 2] 2 is a flowchart showing a character recognition process executed by the CPU 11 of FIG. 1. [Figure 3] 2 is a diagram showing an example of an input image 20 acquired by the image capturing device 14 of FIG. 1. FIG. [Figure 4] FIG. 3 is a diagram showing an example of an object region detected in step S2 of FIG. 2. [Figure 5] 3 is a diagram showing an example of a character region detected in step S3 of FIG. 2. FIG. [Figure 6] FIG. 3 is a diagram for explaining a first algorithm for connecting character regions in step S6 of FIG. 2. [Figure 7] FIG. 3 is a diagram for explaining a second algorithm for connecting character regions in step S6 of FIG. 2. [Figure 8] FIG. 3 is a diagram showing an example of character regions connected in step S6 of FIG. 2. [Figure 9] 3A and 3B are diagrams showing examples of character strings of terminals and character strings of cables that are associated with each other in step S8 of FIG. 2. [Figure 10] FIG. 3 is a diagram showing an example of a match between character strings determined in step S8 of FIG. 2. [Figure 11] 2. FIG. 6 is a diagram showing another example of a string match determined in step S8 of FIG. [Figure 12] FIG. 3 is a diagram showing another example of a character region detected in step S3 of FIG. 2. [Figure 13] FIG. 13 is a diagram for explaining an algorithm for connecting the character regions in FIG. 12. [Figure 14]13 is a diagram showing an example of a character area obtained by connecting the character areas in FIG. 12. FIG. [Figure 15] FIG. 1 is a block diagram showing the configuration of a character recognition system 100 according to a second embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. However, more detailed description than necessary may be omitted. For example, detailed description of well-known matters or redundant description of substantially identical configurations may be omitted. This is to avoid unnecessary redundancy in the following description and to facilitate understanding by those skilled in the art.
[0012] The inventor(s) provide the accompanying drawings and the following description to enable those skilled in the art to fully understand the present disclosure, and do not intend for them to limit the subject matter described in the claims.
[0013] [First embodiment] The character recognition device according to the first embodiment is configured as an all-in-one computer, such as a tablet computer, that includes an imaging device, an input device, and a display device.
[0014] [Configuration of the first embodiment] FIG. 1 is a block diagram showing the configuration of a character recognition device 1 according to a first embodiment. The character recognition device 1 includes a bus 10, a central processing unit (CPU) 11, a memory 12, a storage device 13, a photographing device 14, an input device 15, and a display device 16. The CPU 11 controls the overall operation of the character recognition device 1 and executes character recognition processing, which will be described later with reference to FIG. 2, to process an input image acquired by the photographing device 14 and recognize characters included in the input image. The memory 12 temporarily stores programs and data necessary for the operation of the character recognition device 1. The storage device 13 is a non-volatile storage medium that stores programs and data necessary for the operation of the character recognition device 1. The photographing device 14 photographs an object to generate an input image. The photographing device 14 is, for example, an RGB camera. The input device 15 receives user input to control the operation of the character recognition device 1. The input device 15 includes, for example, a keyboard and / or a pointing device. The display device 16 displays the input image, recognized characters, and the like. The CPU 11 , memory 12 , storage device 13 , image capture device 14 , input device 15 , and display device 16 are connected to one another via a bus 10 .
[0015] The input device 15 may be, for example, a touch panel device integrated into the display device 16, and may be operated by a user's finger or a stylus.
[0016] The CPU 11 is an example of an arithmetic circuit. The programs stored in the memory 12 and the storage device 13 are an example of instructions that can be executed by the CPU 11.
[0017] In an embodiment of the present disclosure, for example, a case will be described in which a character string printed on a terminal block of a distribution board and a character string printed on a cable connected to the distribution board are recognized.
[0018] In this disclosure, "characters" include alphabets, numbers, hiragana, katakana, kanji, and symbols (such as punctuation marks). Also, in this disclosure, a "character string" refers to a plurality of characters arranged in succession.
[0019] [Operation of the first embodiment] FIG. 2 is a flowchart showing the character recognition process executed by the CPU 11 of FIG.
[0020] In step S1, the CPU 11 acquires an input image captured by the image capturing device .
[0021] 3 is a diagram showing an example of an input image 20 acquired by the image capturing device 14 of FIG. 1. The input image 20 includes a terminal block 21 having terminals 22a to 22c, labels 23a to 23c attached near the terminals 22a to 22c, cables 24a and 24c connected to the terminals 22a and 22c, respectively, and labels 25a and 25c attached to the cables 24a and 24c, respectively. In an embodiment of the present disclosure, a case will be described in which character strings printed on the labels 23a to 23c, 25a, and 25c are recognized. Due to dimensional constraints of the labels 23a to 23c, the character strings on each of the labels 23a to 23c are printed across two lines, with a break at the beginning of each character.
[0022] In step S2 of FIG. 2, the CPU 11 recognizes, in the input image 20, object regions that include the terminal block 21, the terminals 22a to 22c, and the cables 24a and 24c.
[0023] Fig. 4 is a diagram showing an example of an object region detected in step S2 of Fig. 2. In the example of Fig. 4, CPU 11 recognizes object region 31 including terminal block 21, object regions 32a to 32c including terminals 22a to 22c, respectively, and object regions 33a and 33c including cables 24a and 24c, respectively.
[0024] The CPU 11 may automatically recognize the object area using a known technique, for example, the technique disclosed in Non-Patent Document 1, or may (manually) recognize the object area based on user input obtained via the input device 15.
[0025] In step S3 of FIG. 2, the CPU 11 detects, in the input image 20, a character string consisting of a plurality of characters or a character region including one character.
[0026] Figure 5 is a diagram showing examples of character areas detected in step S3 of Figure 2. Character areas 41 and 42 include character strings printed on label 23a. Character areas 43 and 44 include character strings printed on label 23b. Character areas 45 and 46 include character strings printed on label 23c. Character area 47 includes character strings printed on label 25a. Character area 48 includes character strings printed on label 25c.
[0027] The CPU 11 may automatically detect the character area using a known technique, for example, the technique disclosed in Non-Patent Document 2.
[0028] In step S4 of Fig. 2, the CPU 11 determines the direction of the characters or character strings in each character region. Figure 5 Alternatively, the orientation of the character or character string may be determined to be an angle that is closest to the orientation of the character or character string among 0 degrees, 90 degrees, 180 degrees, and 270 degrees with respect to the X direction. In the example of Fig. 5, the character strings in character areas 41 to 46 are determined to be arranged substantially in the Y direction, and the character strings in character areas 47 and 48 are determined to be arranged substantially in the X direction. The CPU 11 may automatically determine the orientation of the character or character string using a known technique, for example, the technique disclosed in Non-Patent Document 3, or may (manually) determine the orientation of the character or character string based on a user input acquired via the input device 15.
[0029] In step S5, CPU 11 recognizes characters or character strings in each character area. CPU 11 may recognize characters or character strings using known technology, for example, the technology disclosed in Non-Patent Document 4. In the example of Fig. 5, the character strings in character areas 41 to 48 are recognized as "LG97", "102", "LG97", "103", "LG97", "104", "LG97102", and "LG97104", respectively.
[0030] In step S6, the CPU 11 concatenates character regions including portions of the character string divided into multiple lines.
[0031] FIG. 6 is a diagram illustrating a first algorithm for connecting character regions in step S6 of FIG. 2. Character regions 41 and 42 each contain character strings with the same orientation and are adjacent to each other with a distance less than threshold value r. The distance between character regions 41 and 42 is defined, for example, as the distance between centers P1 and P2 of character regions 41 and 42. Character regions 43 and 44 each contain character strings with the same orientation and are adjacent to each other with a distance less than threshold value r. The distance between character regions 43 and 44 is defined, for example, as the distance between centers P3 and P4 of character regions 43 and 44. Character regions 45 and 46 each contain character strings with the same orientation and are adjacent to each other with a distance less than threshold value r. The distance between character regions 45 and 46 is defined, for example, as the distance between centers P5 and P6 of character regions 45 and 46. When character areas 41 to 46 satisfy the above conditions, CPU 11 may connect character areas 41 and 42 to each other, connect character areas 43 and 44 to each other, and connect character areas 45 and 46 to each other.
[0032] The threshold value r may be determined individually for each character region as, for example, the product of the height h of each character region (i.e., the length in the X direction in FIG. 6) and a predetermined coefficient k. This allows the character regions to be connected regardless of the relative sizes of each character region in the input image 20.
[0033] FIG. 7 is a diagram illustrating a second algorithm for connecting character regions in step S6 of FIG. 2. CPU 11 extends each character region 41-46 a predetermined distance in a direction (X direction) perpendicular to the direction of the character string included in the character region to generate extended regions 41a-46a. Character regions 41 and 42 each contain character strings with the same orientation and have extended regions 41a and 42a that overlap each other. Character regions 43 and 44 each contain character strings with the same orientation and have extended regions 43a and 44a that overlap each other. Character regions 45 and 46 each contain character strings with the same orientation and have extended regions 45a and 46a that overlap each other. If character regions 41-46 satisfy the above conditions, CPU 11 may connect character regions 41 and 42 to each other, character regions 43 and 44 to each other, and character regions 45 and 46 to each other.
[0034] The CPU 11 may use the algorithm of FIG. 6 and the algorithm of FIG. 7 individually or in combination.
[0035] Fig. 8 is a diagram showing an example of character regions connected in step S6 of Fig. 2. When character regions 41 to 46 satisfy the conditions of Fig. 6 and / or the conditions of Fig. 7, CPU 11 connects character regions 41 and 42 to each other to generate connected region 51, connects character regions 43 and 44 to each other to generate connected region 52, and connects character regions 45 and 46 to each other to generate connected region 53.
[0036] In step S7, CPU 11 concatenates the characters or character strings included in the concatenated character regions. In the example of Fig. 8, the character strings "LG97" and "102" included in concatenated region 51 are concatenated to generate the character string "LG97102," the character strings "LG97" and "103" included in concatenated region 52 are concatenated to generate the character string "LG97103," and the character strings "LG97" and "104" included in concatenated region 53 are concatenated to generate the character string "LG97104."
[0037] In step S8, the CPU 11 determines whether the character string on the cable matches the character string on the terminal, and outputs the result to the display device 16.
[0038] 9 is a diagram showing an example of the character strings of the terminals and the character strings of the cables that are associated with each other in step S8 of FIG. 2. Connection regions 51-53 are included in object region 31 of terminal block 21 and are located near object regions 32a-32c of terminals 22a-22c, respectively. Character regions 47 and 48 are included in object regions 33a and 33c of cables 24a and 24c, respectively. This shows that the character strings "LG97102," "LG97103," and "LG97104" included in connection regions 51-53 represent terminals 22a-22c, respectively, and the character strings "LG97102" and "LG97104" included in character regions 47 and 48 represent cables 24a and 24c, respectively.
[0039] 9, since one end of object region 33a of cable 24a is near object region 32a of terminal 22a, CPU 11 may determine that cable 24a is connected to terminal 22a. Also, since one end of object region 33c of cable 24c is near object region 32c of terminal 22c, CPU 11 may determine that cable 24c is connected to terminal 22c. Next, CPU 11 may compare the character strings "LG97102" and "LG97104" (i.e., cable numbers) indicating cables 24a and 24c, respectively, with the character strings "LG97102," "LG97103," and "LG97104" (i.e., terminal numbers) indicating terminals 22a to 22c, respectively.
[0040] 10 is a diagram showing an example of a character string match determined in step S8 of FIG. 2. For the recognized terminal numbers "LG97102" and "LG97104," there are corresponding recognized cable numbers "LG97102" and "LG97104." On the other hand, for the recognized terminal number "LG97103," there is no corresponding recognized cable number. Therefore, it can be seen that cables having cable numbers "LG97102" and "LG97104" are connected to terminals having terminal numbers "LG97102" and "LG97104."
[0041] FIG. 11 illustrates another example of the character string match determined in step S8 of FIG. 2. If the terminal numbers and cable numbers of the terminals and cables that can be used are known and stored, for example, as master data in the storage device 13, the CPU 11 may compare the recognized terminal numbers and cable numbers with the terminal numbers and cable numbers in the master data. In the example of FIG. 11, the terminal number "LG97103" in the master data exists, but a corresponding cable number in the master data does not exist. Also, in the example of FIG. 11, similar to the example of FIG. 10, the recognized terminal number "LG97103" does not have a corresponding recognized cable number. Therefore, a terminal number in the master data that matches the recognized terminal number "LG97103" exists. By comparing the recognition result with the master data, it can be determined that the correct state is that no cable is connected to the terminal with the terminal number "LG97103." This allows the connection status of the terminals and cables to be determined with higher accuracy than without using master data.
[0042] CPU 11 determines whether the cable string matches the terminal string and outputs the result to display device 16 in the form of FIG. 10, FIG. 11, or in some other format.
[0043] 2, CPU 11 determines whether the cable is correctly connected to the terminal based on whether the character string on the cable matches the character string on the terminal, and outputs the result to display device 16. If the terminal numbers and cable numbers of the terminals and cables that can be used are known and stored as master data in storage device 13, for example (see FIG. 11), CPU 11 may determine whether the cable is correctly connected to the terminal based on whether the recognized number matches the corresponding number in the master data, and output the result to display device 16.
[0044] In the other example of Fig. 2, a case has been described in which the direction of the character strings on the labels 23a to 23c is parallel to the line passing through the terminals 22a to 22c. On the other hand, the character recognition process according to the embodiment can also be applied to a case in which the direction of the character strings on the labels 23a to 23c is perpendicular to the line passing through the terminals 22a to 22c. The latter case will be described below with reference to Figs. 12 to 14.
[0045] Figure 12 is a diagram showing another example of character areas detected in step S3 of Figure 2. Character areas 61 and 62 include character strings printed on a first label. Character areas 63 and 64 include character strings printed on a second label. Character areas 65 and 66 include character strings printed on a third label. In the example of Figure 12, character strings 61 to 66 are arranged in the X direction.
[0046] FIG. 13 is a diagram for explaining an algorithm for connecting the character regions in FIG. 12. The example in FIG. 13 shows a case where the algorithm in FIG. 6 is applied to the character regions 61 to 66 in FIG. 12. The character regions 61 and 62 each contain character strings that have the same direction, and are adjacent to each other with a distance less than the threshold value r. The distance between the character regions 61 and 62 is defined, for example, as the distance between the centers P11 and P12 of the character regions 61 and 62. The character regions 63 and 64 each contain character strings that have the same direction, and are adjacent to each other with a distance less than the threshold value r. The distance between the character regions 63 and 64 is defined, for example, as the distance between the centers P13 and P14 of the character regions 63 and 64. P14The distance between the character regions 65 and 66 is defined as the distance between the centers P15 and P16 of the character regions 65 and 66. The character regions 65 and 66 each contain character strings that have the same direction, and are close to each other with a distance less than the threshold value r. The distance between the character regions 65 and 66 is defined as the distance between the centers P15 and P16 of the character regions 65 and 66, for example. CPU11 If the character areas 61 to 66 satisfy the above conditions, the character areas 61 and 62 may be connected to each other, the character areas 63 and 64 may be connected to each other, and the character areas 65 and 66 may be connected to each other.
[0047] Fig. 14 is a diagram showing an example of connected character areas of Fig. 12. When character areas 61 to 66 satisfy the conditions of Fig. 6 and / or the conditions of Fig. 7, CPU 11 connects character areas 61 and 62 to generate connected area 71, connects character areas 63 and 64 to generate connected area 72, and connects character areas 65 and 66 to generate connected area 73.
[0048] According to the examples of FIGS. 12 to 14, it can be seen that the algorithm of FIG. 6 is applicable regardless of the direction of the character string.
[0049] As described above, the character recognition device 1 according to the embodiment can concatenate character regions including portions of a character string divided into multiple lines by using the algorithm of FIG. 6 and / or the algorithm of FIG. 7. Conventionally, it has been difficult to correctly recognize a character string that has arbitrary line break positions and does not have a known format. The character recognition device 1 according to the embodiment can recognize a character string that spans multiple lines and does not have a known format by concatenating character regions.
[0050] According to the character recognition device 1 of the embodiment, it is possible to determine whether or not the cable is correctly connected to the terminal based on whether or not the character string on the cable matches the character string on the terminal.
[0051] In the other example of FIG. 2, a case where the character string on the label is printed across multiple lines has been described, but the character recognition process according to the embodiment can also be applied to a case where the character string on the cable is printed across multiple lines.
[0052] The character recognition device 1 may recognize character strings printed on the terminals of the distribution board and character strings printed on the cables connected to the distribution board. In this case, the character recognition device 1 may match the character strings on the terminals with the character strings on the cables. This allows a single worker to easily determine whether the cables are connected to the correct terminals by simply taking a picture of the distribution board with the character recognition device 1.
[0053] [Advantages of the first embodiment] A character recognition device 1 according to one embodiment of the present disclosure processes an input image to recognize characters contained in the input image. The character recognition device 1 includes a CPU 11 and a memory storing instructions executable by the CPU 11. When the CPU 11 executes the instructions, the CPU 11 detects, in the input image, a character string consisting of a plurality of characters or a plurality of character regions each containing a single character. When the CPU 11 executes the instructions, the CPU 11 determines the direction of the characters or character strings in each character region. When the CPU 11 executes the instructions, the CPU 11 recognizes the characters or character strings in each character region. When the CPU 11 executes the instructions, the CPU 11 generates a connected region by connecting at least two character regions each containing characters or character strings having the same direction and located close to each other with a distance less than a threshold. When the CPU 11 executes the instructions, the CPU 11 connects the characters or character strings contained in the connected region.
[0054] This allows character regions to be concatenated and multi-line strings with no known format to be recognized.
[0055] According to the character recognition device 1 according to an embodiment of the present disclosure, when executing an instruction, the CPU 11 may generate an extended region by extending each character region in a direction perpendicular to the direction of the character or character string included in the character region. In this case, when executing an instruction, the CPU 11 generates a connected region by connecting at least two character regions that each include a character or character string having the same direction, are close to each other with a distance less than a threshold, and have overlapping extended regions.
[0056] This allows character regions to be concatenated and multi-line strings with no known format to be recognized.
[0057] According to a character recognition device 1 according to an embodiment of the present disclosure, when executing an instruction, the CPU 11 may detect, in an input image, a first object region including a first object and a second object region including a second object. In this case, when executing the instruction, the CPU 11 detects a first character region or a first connected region included in the first object region. When executing the instruction, the CPU 11 detects a second character region or a second connected region included in the second object region. When executing the instruction, the CPU 11 recognizes a first character or character string included in the first character region or the first connected region. When executing the instruction, the CPU 11 recognizes a second character or character string included in the second character region or the second connected region. When executing the instruction, the CPU 11 compares the first character or character string with a third character or character string associated with the first object and stored in advance. When executing the instruction, the CPU 11 compares the second character or character string with a fourth character or character string associated with the second object and stored in advance.
[0058] This allows determining whether the first object is correctly positioned relative to the second object.
[0059] According to a character recognition method according to one aspect of the present disclosure, an input image is processed to recognize characters contained in the input image. The method includes a step of detecting, in the input image, a string of characters consisting of a plurality of characters or a plurality of character regions each containing a single character. The method includes a step of determining the direction of the characters or string of characters in each character region. The method includes a step of recognizing the characters or string of characters in each character region. The method includes a step of connecting at least two character regions each containing characters or strings having the same direction and located close to each other with a distance less than a threshold to generate a connected region. The method includes a step of connecting the characters or strings contained in the connected region.
[0060] This allows character regions to be concatenated and multi-line strings with no known format to be recognized.
[0061] A character recognition method according to one aspect of the present disclosure may include detecting, in an input image, a first object region including a first object and a second object region including a second object. In this case, the method includes detecting a first character region or a first connected region included in the first object region. The method includes detecting a second character region or a second connected region included in the second object region. The method includes recognizing a first character or character string included in the first character region or the first connected region. The method includes recognizing a second character or character string included in the second character region or the second connected region. The method includes comparing the first character or character string to a third character or character string associated with the first object and stored in advance. The method includes comparing the second character or character string to a fourth character or character string associated with the second object and stored in advance.
[0062] This allows determining whether the first object is correctly positioned relative to the second object.
[0063] A program according to one aspect of the present disclosure includes instructions to be executed by a CPU 11 implemented in a character recognition device for processing an input image and recognizing characters included in the input image. The instructions cause the CPU 11 to execute a step of detecting, in the input image, a string of characters consisting of a plurality of characters or a plurality of character regions each including a single character. The instructions cause the CPU 11 to execute a step of determining the direction of the characters or string of characters in each character region. The instructions cause the CPU 11 to execute a step of recognizing the characters or string of characters in each character region. The instructions cause the CPU 11 to execute a step of connecting at least two character regions each including a character or string of characters having the same direction and adjacent to each other with a distance less than a threshold to generate a connected region. The instructions cause the CPU 11 to execute a step of connecting the characters or strings included in the connected region.
[0064] This allows character regions to be concatenated and multi-line strings with no known format to be recognized.
[0065] According to a program according to one aspect of the present disclosure, the instructions may cause the CPU 11 to execute a step of detecting, in an input image, a first object region including a first object and a second object region including a second object. In this case, the instructions cause the CPU 11 to execute a step of detecting a first character region or a first connected region included in the first object region. The instructions cause the CPU 11 to execute a step of detecting a second character region or a second connected region included in the second object region. The instructions cause the CPU 11 to execute a step of recognizing a first character or character string included in the first character region or the first connected region. The instructions cause the CPU 11 to execute a step of recognizing a second character or character string included in the second character region or the second connected region. The instructions cause the CPU 11 to execute a step of comparing the first character or character string with a third character or character string associated with the first object and stored in advance. The instructions cause CPU 11 to perform the step of comparing the second character or string of characters against a fourth character or string of characters that is pre-stored and associated with the second object.
[0066] This allows determining whether the first object is correctly positioned relative to the second object.
[0067] [Second embodiment] In the first embodiment, the character recognition device is described as being configured as an integrated computer equipped with a photographing device, an input device, and a display device, but the photographing device, the input device, and the display device may be provided separately from the character recognition device.
[0068] FIG. 15 is a block diagram showing the configuration of a character recognition system 100 according to a second embodiment. The character recognition system 100 in FIG. 15 includes a character recognition device 1A, a photographing device 14A, an input device 15A, and a display device 16A. The character recognition device 1A is, for example, a desktop computer, and includes a bus 10, a CPU 11, a memory 12, a storage device 13, and an input / output interface (I / F) 17. The bus 10, CPU 11, memory 12, and storage device 13 in FIG. 15 are configured similarly to the corresponding components in FIG. 1. The input / output interface (I / F) 17 is connected to the photographing device 14A, the input device 15A, and the display device 16A. The photographing device 14A, the input device 15A, and the display device 16A are configured similarly to the photographing device 14, the input device 15, and the display device 16 in FIG. 1.
[0069] Like the character recognition device 1 in FIG. 1, the character recognition system 100 in FIG. 15 can also recognize character strings spanning multiple lines that do not have a known format by concatenating character regions.
[0070] [Other embodiments] As described above, the embodiments have been described as examples of the technology disclosed in this application. However, the technology in this disclosure is not limited to these, and can be applied to embodiments in which modifications, substitutions, additions, omissions, etc. are made as appropriate. Furthermore, it is also possible to combine the components described in the above embodiments to create new embodiments. Other embodiments are exemplified below.
[0071] 5, 12, and other examples have been described in which each character region includes a string of characters consisting of multiple characters, but the character recognition process according to the embodiment can also be applied to cases in which a character region includes only one character. As a result, a character region including one character is connected to another character region including a string of characters consisting of multiple characters or a single character.
[0072] The character recognition device 1 in FIG. 1 and the character recognition device 1A in FIG. 15 may be configured to be connected to another device via a communication line and to transmit recognized characters to the other device.
[0073] Therefore, the components shown in the accompanying drawings and detailed description may include not only essential components for solving the problem, but also components that are not essential for solving the problem in order to illustrate the above technology. Therefore, the fact that these non-essential components are shown in the accompanying drawings or detailed description should not be interpreted as immediately indicating that these non-essential components are essential.
[0074] Furthermore, since the above-described embodiments are intended to illustrate the technology of the present disclosure, various modifications, substitutions, additions, omissions, etc. may be made within the scope of the claims or their equivalents.
[0075] [Summary of the embodiment] According to the character recognition device according to the first aspect of the present disclosure, A character recognition device that processes an input image and recognizes characters included in the input image, the character recognition device comprising: an arithmetic circuit; a memory storing instructions executable by the arithmetic circuit; When the instruction is executed, the arithmetic circuit Detecting a character string consisting of a plurality of characters or a plurality of character regions each including a single character in the input image; determining the orientation of the characters or character strings in each of the character regions; Recognizing a character or a character string in each of the character regions; generating a connected region by connecting at least two character regions each including a character or a character string having the same direction and adjacent to each other with a distance less than a threshold value; The characters or character strings included in the linked region are linked to each other.
[0076] According to the character recognition device according to the second aspect of the present disclosure, in the character recognition device according to the first aspect, When the instruction is executed, the arithmetic circuit generating an extended region by extending each character region in a direction perpendicular to the direction of the character or character string included in the character region; At least two character regions each including a character or a string of characters having the same direction, adjacent to each other with a distance less than the threshold, and each having an overlapping extension region are connected to generate a connected region.
[0077] According to a character recognition device according to a third aspect of the present disclosure, in the character recognition device according to the first or second aspect, When the instruction is executed, the arithmetic circuit Detecting a first object region including a first object and a second object region including a second object in the input image; Detecting a first character region or a first connected region included in the first object region; Detecting a second character region or a second connected region included in the second object region; Recognizing a first character or character string included in the first character region or the first connected region; Recognizing a second character or character string included in the second character region or the second connected region; comparing the first character or string to a third character or string pre-stored in association with the first object; The second character or string is compared against a fourth character or string pre-stored in association with the second object.
[0078] According to the character recognition method according to the fourth aspect of the present disclosure, 1. A character recognition method for processing an input image to recognize characters contained in the input image, the character recognition method comprising: detecting, in the input image, a character string consisting of a plurality of characters or a plurality of character regions each including a single character; determining the orientation of the characters or character strings in each of the character regions; recognizing a character or a string of characters in each of the character regions; generating a connected region by connecting at least two character regions each including a character or a string of characters having the same direction and adjacent to each other with a distance less than a threshold value; and connecting the characters or character strings included in the connected region to each other.
[0079] According to a character recognition method according to a fifth aspect of the present disclosure, in the character recognition method according to the fourth aspect, Detecting a first object region including a first object and a second object region including a second object in the input image; Detecting a first character region or a first connected region included in the first object region; detecting a second character region or a second connected region included in the second object region; Recognizing a first character or character string included in the first character region or first connected region; recognizing a second character or character string included in the second character region or the second connected region; comparing the first character or string of characters to a third character or string of characters pre-stored in association with the first object; and comparing the second character or string to a fourth character or string pre-stored in association with the second object.
[0080] According to the program according to the sixth aspect of the present disclosure, 1. A program including instructions to be executed by an arithmetic circuit implemented in a character recognition device for processing an input image and recognizing characters included in the input image, the instructions including: detecting, in the input image, a character string consisting of a plurality of characters or a plurality of character regions each including a single character; determining the orientation of the characters or character strings in each of the character regions; recognizing a character or a string of characters in each of the character regions; generating a connected region by connecting at least two character regions each including a character or a string of characters having the same direction and adjacent to each other with a distance less than a threshold value; and a step of concatenating characters or character strings included in the concatenated region.
[0081] According to a program according to a seventh aspect of the present disclosure, in the program according to the sixth aspect, The instruction is to cause the arithmetic circuit to: Detecting a first object region including a first object and a second object region including a second object in the input image; Detecting a first character region or a first connected region included in the first object region; detecting a second character region or a second connected region included in the second object region; Recognizing a first character or character string included in the first character region or first connected region; recognizing a second character or character string included in the second character region or the second connected region; comparing the first character or string to a third character or string pre-stored in association with the first object; and comparing the second character or string to a fourth character or string pre-stored in association with the second object. [Industrial Applicability]
[0082] A character recognition device, a character recognition method, and a program according to an aspect of the present disclosure are applicable to recognition of a character string spanning multiple lines. [Explanation of symbols]
[0083] 1,1A character recognition device 10 Bus 11 Central Processing Unit (CPU) 12 Memory 13 Storage device 14,14A Imaging Device 15,15A input device 16,16A display device 17 Input / Output Interface (I / F) 20 input images 21 Terminal block 22a~22c terminal 23a~23c Label 24a, 24c cable 25a, 25c Label 31 Object area including terminal block 32a to 32c Object area including terminals 33a, 33c Object area including cable 41~48 character area 41a~46a Extended area (extended character area) 51~53 Connected area (connected character area) 61~66 character area 71~73 Connected area (connected character area) 100 Character Recognition System P1~P6, P11~P16 Center of character area
Claims
1. A character recognition device that processes an input image of a distribution board, detects a terminal block, a terminal on the terminal block, and a cable connected to the terminal as an object area, and recognizes characters within the object area, the character recognition device comprising: an arithmetic circuit; a memory storing instructions executable by the arithmetic circuit; When the instruction is executed, the arithmetic circuit In the input image, the terminal block is detected as a first object region, the terminal is detected as a second object region, and the cable is detected as a third object region; Detecting a character string consisting of a plurality of characters or a plurality of character regions each including one character from the first object region and the third object region; determining the orientation of the characters or character strings in each of the character regions; Recognizing a character or a character string in each of the character regions; generating a connected region by connecting at least two character regions each including a character or a character string having the same direction and adjacent to each other with a distance less than a threshold value; Concatenating the characters or character strings included in the concatenated region with each other; determining the character region or the connected region detected in the first object region as a first character region or a first connected region, and recognizing a first character or character string included in the first character region or the first connected region; determining the character region or the connected region detected in the third object region as a second character region or a second connected region, and recognizing a second character or character string included in the second character region or the second connected region; comparing the first character or character string with the terminal number stored as master data; comparing the second character or character string with the cable number stored as the master data; If the first character or character string matches the number of the terminal and the second character or character string matches the number of the cable, it is determined that the cable is connected to the terminal. Character recognition device.
2. A character recognition method for a character recognition device including an arithmetic circuit and a memory storing instructions executable by the arithmetic circuit, which processes an input image of a distribution board, detects a terminal block, terminals on the terminal block, and cables connected to the terminals as an object area, and recognizes characters within the object area, When the instruction is executed, the arithmetic circuit detecting the terminal block as a first object region, the terminal as a second object region, and the cable as a third object region in the input image; detecting a character string consisting of a plurality of characters or a plurality of character regions each including one character from the first object region and the third object region; determining the orientation of the characters or character strings in each of the character regions; recognizing a character or a string of characters in each of the character regions; generating a connected region by connecting at least two character regions each including a character or a string of characters having the same direction and adjacent to each other with a distance less than a threshold value; concatenating characters or character strings included in the concatenated region with each other; a step of determining the character region or the connected region detected in the first object region as a first character region or a first connected region, and recognizing a first character or character string included in the first character region or the first connected region; a step of determining the character region or the connected region detected in the third object region as a second character region or a second connected region, and recognizing a second character or character string included in the second character region or the second connected region; comparing the first character or character string with the terminal number stored as master data; comparing the second character or string with the cable number stored as the master data; determining that the cable is connected to the terminal if the first character or character string matches the number of the terminal and the second character or character string matches the number of the cable; Character recognition method.
3. 1. A program for a character recognition device that processes an input image of a distribution board, detects a terminal block, a terminal on the terminal block, and a cable connected to the terminal as an object area, and recognizes characters in the object area, the program including instructions to be executed by an arithmetic circuit implemented in the character recognition device, the instructions including: detecting the terminal block as a first object region, the terminal as a second object region, and the cable as a third object region in the input image; detecting a character string consisting of a plurality of characters or a plurality of character regions each including one character from the first object region and the third object region; determining the orientation of the characters or character strings in each of the character regions; recognizing a character or a string of characters in each of the character regions; generating a connected region by connecting at least two character regions each including a character or a string of characters having the same direction and adjacent to each other with a distance less than a threshold value; concatenating characters or character strings included in the concatenated region with each other; a step of determining the character region or the connected region detected in the first object region as a first character region or a first connected region, and recognizing a first character or character string included in the first character region or the first connected region; a step of determining the character region or the connected region detected in the third object region as a second character region or a second connected region, and recognizing a second character or character string included in the second character region or the second connected region; comparing the first character or character string with the terminal number stored as master data; comparing the second character or string with the cable number stored as the master data; and determining that the cable is connected to the terminal if the first character or character string matches the number of the terminal and the second character or character string matches the number of the cable. program.
Citation Information
Patent Citations
Address region detector
JP1995265807A
Article management device, method thereof and program thereof
JP2017090970A
Mail address area detector
JP3673034B2