Image Reading System

JP7637512B2Active Publication Date: 2025-02-28CANON DENSHI KK
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2021001388
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-01-07
Publication Date
2025-02-28
Estimated Expiration
2041-01-07

AI Technical Summary

Benefits of technology

【0025】 本発明によれば、原稿の影があっても適切に褪色を補正することができる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007637512000001
    Figure 0007637512000001
  • Figure 0007637512000002
    Figure 0007637512000002
  • Figure 0007637512000003
    Figure 0007637512000003
Patent Text Reader

Abstract

To appropriately execute color fading correction processing even with presence of a shadow.SOLUTION: An image reading system comprises: conveying means 21 that conveys a document S; reading means 70 that optically reads the document S conveyed by the conveying means 21; and image processing means 88 that executes color fading correction processing on the image read by the reading means 70, and the image processing means 88 executes, on the image, periphery removal processing of removing a peripheral part of the image before executing the color fading correction processing. It is preferable for the image processing means to execute shadow removal processing as the periphery removal processing. The image processing means 88 executes area cut-out processing of cutting out a document area from the image read by the reading means 70 before executing the shadow removal processing.SELECTED DRAWING: Figure 10
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image reading system including an image reading device that conveys a document and reads an image thereon. [Background technology]

[0002] In recent years, photo cloud storage services that allow users to easily store digitalized photos on the cloud and access them at any time and place have become popular. The main use of these services is to upload photos and videos taken with cameras on mobile devices such as smartphones, digital cameras, and video cameras, and to view these photos and videos on any device or location.

[0003] In line with this trend, there is a need to digitize previously printed photos and store them in a photo cloud. Because digitizing a large number of printed photos one by one takes time and effort for operators, it is desirable to efficiently digitize them by scanning them with a scanner that can read both sides at the same time and has an ADF (Auto Document Feeder).

[0004] However, printed photographs may have faded colors. Fading is a phenomenon in which photographs fade due to exposure to light such as fluorescent lamps or sunlight, or to air for a long period of time. A technique called fading correction has been proposed to make faded photographs look closer to the original photograph.

[0005] For example, the technology described in Patent Document 1 corrects discoloration by calculating a histogram for each RGB color of an image and then converting the value of each pixel so that the maximum and minimum values ​​in the histogram for each color become the maximum pixel value (255) and the minimum pixel value (0), respectively.

[0006] On the other hand, in photos digitized using an ADF, shadows that appear around the edges of the document may appear in the image. Figure 1 shows the shadows that appear around the document and the mechanism by which they are created, using as an example a configuration in which light emitted from a light source located upstream in the transport direction is incident on a reading sensor located downstream.

[0007] As shown in Figure 1(a), in the state before the document being transported has not yet reached the reading sensor and the document is to be read, the reading sensor will read the background board. At this time, the background board reflects the light irradiated from the light source, and so in the image data it appears as a bright area with a large pixel value.

[0008] When the document is transported by the ADF to the state shown in Figure 1(b), the light emitted from the light source is blocked by the document, and the shadow of the document is projected onto the background plate. In this state, the reading sensor reads the shadow of the document, which results in a dark area with a small pixel value in the image data.

[0009] When the document is further transported by the ADF and reaches the state shown in Figure 1(c), the light emitted from the light source is reflected by the document. The reading sensor reads this reflected light, and the image data represents the document.

[0010] Although the shadow of the document occurs outside the document area, it generally cannot be removed by the process of extracting the document area from the image. For example, if the document has distorted edges, bent corners, or cutouts, as shown in Figure 2, part of the shadow will remain in the image even after the process of extracting the document area.

[0011] In order to solve the problem of shadows remaining in images, a shadow removal process has been performed to detect and remove shadows from images. There are various methods for the shadow removal process, for example, a method that determines whether the shading of pixels in an image matches the characteristics of a shadow, and if they match, regards the pixel as a shadow and converts the pixel value to remove the shadow.

[0012] Here, if a shadow occurs around the document, a problem may occur in the fading correction process. Here, a problem in the fading correction process caused by a shadow will be described with reference to FIG.

[0013] Figure 3(a) shows the original image before fading and its histogram. The left end of the histogram corresponds to pixel value 0, and the right end corresponds to pixel value 255. In the original, unfaded image, the image contains colors from white to black, and the histogram spans the entire range of pixel values.

[0014] Figure 3(b) shows the image and its histogram after bleaching, where the color spread is lost and the histogram becomes narrower due to bleaching.

[0015] Figure 3(c) shows the image and its histogram after the fading correction process. The fading correction process widens the histogram width, resulting in an image and histogram that are close to the state before fading.

[0016] In contrast to the above flow, Fig. 3(d) shows the image and its histogram when the shadow of the document is added to Fig. 3(b). Compared to Fig. 3(b), the histogram in Fig. 3(d) has an additional peak near the left edge caused by the shadow.

[0017] Figure 3(e) shows the image and its histogram after the fading correction process has been applied to the image in Figure 3(d). Because the histogram contains a peak caused by the shadow, it is not possible to widen the histogram width sufficiently, resulting in an image and histogram with more fading remaining than in Figure 3(c).

[0018] To solve the problem of discoloration correction caused by the shadow of the document, in Patent Document 1, when calculating the maximum and minimum values ​​of the histogram, a process is performed to ignore the parts lower than a predetermined threshold (Fig. 4). With this method, if the threshold is set to a value higher than the peak caused by the shadow of the document, the maximum and minimum values ​​of the histogram can be calculated without being affected by the shadow, and discoloration can be corrected with high accuracy even if there is a shadow of the document. With this process, all parts with small pixel values, including the shadow parts, are converted to a pixel value of 0.

[0019] In addition, in Patent Document 2, when calculating the maximum and minimum values ​​of the histogram, a certain area is excluded from the upper and lower ends of the histogram. Even with this method, if a certain area is set so that peaks caused by the shadow of the document can be excluded, the maximum and minimum values ​​of the histogram can be calculated without being affected by the shadow, and fading can be corrected accurately even if there is a shadow of the document. Even with this process, all parts with small pixel values, including the shadowed parts, are converted to a pixel value of 0. [Prior art documents] [Patent documents]

[0020] [Patent Document 1] Patent No. 4556813 [Patent Document 2] Patent No. 3693086 Summary of the Invention [Problem to be solved by the invention]

[0021] Conventional techniques can correct discoloration even when there is a shadow on the document, but the correction emphasizes the shadow on the document, so there is a problem that it cannot be said that appropriate discoloration correction is being performed.

[0022] In color fading correction, all pixels that are relatively dark are converted to black in order to widen the histogram. At this time, the pixels that make up the shadow are also converted to black, so the shadow, which was originally gray, is converted to black. As a result, the shadow is emphasized to be black, which reduces visibility.

[0023] In addition, when the shadow of the document is emphasized by the correction, the shading information of the shadow is lost, as shown in Fig. 5, which has an adverse effect on the process of detecting the shadow. In other words, when all the pixels that compose the shadow are converted to black by the fading correction process, the shading information is lost, so the shadow cannot be detected and cannot be removed. [Means for solving the problem]

[0024] In view of the above, an image reading system according to the present invention comprises: A conveying means for conveying the document; a reading means for optically reading the document conveyed by the conveying means; an image processing unit that performs a fading correction process on the image read by the reading unit; The image processing means performs a peripheral removal process to remove a peripheral portion of the image before performing the fading correction process. Then, the shadow removal process is performed on the image. Effect of the Invention

[0025] According to the present invention, discoloration can be appropriately corrected even if there is a shadow of the original. [Brief description of the drawings]

