Image processing apparatus and image forming apparatus

The image processing apparatus addresses the issue of erroneously converted characters by using a combination of storage units and threshold-based similarity comparisons to accurately correct and identify characters, enhancing OCR processing accuracy.

JP7552263B2Active Publication Date: 2024-09-18KYOCERA DOCUMENT SOLUTIONS INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2020184534
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-11-04
Publication Date
2024-09-18
Estimated Expiration
2040-11-04

AI Technical Summary

Technical Problem

Existing image forming apparatuses struggle to accurately identify and correct erroneously converted characters or character strings in text obtained through OCR processing, especially when documents are improperly placed or contain broken character images.

Method used

An image processing apparatus that includes a document image storage, dictionary data storage, font storage, and a series of units to identify character areas, extract text, determine word matches, and replace mismatched characters with the most similar characters from stored fonts, using threshold-based similarity comparisons to generate corrected text.

Benefits of technology

The apparatus effectively detects and corrects erroneously converted characters or character strings in text, improving the accuracy of OCR processing and font identification, while avoiding unnecessary corrections on correctly converted characters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007552263000005
    Figure 0007552263000005
  • Figure 0007552263000016
    Figure 0007552263000016
  • Figure 0007552263000007
    Figure 0007552263000007
Patent Text Reader

Abstract

To detect or correct erroneously-converted characters or character strings in a text obtained through OCR processing.SOLUTION: An image forming apparatus 10 comprises: a word specification unit 25 that specifies a plurality of words included in a text extracted from an image of a character area of a document image; a word determination unit 26 that determines whether each of the plurality of specified words matches any one registered word in a plurality of registered words; and a creation unit 27 that, when there is a mismatch word determined to be mismatch by the word determination unit 26, replaces a target character constituting the mismatch word in the text with a post-replacement character indicated by an image of a character, of images of all characters constituting fonts stored in a font storage unit 19b, in which the ratio of similarity to a target character image of a character area corresponding to the target character is equal to or more than a predetermined ratio and is the highest ratio, thereby creating a post-correction text obtained by replacing the target character of the mismatch word in the text with the post-replacement character.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image processing device and an image forming device, and more particularly to a technique that enables detection and correction of erroneously converted characters or character strings in text obtained by OCR processing. [Background technology]

[0002] The following Patent Document 1 describes an image forming apparatus that reads multiple documents (e.g., business cards, etc.) placed on a document reading table in one scan with an image reading unit, and performs a known OCR (optical character recognition) process on the scanned image acquired by the image reading unit to acquire character data. For example, when multiple documents placed on the document reading table are partially overlapped with each other, or when a part of a document protrudes from the scan area of ​​the document reading table, a part of the document image in the scanned image is missing. Therefore, the character data obtained by OCR processing of the scanned image naturally has a missing part. Therefore, the above image forming apparatus is capable of correcting the missing part of the character data to a correction candidate character data inferred from the character data of another document. [Prior art documents] [Patent documents]

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

[0004] However, in the image forming apparatus of Patent Document 1 or a general image forming apparatus, even if the document is properly placed on the document reading table, the text obtained by OCR processing may contain erroneously converted characters or character strings, but it is not possible to know which characters or character strings in the text are erroneously converted. In this way, in each of the image forming apparatuses described above, since it is not possible to know which characters or character strings in the text are erroneously converted, it is not possible to correct the erroneously converted characters or character strings to appropriate characters or character strings. In addition, when a document image contains a character image in which a part of the character is missing or damaged (hereinafter referred to as a "broken character image"), when OCR processing is performed on such a document image, there is a high probability that at least the broken character image will be determined to be a erroneously converted character or character string.

[0005] The present invention has been made in consideration of the above circumstances, and has an object to make it possible to detect and correct erroneously converted characters or character strings in text obtained by OCR processing. [Means for solving the problem]

[0006] An image processing device according to one aspect of the present invention includes an original image storage unit that stores an original image, a dictionary data storage unit that stores dictionary data including a predetermined number of registered words, a font storage unit that stores fonts in advance, a character area identification unit that identifies a character area in the original image stored in the original image storage unit, an image acquisition unit that acquires an image of the character area from the original image, a text extraction unit that extracts text from the image of the character area acquired by the image acquisition unit, a word identification unit that identifies each of a plurality of words included in the text extracted by the text extraction unit, and each of the plurality of words identified by the word identification unit is the word determination unit determining whether a word matches any of the registered words of the plurality of registered words included in the dictionary data; and, if there is an mismatched word determined by the word determination unit to be a mismatch, a generation unit replacing a target character constituting the mismatched word of the text with a replacement character indicated by an image of a character that has a similarity to the target character image in the character region corresponding to the target character at a predetermined rate or higher among images of all characters constituting the font stored in the font storage unit, thereby generating a corrected text in which the target character of the mismatched word of the text has been replaced with the replacement character.

[0007] An image forming apparatus according to one aspect of the present invention includes the above-mentioned image processing device, an image reading unit that reads an original image, a control unit that stores the original image read by the image reading unit in the original image storage unit, and an image forming unit that forms an image on a recording medium. Effect of the Invention

[0008] According to the present invention, it is possible to detect and correct erroneously converted characters or character strings in text obtained by OCR processing. [Brief description of the drawings]

[0009] [Figure 1] 1 is a perspective view of an image forming apparatus according to an embodiment of the present invention; [Diagram 2] 1 is a block diagram showing a configuration of an image forming apparatus according to an embodiment; [Diagram 3] 11 is a diagram conceptually illustrating a process performed in the image forming apparatus according to the embodiment to generate corrected text by correcting erroneously converted characters in text extracted from an original image. FIG. [Figure 4] FIG. 4 is a diagram showing an example of a display screen of a display unit of the image forming apparatus. [Diagram 5] 11 is a flowchart illustrating an example of an erroneously converted character correction process according to the embodiment. [Figure 6] FIG. 1A is a diagram showing an example of an original image subjected to layout analysis, and FIG. 1B is a diagram showing an example of a character region identified in the original image. [Figure 7] FIG. 1A is a diagram showing an example of text extracted from an original image, and FIG. 1B is a diagram showing an example of corrected text in which erroneously converted characters in the text have been corrected. [Figure 8] 13 is a flowchart showing an example of a corrected text generation process. [Figure 9] 11A and 11B are diagrams illustrating an example of a process for identifying a font that is most similar to a target character. [Figure 10] 13 is a diagram showing an example of identifying a font using the degree of coincidence of pixel areas between a bounding box of a font determination character and a character box of the same character as the font determination character for each of a plurality of fonts; FIG. [Figure 11] 13 is a flowchart illustrating an example of a replacement process. [Figure 12] FIG. 13 is a diagram showing an example of identifying a character that is most similar to a target character; [Figure 13] FIG. 13 is a diagram showing an example of identifying a character that is most similar to a target character using the degree of coincidence of pixel areas between the bounding box of the target character and the character boxes of all characters in a specified font. [Figure 14] FIG. 13 is a diagram showing an example of corrected text in which an erroneously converted character in the text has been corrected. [Figure 15] FIG. 13 is a diagram showing an example of a display mode of an erroneously converted character that could not be corrected in text. [Figure 16] FIG. 13 is a diagram showing an example of generation of corrected text according to a modified example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, an embodiment of an image processing apparatus and an image forming apparatus according to the present invention will be described with reference to the drawings. Fig. 1 is a perspective view of an image forming apparatus according to an embodiment of the present invention. Fig. 2 is a block diagram showing the configuration of the image forming apparatus according to the embodiment.

