Text recognizer using contour segmentation

A text recognition method using contour detection and segmentation addresses the limitations of existing solutions by accurately extracting text from documents with varying quality and characteristics, enhancing performance through machine learning.

JP2024154426APending Publication Date: 2024-10-30THE BOEING CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024067071
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-18
Filing Date
2024-04-17
Publication Date
2024-10-30

AI Technical Summary

Technical Problem

Current text recognition solutions lack robustness and accuracy when processing documents with smeared, handwritten, or overlapping text, failing to effectively extract text characters due to reliance on techniques that require clear, well-defined contours and white space separation.

Method used

Implementing a text recognition method utilizing contour detection and segmentation, employing machine vision and machine learning techniques to identify and parse overlapping and non-overlapping characters, using contour detection algorithms and machine learning models to classify text characters.

Benefits of technology

Enables accurate text recognition from diverse document types, including those with overlapping characters, improving performance over time through machine learning enhancements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024154426000001_ABST
    Figure 2024154426000001_ABST
Patent Text Reader

Abstract

To provide a computing device for text recognition using contour detection and a method for text recognition.SOLUTION: In a computing system 100, a computing device 102 comprises a processor 104 coupled to a non-volatile memory 112 that stores instructions stored in a text recognition program 112. The instructions, when executed by the processor, cause the processor to: receive a data file including an image; recognize at least one contour in the image; partition the at least one contour into a plurality of segments; and recognize a text character in each segment of the plurality of segments.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The field of the invention relates generally to text recognition, and more specifically to text recognition using contour detection. [Background technology]

[0002]

[0002] Digitization of real documents is often performed for various purposes such as business and personal workflow. Typically, the digitization process converts the real document into a digital image file by using a scanning device. The scanned image data generally represents the real document as pure image data. That is, the scanned image data does not include any text data, even if text was present in the real document. To ensure more functionality, text recognition processes can extract text from the image and reduce it to a machine-readable format that can be edited, searched, manipulated, etc. by text editors and word processing applications. Such processes are typically implemented as automated electronic algorithms. Automated electronic algorithms use machine vision techniques to recognize data present in the image data and perform text classification to convert the recognized text into machine-readable text data. Summary of the Invention

[0003] An embodiment of a computing device for text recognition is provided, the computing device comprising a processor coupled to a storage medium storing instructions that, when executed by the processor, cause the processor to receive a data file including an image, recognize at least one contour in the image, segment the at least one contour into a plurality of segments, and recognize text characters within each of the plurality of segments.

[0004] Another aspect provides a method for text recognition, the method including receiving a data file including an image, recognizing at least one contour in the image, segmenting the at least one contour into a plurality of segments, and recognizing text characters in each segment of the plurality of segments.

[0005] Another aspect provides a computing device for text recognition, the computing device comprising a processor coupled to a storage medium storing instructions that, when executed by the processor, cause the processor to: receive a data file including an image, recognize a plurality of contours in the image, filter the plurality of contours to remove contours corresponding to non-text portions of the image, segment each remaining contour in the plurality of contours into one or more segments, recognize text characters in each segmented segment using a text classification machine learning model, and output the recognized text characters. Have them carry out the procedure.

[0006]

[0006] This Summary is provided to introduce selected concepts in a simplified form that are described in more detail below in the Detailed Description. This Summary is not intended to identify key or critical features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. Moreover, the claimed subject matter is not limited to implementations that solve any or all of the disadvantages noted in any part of this disclosure. [Brief description of the drawings]

[0007] [Figure 1] 1 shows a schematic diagram of an exemplary computing system for text recognition. [Figure 2A] 1 illustrates an exemplary text recognition framework for extracting text from images. [Figure 2B]1 illustrates an exemplary text recognition framework for extracting text from images. [Diagram 3] 1 illustrates an exemplary text recognition process for words in an image. [Figure 4] 1 shows a flow diagram of an exemplary method for text recognition using contour detection and segmentation. [Diagram 5] 1 illustrates a schematic diagram of an example computing environment in which one or more of the methods and processes described herein may be implemented. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0008]

[0012] Current text recognition solutions lack robustness and excel only when dealing with certain documents and texts. Generally, such solutions are designed to work well with texts with clear and distinct outlines and regularly spaced characters that are typically found in modern printed documents. However, such solutions lose accuracy when the quality of the analyzed image deviates from the required format (e.g., texts of different fonts, sizes, and clarity). For example, documents with smudged or handwritten text may be difficult to convert with modern text recognition solutions. Such use cases often involve old and / or technical documents. Most modern text recognition solutions rely on optical recognition and computer vision techniques to extract text character by character, separating characters by detecting white space between characters. However, such solutions are not effective for certain types of text. For example, overlapping characters, i.e., characters with contours that are adjacent to each other within a certain threshold, may be difficult to parse with such solutions. In the use cases mentioned above, overlapping characters may be common, but modern text recognition solutions fail to provide an adequate level of accuracy in such cases.

[0009]

[0013] Considering the above discussion, an embodiment of a text recognition method using contour detection and segmentation is provided. A robust text recognizer can be implemented using various machine vision and / or machine learning techniques to extract text of various qualities and characteristics from an image, including text with overlapping characters. Overlapping characters occur in scanned documents due to various reasons, such as handwritten text, smudged text, and certain fonts. A text recognizer can be implemented using various contour detection and segmentation techniques to recognize and parse text from an image. Such an implementation allows text recognition for both overlapping and non-overlapping characters.

[0010]

[0014] 1 shows a schematic diagram of an exemplary computing system 100 for text recognition. The computing system 100 includes a computing device 102. The computing device 102 includes a processor 104 (e.g., a central processing unit, or "CPU"), an input / output (I / O) module 106, a volatile memory 108, and a non-volatile memory 110. The various components are operatively coupled to each other. The non-volatile memory 110 stores a text recognition program 112. The text recognition program 112 includes instructions for the various software modules described herein for execution by the processor 104.

