Reading device

The reading device addresses the issue of background color removal by calculating a ground color pixel value from first and second representative values, ensuring accurate background color correction without overexposing light colors.

JP2024153180APending Publication Date: 2024-10-29BROTHER KOGYO KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023066917
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing reading devices struggle to accurately remove background color from documents without overexposing light colors, as the average pixel value method fails to account for variations in background color, leading to blown-out areas and incorrect color corrections.

Method used

A reading device that determines a first and second representative pixel value from a predetermined document range, using these values to calculate a ground color pixel value for precise background color correction, adjusting the correction based on the magnitude of background color variation.

Benefits of technology

The device effectively removes background color while suppressing overexposure of light colors, maintaining clarity of images with varying background colors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024153180000001_ABST
    Figure 2024153180000001_ABST
Patent Text Reader

Abstract

To provide a reading device that can remove background color from an image related to pixel values after background color correction and can suppress blown-out highlights of light colors in an image related to pixel values after background color correction.SOLUTION: A document is read by a reading device, and pixel values of each pixel included in a predetermined range of the document are obtained from a signal output by the reading device (S11). Then, a first representative value and a second representative value smaller than the first representative value are determined from the pixel values of each pixel included in the predetermined range (S11, S12). After that, a background color pixel value, which is a pixel value of the background color of the document, is determined on the basis of the first representative value and the second representative value, and the background color pixel value is used to perform background color correction for removing the background color of the document from each pixel value of the document obtained from the signal output by the reading device.SELECTED DRAWING: Figure 4A
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a reading device. [Background technology]

[0002] In a reading device, for example, an operation of reading one line of an original by a reading device extending in the main scanning direction and an operation of relatively moving the reading device and the original in the sub-scanning direction are repeated to read the original.

[0003] Some reading devices perform background color correction to remove the background color of the document from each image value obtained by reading the document with a reading device. For background color correction, a certain range at the downstream end of the document in the moving direction relative to the reading device is read by the reading device, and, for example, the pixel values ​​of the top 16 pixels with the highest values ​​are extracted from the read pixel values, and the average value of the pixel values ​​of the 16 pixels is determined as the pixel value of the background color. Then, in the background color correction, each pixel value read from the document is multiplied by a background color correction value corresponding to the pixel value of the background color, and the multiplied value of the pixel value and the background color correction value is determined as the pixel value after the background color correction. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2008-148050 A Summary of the Invention [Problem to be solved by the invention]

[0005] The pixel value of the background color is determined to be the average of the pixel values ​​of the top 16 pixels in order to eliminate the possibility that a value that accurately represents the background color of the document may not be obtained due to dirt or foreign matter adhering to a certain area of ​​the document.

[0006] However, because the pixel value of the background color is the average of the pixel values ​​of the top 16 pixels, the variation in pixel value of the background color of the document is not reflected in the background color correction, and the background color cannot be removed unless it is blown out by gamma correction. By increasing the blown out areas by gamma correction, the background color can be completely removed, but there is a tradeoff in that even light colors that are not the background color of the document are blown out.

[0007] An object of the present invention is to provide a reading device that can remove background color from an image related to pixel values ​​after background color correction and can suppress blown-out highlights of light colors in an image related to pixel values ​​after background color correction. [Means for solving the problem]

[0008] In order to achieve the above-mentioned object, a reading device according to one aspect of the present invention includes a reading unit that reads a document and outputs a signal corresponding to the read pixel value, and a control unit, wherein the control unit causes the reading unit to read the document, obtains each pixel value in a predetermined range of the document from the signal output by the reading unit, determines a first representative value and a second representative value smaller than the first representative value from each pixel value in the predetermined range, determines a pixel value of the document's background color based on the first representative value and the second representative value, and performs background color correction using the pixel value of the background color to remove the background color of the document from each pixel value of the document obtained from the signal output by the reading unit.

[0009] According to this configuration, the document is read by the reading unit, and each pixel value of the document in a predetermined range (the pixel value of each pixel included in the predetermined range) is obtained from the signal output by the reading unit. From each pixel value in the predetermined range, a first representative value and a second representative value smaller than the first representative value are determined. Then, a pixel value of the background color of the document is determined based on the first representative value and the second representative value, and a background color correction is performed using the pixel value of the background color to remove the background color of the document from each pixel value of the document obtained from the signal output by the reading unit.

