Image reading device
The image reading device uses multiple colored light sources to adjust lighting times based on the background color, enhancing OCR accuracy by increasing contrast and preventing accuracy loss in monochrome document reading.
Patent Information
- Application Number
- JP2023106360
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2025-01-17
AI Technical Summary
When reading a document in monochrome mode with a small difference in density between the background and characters, the accuracy of optical character recognition (OCR) processing decreases.
An image reading device employs multiple light sources emitting different colors (red, green, and blue) and adjusts their lighting times based on the background color to enhance the contrast between the background and characters, thereby improving OCR accuracy.
The adjusted lighting control prevents a decrease in OCR processing accuracy by increasing the contrast between the background and characters, ensuring precise character edge extraction.
Smart Images

Figure 2025005923000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image reading device that performs OCR processing on an image of a read document. [Background technology]
[0002] 2. Description of the Related Art Conventionally, it is known to perform OCR (optical character recognition) processing on a scanned image of a document (Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent Publication No. 2021-190900 Summary of the Invention [Problem to be solved by the invention]
[0004] For example, when an image of a document is read in monochrome mode, if the difference between the density of the document's background and the density of the characters is small, the accuracy of extracting the edges of the characters decreases, which may result in a decrease in the accuracy of the OCR processing.
[0005] In view of the above problems, an object of the present invention is to prevent a decrease in the accuracy of OCR processing. [Means for solving the problem]
[0006] In order to solve the above problems, an image reading device according to the present invention comprises: a first light source that emits light of a first color; a second light source that emits light of a second color different from the first color; a third light source that emits light of a third color different from the first color and the second color; an image sensor that receives reflected light from the document; a control means for turning on the first light source, the second light source and the third light source during a period in which one line of an image of the document along a longitudinal direction of the image sensor is read; a generating means for generating a monochrome image based on a result of light reception by the image sensor during the period; A processing means for performing OCR processing on the monochrome image; A display unit that displays a multi-color image; having The control means controls the lighting of a light source corresponding to an image selected from the images of the multiple colors so that the amount of light from the light source corresponding to the selected image among the first light source, the second light source, and the third light source that enters the image sensor during the period when the OCR processing is performed is greater than the amount of light from the light source corresponding to the selected image among the first light source, the second light source, and the third light source that enters the image sensor during the period when the OCR processing is not performed. Effect of the Invention
[0007] According to the present invention, it is possible to suppress a decrease in the accuracy of OCR processing. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram illustrating a configuration of an image reading device. [Diagram 2] FIG. 2 is a block diagram showing an example of a control configuration of the image reading apparatus. [Diagram 3] 6 is a diagram showing the relationship between a line synchronization signal and the lighting time of each light source. FIG. [Figure 4] FIG. 13 is a diagram showing a read image obtained by reading an original with a red background in a monochrome mode using a first lighting control. [Diagram 5] FIG. 13 is a diagram showing a screen displayed on the operation unit 202 when execution of OCR processing is selected. [Figure 6] FIG. 13 is a diagram showing a table in which sample images of each color are associated with time adjustment data. [Figure 7] FIG. 13 is a diagram showing the relationship between the line synchronization signal and the lighting time of each light source when the first sample image is selected. [Figure 8] 13 is a diagram showing a read image obtained by reading an original with a red background in monochrome mode using the second lighting control. FIG. [Figure 9] 10 is a flowchart illustrating setting of a lighting time. [Figure 10] FIG. 1 is a diagram showing a color bar in which a plurality of colors change continuously. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Preferred embodiments of the present invention will be described below with reference to the drawings. However, the shapes of the components and their relative positions described in the embodiments may be changed as appropriate depending on the configuration of the device to which the present invention is applied and various conditions, and the scope of the present invention is not intended to be limited to the following embodiments.
[0010] [First embodiment] [Image reader] FIG. 1 is a configuration diagram of an image reading device 100 including an original feeding device 101 and a reading device 102 used in this embodiment.
[0011] An original 103 loaded on an original loading section 104 of an original feeding device 101 is fed by a pickup roller 106 and then conveyed further downstream by a feed roller 107 .
[0012] The original 103 is conveyed by a feed roller 107 and the like, and is discharged onto a discharge tray 111 by a discharge roller 110 .
[0013] The reading device 102 is provided with a reading unit 116 that reads an image of a document being conveyed. The reading unit 116 has light sources 122 including a red (R) light source, a green (G) light source, and a blue (B) light source, a lens array 124, and an image sensor 125. The image sensor 125 has a plurality of light receiving elements in the main scanning direction (corresponding to the width direction perpendicular to the conveying direction in which the document is conveyed), and the image sensor 125 is not provided with a color filter. The reading unit 116 reads an image of the front surface (first surface) of the document in a monochrome mode as follows. Specifically, each light source 122 irradiates (emits) light onto the front surface of the document being conveyed through the reading glass 113. The lens array 124 guides the reflected light from the document that is incident through the reading glass 113 to the image sensor 25. The image sensor 125 outputs analog image data based on the received light. The image sensor 125 simultaneously reads one line of image in the main scanning direction (the longitudinal direction of the image sensor 125). Therefore, by reading one line of image multiple times by the image sensor 125 while conveying the document, the image sensor 125 can output image data including the entire document as a light reception result.
[0014] In this embodiment, the reading unit 116 that reads the front side of the document is provided in the reading device 102, but a reading unit that reads the back side (second side) of the document may be provided in the document transport device 101. The reading unit that reads the back side (second side) of the document has the same configuration as the reading unit 116, for example.
[0015] Methods for reading an original include a skimming method and a pressure plate reading method. The skimming method is a method for reading an image of an original transported by the above-mentioned method. The pressure plate reading method is a method for reading an image of an original placed on an original table glass 115 of the reading device 102 by a reading unit 116 that moves at a constant speed in a sub-scanning direction (rightward in FIG. 1) corresponding to the transport direction in which the original is transported. Usually, an image of a sheet-like original is read by the skimming method, and an image of a bound original such as a book or pamphlet is read by the pressure plate reading method.
[0016] The document feeder 101 is rotatable relative to the reading device 102 between an open position where a document table glass 115 is exposed and a closed position where the document table glass 115 is covered by the document feeder 101. The document feeder 101 has a pressure plate that presses the document placed on the document table glass 115 toward the document table glass 115 in the closed position. In the pressure plate reading method, the document placed on the document table glass 115 is read by a reading unit 116 that moves in the sub-scanning direction.
[0017] Note that an image forming device having a known image forming section for forming an image on a sheet may be provided below the image reading device 100 .
[0018] [Control configuration] 2 is a block diagram showing an example of a control configuration of the image reading device 100. In this embodiment, at least one ASIC executes the functions described below.
[0019] The CPU 201 executes various controls by executing programs stored in a non-volatile memory (not shown).
[0020] The operation unit 202 provides a user interface. The CPU 201 controls the operation unit 202 so as to display, on a display unit provided in the operation unit 202, an operation screen for a user to perform settings when reading an image of a document by the document reading device 100. The CPU 201 receives information set by the user from the operation unit 202, and controls the image reading device 100 based on the information.
[0021] The time setting unit 203 calculates (sets) the lighting times of an R light source 204, a G light source 205, and a B light source 206 included in the light source 122, using a method to be described later.
[0022] A synchronization signal generating unit 209 generates a line synchronization signal that indicates the period for reading one line of an image along the main scanning direction.
[0023] Based on the line synchronization signal, the lighting control unit 207 lights up the R light source 204, the G light source 205, and the B light source 206 for the lighting time set by the time setting unit 203. Details will be described later.
[0024] The image data output by the reading unit 116 is input to the CPU 201. The CPU 201 converts the analog image data into digital image data. The digital image data has a higher numerical value as the intensity of the reflected light increases. Hereinafter, this numerical level will be referred to as a luminance value.
[0025] The OCR processor 208 performs known OCR (Optical Character Recognition) processing on a read image corresponding to the digital image data converted by the CPU 201 .
[0026] The CPU 201 outputs the scanned image from the scanning unit 116 and the processing result from the OCR processing unit 208 to an external device such as an external PC, a smartphone, or a tablet.
[0027] [Control when OCR processing is performed] The control performed when the OCR process is performed in this embodiment will be described below.
[0028] <First lighting control> 3 is a diagram showing the relationship between the line synchronization signal and the lighting time of each light source when OCR processing is not performed. When OCR processing is not performed, the time setting unit 203 sets the lighting time for lighting each light source to a predetermined time. When the line synchronization signal is input, the lighting control unit 207 turns on the R light source, the G light source, and the B light source. After that, when the predetermined time set by the time setting unit 203 has elapsed, the lighting control unit 207 turns off the R light source, the G light source, and the B light source.
[0029] Each light receiving element of the image sensor 125 receives light emitted from three light sources during one line period. The image sensor 125 outputs analog image data corresponding to the amount of light received by each light receiving element during one line period as monochrome image data. As a result, one line of an image can be read as a monochrome image. Hereinafter, the above lighting control is referred to as a first lighting control.
[0030] When reading one line of an image as a full-color image, the following process is performed during one line period. Specifically, for example, in a state where the lighting control unit 207 turns on the R light source for a predetermined time, the image sensor 125 outputs analog image data corresponding to the amount of light received during the predetermined time as the R image data. After that, the lighting control unit 207 turns off the R light source and turns on the G light source for a predetermined time, and the image sensor 125 outputs analog image data corresponding to the amount of light received during the predetermined time as the G image data. After that, the lighting control unit 207 turns off the G light source and turns on the B light source for a predetermined time, and the image sensor 125 outputs analog image data corresponding to the amount of light received during the predetermined time as the B image data.
[0031] Fig. 4 is a diagram showing a read image obtained by reading an original with a red background in monochrome mode with the first lighting control. As shown in Fig. 4, when an original with a red background is read in monochrome mode with the first lighting control, the difference between the density of the background and the density of the characters is relatively small, so there is a possibility that the accuracy of extracting the edges of the characters by the OCR processing unit 208 will decrease. In other words, there is a possibility that the accuracy of the OCR processing will decrease.
[0032] Therefore, in this embodiment, the following configuration is applied to prevent the accuracy of the OCR process from decreasing.
[0033] <Second lighting control> FIG. 5 is a diagram showing a screen displayed on the operation unit 202 when execution of OCR processing is selected. As shown in FIG. 5, when execution of OCR processing is selected, sample images of multiple colors and a display prompting the user to select a color close to the background color of the document to be read are displayed on the display unit of the operation unit 202. In the example shown in FIG. 5, a red sample image is displayed as the first sample, and a green sample image is displayed as the second sample. Also, a blue sample image is displayed as the third sample, and a white sample image is displayed as the fourth sample. The user can select one sample image that is thought to be close to the background color of the document from among the sample images of multiple colors. In this embodiment, sample images of four colors are displayed, but sample images of five or more colors may be displayed.
[0034] {Lighting time setting} The time setting unit 203 in this embodiment is provided with a memory (not shown) in which a table in which sample images of each color are associated with time adjustment data is stored. Fig. 6 is a diagram showing the table in which sample images of each color are associated with time adjustment data. The table shown in Fig. 6 is obtained in advance by reading an original of a background color corresponding to the sample image of each color before shipping from the factory and measuring the increase in the lighting time required to reduce the background density.
[0035] For example, in order to reduce the background density when scanning a document with a red background, it is necessary to increase the amount of R light received by the image sensor. Therefore, in this embodiment, the lighting time of the R light source is made longer than the lighting time of the R light source in the first control.
[0036] Specifically, as shown in FIG. 6, when the first sample image is selected, the time setting unit 203 increases the lighting time of the R light source by a [%] from the lighting time of the R light source during the first lighting control. Also, the time setting unit 203 increases the lighting time of the G light source by 0 [%] from the lighting time of the R light source during the first lighting control. The time setting unit 203 increases the lighting time of the B light source by 0 [%] from the lighting time of the R light source during the first lighting control. That is, when the first sample image is selected, the time setting unit 203 does not change the lighting time of the G light source and the lighting time of the B light source. Even when the second to fourth sample images are selected, the time setting unit 203 sets the lighting time of the light source of each color by referring to the table as described above.
[0037] 7 is a diagram showing the relationship between the line synchronization signal and the lighting time of each light source when the first sample image is selected. When the line synchronization signal is input, the lighting control unit 207 turns on the R light source, and then turns on the G light source and the B light source. When the time set by the time setting unit 203 has elapsed, the lighting control unit 207 turns off the R light source, the G light source, and the B light source.
[0038] Hereinafter, such lighting control will be referred to as second lighting control.
[0039] Fig. 8 is a diagram showing a read image obtained by reading an original with a red background in monochrome mode using the second lighting control. As shown in Fig. 8, by reading an original with a red background in monochrome mode using the second lighting control, the difference between the density of the background and the density of the characters becomes relatively large. As a result, it is possible to prevent a decrease in the accuracy of extraction of character edges by the OCR processing unit 208. In other words, it is possible to prevent a decrease in the accuracy of the OCR processing.
[0040] 9 is a flowchart for explaining how to set the illumination time in this embodiment. The process of this flowchart is executed by the CPU 201.
[0041] When a user issues an instruction to perform OCR processing in S101, the CPU 201 controls the operation unit 202 to display sample images of each color on the display unit of the operation unit 202 in S102.
[0042] In S103, the CPU 201 controls the time setting unit 203 so as to set the lighting time corresponding to the selected sample image based on the table.
[0043] Furthermore, in S101, if the user has not instructed to perform OCR processing, in S104, the CPU 201 controls the time setting unit 203 to set a lighting time corresponding to the first lighting control.
[0044] As described above, in this embodiment, when execution of OCR processing is selected, a plurality of sample images of different colors and a display prompting the user to select a color close to the background color of the document to be read are displayed on the display unit of the operation unit 202. Then, the illumination time of the light source of the color corresponding to the selected sample image is set, and the document is read in monochrome mode based on the illumination time. As a result, it is possible to prevent a decrease in the accuracy of extraction of character edges by the OCR processing unit 208. In other words, it is possible to prevent a decrease in the accuracy of the OCR processing.
[0045] In this embodiment, the R light source, the G light source, and the B light source are turned on and off simultaneously in Fig. 3, but this is not limited to the above. For example, the timing at which the R light source, the G light source, and the B light source are turned on may differ, and the timing at which the R light source, the G light source, and the B light source are turned off may differ. In other words, it is sufficient that the R light source, the G light source, and the B light source are turned on for the same period of time during one line.
[0046] In this embodiment, in the table of Fig. 5, the increase in the lighting time of the R light source when the first to third sample images are selected is a [%], but is not limited to this. For example, the increase in the lighting time of the R light source when the first sample image is selected may be a different amount from the increase in the lighting time of the G light source when the second sample image is selected. Also, the increase in the lighting time of the G light source when the second sample image is selected may be a different amount from the increase in the lighting time of the B light source when the third sample image is selected.
[0047] In this embodiment, in the table of Fig. 5, when the first to third sample images are selected, the lighting time of only one color is increased, but this is not limited to this. For example, when the first sample image is selected, the time setting unit 203 may be configured to increase the lighting time of the R light source by a [%] from the lighting time of the R light source during the first lighting control, and to increase the lighting time of the G light source by b [%] from the lighting time of the G light source during the first lighting control. Also, for example, when a purple sample image is selected, the lighting time of the R light source and the lighting time of the B light source corresponding to the purple sample image may be increased.
[0048] 7, the R light source, the G light source, and the B light source are turned on so that the center timings of the periods during which the R light source, the G light source, and the B light source are turned on coincide with each other, but this is not limited thereto. For example, the timings at which the R light source, the G light source, and the B light source start to turn on may coincide with each other, or the timings at which the R light source, the G light source, and the B light source are turned off may coincide with each other. That is, it is sufficient that the R light source, the G light source, and the B light source are turned on for the time set by the time setting unit 203 in one line period.
[0049] In this embodiment, when the execution of OCR processing is selected, the display shown in Fig. 5 is displayed, but this is not limited to this. For example, when the user selects to perform background processing, the display shown in Fig. 5 may be displayed.
[0050] In this embodiment, the density of the background when the document is read is reduced by increasing the lighting time of the light source of the color corresponding to the background color whose density should be reduced, but this is not limited to this. For example, the density of the background when the document is read may be reduced by increasing the amount of light emitted from the light source of the color corresponding to the background color whose density should be reduced. As a method for increasing the amount of light, for example, a method of increasing the current supplied to the light source is used. In other words, when the density of the background when the document is read is reduced, it is sufficient to increase the amount of light corresponding to the color corresponding to the background color whose density should be reduced that the image sensor 125 receives during one line period.
[0051] The R light source in this embodiment emits light with a peak wavelength of 600 nm and a half width of 100 nm, for example. The G light source in this embodiment emits light with a peak wavelength of 540 nm and a half width of 100 nm, for example. The B light source in this embodiment emits light with a peak wavelength of 450 nm and a half width of 100 nm, for example.
[0052] Although the light source 122 in this embodiment includes an R light source, a G light source, and a B light source, the number of light sources may be four or more. For example, a light source that emits orange light may be provided in addition to RGB.
[0053] In this embodiment, as shown in Fig. 5, sample images of multiple colors are displayed, but this is not limited to this. For example, as shown in Fig. 10, a color bar in which multiple colors change continuously may be displayed. [Explanation of symbols]
[0054] 122 Light source 125 Image Sensor 201 CPU 202 Operation section 203 Time setting section 207 Lighting control unit 208 OCR processing section
Claims
1. a first light source that emits light of a first color; a second light source that emits light of a second color different from the first color; a third light source that emits light of a third color different from the first color and the second color; an image sensor that receives reflected light from the document; a control unit that turns on the first light source, the second light source, and the third light source during a period in which an image of one line of the document along a longitudinal direction of the image sensor is read; a generating means for generating a monochrome image based on a result of light reception by the image sensor during the period; A processing means for performing OCR processing on the monochrome image; A display unit that displays a multi-color image; having The control means controls the lighting of a light source corresponding to an image selected from among the images of the multiple colors so that the amount of light from the light source corresponding to the selected image among the first light source, the second light source, and the third light source that enters the image sensor during the period when the OCR processing is performed is greater than the amount of light from the light source corresponding to the selected image among the first light source, the second light source, and the third light source that enters the image sensor during the period when the OCR processing is not performed.
2. The image reading device according to claim 1, characterized in that the control means controls the lighting time of a light source corresponding to an image selected from among the images of the multiple colors, so that the amount of light from the light source corresponding to the selected image, among the first light source, the second light source, and the third light source, that enters the image sensor during the period when the OCR processing is performed is greater than the amount of light from the light source corresponding to the selected image, among the first light source, the second light source, and the third light source, that enters the image sensor during the period when the OCR processing is not performed.
3. The image reading device according to claim 1, characterized in that the control means controls the amount of light emitted from the light source corresponding to the selected image from among the first light source, the second light source, and the third light source so that the amount of light incident on the image sensor during the period when the OCR processing is performed from the light source corresponding to the selected image from among the first light source, the second light source, and the third light source is greater than the amount of light incident on the image sensor during the period when the OCR processing is not performed from the light source corresponding to the selected image from among the first light source, the second light source, and the third light source.
4. 2. The image reading device according to claim 1, wherein the control means includes a memory in which the images of the plurality of colors are associated with values for controlling the lighting of a light source corresponding to the selected image.
5. 2. The image reading device according to claim 1, wherein the display unit displays the image in a plurality of colors when the OCR process is selected to be executed.
6. The image reading device described in claim 1, characterized in that the generation means generates the first color image data based on the light reception result of the image sensor when the first light source is turned on and the second light source and the third light source are not turned on during the period, generates the second color image data based on the light reception result of the image sensor when the second light source is turned on and the first light source and the third light source are not turned on during the period, and generates the third color image data based on the light reception result of the image sensor when the third light source is turned on and the first light source and the second light source are not turned on during the period.
7. 2. The image reading device according to claim 1, wherein the image sensor is not provided with a color filter.
8. 2. The image reading device according to claim 1, wherein the first color is red, the second color is green, and the third color is blue.
Citation Information
Patent Citations
Image reading device
JP2021190900A