Character recognition apparatus

The character recognition device corrects curved surface images using a parabola reading and ellipse fitting to align characters horizontally, enabling accurate recognition on curved surfaces.

JP2025006464APending Publication Date: 2025-01-17TOYOTA JIDOSHA KK

Patent Information

Application Number
JP2023107277
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

Conventional character recognition technologies struggle to accurately read character strings written on curved surfaces due to the arrangement of characters not being in a straight line when converted into two-dimensional images.

Method used

A character recognition device that includes a parabola reading unit to read and correct images based on a parabola, aligning characters horizontally, and an image output section to output the corrected image on a plane, utilizing machine learning and ellipse fitting to separate and recognize characters.

Benefits of technology

Enables high-accuracy recognition of characters on curved surfaces by aligning them in a straight line, facilitating correct identification through optical character recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025006464000001_ABST
    Figure 2025006464000001_ABST
Patent Text Reader

Abstract

To provide a character recognition apparatus capable of accurately recognizing characters written on a curved surface.SOLUTION: A character recognition apparatus 10 is provided with: an image input unit 101 for receiving input of image data to be subjected to character recognition; a parabola reading unit 102 for reading at least one or more parabolas from an image; an image correction unit 103 for correcting an image based on the parabolas; and an image output unit 104 for outputting an image in which a character string is generated on a flat surface based on the image corrected by the image correction unit.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a character recognition device. [Background technology]

[0002] There are known techniques for character recognition of images. For example, Patent Document 1 discloses an invention that, when continuously written, accurately extracts and groups each character by comparing the size of the input character with a predetermined size based on character data. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2012-103755 A Summary of the Invention [Problem to be solved by the invention]

[0004] However, it is difficult for conventional techniques to read character strings written on curved surfaces. One reason for this is that when characters written on a curved surface are converted into two-dimensional images for image processing, the read character strings are rarely arranged in a straight line.

[0005] In view of the above technical problems, an object of the present disclosure is to accurately recognize characters written on a curved surface. [Means for solving the problem]

[0006] A character recognition device according to one aspect of the present disclosure is a character recognition device that recognizes a character string from an image captured of the character string placed close to a curved surface, and includes a parabola reading unit that reads at least one parabola from the image, an image correction unit that corrects the image based on the parabola, and an image output unit that outputs an image in which the character string is created on a flat surface based on the image corrected by the image correction unit. Effect of the Invention

[0007] According to one aspect of the present disclosure, characters written on a curved surface can be recognized with high accuracy. [Brief description of the drawings]

[0008] [Figure 1] 1 is a block diagram showing an example of a functional configuration of a character recognition device; [Diagram 2] 1 is a flowchart illustrating an example of a character recognition method. [Diagram 3] FIG. 13 is a diagram showing an example of an image. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. In this specification and the drawings, components having substantially the same functional configurations are denoted by the same reference numerals, and redundant description will be omitted.

[0010] One embodiment of the present disclosure is a character recognition device that uses machine learning to recognize a character string from an image of the character string. When image data showing an image of a character string arranged close to a curved surface is input, the character recognition device reads at least one parabola from the image and corrects the image so that a plurality of characters (character strings) included in the image are aligned horizontally based on the parabola. The character recognition device then separates the pixels in the image into individual black blocks, finds the top and bottom endpoints of each block, and fits the found point cloud data to an ellipse to detect the alignment of characters, and outputs an image in which the character string is created on a plane.

[0011] 1 is a block diagram showing an example of the functional configuration of a character recognition device 10. As shown in FIG. 1, the character recognition device 10 includes an image input unit 101, a parabola reading unit 102, an image correction unit 103, and an image output unit 104.

[0012] The image input unit 101 accepts input of image data to be subjected to character recognition. The image data shows an image of a character string arranged close to a curved surface. Specifically, the image is an image of a component having a curved surface on which a character string (e.g., a manufacturer name and / or a model number) is written. It is preferable that the image is taken in the same direction for each type of component.

[0013] The parabola reading unit 102 reads at least one parabola from the image data input to the image input unit 101. The type of part is preset in the parabola reading unit 102, and the parabola may be read from a region that is predetermined according to the type of part. When multiple parabolas are read, the parabola reading unit 102 may average the curvatures of the parabola or may use one of the parabolas alone.

[0014] Image correction unit 103 corrects the image input to image input unit 101 based on the parabola read by parabola reading unit 102. Specifically, image correction unit 103 corrects the image so that the parabola becomes a straight line. In the corrected image, character strings arranged close to a curved surface are aligned horizontally in a row.