[0011]

[0015] The instructions stored in the text recognition program 112, when executed by the processor 104, cause the processor 104 to initiate the text recognition process, including receiving image data 114. The image data 114 may be received or provided through a variety of means. In some implementations, the image data 114 is received as a file from an external source, such as a remote device. In some implementations, the image data 114 is provided from a local source, such as captured from local storage or a local image scanning device. Files of various formats may be converted into the appropriate image format for use by the text recognition program 112. For example, in some implementations, files in the Portable Document Format (.pdf), standardized as ISO 32000, are converted into another format before being utilized by the text recognition program 112.

[0012]

[0016] The text recognition program 112 includes a contour detection module 116 for generating contour data 118 from the image data 114. The contour data 118 may be represented in a variety of ways. In some implementations, the contour data 118 represents one or more contours recognized by the contour detection module 116 for a given image from the image data 114. Each contour generally represents a single character, multiple characters, or non-text artifacts found in the given image. In some implementations, a filtering process is applied to remove non-text contours from the contour data 118. Contours representing multiple characters may indicate the presence of overlapping characters.

[0013]

[0017] The contour detection module 116 may be implemented in a variety of ways. In some implementations, the contour detection module 116 utilizes a threshold contour detection algorithm to recognize one or more contours in a given image, such as an image from the image data 114, by finding a group of spatially adjacent pixels within a predefined spatial threshold. Adjacent pixels may be identified by finding and grouping pixels that exceed a threshold. The threshold indicates a non-blank pixel that is adjacent to another pixel that exceeds the threshold in the same group. For example, in some implementations, the image to be analyzed from the image data 114 is a grayscale image or is converted to a grayscale image, with the value of the pixel indicating its grayscale value. The contour detection algorithm may be implemented to scan the image to find a pixel that meets the threshold. From that pixel, other pixels that meet the threshold within the proximity threshold are added to the group of pixels. The proximity threshold for identifying such pixels may be based on a spatial distance that may vary depending on the application. In some implementations, the proximity threshold is one pixel. In such cases, two pixels are said to be adjacent if they are directly adjacent to each other. The process is repeated until no new pixels are found and the group of pixels is identified as a contour. The algorithm may continue to scan the image to identify various contours.

[0014]

[0018] The text recognition program 112 includes a contour segmentation module 120 for generating segmentation data 122 from the contours in the contour data 118. The segmentation data 122 may be represented in various ways. In some implementations, the segmentation data 122 details one or more segments generated by the contour segmentation module 120 for a given contour. Thus, if the contour data 118 includes more than one contour, each contour may be segmented to generate a different set of segmentation data. Each set of segmentation data details one or more segments. Each segment generally represents a text character in the given contour. Thus, the segmentation data 118 including more than one segment may represent a contour having multiple characters (e.g., a contour representing overlapping characters).

[0015]

[0019] The contour detection module 120 can be implemented in a variety of ways. In some implementations, the contour delimitation module 120 generates a bounding box for each contour, which is inscribed into the bounding box. The contour delimitation module 120 can delimit the contour by dividing the bounding box based on a predefined pixel width value. For example, the bounding box can be divided into multiple sub-bounding boxes, which divides the contour into multiple segments, each segment having a predefined pixel width value. The predefined pixel width value can correspond to a character pixel width determined for a given image. Thus, each segment corresponds to a different text character.

[0016]

[0020] The character pixel width may be determined in various ways. In some implementations, a contour with a bounding box having a minimum pixel width is used to determine the character pixel width. The pixel width value of the bounding box may be compared to its pixel height value, and the height-width ratio may be used to infer whether the bounding box represents a single character. In some implementations, a bounding box with a height-width ratio less than 1 may represent a single character. Multiple predefined pixel width values ​​may be utilized. For example, bounding boxes of various heights may represent text of various font sizes for a given image. In such a case, which predefined pixel width value is selected for a given bounding box may depend on the pixel height value of the bounding box. For example, the same predefined pixel width value may be used for contours with similar pixel height values. Multiple predefined pixel width values ​​may be defined based on the height-width ratio of the bounding box associated with the initial predefined width value. Different predefined pixel width values ​​may be determined for different contours with different heights from the bounding box based on the height-width ratio of the bounding box associated with the initial predefined pixel width value so that the height-width ratio remains similar. As can be readily appreciated, such an algorithm may exclude bounding boxes with height-to-width ratios that suggest that the associated contours represent multiple characters, as is the case for overlapping characters, for example.

[0017]

[0021] The text recognition program 112 includes a text classification module 124 for generating recognized text characters 126 from segments in the segmented data 122. The text characters may be symbols, numbers, letters, etc. A set of text characters may be defined for any given alphabet. The text classification module 124 may be implemented to recognize the text characters 126 for each segment in the segmented data 122. As mentioned above, multiple sets of segmented data may be provided if more than one contour is detected. The text classification module 124 may be implemented to generate recognized text characters 126 for each segment of the multiple sets of segmented data.

[0018]

[0022] The text classification module 124 can be implemented in various ways. In some implementations, the text classification module 124 includes a machine learning model. The machine learning model can be implemented for image classification that takes each segment image and outputs a corresponding predicted text character. The machine learning model can be designed to output a prediction according to a predetermined set of possible classifications corresponding to a set of possible text characters. For example, a set of 36 characters can be defined to represent the 10 Arabic numerals and the 26 letters of the Latin alphabet. Any other set may be defined for one or more alphabets. Various types of machine learning architectures can be used, including, but not limited to, Convolutional Neural Networks (CNNs) and Residual Networks (ResNets). The machine learning model can be trained for character text classification. In some implementations, the machine learning model is trained using training data that includes images of a predetermined set of text characters. The training data may further include images of transformed text characters. Various transformations and logical operations can be applied to generate training image data that includes multiple variants of a given text character. Examples of transformations include, but are not limited to, stretching, scaling, and skewing. Other variants of training data may also be implemented. For example, training data having text characters in a variety of fonts can be used.