[0026] [Figure 1] An explanatory diagram of how shadows form around the edges of a document. [Diagram 2] FIG. 11 is an explanatory diagram of a shadow remaining after region extraction. [Diagram 3] 11A and 11B are diagrams illustrating the effect of a shadow on a fading correction process. [Figure 4] 11A and 11B are explanatory diagrams of a fading correction process when shadows are ignored. [Diagram 5]11A and 11B are explanatory diagrams illustrating shadow emphasis by fading correction processing. [Figure 6] 1 is a partial cross-sectional view illustrating a schematic configuration of a document transport device (image reading device) according to an embodiment of the present invention. [Figure 7] FIG. 2 is a block diagram of a control unit of the image reading apparatus according to the embodiment of the present invention. [Figure 8] 1 is a front view of an image reading apparatus A according to an embodiment of the present invention, showing a discharge tray 2 in an unfolded state. [Figure 9] 2 is a cross-sectional view of an image reading unit 70 of the image reading apparatus A according to one embodiment of the present invention. [Figure 10] 5 is a flowchart of a reading process according to the first embodiment of the present invention. [Figure 11] 4 is a flowchart of a shadow erasing process according to the first embodiment of the present invention. [Figure 12] 5 is a flowchart of a shadow edge determination process according to the first embodiment of the present invention. [Figure 13] 5 is a flowchart of an area extraction process according to the first embodiment of the present invention. [Figure 14] 5 is a flowchart of an upper end detection process according to the first embodiment of the present invention. [Figure 15] FIG. 4 is an explanatory diagram of a difference in cut-out rectangles according to the first embodiment of the present invention. [Figure 16] 4 is a flowchart of a fading correction process according to the first embodiment of the present invention. [Figure 17] 4 is a flowchart of a histogram creation process according to the first embodiment of the present invention. [Figure 18] 5 is a flowchart of a histogram maximum value calculation process according to the first embodiment of the present invention. [Figure 19] 10 is a flowchart of a reading process according to a second embodiment of the present invention. [Figure 20] 11 is a read setting dialog according to a second embodiment of the present invention. [Figure 21] 11 shows an attention dialog according to a second embodiment of the present invention. [Figure 22] FIG. 2 is an explanatory diagram of a trimming process according to the first embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0027] Hereinafter, the embodiments for carrying out the present invention will be described in detail with reference to the drawings. The following embodiments are examples for carrying out the present invention, and the present invention is not limited to the following embodiments. The present invention should be appropriately modified or changed depending on the configuration of the device in which the present invention is used and various conditions, without departing from the spirit of the present invention.

[0028] First Embodiment First, a document transport device according to a first embodiment of the present invention will be described.

[0029] FIG. 6 is a partial cross-sectional view that illustrates the configuration of the document transport device (image reading device) according to the first embodiment of the present invention.

[0030] <Device configuration> The image reading device A is a device that conveys one or more conveying media S loaded on a loading platform 1 one by one through a route RT into the device, reads the images, and discharges the media to a discharge tray 2 as a loading member. The conveying media S to be read are, for example, photographs, OA paper, checks, business cards, cards, and other sheets, and may be thick or thin sheets. Examples of cards include insurance cards, driver's licenses, and credit cards. The conveying media S also include booklets such as passports. When a booklet is the target, a holder can be used. By placing a booklet in an open state in a transparent holder and placing it on the loading platform 1, the booklet is conveyed together with the holder, and the image can be read.

[0031] <Paper Feed> A first transport unit 10 is provided as a feeding mechanism that feeds the transport medium S along the path RT. In this embodiment, the first transport unit 10 includes a feed roller 11 and a separation roller 12 arranged opposite the feed roller 11, and transports the transport medium S on the mounting table 1 one by one in the transport direction D1. A driving force is transmitted to the feed roller 11 from a drive unit 3 such as a motor via a transmission unit 5, and the feed roller 11 is driven to rotate in the direction of the arrow in the figure (the positive direction for transporting the transport medium S along the path RT). The transmission unit 5 is, for example, an electromagnetic clutch, and connects and disconnects the driving force from the drive unit 3 to the feed roller 11.

[0032] <Drive unit> In this embodiment, for example, the transmission unit 5 that connects the drive unit 3 and the feed roller 11 is in a state in which the driving force is normally transmitted, and the driving force is interrupted when the transport medium S is reversed or stopped. When the transmission of the driving force is interrupted by the transmission unit 5, the feed roller 11 is in a state in which it can rotate freely. Note that such a transmission unit 5 does not need to be provided when the feed roller 11 is driven in only one direction.

[0033] <Separated structure> The separation roller 12, which is disposed opposite the feed roller 11, is a roller for separating the transport media S one by one, and is in contact with the feed roller 11 with a constant pressure. To ensure this state of contact, the separation roller 12 is provided so as to be able to swing and is configured so as to be biased toward the feed roller 11. A driving force is transmitted to the separation roller 12 from the drive unit 3 via a torque limiter 12a, and the separation roller 12 is driven to rotate in the direction of the solid arrow (the opposite direction to the forward direction of the feed roller 11).

[0034] Since the transmission of driving force is restricted by the torque limiter 12a, the separation roller 12 rotates in a direction (indicated by a dashed arrow) that rotates together with the feed roller 11 when in contact with the feed roller 11. As a result, when multiple conveying media S are conveyed to the pressure contact portion between the feed roller 11 and the separation roller 12, two or more conveying media S except for one are blocked so as not to be conveyed downstream.

[0035] In this embodiment, the separation mechanism is composed of the separation roller 12 and the feed roller 11, but such a separation mechanism is not necessarily required, and any feed mechanism that sequentially feeds the transport medium S one by one to the path RT will suffice. In addition, when a separation mechanism is provided, instead of a configuration such as the separation roller 12, a separation pad that applies friction to the transport medium S may be pressed against the feed roller 11 to provide a similar separation function.

[0036] <Conveyor structure> The second transport section 20, which serves as a transport mechanism located downstream of the first transport section 10 in the transport direction, includes a drive roller 21 and a driven roller 22 driven by the drive roller 21, and transports the transport medium S transported from the first transport section 10 downstream. A driving force is transmitted to the drive roller 21 from a drive section 4 such as a motor, and the drive roller 21 is driven to rotate in the direction of the arrow in the figure. The driven roller 22 is pressed against the drive roller 21 with a constant pressure, and rotates together with the drive roller 21. The driven roller 22 may be configured to be biased against the drive roller 21 by a biasing unit (not shown) such as a spring.

[0037] The third transport section 30, which is located downstream of the second transport section 20 in the transport direction, includes a drive roller 31 and a driven roller 32 driven by the drive roller 31, and transports the transport medium S transported from the second transport section 20 to the discharge tray 2. In other words, the third transport section 30 functions as a discharge mechanism.

[0038] A driving force is transmitted from a driving unit 4 such as a motor to the driving roller 31, and the driving roller 31 is rotated in the direction of the arrow in the figure. The driven roller 32 is pressed against the driving roller 31 with a constant pressure, and rotates together with the driving roller 31. The driven roller 32 may be configured to be biased against the driving roller 31 by a biasing unit (not shown) such as a spring.

[0039] The discharge tray 2 on which documents are stacked is pivotally supported via a first hinge 101 provided below the image reading device A so as to be rotatable relative to the image reading device A. The tray is also made up of a first discharge tray 2a on the first hinge 101 side and a first extension tray 2b, a second extension tray 2c, and a third extension tray 2d connected to the tip side of the first discharge tray 2a. The first extension tray 2b is supported so as to be slidable relative to the first discharge tray 2a and be retractable, the second extension tray 2c is supported so as to be slidable relative to the first extension tray 2b and be retractable, and the third extension tray 2d is supported so as to be slidable relative to the second extension tray 2c and be retractable.