[0015] The image output unit 104 recognizes a character string from the image corrected by the image correction unit 103. The image output unit 104 may exclude characters larger than a threshold value that is determined in advance according to the size of the component from the recognition target. The image output unit 104 fits the recognized character string to an ellipse, and generates an interpolated image of an image obtained by stretching the image on the ellipse onto a plane. The image output unit 104 outputs an image in which the recognized character string is created on a plane.

[0016] The image output unit 104 may perform ellipse fitting using multiple ellipses with approximately equal diameters, utilizing the property that character strings are arranged on a curved surface in an image. Also, the image output unit 104 may perform ellipse fitting using multiple ellipses that are approximately symmetrical in the left and right directions, utilizing the property that curved surfaces are symmetrical in the left and right directions.

[0017] 2 is a flowchart showing an example of a character recognition method executed by the character recognition device 10. The character recognition method according to the present embodiment will be specifically described below with reference to FIG.

[0018] In step S1, the character recognition device 10 accepts input of image data to be recognized. FIG. 3(A) is an example of an image to be recognized. Image 100 shown in FIG. 3(A) is an example of an image of a spark plug. Note that the part is not limited to a spark plug, and may be, for example, an oil filter or a sensor. Image 100 includes an insulator portion 110 and a label portion 120. Insulator portion 110 is an area in which the insulator of the spark plug is imaged. Label portion 120 is an area in which the label to be recognized is imaged.

[0019] In step S2, the character recognition device 10 performs a process of detecting the insulator portion 110. In step S3, the character recognition device 10 performs a process of cutting out an image of the insulator portion 110 and an image of the label portion 120.

[0020] Fig. 3(B) is an example of an image cut out from the insulator part 110. As shown in Fig. 3(B), a plurality of parabolic curves 111 are captured in the insulator part 110.

[0021] Fig. 3(C) is an example of an image cut out from label part 120. As shown in Fig. 3(C), an image of character strings 121 written on a curved surface of a part is captured on label part 120. Here, character strings 121 are arranged in a parabolic shape.

[0022] In step S4, character recognition device 10 performs a parabola approximation process using the image of insulator portion 110 cut out in step S3. In step S5, character recognition device 10 performs a correction process for the image of label portion 120 using the parabola approximated in step S4. Character recognition device 10 corrects the image of label portion 120 so that the parabola read from the image of insulator portion 110 becomes straight. As a result, character recognition device 10 obtains an image in which character strings 121 are arranged in a horizontal row. By performing approximation using a parabola, character recognition device 10 can correct the image with high accuracy.

[0023] In step S6, the character recognition device 10 performs a binarization process for the image. In step S7, the character recognition device 10 performs a contour extraction process and a circumscribing rectangle acquisition process. These processes can be performed by known image processing.

[0024] In step S8, the character recognition device 10 performs a process of regarding the circumscribing rectangle as a character. At this time, the character recognition device 10 regards only the circumscribing rectangles obtained in step S7 that are smaller than a predetermined threshold value when compared with the area of ​​the label unit 120 as characters. For example, the circumscribing rectangle located on the outer edge of the label unit 120 may be a large continuous area due to the shadow of a component. In this case, since it is not possible to recognize a character from the circumscribing rectangle, the circumscribing rectangle is excluded from the recognition target.

[0025] In step S9, the character recognition device 10 performs a process of regarding adjacent characters as consecutive based on the positional relationship of the characters. The condition for regarding two characters as consecutive is that the following two conditions are satisfied. The first condition is that A is the distance between the right end of the left character and the left end of the right character (i.e., the distance between the left character and the right character), B is the distance between the left end of the left character and the right end of the right character (i.e., the width of the range that includes the two characters), and A / B<threshold 1 is true. Threshold 1 may be, for example, 0.5. The second condition is that C is the shorter of the distances between the top end of one character and the bottom end of the other character, D is the longer of the distances between the top end of one character and the bottom end of the other character, and C / D>threshold 2 is true. Threshold 2 may be, for example, 0.8.

[0026] Conventionally, in the process of regarding adjacent characters as continuous, threshold 1 was set to about 0.2 and threshold 2 was set to about 0.5. In this embodiment, since the image is corrected using a parabola, threshold 2 can be set to a larger value than conventionally. In conventional technology, if the horizontal distance is large (if A / B is large), the difference in the vertical positional relationship becomes large (C / D becomes small), so the character sequence could not be determined correctly. By correcting the image using a parabola, the vertical positions become closer (C / D becomes large), so the character sequence can be determined correctly even if the horizontal distance is large (even if A / B is large).