[0010] Based on the first representative value and the second representative value smaller than the first representative value, the pixel value of the background color of the document can be determined to a value according to the magnitude of variation in the background color. For example, for a document with a large variation in background color, the pixel value of the background color can be determined to a relatively small value, and background color correction can be performed on each pixel value of the document acquired from the signal output by the reading unit, thereby removing the background color from the image related to each pixel value. On the other hand, for a document with a small variation in background color, the pixel value of the background color can be determined to a relatively large value, and background color correction can be performed on each pixel value of the document acquired from the signal output by the reading unit, thereby suppressing blown-out highlights of light colors in the image related to each pixel value. Effect of the Invention

[0011] According to the present invention, it is possible to remove the background color from an image related to pixel values ​​after background color correction, and to suppress blown-out highlights of light colors in an image related to pixel values ​​after background color correction. [Brief description of the drawings]

[0012] [Figure 1] 1 is a perspective view of a multifunction peripheral including a reading device according to an embodiment of the present invention; [Diagram 2] FIG. 2 is a cross-sectional view diagrammatically showing the configuration of a reading device. [Diagram 3] FIG. 2 is a block diagram showing an electrical configuration of the multifunction peripheral; [Figure 4A] 13 is a flowchart (part 1) showing the flow of a background color correction process. [Figure 4B] 13 is a second flowchart showing the flow of the background color correction process. [Diagram 5] FIG. 2 is a diagram showing an example of a histogram (horizontal axis: pixel value, vertical axis: number of pixels) of an image in a predetermined range of a document. [Figure 6] 13 is a flowchart showing the flow of background color correction processing according to a modified example. [Figure 7] 13 is a flowchart showing the flow of background color correction processing according to another modified example. [Figure 8] 13 is a flowchart showing the flow of a background color correction process according to another example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

[0014] <Multifunction device> A multi-function peripheral (MFP) 1 shown in FIG. 1 includes a reading device 2 that reads an original, and a printing device 3 that prints an image according to image data on a sheet-like medium such as printing paper.

[0015] An operation panel 4 is provided on the front of the multifunction device 1. The operation panel 4 includes a touch panel 5. The touch panel 5 is a rectangle that is long in the left-right direction, and is configured, for example, by overlapping a pressure-sensitive or capacitance-type transparent film switch on a liquid crystal display. The touch panel 5 displays various information such as buttons operated for various settings and the contents set by operating the buttons. In addition to the touch panel 5, the operation panel 4 may also include physical keys such as a numeric keypad operated for various settings.

[0016] Various settings related to reading of the original can be made by operating the touch panel 5. The various settings include, for example, setting of the reading mode. After the various settings are made, the start of reading of the original can be instructed by operating a start button displayed on the touch panel 5. The reading modes available are a color reading mode in which the original is read and color image data is generated, and a monochrome reading mode in which the original is read and monochrome image data is generated.

[0017] For ease of explanation, the direction toward you when facing the front of the multifunction device 1 is the front of the multifunction device 1, and the direction away from you is the rear of the multifunction device 1. In addition, when the multifunction device 1 is placed on a horizontal surface, the up-down and left-right directions of the multifunction device 1 are defined as facing the front of the multifunction device 1. In Figures 1 and 2, the front, back, top, bottom, left and right directions of the multifunction device 1 are indicated by arrows.

[0018] <Reading device> The reading device 2 includes a housing 11 and a document cover 12 that opens and closes the top surface of the housing 11. The reading device 2 is configured to be capable of reading documents by both the FB (Flat Bed) method and the ADF (Auto Document Feeder) method. The reading device 2 includes a document cover 12 integrally provided with an ADF 13.

[0019] A rectangular first opening 14 that is longer in the left-right direction than in the front-rear direction is formed on the top surface of the housing 11. The first opening 14 is closed from below by a document table 16 made of a transparent plate such as a transparent glass plate or a resin plate. In addition, a rectangular second opening 15 that is longer in the front-rear direction than in the left-right direction is formed on the top surface of the housing 11 to the left of the first opening 14. The second opening 15 is closed from below by a document passing plate 17 made of a transparent plate such as a transparent glass plate or a resin plate.