[0040] <Image reading structure and control> Here, in the image reading device A of this embodiment, since an image is read by an image reading unit 70 disposed between the second conveying section 20 and the third conveying section 30, the second conveying section 20 and the third conveying section 30 convey the conveyed medium S at a constant speed. By always setting the conveying speed to be equal to or higher than the conveying speed of the first conveying section 10, it is possible to reliably prevent the following conveyed medium S from catching up with the preceding conveyed medium S. For example, in this embodiment, the conveying speed of the conveyed medium S by the second conveying section 20 and the third conveying section 30 is controlled to be faster than the conveying speed of the conveyed medium S by the first conveying section 10.

[0041] Furthermore, even if the conveying speed of the conveying medium S by the second conveying section 20 and the third conveying section 30 and the conveying speed of the conveying medium S by the first conveying section 10 are the same, it is also possible to form a minimum gap between the preceding conveying medium S and the succeeding conveying medium S by controlling the drive section 3 to intermittently shift the timing at which the feed of the succeeding conveying medium S begins.

[0042] <Double feed detection> The double-feed detection sensor 40 disposed between the first conveying section 10 and the second conveying section 20 is an example of a detection sensor (a sensor that detects the behavior or state of sheets) for detecting when conveying media S such as paper have come into close contact with each other due to static electricity or the like and passed through the first conveying section 10 (i.e., when a double-feed state occurs in which the conveying media S are conveyed overlapping each other). Various types of double-feed detection sensor 40 can be used, but in this embodiment, it is an ultrasonic sensor that includes an ultrasonic transmitter 41 and a receiver 42, and detects double-feeding based on the principle that the attenuation of ultrasonic waves passing through conveying media S such as paper differs between when the conveying media S are conveyed overlappingly and when the conveying media S are conveyed one by one.

[0043] <Registration sensor> The medium detection sensor 50, which is disposed downstream in the transport direction from the aforementioned double feed detection sensor 40, is an example of a detection sensor (sensor that detects the behavior and state of a sheet) disposed upstream of the second transport section 20 and downstream of the first transport section 10 on the upstream side of the transport path RT, and detects the position of the transported medium S transported by the first transport section 10, more specifically, whether or not the end of the transported medium S has reached or passed the detection position of the medium detection sensor 50. Various types of medium detection sensor 50 can be used, but in this embodiment, it is an optical sensor that includes a light emitting section 51 and a light receiving section 52, and detects the transported medium S on the principle that the received light intensity (received light amount) changes when the transported medium S arrives at or passes through it.

[0044] In this embodiment, the medium detection sensor 50 is provided downstream of and in the vicinity of the double feed detection sensor 40 so that the medium S has reached a position where the double feed can be detected by the double feed detection sensor 40 when the leading edge of the medium S is detected by the medium detection sensor 50. The medium detection sensor 50 is not limited to the optical sensor described above, and may be, for example, a sensor (such as an image sensor) that can detect the edge of the medium S, or a lever-type sensor that protrudes into the path RT. A plurality of sensors may also be provided in a direction perpendicular to the transport direction to detect that the medium is slanting relative to the transport path.

[0045] A media detection sensor 60 different from the media detection sensor 50 is arranged upstream of the image reading unit 70. It is an example of a downstream detection sensor arranged downstream of the second transport unit 20, and detects the position of the transport medium S transported by the second transport unit 20. As the media detection sensor 60, various types can be used. In the case of this embodiment, it is an optical sensor similar to the media detection sensor 50, includes a light emitting unit 61 and a light receiving unit 62, and detects the transport medium S on the principle that the light receiving intensity (light receiving amount) changes due to the arrival or passage of the transport medium S. In this embodiment, the media detection sensors 50 and 60 are arranged on the upstream side and the downstream side of the transport direction of the second transport unit 20, respectively, but only one of them may be sufficient.

[0046] <Arrangement of CIS> The image reading unit 70 located downstream of the media detection sensor 60 optically scans, for example, converts it into an electrical signal, and reads it as image data, and includes a light source such as an LED, an image sensor, a lens array, etc. inside. The image reading unit 70 is a contact image sensor (CIS) unit. Here, the image reading unit 70 is a CIS unit, but for example, a unit using a CCD as an image sensor may be used, and the type of the image sensor is not limited. In the case of this embodiment, the image reading unit 70 (hereinafter synonymous with CIS) is arranged one on each side of the path RT (70a, 70b) and reads the front and back surfaces of the transport medium S. However, it may be configured to arrange only one on one side of the path RT and read only one side of the transport medium S. In this embodiment, the image reading unit 70 is arranged to face each other on both sides of the path RT, but for example, it may be arranged at intervals in the direction of the path RT.

[0047] <Explanation of the block diagram> The control unit 80 will be described with reference to FIG. 7. FIG. 7 is a block diagram of the control unit 80 of the image reading apparatus A.

[0048] The control unit 80 includes a CPU 81, a storage unit 82, a communication unit 84, and an interface unit (a) 85a. The CPU 81 executes a program stored in the storage unit 82 to control various functions such as reading control of the image reading device A, transport of a medium, and notification to an operator. The operation unit 83 is composed of, for example, a switch 83c, a touch panel 83a, a display device 83b, etc., and displays information to the operator and accepts operations from the operator. Figure 6 shows the operation unit 83 as an example, which is a liquid crystal display with a touch panel arranged on the front of the device.

[0049] Here, the control unit 80 may have multiple CPUs, memory units, communication units, and interface units, and for example, one CPU may control the reading of device A and the transport of media, and another CPU may notify the operator, etc. In other words, the functions may be divided and controlled by multiple control systems.

[0050] The communication unit 84 is an interface that communicates information with an external device connected to the CPU 81. If the external device is a PC (personal computer), examples of the communication unit 84 include a USB interface and a SCSI interface. Other examples include a network interface for wired communication such as a LAN, and an interface for wireless communication such as a wireless LAN or Bluetooth (registered trademark). The communication unit 84 may include multiple communication interfaces.

[0051] The interface unit (a) 85a is an I / O interface that performs input and output of data between the CPU 81 and the actuator 86 and sensor 87. The actuator 86 includes a drive unit 3, a drive unit 4, a transmission unit 5, etc. The sensor 87 includes a double feed detection sensor 40, and medium detection sensors 50 and 60, etc. The interface unit (b) 85b is, for example, a control interface that is connected to a display device 83b of the operation unit 83. Examples of interfaces that perform display control include SPI, USB interface, eDP, and HDMI (registered trademark).

[0052] <Display panel configuration> 8 is a front view of the image reading device A according to one embodiment of the present invention with the discharge tray 2 unfolded. More precisely, it is a view seen from a direction perpendicular to the front panel 90 provided at an angle on the front side of the image reading device A, and from a slightly higher position than the front when the device is placed.

[0053] A display panel 93 is provided on the front panel 90 at the upper front part, and inside the display panel 93, a power button 122, which is an example of a switch as an example of an operation unit 83, and a display unit 94 are provided. Here, the display unit 94 is composed of a touch panel 83a, a display device 83b, etc.

[0054] The display device 83b is, for example, a liquid crystal display, and is capable of displaying a screen according to the state of the device and providing device information to the operator. One example of the displayed screen is a screen consisting of a start key for starting the operation of the image reading device A, and a list of jobs that specify the reading operation (for example, reading resolution, output method and output destination of the read image data, etc.) previously registered in the image reading device A. Icons indicating the state of the device may also be displayed.