[0011] The image forming apparatus 10 of the embodiment includes a control unit 11, a display unit 12, an operation unit 14, a touch panel 15, a communication unit 16, an image reading unit 17, an image forming unit 18, and a data storage unit 19. These components are capable of transmitting and receiving data or signals to and from each other via a bus.

[0012] The image reading unit 17 is a reading mechanism having a CCD (Charge Coupled Device) as a scanner that optically reads, for example, an original G1 (see FIG. 3) conveyed by an automatic document feeder or an original G1 placed on a flatbed (see FIG. 3), and generates an original image D1 (see FIG. 3) showing the original G1. Due to the configuration of the reading mechanism, the original image D1 has a rectangular outer shape.

[0013] The image forming unit 18 uniformly charges the surface of the photosensitive drum, exposes the surface of the photosensitive drum to light, forms an electrostatic latent image on the surface of the photosensitive drum, develops the electrostatic latent image on the surface of the photosensitive drum into a toner image, and transfers and fixes the toner image (image) on the surface of the photosensitive drum onto a recording paper. For example, the image of the document G1 obtained by the image reading unit 17 is printed on the recording paper.

[0014] The image processing apparatus has a configuration in which, for example, the image reading unit 17 and the image forming unit 18 are removed from the image forming apparatus 10.

[0015] The display unit 12 is a display device such as a liquid crystal display or an organic light-emitting diode (EL) display.

[0016] The operation unit 14 accepts input of operation instructions from the user, and includes hard keys such as a menu key for calling up a menu, arrow keys for moving the focus in a GUI (Graphical User Interface) that constitutes the menu, a decision key for confirming an operation on the GUI that constitutes the menu, and a start key.

[0017] The touch panel 15 is a so-called resistive film type or capacitive type touch panel. The touch panel 15 is disposed on the screen of the display unit 12, and detects a touch of a finger or the like on the screen of the display unit 12 together with the contact position. When the touch panel 15 detects a touch of a finger or the like, it outputs a detection signal indicating the coordinates of the contact position to the control unit 21 of the control unit 11 or the like. Thus, the touch panel 15 serves as an operation unit into which a user operation on the screen of the display unit 12 is input.

[0018] The communication unit 16 is a communication interface equipped with a communication module, and transmits and receives data to and from an external device 30 (for example, a personal computer, a server, a mobile information terminal, etc.) via a network N consisting of a LAN (Local Area Network) or a public line.

[0019] The data storage unit 19 is a large-capacity storage device such as a hard disk drive (HDD), etc. The data storage unit 19 includes an original image storage unit 19a that stores an original image D1 (i.e., image data) of an original G1 obtained by the image reading unit 17 reading the original.

[0020] 3 is a conceptual diagram showing a process performed by the image forming apparatus according to the embodiment to generate corrected text by correcting erroneously converted characters in text extracted from an original image. As shown in FIG. 3, the image forming apparatus 10 according to the embodiment has a configuration for executing a process to extract text TX from an original image D1 obtained by reading an original G1, for example, and generate corrected text CT by correcting erroneously converted characters in the text TX. Details of the configuration will be described below.

[0021] The data storage unit 19 further includes a font storage unit 19b that stores a plurality of types of fonts in advance. The font storage unit 19b stores a plurality of types of font data (image data of all characters constituting a font (for example, alphabets "a" to "z" in English, symbols such as "." and "-"), such as "Arial", "Courier New", "Times New Roman", etc.).

[0022] The data storage unit 19 further includes a dictionary data storage unit 19c that stores dictionary data including a plurality of predetermined registered words. The dictionary data includes dictionary data of one or a plurality of predetermined languages, such as English dictionary data and Japanese dictionary data. In this embodiment, the dictionary data includes English dictionary data. This English dictionary data stores a plurality of registered English words (e.g., hundreds of thousands of words), such as "You", "they", ..., "that", ..., "should", "may", ..., "kingdom", and "country".

[0023] The control unit 11 is composed of a processor, a RAM (Random Access Memory), a ROM (Read Only Memory), and the like. The processor is, for example, a CPU (Central Processing Unit), an MPU, or an ASIC. This control unit 11 functions as a control unit 21, a character region identification unit 22, an image acquisition unit 23, a text extraction unit 24, a word identification unit 25, a word determination unit 26, and a generation unit 27 by executing a control program stored in a data storage unit 19 by the above processor. Note that the above control unit 21, the character region identification unit 22, the image acquisition unit 23, the text extraction unit 24, the word identification unit 25, the word determination unit 26, and the generation unit 27 of the control unit 11 may each be configured by a hardware circuit, regardless of the operation based on the above control program.

[0024] The control unit 21 is responsible for the overall operation control of the image forming apparatus 10. Fig. 4 is a diagram showing an example of a display screen of the display unit of the image forming apparatus. For example, the control unit 21 causes the display unit 12 to display the operation screen shown in Fig. 4. The control unit 21 performs control related to various execution processes such as copying, printing, scanning, facsimile, and correction of conversion errors after scanning, according to a touch operation by a user on the operation screen shown in Fig. 4.

[0025] Character area identification unit 22 identifies a character area CA (see FIG. 6(B) described later) in document image D1 (i.e., image data acquired by scanning document G1) stored in document image storage unit 19a. Character area CA is an area in which characters are written. For example, character area identification unit 22 can identify character area CA in document image D1 by performing a layout analysis included in a known OCR (optical character recognition) process on document image D1. Character area identification unit 22 stores the layout result in which character area CA in document image D1 is identified in data storage unit 19.

[0026] The image acquiring unit 23 acquires, from the original image D1, an image of the character area CA identified by the character area identifying unit 22. For example, the image acquiring unit 23 acquires an image of the character area CA identified from the original image D1. Note that the image acquiring unit 23 may acquire the image of the character area CA by performing a known image extraction (trimming) process on the original image D1.