[0020] As shown in FIG. 2, a reading device 21 (an example of a reading unit) and a moving mechanism 22 are provided within the housing 11.

[0021] The reading device 21 is in the form of a CIS (Contact Image Sensor) unit, and includes a light source 23, a rod lens array 24, and an image sensor 25.

[0022] The light source 23 includes LEDs (Light Emitting Diodes) of three colors, R (red), G (green), and B (blue). The lighting of the light source 23 is controlled by pulse width modulation. The rod lens array 24 includes a large number of rod lenses aligned in the main scanning direction. The main scanning direction coincides with the front-rear direction of the multifunction device 1. The rod lenses are refractive index distribution type lenses with a unit magnification. The image sensor 25 is, for example, a linear image sensor configured with a plurality of light receiving elements arranged at equal pitches in the main scanning direction. Each light receiving element includes, for example, a color filter and a photodiode of R (red), G (green), and B (blue), and outputs an electrical signal (voltage) according to the intensity of each RGB color component contained in the received light.

[0023] Light from light source 23 is reflected by the document placed on document table 16 or document passing plate 17, and the reflected light passes through rod lens array 24 and enters image sensor 25. One rod lens, for example, forms a magnified image on the light receiving surfaces of a plurality of light receiving elements. Photoelectric conversion is performed in each light receiving element, and an electrical signal is output from each light receiving element, thereby achieving reading of one line in the main scanning direction by reading device 21.

[0024] The moving mechanism 22 is a mechanism for moving the reading device 21 in a sub-scanning direction perpendicular to the main scanning direction. The sub-scanning direction coincides with the left-right direction of the multifunction device 1. The moving mechanism 22 includes a CIS carriage 26 that carries the reading device 21, and a scanner motor 27 that generates a driving force for moving the CIS carriage 26 back and forth in the left-right direction.

[0025] The ADF 13 transports the document placed on the document feed tray to the document discharge tray. The document passes over a document passing plate 17 during transport.

[0026] When reading an original by the FB method, the original cover 12 is opened to the open position, and the original is placed on the upper surface of the original table 16. At this time, the original is placed in a specified position. That is, the original is placed with one corner aligned with the left rear corner where the rear edge 28 of the first opening 14 intersects with the left edge 29 (see FIG. 1), and with two edges aligned with the rear edge 28 and the left edge 29 of the first opening 14. After that, the original cover 12 is closed, and the original is covered from above by the original cover 12. Then, when the start of reading the original is instructed by operating the touch panel 5, the reading device 21 is moved by the moving mechanism 22 to a reading start position, and is moved from that position in the sub-scanning direction. The reading device 21 reads the original on the original table 16 line by line in the sub-scanning direction while moving, thereby achieving reading of the original.

[0027] On the other hand, when reading an original using the ADF method, the original is placed on the original supply tray of the ADF 13. The reading device 21 is stopped at a position facing the second opening 15 from below. After that, when an instruction to start reading the original is given by operating the touch panel 5, the ADF 13 starts transporting the original. During the transport, the original passes over the original passing plate 17, and the reading device 21 reads the original line by line in order, thereby achieving reading of the original.

[0028] <Electrical configuration> 3, the multifunction device 1 includes an ASIC (Application Specific Integrated Circuit) 31. The ASIC 31 includes a CPU (Central Processing Unit) 32 and a memory 33. The memory 33 includes a non-volatile memory such as a flash memory or an E2PROM, in which data can be rewritten, and a volatile memory such as a DRAM (Dynamic Random Access Memory).

[0029] The ASIC 31 (an example of a control unit) is connected to a bus 34 for data communication. The reading device 2 and the printing device 3 are also connected to the bus 34.

[0030] The CPU 32 of the ASIC 31 executes a program stored in the nonvolatile memory of the memory 33, and controls the operation of each part of the reading device 2. The CPU 32 also executes a program stored in the nonvolatile memory of the memory 33, and controls the operation of each part of the printing device 3. The volatile memory of the memory 33 is used as a work area when the CPU 32 executes the program.