[0019]

[0023] FIG. 1 details a process for generating recognized text characters for a given input image. The process may be implemented as part of a general framework for extracting text from a given input image. The framework may include additional or alternative steps. For example, the process for generating recognized text characters may be repeated until all text in a given image is recognized, and a text appending step may be implemented to generate words from the recognized text characters. In some implementations, the framework includes a contour filtering step that removes non-text contours generated during the contour detection process.

[0020]

[0024] 2A and 2B illustrate an exemplary text recognition framework 200 for extracting text from an image. It should be understood that various components illustrated in FIGS. 2A and 2B, such as bounding boxes and contours, are not drawn to scale. The framework 200 can be implemented as a robust text recognizer capable of extracting text from various types of documents. For example, the framework 200 can extract text from technical documents, such as wiring diagrams, as well as printed documents that contain large amounts of formatted text. The framework 200 begins with image data 202, which can be provided by a variety of means. For example, the image data 202 can be provided from a remote or local source. In some implementations, the image data 202 is provided by an image scanning device. The image data 202 can also be an image that has been converted from a different file format.

[0021]

[0025] The framework 200 includes a contour detection step 204 that recognizes one or more contours in the image data 202, where each contour generally represents a character, multiple characters, or a non-text artifact. The contour detection step 204 may be performed using a variety of processes. In some implementations, the contour detection step 204 performs a threshold contour detection algorithm. The threshold contour detection algorithm may be implemented to detect contours by finding groups of adjacent pixels. Adjacent pixels may be identified by finding and grouping pixels that are above a threshold that are within a proximity threshold to another pixel in the same group. Any other contour detection algorithm may be implemented, including but not limited to an edge detection algorithm.

[0022]

[0026] The framework 200 may optionally include a contour filtering step 206 to remove detected contours that correspond to non-text elements in the image data 202. In the illustrated embodiment, the image data 202 includes an image of a wiring diagram. The previously performed contour detection step 204 may detect contours that correspond to wiring components, as well as symbols and alphabetic text characters in the wiring diagram. Contours that correspond to wiring components and symbols are non-text elements that may be removed from the set of detected contours before text classification is performed.

[0023]

[0027] The contour filtering step 206 can be performed in a variety of ways. In some implementations, the dimensions of the bounding box around the contour are used to determine the non-text contours. For example, a bounding box that is too large or contains a height-to-width ratio that is not typical for text may be classified as a non-text element. In the illustrated embodiment, the bounding box 207 is a large bounding box relative to the size of the image. Thus, a contour inscribed in the bounding box 207 is likely not a text element. Other methods of filtering contours include manual selection, prompting the user to select non-text contours to be removed. Another method includes the use of machine learning models. In some implementations, the implemented machine learning models are trained to recognize text and non-text elements using training data associated with a particular industry-specific or domain-specific application. For example, in the illustrated embodiment, a machine learning model trained to recognize wiring diagram components and symbols may be implemented to detect text and non-text elements in wiring diagram images.

[0024]

[0028] The framework 200 includes a contour segmentation step 208 for segmenting the contour into segments, each of which represents a text character. Segmentation can be done for each contour by dividing its bounding box, which divides the contour into segments. In some cases, no segmentation is done (e.g., a segment encompasses the entire contour) since the contour represents a single text character. The bounding boxes may be segmented according to predefined pixel width values. In some implementations, the predefined pixel width values ​​correspond to character pixel widths. For example, in the case of an image having various texts, multiple predefined pixel width values ​​may be utilized.

[0025]

[0029] Character pixel widths can be determined in a variety of ways. In some implementations, a contour with a bounding box having a minimum pixel width value that generally corresponds to a contour representing a single text character is used to determine the character pixel width. If an image does not contain a contour corresponding to a single text character, for example, if every text character overlaps at least one other text character, the height-width ratio of the bounding box can be used to determine the character width. For example, since the height is typically constant for a given text size, the height-width ratios of multiple bounding boxes of similar heights can be compared to estimate and determine the character width.

[0026]

[0030] The framework 200 includes a text classification step 210. In the text classification step 210, each segment defined by a bounding box is analyzed and recognized as a text character. The text characters may be symbols, numbers, letters, etc. In some implementations, an alphabet is defined that includes the available text characters, and the segments are classified into text characters of the defined alphabet. For example, a set of 36 characters may be defined to represent the 10 Arabic numerals and the 26 letters of the Latin alphabet. The text classification process may be performed in various ways. In some implementations, a machine learning model is implemented to perform the text classification. Any machine learning architecture may be utilized for text classification, including CNNs and ResNets. Training of such models may also be performed using various training datasets. For example, training data including images of text characters and various transformations of such text characters may be used for training the machine learning model.

[0027]

[0031] The framework 200 includes a text appending step 212 for appending the recognized text characters. The recognized text characters can be appended to form "words". A "word" generally refers to a set of characters without any white space between the characters in the set. The appending process can be performed using various algorithms. In some implementations, the recognized text characters can be based on the location of the segmented bounding boxes to which their respective segments correspond. For example, an algorithm can be implemented to scan the image. Once a bounding box is reached, the X and Y position coordinates of the bounding box can be recorded. Other bounding boxes having X and Y position coordinates within a predefined threshold of the initial bounding box can be determined to be within the same "word".

[0028]