[0027] The text extraction unit 24 extracts text in the character area CA. That is, the text extraction unit 24 extracts each piece of character data in the text in the character area CA in association with its position information. Specifically, the text extraction unit 24 performs OCR processing on the image of the character area CA acquired by the image acquisition unit 23, and extracts each piece of character data in the text in the character area CA in association with its position information.

[0028] The position information of each character data in the text extracted by the text extraction unit 24 is information indicating the position of the character data in the document image D1, and is, for example, coordinate position information specified by the coordinate position of the document image D1. As shown in FIG. 6A described later, the position of the upper left corner of the document image D1 is set to coordinate position (0,0), the position of the upper right corner is set to coordinate position (x,0), the position of the lower left corner is set to coordinate position (0,y), and the position of the lower right corner is set to coordinate position (x,y). In the case of the character "T" of "They" in the character area CA shown in FIG. 6B described later, the text extraction unit 24 extracts the character data of "T" in association with the position information of the four corners of the rectangular area including the character "T" (it may be only the position information of the two corners on the diagonal line). Since there are multiple characters in the character area CA, the multiple characters are extracted in association with the position information of each of the multiple characters. The text extraction unit 24 associates each piece of character data in the character area CA of the document image D1 with its position information, and stores the data in the document image storage unit 19a.

[0029] The word identification unit 25 identifies each of the multiple words W included in the text TX extracted by the text extraction unit 24. For example, the word identification unit 25 identifies the arrangement direction (horizontal in FIG. 7(A)) of character data constituting the text TX shown in FIG. 7(A) described later, and identifies one or more pieces of character data sandwiched between blank character spaces in the arrangement direction of the character data as words. For example, in the case of the text TX shown in FIG. 7(A), the word identification unit 25 identifies each of the words W such as "They", "said", "thal", "Mark", "snou.d", ..., "him", "away". The word identification unit 25 may identify each of the multiple words W using each piece of character data constituting the text TX and its position information. Note that here, each word W identified by the word identification unit 25 includes a word including an erroneously converted character ("thal", "snou.d" in FIG. 7(A)). This is because, when the paper surface of the document G1 is deteriorated, such as rubbed or scratched, an erroneously converted character or character string is included in the text obtained by the OCR process.

[0030] The word determination unit 26 determines whether or not each of the multiple words W identified by the word identification unit 25 matches any of the multiple registered words included in the dictionary data in the dictionary data storage unit 19c.

[0031] Specifically, the word determination unit 26 determines, in order, whether each of the multiple words W identified by the word identification unit 25, i.e., each of the words W such as "They," "said," "thal," "Mark," "snou.d," ..., "him," and "away," matches any of the multiple registered words contained in the dictionary data in the dictionary data storage unit 19c.

[0032] 7A, the word determination unit 26 determines that "They" identified by the word identification unit 25 matches "They", which is a registered word in the dictionary data, and determines "They" in the text TX to be a matching word MW. Similarly, the word determination unit 26 determines that "said", "Mark", ..., "him", "away", etc. match the multiple registered words "said", "Mark", ..., "him", "away", etc. in the dictionary data, respectively, and determines "said", "Mark", ..., "him", "away", etc. in the text TX to be a matching word MW.

[0033] On the other hand, the word determination unit 26 determines that "thal" identified by the word identification unit 25 in the text TX shown in Fig. 7(A) does not match "that" among the multiple registered words included in the dictionary data and does not match any of the other registered words, and determines "thal" in the text TX to be a mismatched word MSW. Also, the word determination unit 26 determines that "snou.d" identified by the word identification unit 25 in the text TX shown in Fig. 7(A) does not match "should" among the multiple registered words included in the dictionary data and does not match any of the other registered words, and determines "snou.d" in the text TX to be a mismatched word MSW.

[0034] When there is an mismatched word MSW that the word determination unit 26 has determined to be a mismatch, the generation unit 27 replaces the target character TC that constitutes the mismatched word MSW in the text TX with a replaced character RPC indicated by the image of a character that has the highest similarity to the target character image TCI of the character area CA corresponding to the target character TC, among the images of all characters that constitute the font stored in the font storage unit 19b, and that is equal to or higher than a predetermined percentage, thereby generating a corrected text CT (see Figure 7(B) described below) in which the target character TC of the mismatched word MSW in the text TX has been replaced with the replaced character RPC.

[0035] For example, when there is a matching word MW that the word determination unit 26 has determined to be a match, the generation unit 27 sets the characters that make up the matching word MW as font determination characters FJC. Specifically, when the matching word MW is located before or after the mismatched word MSW, the generation unit 27 sets the characters that make up the matching word MW as font determination characters FJC. Furthermore, when a matching word MW is located before and after the mismatched word MSW, the generation unit 27 sets the characters that make up the previous matching word MW or the following matching word MW as font determination characters FJC. Furthermore, when a matching word MW is not located before or after the mismatched word MSW, the generation unit 27 sets the characters that make up the matching word MW in a sentence that includes the mismatched word MSW as font determination characters FJC.

[0036] Next, the generation unit 27 identifies the font indicated by the image of the character having the highest similarity rate between the determination character image JCI of the character area CA corresponding to the font determination character FJC and an image of the same character as the font determination character FJC for each of the multiple fonts stored in the font storage unit 19b, the similarity rate being equal to or greater than a predetermined rate (e.g., 90%), and replaces the target character TC constituting the mismatched word MSW of the text TX with a replaced character RPC indicated by the image of the character having the highest similarity rate to the target character image TCI of the character area CA corresponding to the target character TC, the similarity rate being equal to or greater than a predetermined rate (e.g., 90%), among all the images of characters constituting the identified font among the multiple fonts stored in the font storage unit 19b.

[0037] Specifically, when there is an mismatched word MSW that the word determination unit 26 has determined to be a mismatch, the generation unit 27 divides a rectangular bounding box BB generated by dividing the target character image TCI of the character area CA corresponding to the target character TC that constitutes the mismatched word MSW in the text TX, on a character-by-character basis, and a plurality of rectangular character boxes CB prepared for each character for all characters that constitute a specified font among the multiple types of fonts stored in the font storage unit 19b, into pixel areas consisting of a predetermined number of columns and a predetermined number of rows, divided into a grid pattern, and calculates the degree of match of the pixel area with the bounding box BB for each of the plurality of rectangular character boxes.

[0038] Next, if the highest degree of match HM among these degrees of match is (i) greater than or equal to a predetermined first threshold TH1 (e.g., 97%), the generation unit 27 identifies the character box showing the highest degree of match HM as a first character box corresponding to a first bounding box showing a complete character, and does not replace the target character TC with the character in the first character box.