[0031] The ASIC 31 also includes an A / D conversion circuit. The A / D conversion circuit has, for example, a resolution of 8 bits (0 to 255), and performs A / D conversion on the electrical signal (voltage) output from the image sensor 25 of the reading device 21 for each RGB color into a pixel value (image data) that is a digital value. For example, voltages below a lower limit reference voltage (lower limit value) are uniformly converted to "0", voltages above an upper limit reference voltage (upper limit value) are uniformly converted to "255", and voltages in the range from the lower limit value to the upper limit value are converted to a pixel value according to the magnitude of the voltage.

[0032] <Background color correction processing> Taking the reading of an original by the FB method as an example, as described above, after the original is placed at a specified position on the platen 16, an instruction to start reading the original is given by operating the touch panel 5. In response to this instruction, the reading of the original by the reading device 21 is started, and while the reading device 21 is moved in the sub-scanning direction from the reading start position, the reading device 21 reads the original line by line in the sub-scanning direction. The electric signals of each of the RGB colors output from the reading device 21 are input to the ASIC 31. In the ASIC 31, the electric signals of each of the RGB colors input from the reading device 21 are converted into pixel values ​​by an A / D conversion circuit. Then, when reading an original in the monochrome reading mode, the CPU 32 of the ASIC 31 converts the pixel values ​​of each of the RGB colors input from the reading device 21 into grayscale pixel values ​​(for example, 8 bits) for each pixel. A known conversion method is used for this conversion.

[0033] When reading an original in the monochrome reading mode, the CPU 32 of the ASIC 31 executes the background color correction process shown in FIG. 4A and FIG. 4B.

[0034] In the background color correction process, the CPU 32 obtains grayscale pixel values ​​(hereinafter simply referred to as "pixel values") for each pixel included in a predetermined range of the document (S11 in FIG. 4A). The predetermined range of the document is set to a range of a certain distance in the sub-scanning direction from the leading edge of the document (the edge that is arranged along the left edge 29 of the first opening 14), and is set to, for example, one line at the beginning of the document (one line along the leading edge).

[0035] As shown in Fig. 5, the CPU 32 extracts pixel values ​​of a first pixel portion (for example, 16 pixels) having the highest values ​​from the pixel values ​​of each pixel included in a predetermined range of the document. Then, the CPU 32 calculates the average value of the extracted pixel values ​​of the first pixel portion. The CPU 32 determines the average value of the pixel values ​​of the first pixel portion as the first representative value (S12). For example, if the pixel values ​​of the top 16 pixels are "200", "200", "200", "199", "199", "199", "198", "198", "198", "197", "196", "196", "195", "194", "192" and "191", their average value is "197", so the average value "197" is determined as the first representative value.

[0036] Furthermore, CPU 32 extracts pixel values ​​of a second pixel portion (for example, 16 pixels) that are the top pixels having the smallest values ​​from the pixel values ​​of each pixel included in a predetermined range of the document. CPU 32 then calculates the average value of the pixel values ​​of the extracted second pixel portion. CPU 32 then determines the average value of the pixel values ​​of the second pixel portion as the second representative value (S13). For example, if the pixel values ​​of the bottom 16 pixels are "168", "169", "170", "171", "173", "174", "175", "176", "177", "179", "180", "180", "181", "181", "181" and "181", their average value is "176", so the average value "176" is determined as the second representative value.

[0037] Then, the CPU 32 calculates an absolute difference between the first representative value and the second representative value, that is, a value obtained by subtracting the second representative value from the first representative value (S14). Since images such as characters or lines (images that are not the background color) are often not present within a certain distance from the leading edge of the document in the sub-scanning direction, the pixel values ​​of each pixel included in a predetermined range of the document are often pixel values ​​of the background color of the document, and the magnitude of the absolute difference between the first representative value and the second representative value corresponds to the magnitude of variation in the pixel values ​​of the background color of the document (ground color pixel values).

[0038] After that, the CPU 32 sets a first threshold value and determines whether or not the absolute difference between the first representative value and the second representative value is smaller than the first threshold value (S15 in FIG. 4B). The first threshold value is stored in the memory 33, for example.