[0055] <Control during multi-feeding> During the image reading operation, the presence or absence of a double feed is determined by the double feed detection sensor 40 during the transport of the transported medium S, and if it is determined that there is no double feed, the transport continues. If it is determined that there is a double feed, the transport may be stopped, or the first transport unit 10 may stop taking in the subsequent transported medium S, and the transported medium S in the double feed state may be discharged as is. Also, a display may be displayed on an external personal computer or on a display device 83b inside the device to notify the occurrence of a double feed. At this time, a recovery process may be selected, for example, to continue reading, or to discard the read data of the transported medium S that has been double fed and start from reading the transported medium S for which image read data has not been acquired, including the transported medium S that has been double fed.

[0056] <Starts scanning according to the output of the registration sensor and transmits and saves the scanned image> The control unit 80 starts reading the image of the conveyed medium S conveyed by the second conveying unit 20 by the image reading unit 70 at a timing based on the detection result of the medium detection sensor 60, processes the read image data, temporarily stores it, and sequentially transmits it to the outside of the device. The temporarily stored image data is transmitted to a connected external personal computer or network device via the communication unit 84. Here, the external personal computer may display the received read image and then store it, or the external personal computer may directly store the received read image in a predetermined location. Also, the image may be stored in a predetermined location of a device on the network, such as an external storage device or an FTP server directly connected to the network. Note that image processing of the image data read by the image reading unit 70 may be performed by the control unit 80, or may be performed by an external personal computer or an external device. Of course, multiple functions may be divided and performed by multiple control units 80, external personal computers, or external devices.

[0057] <Paper ejection structure> The conveyed medium S from which the image has been read is discharged to the discharge tray 2 by the third conveying section 30, and the image reading process of the conveyed medium S is completed. The discharge tray 2 is an example of a document placement table.

[0058] A discharge opening 92 is provided in a lower panel 91 at the bottom of the front side, through which the transported medium S transported by the third transport section 30 is discharged. The discharge tray 2 is supported by a hinge provided below the image reading device A so as to be rotatable relative to the image reading device A, and is configured so that the front surface of the main body is covered by the first discharge tray 2a.

[0059] <CISユニット> 9 is a cross-sectional view of an image reading unit 70 of an image reading device A according to this embodiment. In this embodiment, the image reading units 70 are arranged facing each other on both sides of the transport path RT, and in the following description, they are referred to as image reading units 70a and 70b. The image reading units 70a and 70b are sensor units having the same structure and arranged symmetrically across the transport path RT.

[0060] The image reading unit 70a includes a contact image sensor (hereinafter, CIS) 71a and a color reference plate 72a.

[0061] The CIS 71a and the color reference plate 72a are arranged to be slidable in the transport direction by transmitting the driving force of a CIS sliding motor (not shown) arranged in the lower unit 104 via a transmission member 74 and a transmission member connector 150 provided in the lower part of the image reading unit 70. The background color can be switched by sliding the CIS 71a and the color reference plate 72a.

[0062] When the color reference plate 72b is white and the background color of the read image is to be white, the CIS 71a is slid by the CIS sliding motor to move the reading position to the position of the opposing color reference plate 72b, thereby enabling white background reading. At this time, the CIS 71a and the color reference plate 72a move together, so that when the CIS 72a is placed at the white background position, the color reference plate 72a is placed at a position opposite the reading position of the CIS 72b, and both the image reading units 70a and 70b can read the white background. When the color reference plates 72a and 72b are not white, a separate white background section is provided and the CIS 71a and 71b are moved to the position of the white background section, thereby enabling reading the white background.

[0063] When the background color of the scanned image is to be black, the scanning position of the CIS 71a is arranged at the position of the opposing black background portion 76b, thereby enabling scanning against a black background. The light emitted by the light-emitting element in the CIS 71a is diffused by the slope of the black background portion 76b, preventing the light from entering the light-receiving element in the CIS 71a, thereby enabling scanning against a black background.

[0064] Although a configuration in which the reading background color is switched has been shown here, switching of the background color is not essential, and the background color may be fixed to white or black, or to any other color.

[0065] The image reading unit 70b has a structure similar to that of the image reading unit 70a, but the CIS 71b is not driven by the CIS sliding motor 73 but is fixed within the unit.

[0066] <Drive by receiving a start instruction from a PC> The basic operation of the image reading device A will be described. When the control unit 80 receives an image reading start instruction from, for example, an external personal computer or control device to which the image reading device A is connected, the control unit 80 starts driving the first transport unit 10, the second transport unit 20, and the third transport unit 30. The transport medium S stacked on the mounting table 1 is transported one by one from the transport medium S located at the bottommost position thereof. Here, the connection with the external personal computer or control device is assumed to be a communication unit 84 included in the control unit 80, such as a USB interface, a SCSI interface, a LAN, or a wireless LAN.

[0067] <Drive by receiving a start instruction from device operation> Alternatively, instead of an instruction to start reading from an external personal computer or control device, an image reading instruction may be received by an input from a start key (not shown) provided on the operation unit 83 of the image reading device A or from the touch panel 83a, and the image reading operation may be started.

[0068] <Scanning operation> When the control unit 80 receives a start instruction from the external PC or the operation unit 83 as described above, the control unit 80 starts the image scanning operation. The start instruction includes information such as the resolution setting for reading, the color resolution such as color or monochrome, and color correction information. Here, when the transport medium S is a photograph, the control unit 80 can be instructed that it is in the photograph reading mode as an image reading instruction. When the transport medium S is not a photograph, other reading modes are selected and an instruction is given to the control unit 80. Here, there may be a plurality of other reading modes, and the reading mode may be set according to the type of the transport medium S. By changing the reading mode, optimal image processing corresponding to the transport medium S is performed. Note that the instruction that it is in the photograph reading mode may be given by the operator designating it from the operation unit 83 or an external PC, or the control unit 80 may automatically determine to execute in the photograph reading mode from the size of the original document by using the image reading unit 70, the medium detection sensors 50 and 60 in the image reading device A as size detection sensors.

[0069] <Reading starts according to the output of the registration sensor> The control unit 80 reads the conveyed medium S conveyed by the second conveying unit 20 using the image reading unit 70. The timing for starting reading here is based on the detection result of the medium detection sensor 60 included in the sensor 87. The control unit 80 reads images from the image reading unit 70 at regular intervals according to the set reading resolution and the moving speed of the conveyed medium S.

[0070] <Image processing of scanned images> The image read by the image reading unit 70 is subjected to various image processing in the image processing section 88, and is then transmitted to an external control device via the communication section 84. A detailed process flow when the conveyed document S is a photograph will be described later.

[0071] As described above, the image reading units 70a and 70b are disposed on either side of the second transport section 20, and are adapted to read both sides of the transport medium S. When the operator places the transport medium S on the mounting table 1, the operator specifies that the transport medium S should be placed with its front side in contact with the mounting table 1, that is, with the back side visible when the transport medium S is placed on the mounting table 1. The transport medium S is transported, and the front side of the transport medium S is read by the image reading unit 70a, and the back side is read by the image reading unit 70b. Here, if the transport medium S is a photograph, the front side is the side on which the photograph is printed.

[0072] The images of the front and back sides read by the image reading unit 70 are subjected to image processing described below and are sent as image data to an external control device. Here, the side read by the image reading unit 70a is the front side, but the conveying medium S may be configured to be reversed when placed on the placement table 1, that is, to be placed so that the front side is visible when the conveying medium S is placed on the placement table 1, and the side read by the image reading unit 70a is the back side.

[0073] <About the photos> In the present invention, the fading correction process is performed on both sides of the document, regardless of whether it is the front or back. However, if the document is a photograph, even if the operator specifies the execution of the fading correction process, the fading correction may not be performed on the back side. This is due to the following two reasons.