[0027] In step S10, character recognition device 10 generates character chunks based on the positional relationship of the circumscribing rectangles. Image 120A shown in Fig. 3(D) is an example of an image in which character chunks are acquired from label unit 120. Next, character recognition device 10 acquires the upper and lower endpoints of the character chunks. Image 120B shown in Fig. 3(E) is an example of an image in which the upper and lower endpoints are acquired for each character chunk.

[0028] In step S11, the character recognition device 10 performs a process of returning the points acquired in step S10 to the points before correction by inverse correction of the parabolic correction performed in step S5, thereby inversely correcting the upper and lower endpoints of the character block to their positions before correction.

[0029] In step S12, character recognition device 10 performs a process of fitting an ellipse to the upper end point of each character block. In step S13, character recognition device 10 performs a process of fitting an ellipse to the lower end point of each character block. Image 120C shown in Fig. 3(F) is an example of an image in which an ellipse is fitted to the upper and lower end points of a character block. As shown in Fig. 3(F), in steps S12 and S13, fitting is performed so that the upper half of the ellipse passes through the upper end point or the lower end point of the character block.

[0030] In step S14, the character recognition device 10 performs ellipse fitting again on the ellipses obtained by the approximations in steps S12 and S13 together. At this time, the character recognition device 10 performs fitting under the assumption that the x coordinates of the center points and the major axes are the same for all the ellipses.

[0031] In step S15, character recognition device 10 corrects the image of label portion 120 with the ellipse estimated in step S14. Specifically, character recognition device 10 generates an image in which the side surface (curved surface) of a cylinder formed by an upper ellipse passing through the upper end point and a lower ellipse passing through the lower end point is interpolated (image corrected) into a rectangle (plane).

[0032] More specifically, the character recognition device 10 performs image correction as follows. The dimensions of the plane are W×H. W is an approximation of half the perimeter of the upper ellipse. H is the distance between the upper ellipse and the lower ellipse, and corresponds to the height of the cylinder. In this cylinder, A1 is the major axis radius of the upper ellipse, A2 is the major axis radius of the lower ellipse, B1 is the minor axis radius of the upper ellipse, B2 is the minor axis radius of the lower ellipse, (Cx1, Cy1) is the central coordinate of the upper ellipse, (Cx2, Cy2) is the central coordinate of the lower ellipse, and B1=B2, A1=A2, and Cx1=Cx2 are all satisfied. Pixels are copied from the cylinder surface to all dots (X, Y) on this plane.

[0033] First, θ is found from X using θ=πX / Y. This determines the position of the straight line in the height direction of the cylinder's surface that corresponds to X. Next, a point that divides the line internally into H:HY is identified. Next, the color of the identified point is detected. The color can be obtained by interpolating from the pixel values ​​of the four neighbors. If the point on the cylinder's surface does not have integer coordinates, the color can be obtained by bilinear interpolation from the pixel values ​​of the four neighbors. The color of the dot (X,Y) on the plane is then set to the color of the point identified on the cylinder's surface. This results in an interpolated image in which the image of the cylinder's surface is extended onto the plane.

[0034] In step S16, character recognition device 10 outputs the image generated in step S15. In the output image, the character strings recognized in step S15 are created on a plane. Since the character strings are arranged in a straight line in the output image, the character strings can be correctly recognized by optical character recognition (OCR) or the like based on the output image.

[0035] Although the embodiments of the present invention have been described in detail above, the present invention is not limited to these embodiments, and various modifications and changes are possible within the scope of the gist of the present invention described in the claims. [Explanation of symbols]

[0036] 10 Character recognition device 101 Image input unit 102 Parabola reading unit 103 Image correction section 104 Image output unit

Claims

[Claim 1] A character recognition device that recognizes a character string arranged close to a curved surface from an image of the character string, the device comprising: a parabola reading unit that reads at least one parabola from the image; an image correction unit that corrects the image based on the parabola; an image output unit that outputs an image in which the character string is created on a plane based on the image corrected by the image correction unit; A character recognition device comprising:

Citation Information

Patent Citations

  • Character string output device, character recognition system, program, and character string output method

    JP2012103755A

Cited By

  • Cable sprayed code character reading method and system based on image recognition

    CN121963217A

  • A cable inkjet character reading method and system based on image recognition

    CN121963217B