[0039] In addition, if the highest degree of matching HM is (ii) less than a first threshold value TH1 (e.g., 97%) and greater than or equal to a predetermined second threshold value TH2 (e.g., 90%) that is smaller than the first threshold value TH1, the generation unit 27 identifies the character box CB showing the highest degree of matching HM as a second character box corresponding to a second bounding box indicating a broken character, and replaces the target character TC with the character in the second character box.

[0040] In addition, if the highest degree of match HM is (iii) less than a second threshold value TH2 (e.g., 90%), the generation unit 27 identifies the character box CB showing the highest degree of match HM as a third character box that is not a replacement candidate, and does not replace the target character TC with a character in the third character box, but changes the target character to a display mode different from that of other characters.

[0041] The control unit 21 causes the display unit 12 to display the corrected text CT. Then, when the user issues a print instruction to the operation unit 14, the control unit 21 causes the image forming unit 18 to form an image showing the corrected text CT generated by the generation unit 27 on recording paper. Also, when the user issues a data output instruction to the operation unit 14, the control unit 21 causes the communication unit 16 to transmit (output) the corrected text CT generated by the generation unit 27 to the external device 30.

[0042] Next, a description will be given of a process for generating corrected text by correcting erroneously converted characters in text, performed by the image forming apparatus 10. Fig. 5 is a flowchart showing an example of the erroneously converted character correction process according to the embodiment.

[0043] When the user presses the key KB labeled "correct misconversion after scanning" while the display screen shown in Fig. 4 is displayed on the display unit 12, the control unit 21 starts the misconverted character correction process shown in Fig. 5. Specifically, when the user presses the key KB, the touch panel 15 accepts the pressing of the key KB and outputs a signal to start the misconverted character correction process to the control unit 21. The control unit 21 starts the misconverted character correction process based on the signal to start the misconverted character correction process from the touch panel 15.

[0044] 3 is set on the image reading unit 17 by a user, and when the start button of the operation unit 14 is pressed, the control unit 21 causes the image reading unit 17 to read the document G1 (S1). The control unit 21 causes the document image storage unit 19a to store image data indicating the document image D1 read by the image reading unit 17.

[0045] FIG. 6(A) is a diagram showing an example of a layout-analyzed document image. FIG. 6(B) is a diagram showing an example of a character area specified in a document image. The character area specifying unit 22 performs layout analysis included in OCR processing on the document image D1 shown in FIG. 6(A) to specify a character area CA in the document image D1 as shown in FIG. 6(B) (S2). The character area CA is specified in the document image D1 shown in FIG. 6(B). The character area specifying unit 22 also acquires information indicating each position of the character area CA in the document image D1 based on the coordinate position information of the document image D1. For example, the character area specifying unit 22 acquires information indicating each coordinate position P1, P2, P3, P4 of the upper left corner, upper right corner, lower left corner, and lower right corner of the character area CA.

[0046] The image acquiring unit 23 acquires an image of the character area CA identified by the character area identifying unit 22 from the document image D1 shown in FIG. 6(B) (S3).

[0047] The text extraction unit 24 performs OCR processing on the image of the character area CA acquired by the image acquisition unit 23, and extracts each character data in the text in the character area CA and its position information in association with each other (S4). FIG. 7(A) is a diagram showing an example of text extracted from a document image. Specifically, for the first character "They" in the text TX shown in FIG. 7(A), the text extraction unit 24 extracts each character data of "T", "h", "e", and "y" and their position information in association with each character data. Similarly, the text extraction unit 24 extracts each remaining character data following "They" in association with its position information.

[0048] The word identification unit 25 identifies each of the multiple words W included in the text TX extracted by the text extraction unit 24 (S5). As shown in Fig. 7(A), the word identification unit 25 identifies each of the words W such as "They", "said", "thal", "Mark", "snou.d", ..., "him", and "away".

[0049] The word determination unit 26 determines whether or not each of the multiple words W identified by the word identification unit 25 matches any of the multiple registered words included in the dictionary data in the dictionary data storage unit 19c (S6).

[0050] In the case of the text TX shown in Figure 7 (A), the word determination unit 26 determines that, among the multiple words W identified by the word identification unit 25, "They", "said", "Mark", ..., "him", "away", etc. match the multiple registered words "They", "said", "Mark", ..., "him", "away", etc. in the dictionary data, and determines "They", "said", "Mark", ..., "him", "away", etc. in the text TX to be matching words MW.

[0051] On the other hand, the word determination unit 26 determines that the words W, “thal” and “snou.d”, do not match any of the multiple registered words included in the dictionary data, and determines “thal” and “snou.d” in the text TX as mismatched words MSW, respectively.

[0052] The generation unit 27 performs a corrected text generation process (S7). Fig. 8 is a flowchart showing an example of the corrected text generation process. Fig. 9 is a diagram showing an example of a process for identifying a font that is most similar to the target character.

[0053] As shown in Fig. 8, when there is a matching word MW that the word determination unit 26 has determined to be a match, the generation unit 27 sets the characters constituting the matching word MW as font determination characters FJC (S71). In this case, as shown in Fig. 9, the matching words MW "said" and "Mark" are located before and after the mismatched word MSW "thal", and the generation unit 27 sets the character "M" that is in a predetermined order (for example, the first character) among the characters constituting the subsequent matching word MW "Mark" as the font determination character FJC. Note that the character in the predetermined order may be a character in any order other than the first character, or may be the last character (for example, "k" in "Mark").

[0054] As shown in FIG. 9, the generation unit 27 identifies the font indicated by the character image having the highest similarity ratio between the determination character image JCI (image of "M") in the character area CA corresponding to the font determination character FJC and the image of the same character (image of "M") as the font determination character FJC for each of multiple types of fonts (e.g., "Arial", "Courier New", "Times New Roman", etc.) stored in the font storage unit 19b (S72).

[0055] FIG. 10 is a diagram showing an example of identifying a font using the degree of coincidence of pixel areas between a bounding box of a font determination character and a character box of the same character as the font determination character for each of a plurality of fonts.

[0056] Specifically, as shown in FIG. 10, the generation unit 27 divides a rectangular bounding box BB of the image of the font determination character FJC (the image of "M") and a rectangular character box CB for each image of "M" in multiple types of fonts into pixel regions consisting of a predetermined number of columns x number of rows (e.g., 22 x 22) divided in a grid pattern of a predetermined number of columns x number of rows (e.g., 22 x 22), and calculates the degree of correspondence of the pixel region with the bounding box BB for each of the multiple character boxes CB.