[0074] The first reason is that in general, the image is printed only on the front side of the mount, and not on both sides. In many cases, what is printed on the back side of the photograph is only unnecessary data for the operator, such as the brand name of the mount used and a mark indicating the name of the photographic paper, so there is often no benefit to the operator even if fading correction is performed.

[0075] The second reason is that photographs are generally stored in albums etc. so that the back side is less exposed to light and air than the front side, and so tends to fade less. Since the back side tends to fade less, fading correction is often not necessary in the first place.

[0076] <Reading procedure> The reading procedure by the image reading device A of this embodiment will be described below with reference to the flowchart in Fig. 10. The flowchart in Fig. 10 is a flowchart for explaining an example of the reading procedure by the image reading device A of this embodiment, and this process is realized by the CPU 81 executing a program stored in the storage unit 82. Note that, unless otherwise specified, other flowcharts in this embodiment are also realized by the CPU 81 executing a program stored in the storage unit 82. Furthermore, the image processing described below is executed at least in the photo reading mode. However, it may be configured to be executed in the same way in other reading modes as well.

[0077] When an instruction to start image reading is received, in step S1201, the control unit 80 starts controlling the image reading unit 70, reads the background plates, that is, the color reference plates 72a and 72b, and stores them in the storage unit 82.

[0078] Next, in step S1202, in order to read the image, the control unit 80 starts controlling the actuator 86 in accordance with the resolution and color number information specified in the start command, transports one sheet of the transport medium S located at the bottom of the transport media S placed on the mounting table 1, reads the image using the image reading unit 70, and ejects the sheet.

[0079] Next, in step S1203, the images read by the image reading units 70a and 70b are temporarily stored in the storage unit 82. The storage unit 82 used here is a large-capacity, low-cost DRAM, a high-speed accessible SRAM, or the like.

[0080] Here, the method of determining pixel coordinates in the present invention will be described. In the present invention, the upper left corner of an image is set as the origin of the coordinates. Furthermore, when an image is arranged with the main scanning direction of the image reading unit 70 being left and right and the sub-scanning direction being up and down, the rightward direction of the image is defined as the positive X direction and the downward direction of the image as the positive Y direction. In other words, both the X and Y coordinates of the upper left corner are set as 0. Furthermore, the X coordinate of the pixel one pixel to the right of the upper left corner is set as 1 and the Y coordinate is set as 0, and the X coordinate of the pixel one pixel below the upper left corner is set as 0 and the Y coordinate is set as 1.

[0081] <Area extraction processing> Next, in step S1204, the image stored in the storage unit 82 is retrieved and subjected to area extraction processing. Any area extraction processing may be used as long as it extracts an area in which a document is shown from the image. As an example, the present embodiment performs a method in which the top, bottom, left and right edges of the area in which the document is shown in the image are first detected, and then the inside of the detected area is extracted.

[0082] Now, the region extraction process according to the present invention will be described with reference to the flow chart of FIG.

[0083] CPU 81 detects the four corners of the area where the document is shown from the image retrieved from storage unit 82 in steps S1501 to D1504. Any process for detecting each vertex may be used as long as it detects each vertex of the area where the document is shown from the image. In the present invention, the vertex detection process using the flowchart in FIG. 14 is used as an example.

[0084] The apex detection process will be described below using the flowchart in Fig. 14. In step S1601, CPU 81 prepares a variable YMIN for storing the first apex of the document area in storage unit 82, and sets the value to 65535. Note that this value is just an example, and any value larger than the number of pixels corresponding to the length of the document to be read may be used.

[0085] In step S1602, CPU 81 prepares in storage unit 82 a variable X for storing the X coordinate of the pixel for determining the upper end of the document area, and sets the value of this variable to 0.

[0086] In step S1603, CPU 81 prepares in storage unit 82 a variable Y for storing the Y coordinate of the pixel for determining the upper end of the document area, and sets the value of this variable to 0.

[0087] In step S1604, the CPU 81 determines whether the brightness of the pixel at the coordinates (X, Y) is equal to the brightness of the color reference plate stored in the storage unit 82. If it is determined that the brightness is equal to the brightness of the color reference plate, the coordinates (X, Y) are not considered to be in the original area, and the process proceeds to step S1605. On the other hand, if it is determined that the brightness is not equal to the brightness of the color reference plate, the coordinates (X, Y) are considered to be in the original area, and the process proceeds to step S1609.

[0088] In step S1605, the CPU 81 determines whether the coordinates (X, Y+1) are included in the image. If it is determined that the coordinates are included in the image, the process proceeds to step S1606. In step S1606, the CPU 81 adds 1 to the variable Y, and then proceeds to step S1604 to repeat the determination. On the other hand, if it is determined that the coordinates are not included in the image, the search has been completed up to the bottom end of the image, and the process proceeds to step S1607.

[0089] In step S1607, the CPU 81 determines whether the coordinates (X+1, Y) are included in the image. If it is determined that the coordinates are included in the image, the process proceeds to step S1608. In step S1608, the CPU 81 adds 1 to the variable X, and then proceeds to step S1603 to repeat the determination. On the other hand, if it is determined that the coordinates are not included in the image, the process ends, assuming that the search of the entire image has ended.

[0090] In step S1609, CPU 81 determines whether variable Y is smaller than variable YMIN. If it is smaller than variable YMIN, it is assumed that a first vertex with a smaller Y coordinate has been detected, and in step S1610 the value of variable YMIN is replaced with variable Y. Then, the process proceeds to step S1607. If it is not smaller than variable YMIN, the value of variable YMIN is not changed, and the process proceeds to step S1607.

[0091] The first vertex of the document is detected by the above procedure. Returning to Fig. 13, in steps S1502, S1503, and S1504, CPU 81 detects the second vertex, the third vertex, and the fourth vertex, respectively, by using a procedure similar to that of the first vertex detection process.

[0092] That is, in detecting the second vertex, steps S1605 and S1607 in FIG. 14 are exchanged, and the variable XMIN is used as the initial value 65535 in place of the variable YMIN in steps S1601, S1609, and S1610.

[0093] 14, the variable YMAX is set to an initial value of 0 instead of the variable YMIN, the maximum Y coordinate value in the image is used as the initial value of the variable Y in step S1603, and the position where the Y coordinate is maximum in the pixel that is No in step S1604 is obtained. In this case, (Y+1) in steps S1605 and S1606 can be replaced with (Y-1) for processing.

[0094] 14, in detecting the fourth vertex, the variable XMAX is set to an initial value of 0 instead of the variable XMIN used in detecting the second vertex, the maximum X coordinate value in the image is used as the initial value of the variable X in step S1602, and the position where the X coordinate of the pixel that is No in step S1604 is maximum is obtained. In this case, the processing can be performed by replacing (X+1) with (X-1) in steps S1605 and S1606.

[0095] In step S1505, the CPU 81 cuts out the document area into a rectangle based on the detected four corners of the document, and ends the process.

[0096] In the region extraction process of the present invention, when the document is not rectangular and some of its sides are slanted, an inscribed rectangle of the document is extracted. Note that the document may be corrected for slanting before extraction.

[0097] Here, we will use Figure 15 to explain the difference between cutting out an inscribed rectangle and cutting out a circumscribed rectangle. Generally, industrially produced paper does not form an exact rectangle due to errors in the processing stage, and some sides are cut slightly diagonally. On white paper, these diagonally cut parts are not noticeable, but on small paper and photographs where the paper size is small and the edges of the document are colored, these diagonally cut parts can be noticeable.