[0039] If the absolute difference between the first representative value and the second representative value is smaller than the first threshold value (S15: YES), the CPU 32 determines the first representative value as the background color pixel value (S16).

[0040] If the absolute difference between the first representative value and the second representative value is equal to or greater than the first threshold (S15: NO), the CPU 32 sets a second threshold greater than the first threshold and determines whether the absolute difference between the first representative value and the second representative value is greater than the second threshold (S17). The second threshold is stored in the memory 33, for example.

[0041] If the absolute difference between the first representative value and the second representative value is greater than the second threshold value (S17: YES), the CPU 32 determines a value between the first representative value and the second representative value, for example, a value obtained by subtracting the second threshold value from the first representative value, as the background color pixel value (S18).

[0042] If the absolute difference between the first representative value and the second representative value is less than or equal to the second threshold value (S17: NO), that is, if the absolute difference between the first representative value and the second representative value is a value within the range of greater than or equal to the first threshold value and less than or equal to the second threshold value, CPU 32 determines the second representative value as the background color pixel value (S19).

[0043] After determining the background color pixel value in this manner, the CPU 32 judges whether the background color pixel value is within a range of a lower limit threshold value or more and an upper limit threshold value or less (S20). The upper limit threshold value and the lower limit threshold value are stored in the memory 33, for example.

[0044] If the background color pixel value is a value within the range of not less than the lower threshold value and not more than the upper threshold value (S20: YES), the CPU 32 uses the background color pixel value to perform background color correction for each pixel value (grayscale pixel value) read from the document to remove the background color of the document (S21). In the background color correction, for example, a value obtained by dividing the maximum pixel value "255" by the background color pixel value is set as a background color correction value, each pixel value read from the document is multiplied by the background color correction value, and the product of the pixel value and the background color correction value is set as the pixel value after background color correction. After the background color correction is completed, the CPU 32 ends the background color correction process.

[0045] On the other hand, if the background color pixel value is not within the range of the lower threshold value or more and the upper threshold value or less (S21: NO), the CPU 32 does not perform background color correction (S22) and ends the background color correction process.

[0046] <Action and effect> As described above, the document is read by the reading device 21, and the pixel values ​​of each pixel included in a predetermined range of the document (each pixel value in the predetermined range) are obtained from the signal output by the reading device 21. Then, a first representative value and a second representative value smaller than the first representative value are determined from the pixel values ​​of each pixel included in the predetermined range. Specifically, the first representative value is determined as an average value of pixel values ​​of the first pixels in the upper part having a larger value from each pixel value in the predetermined range. The second representative value is determined as an average value of pixel values ​​of the second pixels in the lower part having a smaller value from each pixel value in the predetermined range. After that, a background color pixel value, which is a pixel value of the background color of the document, is determined based on the first representative value and the second representative value, and the background color pixel value is used to perform background color correction for removing the background color of the document from each pixel value of the document obtained from the signal output by the reading device 21.

[0047] Based on the first representative value and the second representative value smaller than the first representative value, the background color pixel value is determined to be a value according to the magnitude of the variation in the background color. Specifically, a first threshold value is set, and when the absolute difference between the first representative value and the second representative value is smaller than the first threshold value, that is, when the variation in the background color is small, the first representative value is determined to be the background color pixel value. Also, when a second threshold value larger than the first threshold value is set, and the absolute difference between the first representative value and the second representative value is larger than the second threshold value, the value between the first representative value and the second representative value is determined to be the background color pixel value. When the absolute difference between the first representative value and the second representative value is a value within a range of not less than the first threshold value and not more than the second threshold value, the second representative value is determined to be the background color pixel value.

[0048] For documents with background color variation smaller than a certain level, the background color pixel value is determined to be a relatively large first representative value, and background color correction is performed on each pixel value of the document, thereby suppressing blown-out highlights of light colors in the image related to each pixel value. On the other hand, for documents with background color variation equal to or larger than a certain level, the background color pixel value is determined to be a relatively small second representative value, and background color correction is performed on each pixel value read from the document, thereby removing the background color from the image related to each pixel value.