[0057] In FIG. 10, the generation unit 27 calculates the similarity scores between the bounding box BB of the determination character image JCI (image of "M") in the character area CA corresponding to the font determination character FJC and the character boxes CB of "M" in each of the fonts "Arial" and "Courier New" to be 94.38% and 80.79%, respectively. In addition, the similarity score with the character box CB of "M" in the font "Times New Roman" is lower than 94.38%, although not shown in FIG. 10. Therefore, the similarity score of the character box CB of "M" in the font "Arial" is 94.38%, which is the highest ratio that is equal to or higher than a predetermined ratio (e.g., 90%). Therefore, the generation unit 27 specifies the font that is most similar to the bounding box BB of the determination character image JCI (image of "M") in the character area CA corresponding to the font determination character FJC as "Arial".

[0058] Returning to Fig. 8, the generation unit 27 performs a replacement process to replace the mismatched words MSW of the text TX, "thal" and "snou.d", with correct words (S73). Fig. 11 is a flowchart showing an example of the replacement process. Fig. 12 is a diagram showing an example of identifying a character most similar to a target character.

[0059] When there are multiple mismatched words MSW, the generation unit 27 performs a replacement process on the multiple mismatched words MSW in the order in which they are arranged. Specifically, the generation unit 27 replaces "thal" with a correct word, and then replaces "snou.d" with a correct word. For convenience of explanation, the following description will be given using the mismatched word MSW "snou.d" as an example.

[0060] The generating unit 27 generates rectangular bounding boxes BB generated by dividing the target character images TCI of the character area CA corresponding to the target characters TC constituting "snou.d" which is the mismatched word MSW of the text TX by character units (S730). Specifically, as shown in Fig. 12, the generating unit 27 generates bounding boxes BB of the target character images TCI of the character area CA corresponding to "s", "n", "o", "u", ".", and "d" with each character of "snou.d" as the target character TC. That is, the bounding box BB of "s", the bounding box BB of "n", the bounding box BB of "o", the bounding box BB of "u", the bounding box BB of ".", and the bounding box BB of "d" are generated.

[0061] The generation unit 27 divides the bounding box BB of "s" and a plurality of rectangular character boxes CB prepared for each character that constitutes the above-mentioned identified font "Arial" stored in the font storage unit 19b into pixel regions consisting of a predetermined number of columns x number of rows (e.g., 22 x 22) divided in a grid pattern of a predetermined number of columns x number of rows (e.g., 22 x 22), and calculates the degree of correspondence of the pixel region with the bounding box BB for each of the plurality of rectangular character boxes CB (S731).

[0062] Here, among images of all characters in the "Arial" font (alphabetical characters "a" to "z", symbols such as "." and "-"), the similarity score of the letter "s" in the "Arial" font is calculated to be 99%, and the similarity score of each character other than the "s" in the "Arial" font is calculated to be less than 90%.

[0063] The generation unit 27 determines whether the highest degree of match HM (i.e., the above 99%) among these degrees of match is equal to or greater than a first threshold value TH1 (e.g., 97%) (S732). Here, the generation unit 27 determines that the highest degree of match HM (the above 99%) is equal to or greater than the first threshold value TH1 (e.g., 97%) (YES in S732), identifies the character box CB showing the highest degree of match HM (the above 99%) as the first character box corresponding to the first bounding box showing a complete character (S733), and does not replace the target character TC with the character in the first character box (S734). That is, the "s" in "snou.d", which is the mismatched word MSW of the text TX, is not replaced because it is not an erroneous conversion character.

[0064] Next, after S734, the generation unit 27 determines whether or not there is a next target character (S734A). Here, since there is a target character "n" following "s" in "snou.d" which is the mismatched word MSW of the text TX, it is determined that there is a next target character (YES in S734A) and proceeds to S731.

[0065] FIG. 13 is a diagram showing an example of identifying a character that is most similar to a target character using the degree of coincidence of pixel areas between the bounding box of the target character and the character boxes of all characters in a specified font.

[0066] As shown in FIG. 13, the generation unit 27 divides the bounding box BB of "n" and a plurality of rectangular character boxes CB prepared for each character that constitutes the above-mentioned identified font "Arial" stored in the font storage unit 19b into pixel regions consisting of a predetermined number of columns x number of rows (e.g., 22 x 22) divided in a grid pattern of a predetermined number of columns x number of rows (e.g., 22 x 22), and calculates the degree of correspondence of the pixel region with the bounding box BB for each of the plurality of rectangular character boxes CB (S731).

[0067] The image of the bounding box BB of "n" shows a character image in which a part of the character is missing or damaged (broken character image). It goes without saying that when OCR processing is performed on such an original image, the broken character image is highly likely to be regarded as a misconverted character or character string.

[0068] Here, as shown in FIG. 13, among images of all characters in the “Arial” font (alphabetics “a” to “z”, symbols such as “.” and “-”, etc.), the similarity scores with the letters “b”, “h”, and “n” in the “Arial” font are calculated to be 87.80%, 94.74%, and 81.82%, respectively.

[0069] The generating unit 27 determines whether the highest degree of agreement HM (i.e., the above 94.74%) among these degrees of agreement is equal to or greater than a first threshold value TH1 (e.g., 97%) (S732). Here, the generating unit 27 determines that the highest degree of agreement HM (the above 94.74%) is not equal to or greater than the first threshold value TH1 (e.g., 97%) (NO in S732).

[0070] Next, the generating unit 27 judges whether the highest degree of agreement HM (94.74% above) is less than the first threshold TH1 (e.g., 97%) and is equal to or greater than the second threshold TH2 (e.g., 90%) (S735). Here, the generating unit 27 judges that the highest degree of agreement HM (94.74% above) is less than the first threshold TH1 (e.g., 97%) and is equal to or greater than the second threshold TH2 (e.g., 90%) (YES in S735), identifies the character box CB showing the highest degree of agreement HM (94.74% above) as the second character box corresponding to the second bounding box showing the broken character (S736), and replaces the target character TC with the character in the second character box (S737). That is, the "n" in the mismatched word MSW "snou.d" of the text TX is an erroneous conversion character and is replaced with the character "h".

[0071] Next, after S737, the generation unit 27 determines whether or not there is a next target character (S734A). Here, since there is a target character "o" following "n" in "snou.d" which is the mismatched word MSW of the text TX, it is determined that there is a next target character (YES in S734A) and proceeds to S731.

[0072] Similarly, a replacement process (S73) is performed on each of the remaining bounding boxes BB in “snou.d”, which is the mismatched word MSW in the text TX, namely, the bounding box BB of “o”, the bounding box BB of “u”, the bounding box BB of “.”, and the bounding box BB of “d”.

[0073] In addition, "o", "u", and "d" in "snou.d", which is the mismatched word MSW, are not erroneously converted characters. Therefore, the generating unit 27 determines that the highest matching score HM for "o", "u", and "d" is equal to or greater than the first threshold value TH1, and "o", "u", and "d" are not replaced with the replaced characters RPC.