[0098] Fig. 15(a) shows the image when such a diagonally cut photo is cut out using the circumscribing rectangle shown by the dashed line. When a diagonally cut image is cut out using a circumscribing rectangle, the background board is reflected in the diagonally cut part, resulting in an unnatural image with a missing part.

[0099] On the other hand, Fig. 15(b) shows the image when the image is cut diagonally and cut using the inscribed rectangle shown by the dashed line. When cut using the inscribed rectangle, the image does not include the diagonally cut part, so a natural image without any missing parts is obtained.

[0100] <Shadow removal processing> 10, in step S1205, a shadow erasing process is applied to the image that has been subjected to the area extraction process. Any shadow erasing process may be used as long as it removes shadows that occur around the document from the image. As an example, the present invention uses a method in which a shadow is first detected from an image and then the shadow is removed.

[0101] The shadow detection process of the present invention utilizes the fact that the length of a shadow is roughly determined. A shadow of a document is generated when light emitted from a light source is blocked by the document, so the length of the shadow is roughly determined by the distance between the document being conveyed and the light source. In an image reading device using an ADF, the distance between the light source and the document is limited by the hardware configuration of the conveying path, so the length of the shadow is also roughly determined.

[0102] In addition, the density of the shadow of the document is influenced by various factors such as diffuse reflection from the background board, and so it has a gradational shape. That is, the shadow is darkest at the edge of the document, and becomes monotonically lighter the further away from there. In the present invention, the shadow density is analyzed, and the shadow is detected by utilizing the fact that the gradational shape of the shading is used.

[0103] Here, the shadow erasing process will be described with reference to the flowchart in Fig. 11. Note that in this embodiment, as shown in Fig. 1, the light is irradiated onto the document from the upstream side in the transport direction, and the description will be made on the assumption that the shadow is formed in the upper part of the image (the side with a larger Y coordinate), but this is not limited to this.

[0104] In step S1301, the CPU 81 prepares a variable X for storing the X coordinate of a pixel for which a shadow is to be determined in the storage unit 82, and sets the value of the variable X to 0.

[0105] In step S1302, the CPU 81 prepares a variable Y for storing the Y coordinate of a pixel for which a shadow is to be determined in the storage unit 82, and sets the value of the variable Y to 0.

[0106] In step S1303, the CPU 81 determines whether the coordinates (X, Y) are the edge of a shadow. An example of the process for determining whether the coordinates are the edge of a shadow will now be described with reference to the flowchart of FIG.

[0107] In the shadow determination process of the present invention, the shadow area is determined by determining whether the coordinate (X, Y) is the edge of the shadow, i.e., the shadow closest to the document. In other words, it is determined that the brightness of the coordinate (X, Y) is the darkest, the pixels below the coordinate (X, Y) (the positive side of the coordinate axis) are bright because they are within the document area, and the coordinates above the coordinate (X, Y) are bright because of the shadow gradation.

[0108] Note that this shadow determination method is merely an example, and the present invention is not limited to this. Any process may be used as long as it can determine the position of a shadow from an image.

[0109] In step S1401, CPU 81 determines whether the brightness of coordinates (X, Y) is darker than a predetermined value. The predetermined value is a value that is set in advance as the brightness that a shadow on a document normally has. If it is darker than the predetermined value, it is determined that coordinates (X, Y) may be the edge of a shadow, and the process proceeds to step S1402, where the process continues to determine whether the shadow exists. If it is brighter than the predetermined value, the process proceeds to step S1409, where it is determined that coordinates (X, Y) are not the edge of a shadow, and the process ends.

[0110] In step S1402, CPU 81 determines whether the brightness of coordinate (X, Y+1) is brighter than the brightness of coordinate (X, Y). If it is determined that it is bright, it is assumed that coordinate (X, Y+1) is in the document area and coordinate (X, Y) may be the edge of a shadow, and the process proceeds to step S1403 to continue the shadow determination. If it is determined that it is dark, the process proceeds to step S1409, where it is determined that coordinate (X, Y) is not the edge of a shadow, and the process ends.

[0111] In step S1403, the CPU 81 prepares a variable L indicating the determination position of a pixel in the storage unit 82, and sets the value of the variable L to 1. In the subsequent processing, the variable L is used to determine whether the shadow has a gradation pattern.

[0112] In step S1404, the CPU 81 judges whether the brightness of the coordinates (X, YL) is equal to the brightness of the color reference plate stored in the storage unit 82. If it is judged to be equal to the brightness of the color reference plate, it is assumed that the shadow has been searched to its end, and the process proceeds to step S1408, where it is judged that the coordinates (X, Y) are the end of the shadow, and the process ends. If it is judged to be not equal to the brightness of the color reference plate, it is assumed that the end of the shadow has not been found, and the process proceeds to step S1405, where the judgment process continues.

[0113] In step S1405, the CPU 81 determines whether the brightness of the coordinates (X, YL-1) is equal to or greater than the brightness of the coordinates (X, YL). If it is determined that it is equal to or greater than the brightness of the coordinates (X, YL), then it is assumed that the shadow has a gradation pattern and that the coordinates (X, Y) may be the edge of the shadow, and the process proceeds to step S1406 to continue the shadow determination. If it is determined that it is lower than the brightness of the coordinates (X, YL), the process proceeds to step S1409, where it is determined that the coordinates (X, Y) are not the edge of the shadow, and the process ends.

[0114] In step S1406, the CPU 81 adds 1 to the value of the variable L.

[0115] In step S1407, CPU 81 determines whether the value of variable L is equal to or greater than a predetermined maximum shadow length. If it is equal to or greater than the maximum shadow length, it is deemed too long to be a shadow and may be an original document rather than a shadow, and the process proceeds to step S1409, where it is determined that the coordinates (X, Y) are not the edge of a shadow and the process ends. If it is less than the maximum shadow length, it is determined that the gradation check is insufficient, and the process proceeds to step S1403 to continue determining whether or not there is a shadow.

[0116] Returning to FIG. 11, if the CPU 81 determines in step S1303 that the coordinates (X, Y) are the edge of the shadow, the process proceeds to S1304, and if the CPU 81 determines that the coordinates are not the edge of the shadow, the process proceeds to S1305.

[0117] In step S1304, the CPU 81 removes the shadow based on the coordinates (X, Y). Specifically, the density of the pixels in the range from the coordinates (X, Y) to the coordinates (X, Y - maximum shadow length) is converted to a predetermined value. The predetermined value may be white, that is, the RGB components of the pixel may all be 255, but it may also be converted to the pixel value of a color reference plate acquired in advance.

[0118] On the other hand, in step S1305, the CPU 81 adds 1 to the value of the variable Y.

[0119] In step S1306, CPU 81 determines whether the value obtained by adding 1 to the value of variable Y is included in the image, i.e., whether the coordinate one position below (X, Y) is present in the image. If it is determined that the coordinate is present in the image, the process proceeds to step S1303, and the search for the edge of the shadow is continued in the positive Y direction. On the other hand, if it is determined that the edge is not present in the image, the process proceeds to step S1307.

[0120] In step S1307, the CPU 81 adds 1 to the value of the variable X.

[0121] In step S1308, CPU 81 determines whether the value of variable X is included in the image, i.e., whether the coordinates (X, Y) are present in the image. If it is determined that the shadow is present in the image, the process proceeds to step S1302, where the search for the shadow edge is continued in the positive X direction. On the other hand, if it is determined that the shadow is not present in the image, the search for the shadow is deemed to have ended, and the process is terminated.

[0122] The shadow erasing process in this embodiment is as described above and can remove shadows that appear on the Y direction side of the document, but shadow erasing process can also be similarly performed on shadows that appear on the X direction side of the document.