[0049] Furthermore, if the specified range of the document contains images such as characters or lines that are not the background color, the absolute difference between the first representative value and the second representative value will be excessive (a large value exceeding the second threshold value). In this case, the background color pixel value is determined to be a value between the first representative value and the second representative value, and background color correction is performed on each pixel value read from the document, thereby removing the background color from the image related to each pixel value while suppressing the images related to each pixel value read from the document from becoming faint, such as characters or lines.

[0050] For example, when the first representative value is determined as the background color pixel value and the background color pixel value exceeds the upper threshold value, that is, when the first representative value exceeds the upper threshold value, the background color of the document is so light that it is almost white, and there is no need to perform background color correction, so background color correction is not performed. This makes it possible to prevent unnecessary background color correction.

[0051] Furthermore, when the second representative value is determined as the background color pixel value and the background color pixel value exceeds the lower limit threshold, that is, when the second representative value exceeds the lower limit threshold, background color correction is not performed. In this case, it is assumed that many images such as characters and lines are included in the predetermined range of the document, so by not performing background color correction, images such as characters and lines can be clearly retained in the predetermined range in the image related to each pixel value obtained by reading the document.

[0052] <Modification of background color correction process> Instead of the background color correction processing shown in Figures 4A and 4B, the background color correction processing shown in Figures 4A and 6 may be performed. That is, instead of the background color correction processing shown in Figure 4B, the background color correction processing shown in Figure 6 may be performed. The background color correction processing shown in Figure 6 will be described by focusing on the differences from the background color correction processing shown in Figure 4B.

[0053] In the background color correction process shown in FIG. 4B, if the absolute difference between the first representative value and the second representative value is greater than the second threshold value (S17: YES), a value between the first representative value and the second representative value is determined as the background color pixel value (S18).

[0054] 6, when the absolute difference between the first representative value and the second representative value is greater than the second threshold value (S17: YES), the CPU 32 determines the first representative value as the background color pixel value (S618). By determining the first representative value as the background color pixel value and performing background color correction on each pixel value obtained by reading the document, when an image such as a character or a line that is not the background color is included in a predetermined range of the document, the effect of removing the background color from the image related to each pixel value is reduced compared to the background color correction process shown in FIG. 4B, but it is possible to effectively prevent the image related to each pixel value obtained by reading the document from becoming faint.

[0055] <Other Modifications of Background Color Correction Processing> Instead of the background color correction process shown in Figure 4A and Figure 4B, the background color correction process shown in Figure 7 may be performed. The background color correction process shown in Figure 7 will be described by focusing on the differences from the background color correction process shown in Figure 4A and Figure 4B.

[0056] In the background color correction process shown in Figures 4A and 4B, if the absolute difference between the first representative value and the second representative value is greater than the second threshold value (S17: YES), a value between the first representative value and the second representative value is determined as the background color pixel value (S18).

[0057] 7, when the absolute difference between the first representative value and the second representative value is greater than the second threshold value (S17: YES), the CPU 32 does not perform background correction (S22) and ends the background correction process. As a result, when an image such as a character or a line that is not the background color is included in a predetermined range of the document, the background color is not removed from the image related to each pixel value, but the image related to each pixel value obtained by reading the document does not become faint.

[0058] <Another example of background color correction processing> In the background color correction process shown in FIG. 8, the CPU 32 acquires the pixel values ​​of each pixel included in a predetermined range of the document, similarly to step S11 shown in FIG. 4A (S31).

[0059] 4A, CPU 32 extracts the pixel values ​​of the first pixels having the highest values ​​from the pixel values ​​of each pixel included in a predetermined range of the document, calculates the average value of the extracted pixel values ​​of the first pixels, and determines the average value of the pixel values ​​of the first pixels as the first representative value (S32).

[0060] 4A, CPU 32 extracts the pixel values ​​of the second pixel portion having the smallest pixel values ​​from the pixel values ​​of each pixel included in a predetermined range of the document, calculates the average value of the extracted pixel values ​​of the second pixel portion, and determines the average value of the pixel values ​​of the second pixel portion as the second representative value (S33).