[0074] On the other hand, the "." in the mismatched word MSW "snou.d" is an erroneous conversion character. Therefore, the generation unit 27 determines that the highest matching score HM for the "." is less than the first threshold TH1 (e.g., 97%) and is equal to or greater than the second threshold TH2 (e.g., 90%) (YES in S735), specifies the character box CB (here, "l": lowercase L) showing the highest matching score HM as the second character box corresponding to the second bounding box showing the broken character (S736), and replaces the target character TC with the character in the second character box (here, "l") (S737). That is, the "." in the mismatched word MSW "snou.d" of the text TX is an erroneous conversion character and is replaced with the character "l" (lowercase L).

[0075] In the above, the generation unit 27 has determined that the highest matching score HM for the "." in the mismatched word MSW "snou.d" is less than the first threshold value TH1 (e.g., 97%) and greater than or equal to the second threshold value TH2 (e.g., 90%) (YES in S735). However, the case where it is less than the second threshold value TH2 (e.g., 90%) will be described below.

[0076] When generation unit 27 determines that the highest degree of matching HM for the "." in the mismatched word MSW "snou.d" is less than a second threshold value TH2 (e.g., 90%) (NO in S735), it identifies the character box CB showing the highest degree of matching HM as a third character box that is not a replacement candidate (S738), does not replace the target character TC with the character in the third character box, and changes the display mode of the target character to a different one from the other characters (S739), as shown in FIG. 15, and proceeds to S734A.

[0077] Fig. 15 is a diagram showing an example of a display mode of an erroneously converted character that could not be corrected in a text. The generating unit 27 changes the display mode of the background of the "." in the mismatched word MSW "snou.d" to a color (indicated by hatching in Fig. 15) different from the background of other characters.

[0078] Next, the generation unit 27 determines whether or not there is a next target character (S734A). Here, since there is no target character after "d" in "snou.d", which is the mismatched word MSW of the text TX, it is determined that there is no next target character (NO in S734A) and proceeds to S74 in FIG.

[0079] The generation unit 27 judges whether or not there is a next mismatched word (S74). If there is a next mismatched word (YES in S74), the generation unit 27 judges whether or not the mismatched word is a word in the same sentence (S75). For example, if there is another mismatched word MSW after "snou.d", which is the mismatched word MSW of the text TX shown in FIG. 7(A), the generation unit 27 judges whether or not the other mismatched word MSW exists in the sentence "they ... kingdom." If the generation unit 27 judges that the other mismatched word MSW exists in the sentence "they ... kingdom." (YES in S75), the process proceeds to S73, and if it judges that the other mismatched word MSW does not exist in the sentence "they ... kingdom." (NO in S75), the process proceeds to S71.

[0080] When the generating unit 27 determines that there is no next mismatched word (NO in S74), the control unit 21 ends the process shown in FIG.

[0081] FIG. 14 is a diagram showing an example of corrected text in which erroneously converted characters in the text are corrected. As shown in FIG. 14, the generation unit 27 replaces "thal" and "snou.d", which are the mismatched words MSW of the text TX, with "that" and "should", which are correct words. Specifically, the generation unit 27 replaces "l" in "thal", which is the mismatched word MSW, with the replaced character RPC, which is "t", and replaces "thal", which is the mismatched word MSW of the text TX, with "that", which is the correct word. In addition, the generation unit 27 replaces "n" and "." in "snou.d", which is the mismatched word MSW, with the replaced character RPC, which is "h", and the replaced character RPC, which is "l", respectively, and replaces "snou.d", which is the mismatched word MSW of the text TX, with the correct word "should".

[0082] Returning to Fig. 5, the control unit 21 causes the display unit 12 to display the corrected text CT shown in Fig. 7(B) (S8). Fig. 7(B) is a diagram showing an example of the corrected text in which an erroneously converted character in the text has been corrected.

[0083] The control unit 21 determines whether or not the user has instructed to save or print (S9). When the control unit 21 detects pressing of a "save" button (not shown) on the touch panel 15 ("save" at S9), it stores the corrected text CT in the data storage unit 19 (S10) and ends this process. On the other hand, when the control unit 21 detects pressing of a "print" button (not shown) on the touch panel 15 ("print" at S9), it causes the image forming unit 18 to form an image of the corrected text CT on recording paper (S11) and ends this process.

[0084] Note that a determination of "send" may be added in S9. In this case, when the user performs an operation to instruct data output on the operation unit 14, the control unit 21 may cause the communication unit 16 to send (output) the corrected text CT to the external device 30, and terminate this process.

[0085] Thus, according to the above embodiment, the document image storage unit 19a stores the document image D1. The dictionary data storage unit 19c stores dictionary data including a plurality of predefined registered words. The font storage unit 19b stores fonts in advance. The character area specification unit 22 specifies the character area CA in the document image D1 stored in the document image storage unit 19a. The image acquisition unit 23 acquires an image of the character area CA from the document image D1. The text extraction unit 24 extracts text TX from the image of the character area CA acquired by the image acquisition unit 23. The word specification unit 25 specifies each of the plurality of words W included in the text TX extracted by the text extraction unit 24. The word determination unit 26 determines whether each of the plurality of words W specified by the word specification unit 25 matches any of the plurality of registered words included in the dictionary data. When there is a mismatched word MSW determined by the word determination unit 26 to be mismatched, the generation unit 27 replaces the target character TC constituting the mismatched word MSW in the text TX with the replaced character RPC indicated by the image of the character that has the highest similarity rate to the target character image TCI of the character area CA corresponding to the target character TC among all the images of characters constituting the font stored in the font storage unit 19b, which is equal to or higher than a predetermined rate, thereby generating a corrected text CT in which the target character TC of the mismatched word MSW in the text TX is replaced with the replaced character RPC. Therefore, when there is a mismatched word MSW, it is possible to detect that the mismatched word MSW contains an erroneously converted character. In other words, it is possible to detect an erroneously converted character or character string in the text TX. Then, the generation unit 27 generates a corrected text CT in which the target character TC of the mismatched word MSW in the text TX is replaced with the replaced character RPC, so that it is possible to correct an erroneously converted character or character string in the text TX obtained by the OCR process. This makes it possible to detect and correct an erroneously converted character or character string in the text TX obtained by the OCR process.