[0032] The threshold for identifying whether the bounding boxes are part of the same "word" may depend on various factors including the character pixel width and the language of the text. For example, for a left-to-right language, a raster scan of the image may be performed from left to right to find an initial bounding box. If the scan continues and another bounding box is found within the same Y coordinate of the initial bounding box, it may be assumed that the text characters of the new bounding box are in the same column as the initial bounding box. A bounding box with a constant Y coordinate (within the threshold) and an increasing X coordinate indicates that the text characters of that bounding box are part of the same word. If the X coordinate of the new bounding box is less than a character width away from the X coordinate of the initial bounding box, the text characters of the two bounding boxes may be identified as being in the same "word". The process may be repeated with a second bounding box until no other new bounding boxes are found. As can be easily understood, any algorithm may be implemented to perform the above steps. For example, the X coordinate of the right side of the initial bounding box may be used to compare with the X coordinate of the left side of the new bounding box. If the difference between the two is less than the character pixel width, the two bounding boxes can be added. Additionally or alternatively, the algorithm can default to assuming that overlapping characters are part of the same "word".

[0029]

[0033] The framework 200 may optionally include a word correction step 214. Using the various output recognized texts 216, word correction can be performed on the added words generated in the text addition step 212. If the word correction step 214 is not performed, the added text is output as the recognized text 216. In some implementations, natural language processing techniques are implemented to perform the word correction. For example, during character text classification, confusion often occurs in the classification of the number "0" and the letter "O". Natural language processing techniques can correct these mistakes. For example, the number "0" does not usually appear between characters, so in this case it can be corrected as the letter "O". Furthermore, natural language processing techniques can be used to correct words based on context from nearby words, for example, correcting sentence structure and grammar. In some implementations, machine learning models are implemented to perform natural language processing and provide predicted output text.

[0030]

[0034] Additionally or alternatively, a word repository 218 can be utilized for the word correction process. The word repository 218 may be initially empty, and words are added over time as the text recognizer matures. In some implementations, the word repository 218 is initially equipped with one or more dictionaries. Examples of dictionaries include language-specific dictionaries, technical dictionaries, domain-specific dictionaries, and customized dictionaries. Such implementations may be useful when the framework 200 is often used on similar documents. For example, in a set of industry-specific or domain-specific documents, words may appear repeatedly that do not make sense in other contexts. The images shown in Figures 2A and 2B show wiring diagrams with domain-specific word structures / formats (e.g., three consecutive digits followed by a letter). Such words can be added to the word repository over time as the text recognizer is implemented, allowing for better word recognition and word correction in future applications.

[0031]

[0035] Another aspect of the word correction process may include the use of confidence scores. During the literal text classification process, a confidence score may be calculated based on the predicted accuracy of the literal text classification. For example, an image classification machine learning model may be used to output a prediction along with a confidence score indicating the accuracy of the prediction. In some implementations, the word correction process outputs the predicted word along with the confidence score. A low confidence score may result from various sources. For example, in an implementation where the contours of overlapping characters are divided into equal-width segments, certain characters may be ideally segmented by having a different width relative to other characters (e.g., the number "1" is narrower than other text characters). The confidence score may be used in the word correction process in various ways. In some implementations, a low confidence score may be indicated to the user and correction may be made using user input. In some implementations, the confidence score is used in a combination of natural language processing techniques, such as using a machine learning model, to perform word correction.

[0032]

[0036] Figures 2A and 2B show schematic diagrams of a text recognition process. As a more specific example, Figure 3 shows an exemplary text recognition process 300 for a word 302 in the image shown in Figures 2A and 2B. It should be understood that various components shown in Figure 3, such as bounding boxes and contours, are not drawn to scale. In a first step, image data is provided 304. The image data includes an image that includes a word 302. In the illustrated example, the word 302 is "D430". The image data may be provided using any of the processes described above.

[0033]

[0037] A contour detection step 306 is performed on the provided image data and a bounding box is generated that includes the detected contours. Any of the processes described above may be used to perform the contour detection. In the illustrated embodiment, two different contours are detected in the word 302 and two corresponding bounding boxes are generated. The letter "D" does not overlap with an adjacent letter and is represented by a first contour. The remaining letter "430" is an overlapping letter and is represented by a second contour. A first bounding box 308 is generated around the first contour and a second bounding box 310 is generated around the second contour.

[0034]

[0038] A contour delimitation step 312 is performed on the detected contours and the generated bounding boxes. Any of the processes described above may be used to perform the contour delimitation. In the illustrated embodiment, the letter "D" and its associated contours are identified as a single character, and therefore the first contour is not delimited. The width (relative to its height) of the bounding box 310 of the second contour indicates that the second contour represents more than one character. Thus, the second contour and its bounding box 310 are delimited. The bounding box 310 is delimited based on a predefined pixel width value. For example, the pixel width value of the first bounding box 308 identified to represent a single character may be used to divide the second bounding box 310. In the illustrated embodiment, the pixel width of the second bounding box 310 is identified to represent three characters, and the second bounding box 310 is delimited into three sub-bounding boxes 314A-314C. Such identification may be based on the similarity of the pixel width (character pixel width value) of the first bounding box 308 and the height (within a predetermined threshold) of the first and second bounding boxes 308, 310. With this information, the number of characters that the second contour represents can be estimated using the pixel width of the second bounding box 310.

[0035]

[0039] In some embodiments, an initial recognition of characters on the same document image or related document images may be performed to obtain characters that include white space separation (e.g., one or more white space pixels that separate characters). The recognized characters may be used to obtain predefined pixel width values ​​before corresponding to contours that include potential overlapping characters (i.e., contours having multiple characters). Additionally, by capturing the widths of characters in the same document image, the height-width ratio of recognized characters may be scaled according to bounding box sizes with potential overlapping characters.

[0036]

[0040] A text classification step 316 is performed to recognize each character within the bounding boxes. Any of the processes described above may be used to perform the text classification. In the illustrated embodiment, bounding box 308 is recognized as the character "D", sub-bounding box 314 is recognized as the character "4", sub-bounding box 314B is recognized as the character "3", and sub-bounding box 314C is recognized as the character "0".