[0123] <Fading correction processing> 10, in step S1206, a fading correction process is applied to the image that has been subjected to the shadow erasure process. The fading correction process in the present invention is performed by creating a histogram for each RGB component of the image, then calculating the maximum and minimum values ​​of the histogram, and converting pixel values ​​so that the finally calculated maximum and minimum values ​​become 255 and 0, respectively. This process results in an image with a balanced RGB and fading corrected.

[0124] It should be noted that this fading correction method is merely an example, and the present invention is not limited to this. Any processing may be used as long as it can remove or reduce the effects of fading from an image.

[0125] Here, the fading correction process will be described with reference to the flowchart of FIG.

[0126] In step S1801, the CPU 81 creates a histogram for each RGB component from the entire image. The histogram creation process will now be described with reference to the flowchart in FIG.

[0127] In step S1901, the CPU 81 creates histogram data for each RGB component in the storage unit 82, and initializes the values. Specifically, 256 variables (768 in total) are prepared for each of RGB, and the value 0 is set to all of them.

[0128] In step S1902, the CPU 81 prepares in the storage unit 82 a variable X for storing the X coordinate of a pixel to be added to the histogram, and sets the value of this variable to 0.

[0129] In step S1903, the CPU 81 prepares in the storage unit 82 a variable X for storing the Y coordinate of a pixel to be added to the histogram, and sets the value to 0.

[0130] In step S1904, the CPU 81 adds each of the RGB components of the pixel value at the coordinates (X, Y) to the histogram. Specifically, if the R component of the pixel value at the coordinates (X, Y) is RXY, then 1 is added to the RXY+1th data of the histogram of the R component in the storage unit 82. Similarly, 1 is added to data corresponding to the pixel value in the histogram data for the G and B components.

[0131] In step S1905, the CPU 81 determines whether the coordinates (X, Y+1) are included in the image. If it is determined that the coordinates are included in the image, the process proceeds to step S1906. In step S1906, the CPU 81 adds 1 to Y, and then proceeds to step S1904 to continue creating a histogram. On the other hand, if it is determined that the coordinates are not included in the image, the search has ended up to the bottom edge of the image, and the process proceeds to step S1907.

[0132] In step S1907, the CPU 81 determines whether the coordinates (X+1, Y) are included in the image. If it is determined that the coordinates are included in the image, the process proceeds to step S1908. In step S1908, the CPU 81 adds 1 to X, and then proceeds to step S1903 to continue creating the histogram. On the other hand, if it is determined that the coordinates are not included in the image, the process ends, assuming that the creation of the histogram has ended.

[0133] In step S1802, the CPU 81 calculates the maximum value before fading correction from the histogram created in the storage unit 82. In the present invention, the "maximum value" (maximum value before fading correction) used in the pixel value conversion process described later is the upper end position of the distribution excluding a predetermined distribution ratio (area) from the upper end of the histogram. By using the maximum value in the distribution excluding the predetermined distribution ratio as the maximum value before fading correction, it becomes possible to obtain an appropriate maximum value regardless of noise in the image or dust when reading the document.

[0134] Note that this method of determining the maximum value is just an example, and the present invention is not limited to this. Any method may be used as long as it determines the value to be used as the maximum value of each RGB component in the pixel value conversion process at the subsequent stage. For example, it may be a method of determining a position where the histogram is not 0 as the maximum value, or a method of determining a position where the histogram exceeds a predetermined height as the maximum value.

[0135] The process of calculating the maximum value of a histogram will now be described with reference to the flowchart in Fig. 18. Note that although the flowchart in Fig. 18 describes a method of calculating the maximum value of the histogram of the R component, the maximum values ​​of the G component and the B component are also calculated using the same procedure.

[0136] In step S2001, the CPU 81 prepares a variable SUM indicating the calculated area in the storage unit 82 and sets the value to 0.

[0137] In step S2002, the CPU 81 prepares a variable V indicating the calculated position in the storage unit 82 and sets the value of the variable V to 255.

[0138] In step S2003, the CPU 81 adds the Vth value of the R component histogram to SUM.

[0139] In step S2004, CPU 81 determines whether the value of SUM is greater than a predetermined area. If it is determined that it is greater than the predetermined area, the process proceeds to step S2007, where V is determined to be the maximum value of the histogram, and the process ends. On the other hand, if it is determined that it is not greater than the predetermined area, the process proceeds to step S2005. Note that the predetermined area may be a fixed value, or may be a value obtained by multiplying the total number of pixels of the image by a predetermined ratio.

[0140] In step S2005, the CPU 81 subtracts one from V.

[0141] In step S2006, the CPU 81 determines whether V is equal to 0. If it is equal to 0, the process proceeds to step S2007, where V is determined to be the maximum value of the histogram, and the process ends. On the other hand, if it is determined that V is not equal to 0, the process proceeds to step S2003, and the calculation of the maximum value of the histogram continues.

[0142] 16, in step S1803, CPU 81 calculates the "minimum value" in the histogram. The minimum value of the histogram is calculated in the same manner as the maximum value of the histogram, and is the bottom end position of the distribution excluding a predetermined distribution ratio (area) from the bottom end of the histogram.

[0143] Next, in step S1804, the CPU 81 changes pixel values ​​of the image based on the calculated maximum and minimum values ​​of the histogram. Specifically, for all pixels of the image, the following equations are used to convert each RGB component of the pixel before conversion into each RGB component of the pixel after conversion. R component after conversion = (R component before conversion - minimum value of R) / (maximum value of R - minimum value of R) x 255 G component after conversion = (G component before conversion - minimum G value) / (maximum G value - minimum G value) x 255 Transformed B component = (Before transformation B component - minimum value of B) / (maximum value of B - minimum value of B) x 255

[0144] Using the above formula, pixel values ​​are converted so that the calculated maximum and minimum values ​​become 255 and 0, respectively. As a result, an image with a good RGB balance and corrected discoloration is obtained. Note that, taking into account the RGB distribution of all pixels before conversion, each converted RGB component may be multiplied by a correction coefficient.

[0145] 10, in step S1207, the final image subjected to the fading correction process is stored in storage unit 82. The image stored here is stored outside image reading device A in a storage device such as an external control device, memory device, or hard disk drive via communication unit 84, or in a storage area provided by a cloud computing service on a network using the LAN function that is part of communication unit 84, by a process separate from the reading means. Alternatively, the image may be stored in storage unit 82 of image reading device A. Here, it does not matter whether storage unit 82 is non-volatile or volatile.

[0146] In the reading process, if it is determined in step S1208 that the medium S remains on the stage 1, the process returns to step S1202 and the image is read again. Conversely, if the medium S does not remain on the stage 1, the process ends.

[0147] By the above procedure, discoloration can be corrected with high accuracy even if there is a shadow from the original, and an image with high visibility can be obtained.

[0148] <Second embodiment> The second embodiment is a modified example of the first embodiment. One of the differences from the first embodiment is the shadow erasing process. In the first embodiment, the position of the shadow is determined based on the shade of the shadow, and the shadow erasing process is performed to remove the shadow. In the second embodiment, as another method of the shadow erasing process, the shadow is removed using a process (trimming process) that removes a predetermined length from the document edge (surroundings of the document). In addition, the operator is allowed to select whether or not to perform the fading correction process and the trimming process. Only the differences from the first embodiment will be described below, and the other configurations are the same as those of the first embodiment.

[0149] The reading procedure by the image reading device A of this embodiment will be described below with reference to the flowchart in Fig. 19. The flowchart in Fig. 19 is a flowchart for explaining an example of the reading procedure by the image reading device A of this embodiment, and this process is realized by the CPU 81 executing a program stored in the storage unit 82, except for step S2101 described later. It should be noted that the other flowcharts in this embodiment are also realized by the CPU 81 executing a program stored in the storage unit 82, unless otherwise specified.