[0086] Furthermore, when there is a matching word MW that the word determination unit 26 has determined to be a match, the generation unit 27 sets the characters that make up the matching word MW as font determination characters FJC, and specifies the font indicated by the image of the character that has the highest similarity ratio between the determination character image JCI in the character area CA corresponding to the font determination character FJC and the image of the same character as the font determination character FJC for each of the multiple fonts stored in the font storage unit 19b and is equal to or greater than a predetermined ratio. Therefore, the type of font can be specified using an image of a complete character (image of the font determination character FJC) that has been correctly recognized by the OCR process, and the use of a "broken character image" in which part of the character is missing or damaged can be reduced. This improves the accuracy of specifying the type of font. The generation unit 27 also replaces the target character TC constituting the mismatched word MSW of the text TX with the replaced character RPC that has the highest similarity rate to the target character image TCI of the character area CA corresponding to the target character TC among all the images of characters constituting a font specified among the multiple fonts stored in the font storage unit 19b, the ratio being equal to or higher than a predetermined ratio, thereby generating a corrected text CT in which the target character TC of the mismatched word MSW of the text TX has been replaced with the replaced character RPC. This makes it possible to correct a character or character string that has been erroneously converted in the text TX obtained by the OCR process.

[0087] Furthermore, when there is an unmatched word MSW determined by the word determination unit 26 to be unmatched, the generation unit 27 divides a rectangular bounding box BB generated by dividing the target character image TCI of the character area CA corresponding to the target character TC constituting the unmatched word MSW in the text TX by character units, and a plurality of rectangular character boxes CB prepared for each character for all characters constituting the specified font among the plurality of types of fonts stored in the font storage unit 19b, into pixel areas each having a predetermined number of columns and a number of rows, which are divided in a grid pattern with a predetermined number of columns and a number of rows, and calculates the pixel area of ​​the bounding box BB for each of the plurality of rectangular character boxes CB. The degree of agreement is calculated for each of the degrees of agreement, and if the highest degree of agreement among these degrees of agreement is (i) equal to or greater than a predetermined first threshold, the character box CB showing the highest degree of agreement is identified as a first character box corresponding to a first bounding box showing a complete character, and the target character TC is not replaced with a character in the first character box, and (ii) if the highest degree of agreement is less than the predetermined first threshold and equal to or greater than a predetermined second threshold smaller than the predetermined first threshold, the character box CB showing the highest degree of agreement is identified as a second character box corresponding to a second bounding box showing a broken character, and the target character TC is replaced with a character in the second character box. Therefore, if (i) the highest degree of agreement is equal to or greater than the predetermined first threshold, the target character TC can be identified as a complete character and can be identified as a correctly converted character. In this case, it is not necessary to replace the target character TC with a character in the first character box. Therefore, the generation unit 27 does not replace the target character TC with a character in the first character box. Therefore, it is possible to avoid correcting a character or a character string that has been converted correctly in the text TX obtained by the OCR process. On the other hand, (ii) if the highest degree of match is less than a predetermined first threshold and equal to or greater than a predetermined second threshold, the target character TC can be identified as a broken character and can be identified as an erroneously converted character. Thus, it is possible to detect an erroneously converted character or character string in the text TX. Then, the generation unit 27 replaces the target character TC with the character in the second character box. Therefore, it is possible to accurately correct an erroneously converted character or character string in the text TX obtained by the OCR process.

[0088] Furthermore, when the highest degree of matching is (iii) less than a predetermined second threshold, generation unit 27 identifies character box CB showing the highest degree of matching as a third character box that is not a replacement candidate, does not replace target character TC with the character in the third character box, and changes the display mode of target character TC to a different mode from other characters. This makes it possible to identify that target character TC is a character that has been erroneously converted and has not been correctly corrected, and to alert the user to that effect.

[0089] Furthermore, when the matching word MW is located before or after the mismatched word MSW, the generation unit 27 sets the characters constituting the matching word MW as font determination characters FJC, when the matching word MW is located before and after the mismatched word MSW, the characters constituting the previous matching word MW or the following matching word MW as font determination characters FJC, and when the matching word MW is not located before or after the mismatched word MSW, the characters constituting the matching word MW in the sentence containing the mismatched word MSW as font determination characters FJC. Note that the mismatched word MSW is highly likely to be in the same font as the matching word MW in the sentence containing the mismatched word MSW, and more specifically, is even more likely to be in the same font as the matching word MW before or after the mismatched word MSW. For this reason, the matching word MW located before and after the mismatched word MSW, that is, the image of the complete character correctly recognized by the OCR process (the image of the font determination characters FJC) can be used. This can further improve the accuracy of identifying the type of font.

[0090] Next, an image forming apparatus according to a modified example will be described with reference to Fig. 16. Fig. 16 is a diagram showing an example of generation of corrected text according to the modified example.

[0091] In the above embodiment, when the highest degree of matching HM is (i) equal to or greater than a first predetermined threshold value TH1 (e.g., 97%), the generating unit 27 identifies the character box showing the highest degree of matching HM as a first character box corresponding to a first bounding box showing a complete character, and does not replace the target character TC with the character in the first character box, but is not limited to this. That is, in a modified example, the generating unit 27 replaces the target character TC with the character in the first character box.

[0092] When there is an mismatched word MSW that the word determination unit 26 has determined to be a mismatch, the generation unit 27 divides a rectangular bounding box BB generated by dividing the target character image TCI of the character area CA corresponding to the target character TC that constitutes the mismatched word MSW in the text TX, on a character-by-character basis, and a plurality of rectangular character boxes CB prepared for each character for all characters that constitute a specified font among the multiple types of fonts stored in the font storage unit 19b, into pixel areas consisting of a predetermined number of columns and number of rows divided into a grid pattern, identifies the character box among the multiple rectangular character boxes CB that has the highest degree of matching in its pixel area with the bounding box BB, and replaces the target character TC with the character in the character box with the highest degree of matching.

[0093] As shown in FIG. 16, the generation unit 27 replaces "thal" and "snou.d" which are mismatched words MSW of the text TX with "that" and "should" which are correct words. Specifically, the generation unit 27 replaces all characters ("t", "h", "a", "l") of "thal" which is the mismatched word MSW of the text TX with the replaced character RPCs of "t", "h", "a", and "l", respectively, and replaces "thal" which is the mismatched word MSW of the text TX with "that", which is the correct word. In addition, the generation unit 27 replaces all characters ("s", "n", "o", "u", ".", and "d") of "snou.d" which is the mismatched word MSW of the text TX with the replaced character RPCs of "s", "h", "o", "u", "l", and "d", respectively, and replaces "snou.d" which is the mismatched word MSW of the text TX with "should", which is the correct word.