[0037]

[0041] A text addition step 318 is performed to add the recognized characters based on their proximity to each other to form words. Any of the processes described above may be used to perform the text addition. In the illustrated embodiment, the spatial location of the bounding boxes is identified to be within a predetermined threshold, and thus added to form words. For example, the Y coordinate or vertical location of the bounding boxes is identified to be within a predetermined threshold, indicating that the characters are in the same column. Furthermore, the lack of any white space in the horizontal dimension between the separated second contours identifies the characters "4", "3", and "0" as being part of the same word. The white space between the first bounding box 308 of the first contour and the closest bounding box 314 is less than a predetermined threshold, and the character "D" is identified as being part of the same word as the other three characters. In the illustrated embodiment, the predetermined threshold is the pixel width of a single character, which is the pixel width of the first bounding box 308.

[0038]

[0042] An optional word correction step 320 may be performed to correct the appended text. Any of the processes described above may be used to perform word correction. In the illustrated embodiment, the word "D430" is identified as the correct word and is output as recognized text 322.

[0039]

[0043] 4 shows a flow diagram of an exemplary method 400 for text recognition using contour detection and segmentation. In step 402, the method 400 includes receiving a data file that includes an image.

[0040]

[0044] In step 404, the method 400 includes recognizing at least one contour in the image. In some implementations, multiple contours are recognized in the image. Recognizing the contour can be performed in a variety of ways. An exemplary process includes using a threshold contour detection algorithm. Such a process can be implemented to recognize the contour by finding a group of pixels that are spatially adjacent within a predetermined threshold. Neighboring pixels can be identified by first finding a pixel that is above the threshold, which indicates a non-white space pixel, and adding that pixel to the group. The algorithm then attempts to find other pixels above the threshold that are within the proximity threshold to a pixel in the group. This process continues until no more new pixels are found, and once the group of pixels is identified as a group of neighboring pixels, a contour is formed. The proximity threshold can be determined by a variety of methods. The proximity threshold can be determined based on a spatial distance, which may vary depending on the application. In recognizing a different contour, the process can be repeated for a new group of pixels.

[0041]

[0045] In step 406, the method 400 may optionally include filtering the multiple contours in the image to remove non-text portions. If multiple contours are recognized, a filtering step can be performed to remove contours that correspond to non-text. For example, in technical documents, non-text artifacts may exist, and the contours of such artifacts are recognized as well as the contours of text portions. Identifying contours that correspond to non-text portions can be done in various ways. In some implementations, such identification of contours is provided through user input. In some implementations, a machine learning model is implemented to predict whether a contour represents text. For example, an image of a given contour can be input to a text classification convolutional neural network to determine whether a given contour corresponds to a text character. Other types of machine learning models can also be implemented to identify non-text contours.

[0042]

[0046] At step 408, the method 400 includes segmenting at least one contour into multiple segments. The segmentation process may be performed for each contour. In some implementations, the contour segmentation is performed by generating a bounding box into which the contour is carved. The bounding box may be divided to segment the contour into multiple segments. In some implementations, the bounding box may be divided based on a predetermined pixel width value, resulting in equal-width segments. The predetermined pixel width value may correspond to a character width determined for a given image.

[0043]

[0047] Character width may be determined in various ways. In some implementations, a bounding box with a minimum pixel width is used to determine the character width. The pixel width value of the bounding box may also be compared to its height value, and the height-to-width ratio may be used to infer whether the contours within the bounding box represent a single character. In some implementations, a bounding box with a height-to-width ratio less than one may represent a single character. Multiple predefined pixel width values ​​may be utilized for a given image. In such cases, the selection of which predefined pixel width value to utilize for a given contour may depend on the height value of the bounding box into which the contour is inscribed. For example, the same predefined pixel width value may be used for bounding boxes with similar height values. By partitioning the contours according to the predefined pixel widths of a given character, the characters may be segmented without any white space separation between characters (e.g., without any white space pixels between characters).

[0044]

[0048] At step 410, the method 400 includes recognizing text characters in each segment of the plurality of segments. In some implementations, recognizing the text characters in each segment is performed using a character classification machine learning model. The machine learning model may be implemented for image classification that takes each segment image and outputs a corresponding predicted text character. The machine learning model may be designed to output a prediction according to a predetermined set of possible classifications corresponding to a set of possible text characters. Various types of machine learning architectures may be used, including, but not limited to, CNNs and ResNets. In some implementations, the machine learning model is trained using training data that includes images of a predetermined set of text characters. The training data may further include images of transformed text characters to which various logical operations are applied. Examples of transformations include, but are not limited to, stretching, scaling, and skewing.

[0045]

[0049] At step 412, the method 400 optionally includes appending at least two of the recognized text characters to form a word. The appending process may be performed using various algorithms. In some implementations, the recognized text characters are appended based on a predetermined spatial location difference threshold. For example, the recognized text characters may be appended based on the location of the divided bounding boxes to which the respective segments correspond. If the spatial difference of the bounding boxes, such as the X coordinate of the bounding boxes, is within the predetermined spatial location difference threshold, the associated recognized text character may be appended. The predetermined spatial location difference threshold may be specified in various ways. In some implementations, the predetermined spatial location difference threshold is a character width. For example, the predetermined spatial location difference threshold may be based on the width of a bounding box that includes a minimum width and may be considered to represent a single text character.

[0046]

[0050] At step 414, method 400 optionally includes performing word correction on the words to generate corrected words. In some implementations, natural language processing techniques are implemented to perform the word correction. For example, natural language processing can be used to correct words based on context from nearby words, such as correcting sentence structure and grammar. In some implementations, a machine learning model is implemented to perform the natural language processing to provide the predicted output text.

[0047]