[0150] In step S2101, the operator determines the reading settings and transmits an instruction to start image reading to the image reading device using an external device (not shown) connected to the image reading device via the communication unit 84 or the operation unit 83. The instruction to start image reading in this embodiment includes information on whether or not the enablement of the trimming process has been selected in the reading settings, and information on whether or not the enablement of the fading correction process has been selected.

[0151] In this embodiment, the operator operates the dialog shown in Fig. 20 to determine the reading settings and send an instruction to start image reading. The dialog shown in Fig. 20 is displayed on a display unit (not shown) of the external device, and can be operated using a user interface unit (not shown) of the external device. The dialog shown in Fig. 20 is an example, and any dialog may be used as long as it allows the operator to confirm and change the settings of whether or not to enable fading correction processing and whether or not to enable trimming processing.

[0152] In this embodiment, the fading correction process and the trimming process can be set to be enabled or disabled independently. However, this is only an example, and for example, when the fading correction process is enabled, the trimming process may be forcibly enabled. Furthermore, when the fading correction process is enabled, a warning message as shown in FIG. 20 may be displayed to the operator to prompt the operator to enable the trimming process.

[0153] The control unit 80, which has received the instruction to start image reading in step S2102, starts controlling the image reading unit 70, similarly to step S1201, reads the background boards, i.e., the color reference boards 72a and 72b, and stores the read data in the storage unit 82. The control unit 80 also stores in the storage unit 82 information included in the start instruction, such as whether or not the enablement of the trimming process has been selected, and information as to whether or not the enablement of the fading correction process has been selected.

[0154] In step S2103, as in step S1202, the control unit 80 starts controlling the actuator 86 in accordance with the resolution and color number information specified in the start command in order to read the image, transports one sheet of the transport medium S located at the bottom of the transport media S placed on the mounting table 1, reads the image using the image reading unit 70, and ejects the sheet.

[0155] In step S2104, similarly to step S1203, the images read by the image reading units 70a and 70b are temporarily stored in the storage unit 82.

[0156] In step S2105, similarly to step S1204, the image stored in the storage unit 82 is extracted and subjected to region extraction processing.

[0157] In step S2106, it is determined whether the trimming processing settings stored in the storage unit 82 are valid. If the settings are valid, the process proceeds to step S2107, where the trimming processing is performed. On the other hand, if the settings are not valid, the process proceeds to step S2108.

[0158] In step S2107, a trimming process is applied to the image that has been subjected to the region extraction process. In this embodiment, the trimming process is performed by cutting out a predetermined length from the top, bottom, left, and right of the image, as shown in Fig. 22. Note that this trimming process is one example, and the amount of cutting out may differ from top, bottom, left, and right, or the image may be cut out in a rectangular shape slightly inside the edge as shown in Fig. 22, or the operator may be able to specify the amount of cutting out. Also, the length of a shadow may be detected, and the amount of cutting out may be determined based on the detected length of the shadow.

[0159] In step S2108, it is determined whether the settings for the fading correction process stored in the storage unit 82 are valid. If the settings are valid, the process proceeds to step S2109, where the fading correction process is performed. On the other hand, if the settings are not valid, the process proceeds to step S2110.

[0160] In step S2109, similar to step S1206, a fading correction process is applied to the image.

[0161] In step S2110, the final image to which the fading correction process has been applied is stored in the storage unit 82, similarly to step S1207.

[0162] In step S2111, similarly to step S1208, if the medium S remains on the stage 1, the process returns to step S2103 again, and image reading is performed. Conversely, if the medium S does not remain on the stage 1, the process ends.

[0163] As described above, in this embodiment, a fading correction process is executed after a shadow removal process using a trimming process is performed on a scanned image. With this configuration, it is possible to appropriately apply the fading correction process to images that have portions that cannot be completely removed by the shadow removal process that determines shadows based on the shade of the shadow as described in the first embodiment.

[0164] It should be noted that the area extraction process and shadow removal process described in the above embodiment are examples of edge removal process that removes the peripheral portions of an original image, and other image processing methods may be used as long as they are capable of removing the shadow portions within an image by removing the peripheral portions of the original image, and even in such cases, subsequent fading correction processing can be performed appropriately.

[0165] In addition, the shadow erasing processes described in the first and second embodiments (hereinafter, the first shadow erasing process and the second shadow erasing process) may be combined so that both processes can be executed. Furthermore, as described above, it is preferable that the operator can specify that the mode is the photo reading mode, and for example, a menu for selecting the photo reading mode may be displayed on the display screen of FIG. 20 or another screen. In this case, in the photo reading mode, the first shadow erasing process may be displayed as unselectable, and only the second shadow erasing process may be displayed as selectable. Furthermore, when the operator selects to execute the fading correction process, it is preferable to notify the operator to select the execution of the edge removal process (the second shadow erasing process) as shown in FIG. 21. According to this configuration, when the fading correction process is executed in the photo reading mode, only the second shadow erasing process can be selected, and the fading correction process can be executed appropriately.

[0166] In each embodiment described above, the image processing such as steps S1204 to S1206 in Fig. 10 and steps S2105 to S2109 in Fig. 19 are executed by the control unit 80 (CPU 81), but the present invention is not limited to this. That is, the present invention may be realized as a system in which an image read by the image reading unit 70 is transmitted to an external device connected via the communication unit 84 and executed by image processing software (application) installed in the external device or the driver software of the image reading device A. It can be said that any of the embodiments constitutes an image reading system that reads an image of a document. [Explanation of symbols]

[0167] A Image reader S Transport medium 11 Feed roller 12 Separation roller 21, 31 Drive roller 22, 22 driven roller 70 Image reading unit 80 Control section 81 CPU 82 Memory section 83 Operation section 84 Communications Department 85a, 85b Interface section 86 Actuator 87 Sensors 88 Image Processing Section 90 Front Panel 93 Display Panel 94 Display section

Claims

1. A conveying means for conveying the document; a reading means for optically reading the document conveyed by the conveying means; an image processing unit that performs a fading correction process on the image read by the reading unit; The image reading system according to claim 1, wherein the image processing means performs a shadow erasure process on the image as a peripheral removal process for removing a peripheral portion of the image before performing the fading correction process.

2. 2. The image reading system according to claim 1, wherein the image processing means executes an area extraction process for extracting an original area from the image read by the reading means before executing the shadow erasing process.

3. 3. The image reading system according to claim 1, wherein the shadow removal process executable by the image processing means comprises analyzing the shade of the shadow from the image read by the reading means, detecting the position of the shadow based on the shade, and removing the shadow based on the detected position.

4. 3. The image reading system according to claim 1, wherein the shadow removal process that can be executed by the image processing means is a trimming process that removes shadows by cutting out a predetermined length of the periphery of the document from the image read by the reading means.

5. 5. The image reading system according to claim 1, further comprising a selection unit that allows the user to select whether or not to execute the fading correction process and the edge removal process by the image processing unit.

6. 6. The image reading system according to claim 5, wherein the selection means selects to execute the edge removal process when execution of the fading correction process is selected.

7. 6. The image reading system according to claim 5, further comprising a notification unit that notifies an operator to execute the edge removal process when the selection unit selects to execute the fading correction process.

Citation Information

Patent Citations

  • Method for deciding tilt angle of document image

    JP1999313207A

  • Photographic image area extraction apparatus and copying machine

    JP2005354654A

  • Image reading device, image processing method, image processing program, and image reading system

    JP2013141318A

  • Image reader

    JP2014168193A

  • Image reader and its reading method, and copying apparatus

    JP2017118349A