[0061] Thereafter, the CPU 32 sets a threshold value and determines whether the first representative value is equal to or greater than the threshold value (S34). The threshold value is stored in the memory 33, for example.

[0062] If the first representative value is equal to or greater than the threshold value (S34: YES), the CPU 32 determines the first representative value as the background color pixel value (S35). Then, the CPU 32 uses the background color pixel value (first representative value) to perform background color correction for each pixel value (grayscale pixel value) read from the document to remove the background color of the document (S37). After completing the background color correction, the CPU 32 ends the background color correction process.

[0063] If the first representative value is smaller than the threshold value (S34: NO), the CPU 32 determines the second representative value as the background color pixel value (S36).Then, the CPU 32 performs background color correction for removing the background color of the document from each pixel value read from the document using the background color pixel value (second representative value) (S37).After completing the background color correction, the CPU 32 ends the background color correction process.

[0064] 8, for an original with a light background color, the background color pixel value is determined to be a relatively large first representative value, and background color correction is performed on each pixel value of the original, thereby suppressing blown-out highlights of light colors in an image related to each pixel value. On the other hand, for an original with a dark background color, the background color pixel value is determined to be a relatively small second representative value, and background color correction is performed on each pixel value read from the original, thereby removing the background color from an image related to each pixel value.

[0065] <Other Modifications> Although the embodiment of the present invention has been described above, various design modifications can be made to the above-mentioned configuration within the scope of the matters described in the claims. [Explanation of symbols]

[0066] 2: Reading device 21: Reading device 31: ASIC 32:CPU

Claims

1. a reading unit that reads an original and outputs a signal corresponding to the pixel value read; A control unit, The control unit is causing the reading unit to read the document, and acquiring pixel values ​​of each pixel within a predetermined range of the document from a signal output by the reading unit; determining a first representative value and a second representative value smaller than the first representative value from each pixel value in the predetermined range; determining a pixel value of a background color of the document based on the first representative value and the second representative value; The reading device performs background color correction for removing the background color of the document from each pixel value of the document acquired from the signal output by the reading unit, using the pixel value of the background color.

2. 2. The reading device according to claim 1, The control unit extracts pixel values ​​of a first pixel portion having the highest values ​​from each pixel value in the specified range, and determines an average value of the pixel values ​​of the first pixel portion as the first representative value.

3. 3. The reading device according to claim 1, The control unit extracts pixel values ​​of a second pixel portion having a smaller value from each pixel value in the specified range, and determines an average value of the pixel values ​​of the second pixel portion as the second representative value.

4. 2. The reading device according to claim 1, The control unit sets a first threshold value, and when a difference between the first representative value and the second representative value is smaller than the first threshold value, determines the first representative value to be the pixel value of the background color.

5. 5. The reading device according to claim 4, The control unit sets a second threshold value greater than the first threshold value, and when a difference between the first representative value and the second representative value is greater than the second threshold value, determines a value between the first representative value and the second representative value as the pixel value of the background color.

6. 6. The reading device according to claim 5, When a difference between the first representative value and the second representative value is greater than the second threshold value, the control unit determines a value obtained by subtracting the second threshold value from the first representative value as the pixel value of the background color.

7. 5. The reading device according to claim 4, The control unit sets a second threshold value that is greater than the first threshold value, and does not perform the background color correction when a difference between the first representative value and the second representative value is greater than the second threshold value.

8. 5. The reading device according to claim 4, The control unit sets a second threshold value greater than the first threshold value, and when a difference between the first representative value and the second representative value is greater than the second threshold value, determines the first representative value to be the pixel value of the background color.

9. The reading device according to any one of claims 5 to 8, The control unit determines the second representative value as the pixel value of the background color when a difference between the first representative value and the second representative value is equal to or greater than the first threshold value and equal to or less than the second threshold value.

10. 2. The reading device according to claim 1, The control unit does not perform the background color correction when the pixel value of the background color is greater than an upper limit threshold.

11. 2. The reading device according to claim 1, The control unit does not perform the background color correction when the pixel value of the background color is smaller than a lower limit threshold.

Citation Information

Patent Citations

  • Image reader

    JP2008148050A