[0051] Additionally or alternatively, a word repository can be utilized for the word revision process. In some implementations, the word repository is initially blank and words are added through user input or automatically as the text recognizer matures over time. In some implementations, the word repository is initially populated with one or more dictionaries. Examples of dictionaries include general dictionaries, technical dictionaries, domain-specific dictionaries, and customized dictionaries. Words can be added to the word repository as the implemented text recognizer matures over time.

[0048]

[0052] Additionally or alternatively, confidence scores can be utilized in the word correction process. During the text classification process, a confidence score can be calculated based on the predicted accuracy of the text classification. For example, by using an image classification machine learning model, a prediction can be output along with a confidence score indicating the accuracy of the prediction. The confidence score can be used in a combination of natural language processing techniques, such as using a machine learning model, to perform word correction. In some implementations, the word correction process outputs the predicted word along with a confidence score. The confidence score can be used in the word correction process in various ways. For example, a low confidence score can be indicated to the user and manual correction can be performed.

[0049]

[0053] The text recognizer and associated framework described herein provides a robust process for text extraction from various types of documents, including typical printed documents and technical documents. Compared to contemporary text recognition solutions, the implementations described herein enable text classification and extraction of duplicate characters. The use of machine learning models in one or more steps of the process allows the text recognizer to improve performance over time, allowing for further efficiencies in domain-specific implementations.

[0050]

[0054] In some embodiments, the methods and processes described herein may pertain to a computing system of one or more computing devices. In particular, such methods and processes may be implemented as a computer application program or service, an application programming interface (API), a library, and / or other computer program product.

[0051]

[0055] 5 illustrates generally a non-limiting embodiment of a computing system 500 that may perform one or more of the methods and processes described above. The computing system 500 is illustrated in simplified form. The computing system 500 may embody the computing device 102 described above and illustrated in FIG. 1. The computing system 500 may take the form of one or more personal computers, server computers, tablet computers, home entertainment appliances, network computing devices, gaming devices, mobile computing devices, mobile communication devices (e.g., smartphones), and / or other computing devices, as well as portable computing devices such as smart watches and head-mounted augmented reality devices.

[0052]

[0056] Computing system 500 includes a logic processor 502, a volatile memory 504, and a non-volatile storage device 506. Computing system 500 optionally includes a display subsystem 508, an input subsystem 510, a communication subsystem 512, and / or other components not shown in FIG.

[0053]

[0057] Logic processor 502 includes one or more physical devices configured to execute instructions. For example, logic processor 502 may be configured to execute instructions that are part of one or more applications, programs, routines, libraries, objects, components, data structures, or other logical constructs. Such instructions may be implemented to perform tasks, implement data types, transform the state of one or more components, achieve a technical effect, or otherwise arrive at a desired result.

[0054]

[0058] Logic processor 502 may include one or more physical processors (hardware) configured to execute software instructions. Additionally or alternatively, logic processor 502 may include one or more hardware logic circuits or firmware devices configured to execute hardware-implemented logic or firmware instructions. The processors of logic processor 502 may be single-core or multi-core, and the instructions executed by the processors may be configured for sequential, parallel, and / or distributed processing. Individual components of logic processor 502 may optionally be distributed among two or more separate devices, which may be remotely located and / or configured for cooperative processing. Aspects of logic processor 502 may be virtualized and executed by remotely accessible networked computing devices set up in a cloud computing configuration. In such cases, it will be appreciated that these virtualized aspects may be executed in various physical logic processors of various different machines.

[0055]

[0059] The non-volatile storage device 506 includes one or more physical devices configured to hold instructions executable by the logic processor and to implement the methods and processes described above, such that when such methods and processes are implemented, the state of the non-volatile storage device 506 may be transformed to hold various data, for example.

[0056]

[0060] The non-volatile storage device 506 may include removable and / or built-in physical devices. The non-volatile storage device 506 may include optical memory (e.g., CD, DVD, HD-DVD, etc.), semiconductor memory (e.g., ROM, EPROM, EEPROM, flash memory, etc.), and / or magnetic memory (e.g., hard disk drive, floppy disk drive, tape drive, MRAM, etc.), or other mass storage technologies. The non-volatile storage device 506 may include non-volatile devices, dynamic devices, static devices, read / write devices, read-only devices, sequential access devices, location addressable devices, file addressable devices, and / or content addressable devices. It will be appreciated that the non-volatile storage device 506 is configured to retain instructions even when power is removed.

[0057]

[0061] Volatile memory 504 may include physical devices including random access memory. Volatile memory 504 is typically utilized by logic processor 502 to temporarily store information during the processing of software instructions. It should be understood that volatile memory 504 typically does not continue to store instructions once power is removed.

[0058]

[0062] Aspects of the logic processor 502, the volatile memory 504, and the non-volatile storage device 506 may be integrated into one or more hardware-logic components, which may include, for example, a field programmable gate array (FPGA), a program specific integrated circuit / application specific integrated circuit (PASIC / ASIC), a program specific standard product / application specific standard product (PSSP / ASSP), a system on a chip (SOC), and a complex programmable logic device (CPLD).

[0059]

[0063] Words such as "module," "program," and "engine" may be used to describe aspects of the computing system 500 that are typically implemented in software by a processor to perform a particular function using a portion of volatile memory, the function involving a transformation operation that specifically configures the processor to perform the function. Thus, a module, program, or engine may be instantiated via the logic processor 502 using a portion of the volatile memory 504 to execute instructions held by the non-volatile storage device 506. It should be understood that various modules, programs, and / or engines may be instantiated from the same application, service, code block, object, library, routine, API, function, etc. Similarly, the same module, program, and / or engine may be instantiated from different applications, services, code blocks, objects, libraries, routines, APIs, functions, etc. The terms "module," "program," and / or "engine" may encompass individual executable data files, libraries, drivers, scripts, database records, etc., or groups thereof.

[0060]