[0094] According to the above modification, when there is a mismatched word MSW determined by the word determination unit 26 as a mismatch, the generation unit 27 divides a rectangular bounding box BB generated by dividing the target character image TCI of the character area CA corresponding to the target character TC constituting the mismatched word MSW in the text TX by character units, and a plurality of rectangular character boxes CB prepared for each character constituting the specified font among the plurality of types of fonts stored in the font storage unit 19b, into pixel areas consisting of a number of columns and a number of rows, which are divided in a grid pattern of a predetermined number of columns and a number of rows, identifies the character box among the plurality of rectangular character boxes CB that has the highest degree of matching of the pixel area with the bounding box BB, and replaces the target character TC with the character in the character box with the highest degree of matching (i.e., the replaced character RPC). Therefore, it is possible to accurately correct a character or character string that is erroneously converted in the text obtained by the OCR process.

[0095] The present invention is not limited to the configurations of the above-described embodiments, and various modifications are possible.

[0096] In the above embodiment or modified example, character area identification unit 22 identifies character area CA by performing layout analysis on document image D1, but is not limited to this. For example, character area identification unit 22 may identify character area CA in document image D1 according to a user's designation of character area CA. When a two-point operation is performed in which the user touches two points, the upper left corner point and the lower right corner point, of a rectangular area on document image D1 displayed on display unit 12, character area identification unit 22 identifies this rectangular area as character area CA. Alternatively, a four-point operation in which the user designates the four corners of a rectangular area, an operation to surround an image of handwritten characters (drag operation), etc. may be performed.

[0097] In the above embodiment, the image forming apparatus 10 is used as an example of the image processing apparatus, but the image processing apparatus is not limited to this. For example, the image processing apparatus may be an image processing apparatus (for example, a personal computer, a server, a mobile information terminal, etc.) including a control unit 11 and a data storage unit 19 shown in FIG.

[0098] The configurations and processes of the above-described embodiment described with reference to FIGS. 1 to 16 are merely examples of the present invention, and the present invention is not limited to these configurations and processes. [Explanation of symbols]

[0099] 10 Image forming device 17 Image reading unit 18 Image forming section 19a Original image storage unit 19b Font storage section 19c Dictionary data storage unit 21 Control section 22 Character area identification part 23 Image acquisition unit 24 Text Extraction Unit 25 Word Identification Section 26 Word Determination Section 27 Generation part

Claims

1. an original image storage unit for storing an original image; a dictionary data storage unit that stores dictionary data including a plurality of predetermined registered words; a font storage unit that stores images of all characters that constitute a font in advance; a character area specifying unit that specifies a character area in the document image stored in the document image storage unit; an image acquisition unit that acquires an image of the character region from the document image; a text extraction unit that extracts text from the image of the character region acquired by the image acquisition unit; a word identification unit that identifies each of a plurality of words included in the text extracted by the text extraction unit; a word determination unit that determines whether or not each of the plurality of words identified by the word identification unit matches any of the plurality of registered words included in the dictionary data; and a generation unit that, when there is an mismatched word determined by the word determination unit to be a mismatch, replaces a target character that constitutes the mismatched word in the text with a replaced character indicated by an image of a character that has a similarity to a target character image in the character region corresponding to the target character at a predetermined rate or higher among images of all characters that constitute the font stored in the font storage unit, thereby generating a corrected text in which the target character of the mismatched word in the text has been replaced with the replaced character.

2. The font storage unit stores a plurality of types of fonts in advance, 2. The image processing device according to claim 1, wherein, when there is a matching word determined by the word determination unit to be a match, the generation unit sets characters constituting the matching word as font determination characters, identifies a font indicated by an image of a character having a highest rate of similarity between a determination character image in the character region corresponding to the font determination character and an image of a character identical to the font determination character for each of the multiple fonts stored in the font storage unit that is equal to or higher than a predetermined rate, and replaces a target character constituting the mismatched word of the text with a replaced character indicated by an image of a character having a highest rate of similarity between the determination character image in the character region corresponding to the target character and an image of a character identical to the font determination character for each of the multiple fonts stored in the font storage unit that is equal to or higher than a predetermined rate, among images of all characters constituting the specified font among the multiple fonts stored in the font storage unit.

3. 3. The image processing device according to claim 2, wherein, when there is an mismatched word determined by the word determination unit to be a mismatch, the generation unit divides a rectangular bounding box generated by dividing, on a character-by-character basis, a target character image of the character region corresponding to the target character constituting the mismatched word in the text, and a plurality of rectangular character boxes prepared for each character for all characters constituting the specified font among the plurality of types of fonts stored in the font storage unit, into pixel regions consisting of a predetermined number of columns and a predetermined number of rows, divided in a grid pattern, identifies a character box among the plurality of rectangular character boxes whose pixel region has the highest degree of matching with the bounding box, and replaces the target character with the character in the character box with the highest degree of matching.

4. When there is an mismatched word determined by the word determination unit to be mismatched, the generation unit divides a rectangular bounding box generated by dividing, on a character-by-character basis, a target character image of the character region corresponding to the target character constituting the mismatched word in the text, and a plurality of rectangular character boxes prepared for each character for all characters constituting the specified font among the plurality of types of fonts stored in the font storage unit, into pixel regions consisting of a predetermined number of columns and a predetermined number of rows, which are divided into a grid shape, and calculates a degree of matching of the pixel region with the bounding box for each of the plurality of rectangular character boxes, 3. The image processing device of claim 2, further comprising: (i) a first threshold value or more for which the highest degree of match is equal to or greater than a first threshold value; identifying the character box showing the highest degree of match as a first character box corresponding to a first bounding box indicating a complete character, and not replacing the target character with the character in the first character box; and (ii) a second threshold value or more for which the highest degree of match is less than the first threshold value and is equal to or greater than a second threshold value that is smaller than the first threshold value; identifying the character box showing the highest degree of match as a second character box corresponding to a second bounding box indicating a corrupted character, and replacing the target character with the character in the second character box.

5. 5. The image processing device of claim 4, wherein when the highest degree of match is (iii) less than the predetermined second threshold, the generation unit identifies the character box showing the highest degree of match as a third character box that is not a replacement candidate, does not replace the target character with a character in the third character box, and changes the target character to a display mode different from other characters.

6. 3. The image processing device of claim 2, wherein when the matching word is located before or after the mismatched word, the generation unit sets characters constituting the matching word as the font determination characters, when the matching word is located before and after the mismatched word, characters constituting the previous matched word or the following matched word as the font determination characters, and when the matching word is not located before or after the mismatched word, characters constituting the matching word in a sentence including the mismatched word as the font determination characters.

7. An image processing device according to any one of claims 1 to 6, an image reading unit that reads an image of a document; a control unit that stores the document image read by the image reading unit in the document image storage unit; An image forming apparatus comprising: an image forming unit that forms an image on a recording medium.

Citation Information

Patent Citations

  • Method and device for document recognition

    JP2000155795A

  • Image forming apparatus

    JP2019106028A

  • Image processing device

    JP2019148941A