[0064] If included, the display subsystem 508 may be used to present a visual display of the data held by the non-volatile storage device 506. The visual display may take the form of a graphical user interface (GUI). The methods and processes described herein modify the data held by the non-volatile storage device, which in turn transforms the state of the non-volatile storage device. The state of the display subsystem 508 may be transformed to visually represent the changes to the underlying data. The display subsystem 508 may include one or more display devices. Such display devices may be combined with the logic processor 502, the volatile memory 504, and / or the non-volatile storage device 506 in a shared enclosure, or such display devices may be peripheral display devices.

[0061]

[0065] If included, the input subsystem 510 may include or interface with one or more user input devices, such as a keyboard, a mouse, a trackpad, a touch-sensitive display, a camera, or a microphone.

[0062]

[0066] If included, the communications subsystem 512 may be configured to communicatively couple the various computing devices described herein to one another and to other devices. The communications subsystem 512 may include wired and / or wireless communications devices compatible with one or more different communications protocols. In non-limiting examples, the communications subsystem may be configured for communication over a wireless cellular network, or a wired or wireless local or wide area network. In some embodiments, the communications subsystem may enable the computing system 500 to send and receive messages to and from other devices over a network, such as the Internet.

[0063]

[0067] Furthermore, the present disclosure includes the following provisions:

[0064]

[0068] Clause 1 1. A computing device for text recognition, comprising a processor coupled to a storage medium storing instructions that, when executed by the processor, cause the processor to receive a data file including an image, recognize at least one contour within the image, segment the at least one contour into a plurality of segments, and recognize text characters within each of the plurality of segments.

[0065]

[0069] Clause 2 The computing device of clause 1, wherein the instructions, when executed by the processor, cause the processor to append at least two of the recognized text characters to form a word, perform word correction on the word to generate a corrected word, and output the corrected word.

[0066]

[0070] Clause 3 3. The computing device of claim 2, wherein at least two of the recognized text characters are added based on a predetermined spatial position difference threshold.

[0067]

[0071] Clause 4 The computing device of clauses 1 to 3, wherein the at least one contour includes a plurality of contours, and the instructions, when executed by the processor, further cause the processor to filter the plurality of contours to remove non-text contours in the plurality of contours.

[0068]

[0072] Clause 5 The computing device of clauses 1 to 4, wherein recognizing at least one contour includes identifying a plurality of adjacent pixels, each adjacent pixel being within a predetermined spatial distance threshold relative to another adjacent pixel, and each adjacent pixel including a pixel value exceeding a predetermined pixel value threshold.

[0069]

[0073] Clause 6 6. The computing device of claim 1, wherein partitioning the at least one contour comprises identifying a contoured bounding box for the at least one contour and dividing the bounding box.

[0070]

[0074] Clause 7 7. The computing device of clause 6, wherein the bounding box is divided based on a predetermined pixel width value.

[0071]

[0075] Clause 8 The computing device of clauses 1 to 7, wherein the at least one contour includes a plurality of contours, and partitioning the at least one contour includes identifying a plurality of bounding boxes, each contour of the plurality of contours being inscribed within another bounding box of the plurality of bounding boxes, and partitioning each bounding box of the plurality of bounding boxes into a set of segments based on a predetermined pixel width value, the predetermined pixel width value being determined based on a minimum width of the plurality of bounding boxes.

[0072]

[0076] Clause 9 9. The computing device of claim 1 to 8, wherein the text characters are recognized using a text classification machine learning model.

[0073]

[0077] Clause 10 10. The computing device of clause 9, wherein the text classification machine learning model comprises a convolutional neural network.

[0074]

[0078] Clause 11 1. A method for text recognition, comprising: receiving a data file including an image; recognizing at least one contour in the image; segmenting the at least one contour into a plurality of segments; and recognizing text characters in each of the plurality of segments.

[0075]

[0079] Clause 12 12. The method of claim 11, comprising identifying at least two recognized text characters that satisfy a predetermined spatial location difference threshold, appending the at least two recognized text characters to form a word, performing word correction on the word to generate a corrected word, and outputting the corrected word.

[0076]

[0080] Clause 13 13. The method of claim 11 or 12, wherein the at least one contour comprises a plurality of contours, the method further comprising filtering the plurality of contours to remove non-text contours in the plurality of contours.

[0077]

[0081] Clause 14 14. The method of claim 11 to 13, wherein partitioning the at least one contour comprises identifying a contoured bounding box for the at least one contour and dividing the bounding box based on a predetermined pixel width value.

[0078]

[0082] Clause 15 15. The method according to any one of claims 11 to 14, wherein the text characters are recognized using a text classification convolutional neural network.

[0079]

[0083] Clause 16 1. A computing device for text recognition, the computing device comprising: a processor coupled to a storage medium storing instructions that, when executed by the processor, cause the processor to: receive a data file including an image; recognize a plurality of contours in the image; filter the plurality of contours to remove contours that correspond to non-text portions of the image; segment each remaining contour in the plurality of contours into one or more segments; recognize text characters in each segment using a text classification machine learning model; and output the recognized text characters.

[0080]

[0084] Clause 17 The instructions, when executed by the processor, cause the processor to: The computing device of clause 16, further configured to identify at least two recognized text characters that satisfy a predetermined spatial position difference threshold, append the at least two recognized text characters to form a word, perform word correction on the word to generate a corrected word, and output the corrected word.

[0081]

[0085] Clause 18 18. The computing device of claim 16 or 17, wherein the plurality of contours are filtered using a text classification machine learning model.

[0082]

[0086] Clause 19 19. The computing device of claim 16-18, wherein partitioning each of the remaining contours comprises identifying a contoured bounding box for the remaining contour and dividing the bounding box based on a predetermined pixel width value.

[0083]

[0087] Clause 20 20. The computing device of claim 16-19, wherein the text characters are recognized using a text classification convolutional neural network.

[0084] Parts List: Computing Systems 100 Computing Devices 102 Processor 104 Input / Output (I / O) Module 106 Volatile Memory 108 Non-volatile memory 110 Text Recognition Program 112 Image data 114 Contour Detection Module 116 Contour data 118 Contour Separation Module 120 Segmentation Data 122 Text Classification Module 124 Text characters 126 Framework 200 Image data 202 Detection Step 204 Contour Filtering Step 206 Bounding Box 207 Contour division step 208 Text Classification Step 210 Add Text Step 212 Word Correction Step 214 Recognized Text 216 Word Repository 218 Text Recognition Process 300 Word 302 First Step 304 Contour detection step 306 First bounding box 308 Second bounding box 310 Contour division step 312 Sub-bounding boxes 314A-314C Text Classification Step 316 Add Text Step 318 Word Correction Step 320 method 400 Step 402 Step 404 Step 406 Step 408 Step 410 Step 412 Step 414 Computing System 500 Logic Processor 502 Volatile Memory 504 Non-volatile storage devices 506 Display Subsystem 508 Input Subsystem 510 Communications Subsystem 512

Claims

1. A computing device (102) for text recognition, the computing device (102) comprising: a processor (104) coupled to a storage medium that stores instructions, the instructions, when executed by the processor (104), causing the processor (104) to: Receiving a data file containing an image (114); Recognizing at least one contour (118) in the image (114); partitioning said at least one contour (118) into a plurality of segments (122); recognizing text characters (126) within each segment of the plurality of segments (122); A computing device (102) that causes the

2. The instructions, when executed by the processor (104), cause the processor (104) to: adding at least two of the recognized text characters (126) to form a word; performing word correction (214) on the word to generate a corrected word; outputting the corrected word; The computing device (102) of claim 1 further comprising:

3. The computing device of claim 2 , wherein at least two of the recognized text characters are added based on a predetermined spatial position difference threshold.

4. 2. The computing device of claim 1, wherein the at least one contour comprises a plurality of contours, and the instructions, when executed by the processor, further cause the processor to filter the plurality of contours to remove non-text contours in the plurality of contours.

5. 2. The computing device of claim 1, wherein recognizing the at least one contour comprises identifying a plurality of adjacent pixels, each adjacent pixel being within a predetermined spatial distance threshold relative to another adjacent pixel, and each adjacent pixel including a pixel value that exceeds a predetermined pixel value threshold.

6. Delimiting the at least one contour (118) comprises: Identifying a bounding box (308) inscribed with the contour (118) for the at least one contour (118); Dividing the bounding box (308); The computing device (102) of claim 1 comprising:

7. The computing device of claim 6 , wherein the bounding box is divided based on a predetermined pixel width value.

8. The at least one contour (118) includes a plurality of contours (118), and dividing the at least one contour (118) includes identifying a plurality of bounding boxes (308), each contour (118) of the plurality of contours (118) being inscribed within another bounding box (308) of the plurality of bounding boxes (308); Dividing each of the plurality of bounding boxes (308) into a set of segments based on a predetermined pixel width value; 2. The computing device of claim 1, wherein the predetermined pixel width value is determined based on a minimum width of the plurality of bounding boxes.

9. The computing device of claim 1 , wherein the text characters are recognized using a text classification machine learning model.

10. The computing device (102) of claim 9, wherein the text classification machine learning model comprises a convolutional neural network.

11. A method (400) for text recognition, comprising: Receiving (402) a data file including an image (114); Recognizing (404) at least one contour (118) in the image (114); Segmenting (408) the at least one contour (118) into a plurality of segments (122); recognizing (410) text characters (126) within each segment of the plurality of segments (122); The method (400) comprising:

12. Identifying at least two recognized text characters (126) that satisfy a predetermined spatial location difference threshold; adding (412) the at least two recognized text characters (126) to form a word; performing word correction (214) on the word to generate a corrected word (414); outputting the corrected word; 12. The method of claim 11, comprising:

13. 12. The method (400) of claim 11, wherein the at least one contour (118) comprises a plurality of contours (118), the method further comprising filtering the plurality of contours (118) to remove non-text contours in the plurality of contours (118).

14. Segmenting (408) the at least one contour (118) comprises: Identifying a bounding box (308) inscribed with the contour (118) for the at least one contour (118); Dividing the bounding box (308) based on a predetermined pixel width value; 12. The method of claim 11, comprising:

15. 12. The method (400) of claim 11, wherein the text characters (126) are recognized (410) using a text classification convolutional neural network.

16. A computing device (102) for text recognition, the computing device (102) comprising: a processor (104) coupled to a storage medium that stores instructions, the instructions, when executed by the processor (104), causing the processor (104) to: Receiving a data file containing an image (114); Recognizing a plurality of contours (118) in the image (114); filtering the plurality of contours (118) to remove contours corresponding to non-text portions of the image (114); partitioning each remaining contour (118) in the plurality of contours (118) into one or more segments (122); recognizing text characters (126) in each partitioned segment (122) using a text classification machine learning model; outputting the recognized text characters (126); A computing device (102) that causes the

17. The instructions, when executed by the processor (104), cause the processor (104) to: Identifying at least two recognized text characters (126) that satisfy a predetermined spatial location difference threshold; adding said at least two recognized text characters (126) to form a word; performing word correction (214) on the word to generate a corrected word; outputting the corrected word; The computing device (102) of claim 16, further comprising:

18. The computing device of claim 16 , wherein the plurality of contours is filtered using a text classification machine learning model.

19. Segmenting each of the remaining contours (118) comprises: Identifying a bounding box (308) in which the contour (118) is inscribed in the remaining contour (118); Dividing the bounding box (308) based on a predetermined pixel width value; The computing device (102) of claim 16, comprising:

20. 20. The computing device of claim 16, wherein the text characters are recognized using a text classification convolutional neural network.