Image reading device, document area discrimination method in image reading device, and program

The image reading apparatus addresses the challenge of accurately detecting document areas by using a background with a specific periodic pattern and analyzing short-period variations in luminance values, resulting in improved detection accuracy and reduced errors.

JP2025086532APending Publication Date: 2025-06-09SEIKO EPSON CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023200569
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-11-28
Publication Date
2025-06-09

AI Technical Summary

Technical Problem

Existing image reading apparatuses face challenges in accurately detecting the document area due to the fine stripes used to improve detection accuracy, leading to increased errors and difficulty in specifying apexes.

Method used

An image reading apparatus that uses a background with a specific periodic pattern, such as a striped pattern, and a control unit that determines the presence of short-period variations in luminance values for each unit of continuous pixels, allowing for accurate discrimination between document and background areas.

Benefits of technology

This approach enhances the accuracy of document area detection by effectively distinguishing between short-period variations in the background pattern and the absence of such variations in the document area, thereby reducing errors and improving detection precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025086532000001_ABST
    Figure 2025086532000001_ABST
Patent Text Reader

Abstract

To provide an image reading device capable of detecting a document area in an image with high accuracy, a document area discrimination method in the image reading device, and a program.SOLUTION: An image reading device includes a reading section configured to read an image of a document. A background forming section causes the reading section to read a background including a pattern (e.g., stripe pattern) with a specific cycle. A control section sets, as a single unit, three or more M pixels continuous in a direction with a cycle of the pattern in image data where the reading section reads the document. The control section determines the presence or absence of a short cycle fluctuation, which is a cyclical fluctuation of a luminance value specific to the pattern, for each unit, based on the luminance values of each unit of the M pixels. The control section discriminates a document area and a background area based on a position at which the presence or absence of the short cycle fluctuation obtained from the image data changes.SELECTED DRAWING: Figure 8
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image reading apparatus including a reading unit that reads a document, a method for determining a document area in the image reading apparatus, and a program.

Background Art

[0002] For example, Patent Document 1 discloses an image reading apparatus including a reading unit that reads a document. The image reading apparatus includes a background plate on which black and white stripes (an example of a striped pattern) are drawn at a position facing the reading unit. In the image obtained by reading the document, black and white stripes are read as the background of the document. The document area is obtained from the position of the apex of the black stripe formed by the boundary between the black stripe and the document among the black and white stripes.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] However, in the image reading apparatus described in Patent Document 1, since a method of detecting the position of the apex of the black stripe is adopted, in order to improve the detection accuracy of the document area, the stripes are made finer and the number of apexes to be detected is increased. However, when the stripes are made finer, it becomes difficult to specify the apexes, and detection errors are likely to occur. Therefore, there is a demand for improving the accuracy of obtaining the document area using a pattern having a specific period such as a striped pattern.

Means for Solving the Problems

[0005] An image reading apparatus for solving the above problems is an image reading apparatus including a reading unit capable of reading an image of a document, and includes a background forming unit that causes the reading unit to read a background including a pattern having a specific period, and a control unit. In the image data obtained by the reading unit reading the document, three or more M pixels continuous in the direction having the period of the pattern are taken as one unit. The control unit determines, for each unit, whether there is a short-period variation, which is a periodic variation of luminance values specific to the pattern, based on the luminance values of the M pixels for each unit, and discriminates a document area and a background area based on positions where the presence or absence of the short-period variation of a plurality of units obtained from the image data switches.

[0006] A method for discriminating a document area in the image reading apparatus for solving the above problems is a method for discriminating a document area and a background area in an image reading apparatus that reads image data of a document by a reading unit capable of reading the image of the document. The method includes causing the reading unit to read the document to obtain image data of the document having a pattern with a specific period as a background, taking three or more M pixels continuous in the direction having the period of the pattern in the image data as one unit, determining, for each unit, whether there is a short-period variation, which is a periodic variation of luminance values specific to the pattern, based on the luminance values of the M pixels for each unit, and discriminating the document area and the background area based on positions where the presence or absence of the short-period variation of a plurality of units obtained from the image data switches.

[0007] A program for solving the above problems is a program that causes a computer of an image reading apparatus having a reading unit capable of reading an image of a document to execute a process for discriminating a document area and a background area in the image data read by the reading unit. The program causes the computer to read from a storage unit image data of the document with a pattern having a specific period as a background by causing the reading unit to read the document, and in the image data, using three or more consecutive M pixels in the direction having the period of the pattern as one unit, and performing a determination process for determining, for each unit, whether there is a short-period variation which is a periodic variation of luminance values peculiar to the pattern, based on the luminance values of the M pixels for each unit, and performing a discrimination process for discriminating the document area and the background area based on positions where the presence or absence of the short-period variation switches among a plurality of units obtained from the image data.

Brief Description of the Drawings

[0008]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20A

Figure 20B

Figure 20C

Figure 21A

Figure 21B

Figure 21C

Figure 22

Figure 23

Figure 24

Figure 25

Figure 26

Figure 27

Figure 28

DETAILED DESCRIPTION OF THE INVENTION

[0009] (First Embodiment) Hereinafter, a first embodiment of the image reading apparatus will be described with reference to the drawings. As shown in FIG. 1, the image reading apparatus 11 of the present embodiment includes a main body 12 having a substantially trapezoidal shape in side view, and a document support 13 on which a document 14 to be read is placed (set). A stacker 15 is housed in the main body 12 in a state where it can slide in the front-rear direction below the discharge port 12B.

[0010] The original document support 13 has a flat placement surface 13A that extends obliquely upward to the rear side of the main body 12 so that a plurality of original documents 14 can be placed thereon. The original document support 13 is provided with a pair of edge guides 13B that are slidable in the width direction X that intersects (particularly orthogonally) the conveyance direction Y1 in which the original document 14 is conveyed. The original document 14 stacked on the placement surface 13A is positioned in the width direction X with respect to the document feed port 12A by being sandwiched between the pair of edge guides 13B. Further, a slide-type auxiliary support portion 13C is provided on the placement surface 13A of the original document support 13 so as to be able to extend and retract. The original document 14 stacked on the placement surface 13A is positioned in the conveyance direction Y1 with respect to the document feed port 12A by coming into contact with the slide-type auxiliary support portion 13C. Note that the width direction X is the main scanning direction when the image reading device 11 reads the original document 14, and the direction opposite to the conveyance direction Y1 is the sub-scanning direction Y. Hereinafter, it is also referred to as the main scanning direction X.

[0011] The original document 14 placed on the original document support 13 is fed one by one into the main body 12 from the document feed port 12A that opens at the upper part of the main body 12. The fed original document 14 is conveyed along a predetermined conveyance path 29 (see FIG. 2) inside the main body 12, and after the image is read in the reading area SA during the conveyance, it is discharged from the discharge port 12B that opens at the lower front part of the main body 12.

[0012] A power button 20 is provided on the front surface portion 12C of the main body 12. A display portion 22, such as a liquid crystal panel, for displaying a predetermined image in a display area 23 is provided on the front surface portion 12C of the main body 12. Information such as menus, selection items, and the operation status of the image reading device 11 is displayed on the display portion 22. An operation portion 21, such as a touch panel, that can detect a touch operation by the user is provided on the display portion 22. The operation portion 21 is configured to input necessary information according to the touch operation of the user when giving an instruction to the image reading device 11.

[0013] As shown in FIG. 2, the main body 12 includes a main body portion 18 and a cover portion 19 pivotally connected about the front end portion of the main body portion 18. The main body 12 has a transport path 29 (transport passage) extending from the feed port 12A to the discharge port 12B between the main body portion 18 and the cover portion 19.

[0014] A transport mechanism 30 for transporting the document 14 is provided inside the main body 12. The transport mechanism 30 includes a feeding unit 30A that feeds the documents 14 stacked (set) on the document support 13 one by one into the main body 12 while guiding them, a transport unit 31 that transports the fed document 14 along the transport path 29 so as to pass through the reading area SA, and a discharge unit 32 that discharges the document 14 after the image has been read during the transport by the transport unit 31. The transport mechanism 30 has an automatic document feeder function for transporting a plurality of documents 14 stacked on the document support 13 one by one in order along the transport path 29 so as to pass through the reading area SA.

[0015] The feeding unit 30A includes one feeding roller 33 (pickup roller) facing the feeding guide 30B at the upstream end position of the transport path 29 inside the main body 12. The feeding unit 30A feeds a plurality of documents 14 stacked on the document support 13 one by one from the feed port 12A along the feeding guide 30B.

[0016] The transport unit 31 includes a pair of feeding rollers 34 disposed downstream of the feeding roller 33 in the transport direction Y1, and a pair of transport rollers 35 disposed upstream of the reading area SA in the transport direction Y1. The pair of feeding rollers 34 is composed of a driving roller 34A and a separating roller 34B (retard roller). The pair of transport rollers 35 is composed of a driving roller 35A and a driven roller 35B.

[0017] The discharge unit 32 includes a pair of discharge rollers 36 disposed downstream of the reading area SA in the transport direction Y1. The pair of discharge rollers 36 is composed of a driving roller 36A and a driven roller 36B. Note that the pair of discharge rollers 36 also participates in the transport of the document 14 during reading together with the pair of transport rollers 35.

[0018] Thus, in order from the upstream side in the conveyance direction Y1, a feed roller 33, a pair of feed rollers 34, a pair of conveyance rollers 35, and a pair of discharge rollers 36 are respectively arranged, and are arranged in pairs at intervals in the width direction X, respectively.

[0019] A plurality of rollers 33, 34A in the feeding system are rotationally driven by the power of a feeding motor 37 which is their power source. A plurality of original documents 14 stacked on the original document support 13 are fed one by one from the lowermost one into the main body 12 through the feed port 12A by the feed roller 33. Thus, the feeding unit 30A (rollers 33, 34A, etc.) is driven using the feeding motor 37 as a power source.

[0020] Also, a separation roller 34B in the feeding system and drive rollers 35A, 36A in the conveyance system are rotationally driven by the power of a conveyance motor 38 which is their power source. The original document 14 fed into the main body 12 by the feed roller 33 is conveyed to the reading area SA and then discharged from the discharge port 12B. Thus, the conveyance unit 31 (pair of conveyance rollers 34, etc.) and the discharge unit 32 (pair of discharge rollers 36, etc.) are driven using the conveyance motor 38 as a common power source.

[0021] Also, the drive rollers 35A, 36A are rotationally driven so as to convey the original document 14 at the same conveyance speed (reading speed) when reading the original document 14. Each driven roller 35B, 36B is rotated by the rotation of the drive rollers 35A, 36A with which they are paired.

[0022] Also, an encoder 44 (for example, a rotary encoder) capable of detecting the rotation of one drive roller in the conveyance system among a plurality of roller pairs 34 to 36 is provided inside the main body 12. The encoder 44 outputs a detection signal including a number of pulses proportional to the rotation amount of the drive roller to a control unit 50 (controller). Therefore, the control unit 50 can grasp the position (conveyance position) of the original document 14 being conveyed and the conveyance speed based on the detection signal of the encoder 44.

[0023] Also, between a pair of feed rollers 33, there is disposed an original sensor 45 for detecting the presence or absence of an original 14 set on the original support 13. At a position slightly downstream of the nip point of the pair of conveyance rollers 35 in the conveyance direction Y1, there is disposed an original presence / absence sensor 46 capable of detecting the presence or absence of the original 14. The control unit 50 detects, based on the detection signal (ON / OFF) of the original presence / absence sensor 46, that the leading end of the original 14 has passed through the pair of conveyance rollers 35 and that the trailing end of the original 14 has passed through the pair of conveyance rollers 35. The detection results of the original presence / absence sensor 46 detecting the leading end and the trailing end of the original 14 are used for control to determine the start and end timings of the reading operation of a reading unit 40 (40A, 40B) described later.

[0024] The image reading apparatus 11 includes a reading unit 40 for reading an original 14 inside the main body 12. The reading unit 40 is provided in a pair on both sides sandwiching the conveyance path 29 at a position between the pair of conveyance rollers 35 and the pair of discharge rollers 36 in the conveyance direction Y1. In the present embodiment, the pair of reading units 40 includes a first reading unit 40A for reading the front surface (lower surface) of the original 14 conveyed along the conveyance path 29 and a second reading unit 40B for reading the back surface (upper surface) of the original 14 conveyed along the conveyance path 29. The pair of reading units 40 are arranged at positions slightly shifted from each other in the conveyance direction Y1, but a configuration without one of the reading units may also be employed.

[0025] The pair of reading units 40 is composed of a light source 41 capable of irradiating light on the original 14 being conveyed by irradiating light on the reading area SA and an image sensor 42 capable of reading an image from the original 14. In the normal reading mode, only the first reading unit 40A performs the reading operation and the front surface of the original 14 is read, and in the double-sided reading mode, both the first reading unit 40A and the second reading unit 40B perform the reading operation and both sides (front and back surfaces) of the original 14 are read.

[0026] The light source 41 is composed of, for example, an LED, a fluorescent lamp, or the like. The image sensor 42 receives the reflected light of the light irradiated from the light source 41 by the original document 14, converts the received light into an electrical signal, and outputs a pixel signal having a value corresponding to the received light amount. Thus, the image sensor 42 is a sensor that reads an image. The image sensor 42 is, for example, a linear image sensor. The image reading apparatus 11 is capable of color scanning and monochrome scanning (gray-scale scanning). Hereinafter, the light source 41 and the image sensor 42 on the first reading unit 40A side may be referred to as the first light source 41A and the first image sensor 42A, and those on the second reading unit 40B side may be referred to as the second light source 41B and the second image sensor 42B.

[0027] The image sensor 42 is, for example, a contact type image sensor in which a plurality of photoelectric conversion elements are arranged in a row along the main scanning direction X. Further, specifically, the image sensor 42 is a CMOS (Complementary Metal Oxide Semiconductor) image sensor. The image sensor 42 photoelectrically converts the light received by each photoelectric conversion element and outputs a pixel signal having a value corresponding to the received light amount.

[0028] For example, in the case of double-sided reading, both sides of the original document 14 are read by the first image sensor 42A and the second image sensor 42B. Also, in the case of single-sided reading, the front surface of the original document 14 is read by the first image sensor 42A. The image sensors 42A and 42B have a reading area that is wider than the maximum original document size that the image reading apparatus 11 can read.

[0029] Further, a background plate 43 as an example of the background forming unit 60 is disposed at a position facing the image sensor 42 with the conveyance path 29 therebetween. The background plate 43 is disposed over a region wider than the conveyance region of the document 14 in the main scanning direction X within the reading target range of the reading unit 40. That is, the background plate 43 is disposed over a range slightly wider than the width of the document 14 of the maximum size in the main scanning direction X. The background plate 43 is disposed in a range including at least a region facing the reading ranges of the image sensors 42A and 42B in the main scanning direction X. The image sensors 42A and 42B read the background plate 43 in a region where the document 14 is not present. For this reason, the background plate 43 is read as the background of the document 14. That is, the background plate 43 has a function of forming the background of the document in the read image where the document 14 is read.

[0030] Here, the background plate 43 will be described with reference to FIGS. 3 and 5. As shown in FIG. 3, the background plate 43 is disposed at a position facing the image sensor 42 with the conveyance path of the document 14 therebetween. On a surface 43a of the background plate 43 facing the image sensor 42, a stripe pattern 61 shown in FIG. 5 is drawn.

[0031] As shown in FIG. 5, the stripe pattern 61 is, for example, a black-and-white stripe pattern. The stripe pattern 61 is a black-and-white stripe pattern in which lines constituting the stripe pattern are black lines BC and white lines WC extending in the sub-scanning direction Y and arranged alternately. The black lines BC and the white lines WC are arranged alternately in the main scanning direction X. The black lines BC and the white lines WC have the same thickness. Thus, the stripe pattern 61 that the background forming unit 60 causes the reading unit 40 to read includes black and white. Note that the stripe pattern 61 is not limited to a black-and-white two-color stripe pattern of black lines and white lines. For example, it may be a two-color stripe pattern of a dark color and a light color.

[0032] For example, set the density value to 100% from the lowest gradation value to the highest gradation value. In this case, the stripe pattern may be a two-color stripe pattern consisting of a first color indicated by a gradation value of 20% or less and a second color indicated by a gradation value of 80% or more. For example, in the case of 256 gradations, black has a gradation value of "0" (0%) and white has a gradation value of "256" (100%). Note that when the difference between the gradation values of the two colors is expressed as a percentage, it may be, for example, 60% or more. Also, the greater the difference in gradation values, the higher the detection accuracy for detecting the edge of the original 14I in the image data SD. In this regard, the difference between the gradation values of the two colors is preferably 80% or more rather than 60% or more. For example, it may be a stripe pattern composed of a combination of a first color indicated by a gradation value of 10% or less and a second color indicated by a gradation value of 90% or more.

[0033] As shown in FIG. 4, the image sensor 42 may be a one-dimensional image sensor including a long substrate 42s and a plurality of light receiving elements 42a arranged in a row along the main scanning direction X on the substrate 42s. The image sensor 42 is assembled in the image reading apparatus 11 in such a direction that the arrangement direction of the light receiving elements 42a is parallel to the main scanning direction X. In the present embodiment, the number of light receiving elements 42a included in the image sensor 42 is designated as A. Here, A is a value equal to or greater than the number of light receiving elements 42a that can be arranged within a range corresponding to the maximum width of the original that the image reading apparatus 11 can handle. A is, for example, a value within the range of 100 or more and 10,000 or less, but may also be a value less than 100 or exceeding 10,000. Note that in FIG. 5, for the sake of convenience of explanation, the number of light receiving elements 42a is drawn as being less than the actual number.

[0034] <Relationship between stripe pattern and light receiving elements> The respective widths W1 and W2 of the black line BC and the white line WC shown in FIG. 5 are, for example, the same. Since the widths W1 and W2 are the same, they are denoted as width W (W = W1 = W2). The width W is a width of at least one unit corresponding to the number of light-receiving elements 42a. In the present embodiment, the width W is a width of at least two units corresponding to the number of light-receiving elements 42a. Note that the width W is not limited to being a natural multiple of the width SW of one light-receiving element 42a, and may be a rational multiple of 1 or more of the width w of one light-receiving element 42a. Also, the widths W1 and W2 may be different values (W1 ≠ W2).

[0035] Here, the width W is a value within the range of 1 to 10 times the width w of one light-receiving element 42a, but may also be a value of 11 times or more the width w. That is, when expressed in terms of the number of light-receiving elements 42a, the width W may be a width corresponding to the number within the range of 1 to 10 units. In the present embodiment, the width W adopts a width corresponding to, for example, 2 to 6 units in terms of the number of light-receiving elements 42a.

[0036] Returning to FIG. 2, the image reading apparatus 11 includes a control unit 50. When a job for reading an image from the document 14 is input based on an operation signal from the operation unit 21 (see FIG. 1) operated by the user or a reading instruction signal (reading instruction) from the host apparatus 100 described later, the control unit 50 controls the image reading apparatus 11. When performing reading control, the control unit 50 controls the feeding motor 37, the conveyance motor 38, and the reading units 40A and 40B. The images of the document 14 are read by the reading units 40A and 40B.

[0037] <Electrical Configuration of Image Reading Apparatus 11> Next, with reference to FIG. 6, the electrical configuration of the image reading apparatus 11 will be described. As shown in FIG. 6, the image reading apparatus 11 is connected to the host apparatus 100 through a communication cable. The host apparatus 100 is, for example, a personal computer (hereinafter also referred to as "PC"). The host apparatus 100 includes an operation unit 101 and a display unit 102 that are electrically connected to its main body. The host apparatus 100 includes a scan driver 103 composed of software installed therein by installing a scan driver program. The scan driver 103 has a function of giving an instruction to read the document 14 to the image reading apparatus 11. The scan driver 103 transmits reading instruction information (scan job data) including reading condition information and various commands specified by the user through the operation of the operation unit 101 of the host apparatus 100 to the image reading apparatus 11. Further, the scan driver 103 receives the image data of the document 14 from the image reading apparatus 11. Note that the host apparatus 100 is not limited to a PC, and may be a smart device such as a personal digital assistant (PDA), a tablet PC, or a smartphone.

[0038] The reading conditions are set by the user operating the operation unit 21 or the operation unit 101 of the host apparatus 100. The reading conditions include the document size, the reading resolution, the reading color (monochrome / color), single-sided reading / double-sided reading, and the like. Examples of the document size include A4 size and B5 size. Examples of the reading resolution include 300 dpi / 600 dpi. The reading color includes monochrome (grayscale) / color.

[0039] The image reading device 11 includes a control unit 50. The control unit 50 includes a computer 51 composed of a microprocessor or the like. The computer 51 includes a storage unit 52 (memory) composed of a RAM and a non-volatile memory or the like. The storage unit 52 stores a program PR. The program PR includes programs shown in the flowcharts of FIGS. 18 and 19. The control unit 50 is not limited to performing software processing for all the processes it executes. For example, the control unit 50 may include a dedicated hardware circuit (e.g., an application-specific integrated circuit: ASIC) that performs hardware processing for at least a part of the processes it executes. That is, the control unit 50 can be configured as a circuitry including one or more processors that operate according to a computer program (software), one or more dedicated hardware circuits that execute at least a part of various processes, or a combination thereof. The processor includes a CPU and memories such as a RAM and a ROM, and the memories store program codes or instructions configured to cause the CPU to execute processes. The memory, that is, the computer-readable medium, includes any available medium accessible by a general-purpose or dedicated computer.

[0040] The control unit 50 includes an input unit 56 composed of an input interface and an output unit 57 composed of an output interface. The input unit 56 inputs various data and signals from the host device 100. The output unit 57 outputs the image data SD (see FIG. 7) read by the image reading device 11 to the host device 100.

[0041] Furthermore, the control unit 50 includes a timing generator 54 (hereinafter also referred to as "TG54"). The TG54 outputs a pulse signal that defines various operation timings including a reading operation for the image sensors 42A and 42B. The control unit 50 also includes an analog front end 55 (hereinafter also referred to as "AFE55"). The AFE55 performs analog / digital conversion (A / D conversion) on the pixel signals input from the image sensors 42A and 42B.

[0042] When the computer 51 executes the program PR, as a functional part composed of software configured inside, it includes a main control unit 70, a conveyance control unit 71, a reading control unit 72, an image processing unit 73, and an original area detection unit 74. The main control unit 70 comprehensively controls the image reading device 11.

[0043] The conveyance control unit 71 drives and controls the feeding motor 37 and the conveyance motor 38 to feed the originals 14 set on the original support 13 one by one. By the rotation of each of the feeding roller 33, the pair of feeding rollers 34, the pair of conveyance rollers 35, and the pair of discharge rollers 36, the original 14 is conveyed along the conveyance path at a predetermined speed. The original 14 is conveyed through the reading area SA in the middle of the conveyance path 29 at a reading speed corresponding to the reading resolution (for example, 300 / 600 dpi). For example, when the reading resolution is the relatively high first reading resolution (for example, 600 dpi), the original 14 is conveyed at a low speed. On the other hand, when the reading resolution is the relatively low second resolution (for example, 300 dpi), the original 14 is conveyed at a high speed.

[0044] The reading control unit 72 controls the reading unit 40 via the TG54. The reading unit 40 reads the image of the original 14. In particular, the reading control unit 72 outputs a pulse signal that defines the operation timing of the reading operation to the TG54 for the image sensor 42. The reading control unit 72 controls the light emission of the light source 41 via a light source drive unit (not shown) and irradiates the reading area SA with light from the light source 41.

[0045] The image processing unit 73 inputs the digital signal of the image read by the reading unit 40 via the AFE55. The image processing unit 73 performs known correction processing such as shading correction on the image data based on the input digital signal to generate the image data SD of the original 14. The image processing unit 73 performs various corrections such as gamma correction in addition to shading correction. Also, the image processing unit 73 generates the image data of the original before being converted into the specified format from the read data. The output unit 57 transmits the file generated by the image processing unit 73 by converting the image data into the specified format to the host device 100 connected through a communication cable (not shown).

[0046] The original document area detection unit 74 performs a process of detecting the original document area DA in the image data SD. The original document area detection unit 74 detects the original document area DA by discriminating between the original document area DA and the background area BA based on the image data SD. Details of the original document area detection unit 74 will be described later.

[0047] The image processing unit 73 performs predetermined processing on the image data SD read by the reading unit 40 from the original document 14. The image processing unit 73 includes a tilt correction processing unit 75, a cutting-out processing unit 76, and a rotation processing unit 77. Since the processes of the two reading units 40 for reading the original document 14 are basically the same, hereinafter, without distinguishing between the front and the back, they are treated as the image data SD.

[0048] The tilt correction processing unit 75 performs a tilt correction process for correcting the tilt of the original document area DA detected by the original document area detection unit 74. The cutting-out processing unit 76 performs a cutting-out process for cutting out the original document area DA from the image data SD. By this cutting-out process, the image data of the original document 14I (see FIG. 7) is generated.

[0049] The rotation processing unit 77 performs a rotation process for rotating the image data of the original document 14I. By the rotation process, the orientations of the image data of the original document 14I are aligned. The computer 51 executes the program PR shown in the flowcharts in FIGS. 18 and 19 stored in the storage unit 52. In the present embodiment, the original document area detection unit 74 is configured by the computer 51 that executes the original document area detection process shown in FIG. 18. In this case, the original document area detection unit 74 is configured as software. Also, the processing content of the program PR may be written in an electronic circuit such as an ASIC. In this case, the original document area detection unit 74 is configured as hardware.

[0050] <Regarding the image data> Next, referring to FIG. 7, the image read by the image sensor 42 will be described. FIG. 7 shows the image data SD (also referred to as "image SD") read by the image sensor 42. The image data SD includes a document area DA and a background area BA. The document area DA is the area in the image data SD where the document 14I of the document 14 is located. The background area BA is the area that serves as the background other than the document area DA in the image (reading range). In the present embodiment, in the background area BA, a stripe pattern 62 in which a black line BC and a white line WC drawn on the read surface 43a of the background plate 43 are read is formed. The stripe pattern 62 that appears in the background area BA is configured by alternately arranging black lines BL and white lines WL extending along the sub-scanning direction Y in the main scanning direction X. That is, the stripe pattern 62 is a vertical stripe pattern 620 in which stripes extend along the sub-scanning direction Y. In FIG. 7, the image sensor 42 is shown by a two-dot chain line. The image sensor 42 reads the background plate 43 as the background forming unit 60 as a background including the stripe pattern 62 as an example of a pattern having a specific period.

[0051] The image data SD shown in FIG. 7 is a dot image formed by a large number of pixels (dots). Each pixel constituting the image data SD has a luminance value corresponding to the amount of light received by one light-receiving element 42a of the image sensor 42 shown in FIGS. 3 and 4 for each scanning column.

[0052] Here, the image reading device 11 is provided with two reading modes: a high-resolution mode and a low-resolution mode. In the high-resolution image data SD read in the high-resolution mode, the amount of light received by one light-receiving element 42a corresponds to the luminance value of one pixel in the image data SD. In the low-resolution image data SD read in the low-resolution mode, the average value of the luminance values of a total of four (2×2) pixels, two by two in two directions XY, corresponds to the luminance value of one pixel in the image data SD. Note that the luminance value of one representative pixel at a predetermined position among the total of four 2×2 pixels may correspond to the luminance value of one pixel in the low-resolution image data SD.

[0053] <Regarding the luminance change in the main scanning direction X> Next, with reference to FIG. 8, the change in the luminance value in the main scanning direction X intersecting the stripe direction in the image data SD will be described. In the graph shown in FIG. 8, the horizontal axis represents the pixel position x in the main scanning direction X, and the vertical axis represents the luminance value.

[0054] As shown in the graph of FIG. 8, the luminance value in the background region BA varies in a short period (short-period variation) peculiar to the stripe pattern 62. Here, the short-period variation means that the luminance value varies between the low value of the black line BL and the high value of the white line WL in a short period corresponding to the short pitch between both lines due to the stripe pattern 61 within the background region BA. When the stripe pattern 62 is distinct, the luminance value of each pixel rides on a rectangular wave that changes stepwise (see FIG. 10) according to the low value of the black line BL and the high value of the white line WL. When the stripe pattern 62 is unclear and includes blurring, since a gray line with an intermediate density appears between the black line BL and the white line WL of the stripe pattern 62, the luminance value of each pixel rides on a sine wave that changes in a sine curve shape (see FIG. 12).

[0055] On the other hand, in the document region DA shown in the graph of FIG. 8, the luminance value mainly depends on the background color of the document 14. Also, even if there are characters or pictures drawn on the document 14, there is no regular periodic variation in the luminance value like the stripe pattern 62 in the background region BA. Therefore, it takes a substantially constant luminance value depending on the background color of the document 14.

[0056] In the graph of FIG. 8, the luminance value of the document region DA takes a constant high value indicated by the graph line DL1 when the background color of the document 14I is a white system color. Also, the luminance value of the document region DA takes a constant medium value indicated by the graph line DL2 when the background color of the document 14I is an intermediate color. Furthermore, the luminance value of the document region DA takes a constant low value indicated by the graph line DL3 when the background color of the document 14I is a dark system color.

[0057] <Calculation method of determination value using luminance value in document region detection process> Next, with reference to FIG. 9, the determination value used to detect the manuscript area will be described. FIG. 9 is an enlarged view showing a portion of the stripe pattern 62 of the background area BA at the pixel level. In FIG. 9, one square partitioned by a dashed line corresponds to one pixel. In the example shown in FIG. 9, the width W of the stripe pattern 61 corresponds to the width of four light-receiving elements 42a. Therefore, in the image data SD shown in FIG. 9, the widths of the black lines BL and the white lines WL that constitute the stripe pattern 62 are each four pixels wide.

[0058] The control unit 50 uses M pixels that are three or more consecutive pixels in the intersection direction (horizontal direction in FIG. 9) intersecting the stripe direction (vertical direction) of the stripe pattern 62 as one unit. The control unit 50 obtains a short-period variation value having a value corresponding to the amount of short-period variation of the luminance value peculiar to the stripe pattern 62 for each unit based on the luminance values of the M pixels that are one unit. The control unit 50 obtains the short-period variation value for all the pixels of the image data SD as the target pixel. The control unit 50 discriminates between the manuscript area DA and the background area BA in the image data SD using the short-period variation value as the determination value H. That is, the control unit 50 detects the manuscript area DA in the image data SD using the short-period variation value as the determination value H.

[0059] Here, assuming that the two widths 2w of the black line BL and the white line WL, which are the constituent colors of the stripe pattern 62, are one cycle, the number M of pixels in one unit is larger than half the number of pixels N in one cycle of the stripe pattern 62 (half the number of half-cycles) (M > N / 2).

[0060] The control unit 50 calculates a determination value H (short-period variation value) used for determining the presence or absence of short-period variation according to a predetermined arithmetic expression using the luminance values of M consecutive pixels including one target pixel in the image data SD at the center. That is, in FIG. 9, while moving one target pixel sequentially in the intersection direction (horizontal direction in FIG. 9), a predetermined calculation using the luminance values of M consecutive pixels including the target pixel is performed to calculate the determination value H.

[0061] Here, the stripe pattern 61 that the background forming unit 60 causes the reading unit 40 to read is a two-tone stripe pattern of light and shade. Specifically, the stripe pattern 61 on the background plate 43 is a two-tone stripe pattern of black and white. When the stripe pattern 61 of the background forming unit 60 is a two-tone stripe pattern of light and shade, if the stripe pattern 62 in the image data SD obtained by reading the document 14 is clear, the stripe pattern 62 in the image data SD will also be a two-tone stripe pattern of light and shade. On the other hand, even when the stripe pattern 61 of the background forming unit 60 is a two-tone stripe pattern of light and shade, if the stripe pattern 62 in the image data SD obtained by reading the document 14 is unclear, the stripe pattern 62 in the image data SD will be a stripe pattern 62 with a gradation of three or more tones of light and shade due to image blurring. Whether the stripe pattern 62 is clear or unclear is generally determined according to the model of the image reading apparatus 11, the reading resolution, and the like.

[0062] When calculating the determination value H, the control unit 50 includes at least one of a first arithmetic expression for the case where the stripe pattern 62 is clear and a second arithmetic expression for the case where the stripe pattern 62 is unclear, depending on whether the stripe pattern 62 in the image data SD is a clear model or an unclear model. Further, when calculating the determination value H, the control unit 50 includes at least one of a first arithmetic expression used when the stripe pattern 62 is clear and a second arithmetic expression used when the stripe pattern 62 is unclear, depending on whether the stripe pattern 62 in the image data SD is a high-resolution mode where the stripe pattern 62 is clear or a low-resolution mode where the stripe pattern 62 is unclear.

[0063] When the stripe pattern 62 in the image data SD is clear, the control unit 50 uses a first arithmetic expression created on the premise that there is a two-tone stripe pattern 62 of light and shade. The control unit 50 uses the first arithmetic expression to calculate a first determination value H1 as the determination value H.

[0064] An example of the first arithmetic expression is shown below. In this example of the first arithmetic expression, the number of pixels M per unit is set to M = 7. H1 = max{abs(n - average(n - 1, n - 2, n - 3)), abs(n - average(n + 1, n + 2, n + 3))} …(1) Here, n in the formula indicates the luminance value of the pixel of interest. For the luminance values of the pixels other than the pixel of interest among the M pixels, the number indicating the position of the pixel in the minus direction and the plus direction with respect to the pixel of interest is shown with a plus / minus sign. For example, n - 2 indicates the luminance value of the second pixel on the minus side with respect to the pixel of interest. The luminance values of a total of 7 pixels are used, including the luminance value of the pixel of interest, the luminance values of the pixels up to 3 adjacent pixels on the minus side with the pixel of interest as the central position, and the luminance values of the pixels up to 3 adjacent pixels on the plus side. The control unit 50 calculates the determination value H1 based on the above formula (1) using the luminance values n - 3, n - 2, n - 1, n, n + 1, n + 2, n + 3 of the 7 pixels.

[0065] The control unit 50 determines the presence or absence of short-period fluctuations specific to the stripe pattern 62 from the comparison result between the determination value H1 and the threshold value Hs1. That is, if H1 > Hs1, it is determined that there are short-period fluctuations. On the other hand, if H1 ≤ Hs1, it is determined that there are no short-period fluctuations. In other words, the control unit 50 determines that the pixel of interest belongs to the background area BA if the determination value H1 is greater than the threshold value Hs1 (H1 > Hs1). On the other hand, if the determination value H1 is less than or equal to the threshold value Hs1 (H1 ≤ Hs1), the control unit 50 determines that the pixel of interest belongs to the document area DA. The control unit 50 determines the switching between the background area BA and the document area DA based on the position where the presence or absence of short-period fluctuations switches. The control unit 50 detects the edge of the document area DA (document 14I) based on the position of the pixel of interest where the presence or absence of short-period fluctuations switches.

[0066] It is also possible to calculate the determination value H1 and perform the determination using the determination value H1 for all the pixels of the image data SD as the pixel of interest. Further, instead of all the pixels of the image data SD, it is also possible to calculate the determination value H1 and perform the determination using the determination value H1 until the document area DA can be specified. That is, when the document area DA can be specified as a result of the determination using the determination value H1, the calculation and determination of the determination value H1 may be terminated.

[0067] <Arithmetic expression used in the case of a two-tone stripe pattern> Here, referring to FIG. 10, a first arithmetic expression applied when the stripe pattern 62 is distinct will be described. The control unit 50 calculates, using the luminance values of M pixels, a value corresponding to the amount of short-period variation as a determination value H1 by the first arithmetic expression represented by the above equation (1). Here, M is larger than the number of pixels for a half period, which is 1 / 2 of the period (short period) of the stripe pattern 62. In the example shown in FIG. 9, one period of the stripe pattern 62 is 8 pixels, which is the sum of 4 pixels of the black line BL and 4 pixels of the white line WL. The half period of the period of the stripe pattern 62 is 4 pixels. M is set to a number greater than 4 (M>4). In the first arithmetic expression represented by the above equation (1), among the values satisfying M>4, M = 7 is adopted.

[0068] As shown in FIG. 10, in the two-color shade stripe pattern 62, four low-luminance pixels belonging to the black line BL and four high-luminance pixels belonging to the white line WL are arranged alternately. In the graph of FIG. 10, the pixel with the luminance value n is the pixel of interest.

[0069] In the first arithmetic expression of the above equation (1), as shown in FIG. 10, the average value of k pixels (where k=(M - 1) / 2) on one side (minus side) of both sides of the pixel of interest in the crossing direction (main scanning direction X) and the average value of k pixels on the other side (plus side) are obtained. Further, in this first arithmetic expression, the larger value of the two difference values Δ1 and Δ2, which are the differences between the respective average values ave1 and ave2 and the luminance value n of the pixel of interest, is selected. In other words, when M is an odd number, the first arithmetic expression is the difference Δ1 between the average value ave1 of the luminance values of (M - 1) / 2 pixels on the minus side with respect to the pixel of interest and the luminance value n of the pixel of interest, and the difference Δ2 between the average value ave1 of the luminance values of (M - 1) / 2 pixels on the plus side with respect to the pixel of interest and the luminance value n of the pixel of interest. The larger value is set as the determination value H1. This determination value H1 is a short-period variation value indicating a value corresponding to the amount of short-period variation peculiar to the stripe pattern 62. The control unit 50 determines the presence or absence of short-period variation based on the comparison result between the determination value H1 and the first threshold value Hs1.

[0070] The above formula (1) is an example where k (= (M - 1) / 2) is 3. In this case, the determination value H1 takes a value of 2 / 3 or more of the difference between the black luminance value and the white luminance value. For example, in the example shown in FIG. 10, when the black luminance value is 80 and the white luminance value is 180, the determination value H1 takes a value of approximately 67 or more.

[0071] On the other hand, assume that the pixel of interest has moved out of the background area BA with the stripe pattern 62 and is located at the edge of the document area DA. At this time, the black-and-white combination of the three pixels on the document area DA side with respect to the pixel of interest deviates from the combination when it is in the background area BA. That is, the luminance values of the three pixels on the document area DA side no longer satisfy the short-period variation. The determination value H1 generally becomes a value of 33 or less. Therefore, the first threshold value Hs1 is set to 50, for example. Then, the pixel of interest is in the background area BA when H1 > Hs1, and in the document area DA when H1 ≤ Hs1. From the comparison result between the determination value H1 and the first threshold value Hs1, the document area DA can be detected.

[0072] Here, with reference to FIG. 8, the determination value H1 based on the luminance value of the pixel in the document area DA will be described. As can be seen from the graph shown in FIG. 8, in the document area DA, since the luminance value of the pixel mainly depends on the background color of the document 14I, it is generally a constant value. When the background color of the document 14I is a white system, like the graph line DL1 shown by the solid line in FIG. 8, the luminance value takes a constant value of a high value. When the background color of the document 14I is an intermediate color, like the graph line DL2 shown by the one-dot chain line in FIG. 8, the luminance value takes a constant value of a medium value. When the background color of the document 14I is a dark color system, like the graph line DL3 shown by the two-dot chain line in FIG. 8, the luminance value takes a constant value of a low value. Thus, within the document area DA, the luminance value generally takes a constant value, and there is no or little short-period variation. Therefore, the determination value H1 based on the first arithmetic formula becomes 0 (zero) or a small value. And at the edge of the document area DA, by using the luminance value of the pixel within the document area DA, the determination value H1 becomes less than or equal to the first threshold value Hs1 (H1 ≤ Hs1). The control unit 50 determines, for example, the pixel of interest at the switching of the presence or absence of short-period variation as the edge of the document area DA.

[0073] The stripe pattern 62 that the background forming unit 60 causes the reading unit 40 to read is a two-tone stripe pattern. In the high-resolution mode, the original document 14 is conveyed at a low speed. Therefore, the stripe pattern 62 read by the reading unit 40 from the background plate 43 is relatively difficult to blur. In the stripe pattern 62 within the background area BA, the boundary between the black line BL and the white line WL is distinct. The distinct stripe pattern 62 is a two-tone (e.g., black and white) stripe pattern. Therefore, as shown in FIG. 9, when it is the two-tone stripe pattern 62 of the black line BL and the white line WL, the first arithmetic expression is used to calculate the determination value H1.

[0074] On the other hand, in the low-resolution mode, the original document 14 is conveyed at a high speed. Therefore, the stripe pattern 62 read by the reading unit 40 from the background plate 43 is likely to blur. Also, the image sensor 42 is focused on the surface to be read of the original document 14. Therefore, the stripe pattern 62 read from the surface 43a to be read of the background plate 43, which is at a position farther from the surface to be read of the original document 14, is likely to blur. Due to the blurring of the background in the image data SD, as shown in FIG. 11, a line ML of intermediate density (e.g., gray color) is formed at the boundary between the black line BL and the white line WL in the stripe pattern within the background area BA. In this case, the first arithmetic expression cannot be adopted for the detection of the original document area DA.

[0075] <Regarding the calculation formula in the case of a stripe pattern of three or more tones> As shown in FIG. 11, when the stripe pattern is a multi-color (three or more colors) stripe pattern 62 including a line ML of intermediate density between the black line BL and the white line WL, the second arithmetic expression is used to calculate the determination value H (the second determination value H2). An example of the second arithmetic expression is shown below.

[0076] H2 = Δn-1 + Δn + Δn+1 …(2) However, Δnx = abs(n-x - n+x), (x is an integer) Here, in the above formula (2), since x is -1, 0, 1, Δn-1 = abs(n-2 - n), Δn = abs(n-1 - n+1), Δn+1 = abs(n - n+2).

[0077] As described above, the stripe pattern 61 that the background forming unit 60 (background plate 43) causes the reading unit 40 to read is a two-tone stripe pattern. However, when the background of the original 14I in the image data SD when the reading unit 40 reads the original 14 becomes a stripe pattern 62 including three or more colors with one or more intermediate densities between the two tones. In this case, the control unit 50 uses the second arithmetic expression shown in the above formula (2) created on the premise that the stripe pattern 62 in the image data SD is a multi-color stripe pattern of three or more colors. The control unit 50 calculates a second determination value H2 as a determination value using the second arithmetic expression.

[0078] The second arithmetic expression includes an expression for obtaining a difference value between the luminance values of two pixels located adjacent to each pixel for M - 2 pixels closer to the center excluding the two end pixels out of M pixels using the luminance values of M pixels. The second arithmetic expression is given by an expression for obtaining a total value obtained by summing the difference values between the luminance values of two adjacent pixels for each pixel in one unit. The control unit 50 determines whether the pixel of interest belongs to the background area BA or the original area DA based on the comparison result between the second determination value H2 indicated by the total value and the second threshold value Hs2. The control unit 50 determines, for example, a pixel of interest at the switching of the presence or absence of short-period fluctuations as the end of the original area DA.

[0079] Here, with reference to FIG. 12, the arithmetic expression shown by this formula (2) will be described. In the above formula (2), M = 5, and a unit of five pixels is used. A unit of pixels is a total of five pixels (M = 5) including the pixel of interest, two pixels on the minus side with respect to the pixel of interest, and two pixels on the plus side. As shown in the graph of FIG. 12, the luminance values of the pixels of the stripe pattern of three or more tones are generally located on a sine curve. In this graph, the pixel with the luminance value n is the pixel of interest. And the pixels with the luminance values n - 1 and n + 1 are the pixels adjacent to the front and rear of the pixel of interest. The differences Δnx between the luminance values n - x and n + x of the pixels before and after each of these three pixels are calculated. The three differences Δn - 1, Δn, Δn + 1 are calculated by Δn - 1 = abs(n - 2 - n), Δn = abs(n - 1 - n + 1), Δn + 1 = abs(n - n + 2). As can be seen from the graph of FIG. 12, when the point of the luminance value lies on the sine curve, the three difference values Δn - 1, Δn, Δn+1 takes a relatively large value. That is, at least two of the three difference values take relatively large values corresponding to the slope of the large part of the sine curve gradient. Therefore, the determination value H2 indicated by the sum (total value) of the three difference values Δn-1, Δn, and Δn+1 is likely to take a relatively large value. The threshold value Hs2 is set to a value smaller than the minimum value that the second determination value H2 determined from the above formula (2) can take.

[0080] Summarizing the above, the control unit 50 (specifically, the document area detection unit 74) executes the following as the document area detection process. The control unit 50 uses different arithmetic expressions depending on whether the reading resolution at which the reading unit 40 reads the document 14 is the first resolution or the second resolution with a lower resolution than the first resolution. When it is the first resolution, the control unit 50 calculates the first determination value H1 using the first arithmetic expression shown in the above formula (1) based on the luminance values of M pixels. When it is the second resolution, the control unit 50 calculates the second determination value H2 using the second arithmetic expression shown in the above formula (2) based on the luminance values of M pixels. Then, the control unit 50 detects the document area DA based on the comparison result between the first determination value H1 and the first threshold value Hs1, or the comparison result between the second determination value H2 and the second threshold value Hs2. The control unit 50 of the present embodiment generates determination image data HD in which the luminance values of the image data SD are replaced with the determination value H. The control unit 50 performs the comparison process between the determination value H and the threshold value Hs by binarizing the determination image data HD with the threshold value Hs. The details of this binarization process will be described later.

[0081] <Regarding image processing> Next, with reference to FIG. 13, image processing will be described. FIG. 13 shows determination image data HD with the determination value H as the pixel value. In the determination image data HD, the background area BA is close to white because the determination value H is high. The document area DA is close to black because the determination value H is low. The black characters in the document area DA deviate from the short-period variation peculiar to the stripe pattern 62, so the determination value H is low and, for example, becomes gray. As shown in FIG. 13, in the determination image data HD, the background area BA and the document area DA are separated by the difference in the determination value H.

[0082] FIG. 14 shows an example of actual image data SD obtained by reading manuscript 14. In the image data SD, there is a short-period stripe pattern 62 in the background area BA. The stripe pattern 62 is, for example, a vertical stripe pattern 620.

[0083] FIG. 15 shows a binarized image D2 obtained by binarizing the determination image data HD shown in FIG. 14. The binarized image D2 is an image obtained by binarizing the determination image data HD with a threshold value Hs. The determination image data HD is short-period fluctuation value data having a short-period fluctuation value as a pixel value. Therefore, in the binarized image D2, pixels satisfying H>Hs are shown in white, and pixels satisfying H≦Hs are shown in black.

[0084] <Glass stain detection process> Next, with reference to FIGS. 16 and 17, the glass stain detection process will be described. FIG. 16 is a graph showing the luminance values of the image data SD. The horizontal axis represents the pixel position x, and the vertical axis represents the luminance value. FIG. 17 shows a graph showing the moving average value of the luminance values of the image data SD.

[0085] The control unit 50 may obtain the moving average value of the luminance values of N pixels for each unit (N pixels) using the luminance values of each pixel of the image data SD shown in FIG. 16. Here, N is the number of pixels corresponding to the fluctuation period of the stripe pattern 62. That is, the stripe pattern 62 has a fluctuation period of the sum of the width w1 of the black line BL and the width w2 of the white line WL. In the present embodiment, since w1 = w2, the fluctuation period is 2w. N is the number of pixels within a range of a distance 2w in the direction intersecting the stripes (for example, the main scanning direction X). In the example shown in FIG. 17, a spike DS at the end of the manuscript area DA and a spike GD of glass stain appear in the graph of the moving average line.

[0086] The control unit 50 detects spikes DS and GD based on the comparison result between the moving average value and the third threshold value. The control unit 50 may detect, as stains on the glass surface of the reading unit 40, pixels other than the pixels of the spike DS at the end of the manuscript area DA among the pixels specified by the spikes DS and GD.

[0087] <Operation of the First Embodiment> Next, the operation of the image reading apparatus 11 will be described. The user sets the document 14 on the placement surface 13A of the document support 13 of the image reading apparatus 11. The user sets the reading conditions for the image reading apparatus 11 by operating the operation unit 21 of the image reading apparatus 11 or the operation unit 101 of the host apparatus 100. Specifically, the operation units 21 and 101 are operated to select the reading conditions including the reading resolution (e.g., 600 dpi / 300 dpi, etc.), the reading color (color / grayscale), and the reading method (single-sided reading / double-sided reading). The user operates the operation units 21 and 101 to instruct the execution of scanning. When the control unit 50 receives the scanning instruction, it starts reading the set document 14.

[0088] The conveyance control unit 71 in the control unit 50 drives and controls the motors 37 and 38 which are the drive sources of the conveyance mechanism 30. The documents 14 set on the placement surface 13A are fed one by one in order from the lowermost layer. When the first reading resolution is specified, the control unit 50 conveys the document 14 at a low speed. When the second reading resolution is specified, the control unit 50 conveys the document 14 at a high speed.

[0089] The reading unit 40 reads the document 14 in the reading position during conveyance. Specifically, the image sensor 42 reads the document 14. At this time, the image sensor 42 reads the document 14 and the background plate 43 which is the background thereof.

[0090] The reading signal output from the image sensor 42 is input to the image processing unit 73 as image data SD via the AFE 55. As shown in FIG. 7, the image data SD includes a document area DA and a background area BA. For example, when skew occurs during conveyance of the document 14, as shown in FIG. 13, the document 14I tilts. As a result, a tilt correction process for correcting the tilt of the tilted document 14I in the image data SD is performed. In addition, a cutout process and a rotation process of the document 14I are performed. In order to perform these tilt correction process, cutout process, and rotation process, it is necessary to detect the document area DA in which the document 14I is located in the image data SD. In the present embodiment, the control unit 50 (computer 51) detects the document area DA by executing the program PR of the image area detection process shown in FIG. 18. That is, the document area detection unit 74 composed of software performs the image area detection process.

[0091] Hereinafter, with reference to FIG. 18, the image area detection process executed by the control unit 50 (computer 51) will be described. First, in step S11, the control unit 50 acquires an image (image data SD). For example, the computer 51 reads out the image data SD shown in FIGS. 7 and 14 from the storage unit 52. The image data SD includes the document 14I having a stripe pattern 62 with a specific period as a background by causing the reading unit 40 to read the document 14. The stripe pattern 62 is an example of a pattern having a characteristic period.

[0092] In step S12, the control unit 50 calculates the short-period variation value for all pixels of the image. The short-period variation value is a determination value for determining the presence or absence of short-period variation peculiar to the stripe pattern 62. Specifically, the computer 51 performs a calculation process for the determination value H using, as a unit, three or more consecutive M pixels in the intersection direction intersecting the stripe direction of the stripe pattern 62 in the image data SD. The computer 51 performs a determination process for determining, for each unit, the presence or absence of short-period variation, which is a periodic variation of the luminance value peculiar to the stripe pattern 62, based on the luminance values of the M pixels for each unit. Note that the intersection direction intersecting the stripe direction of the stripe pattern 62 corresponds to the direction having the period of the pattern. The direction having the period of the pattern is the direction (repetition direction) in which a specified pattern, which is an element of the pattern, is repeated at a specific period.

[0093] Here, the control unit 50 uses a predetermined arithmetic expression according to whether the stripe pattern 62 in the image data SD is clear or unclear. The arithmetic expression to be used is predetermined according to the model of the image reading device 11 and the reading resolution. For example, in an example where the arithmetic expression to be used is predetermined according to the reading resolution, the control unit 50 performs the following processing. When the reading resolution is the first resolution, the control unit 50 conveys the document 14 at a low speed. For this reason, since the background in the image data SD is not blurred, the background becomes a stripe pattern 62 of two shades of light and dark. In this case, the control unit 50 calculates a first determination value H1 as the short-period variation value based on, for example, the first arithmetic expression represented by the above formula (1). On the other hand, when the reading resolution is the second resolution, the control unit 50 conveys the document 14 at a high speed. For this reason, since the background in the image data SD is blurred, the background becomes a stripe pattern 62 of three or more shades of light and dark with gradation. In this case, the control unit 50 calculates a second determination value H2 as the short-period variation value based on, for example, the second arithmetic expression represented by the above formula (2). The control unit 50 generates determination image data HD (short-period variation value data) shown in FIG. 13 by replacing, for example, the luminance value of the image data SD with the short-period variation value.

[0094] In step S13, the control unit 50 binarizes the short-period variation value. The control unit 50 performs a binarization process of binarizing the determination image data HD having the short-period variation value as a pixel value with a threshold value Hs. As a result, a binarized image D2 shown in FIG. 15 is obtained from the determination image data HD via the image data SD shown in FIG. 14.

[0095] In step S14, the control unit 50 detects the document area. As shown in FIG. 15, in the binarized image D2, the background area BA and the document area DA are separated into areas by binary values. The control unit 50 detects the document area DA from the binarized image D2. The control unit 50 acquires, for example, a rectangular document area DA so as to include the outermost pixel among the pixel group indicating the edge of the document area DA.

[0096] Here, by the processes of steps S13 and S14, the control unit 50 performs a discrimination process of discriminating the document area DA and the background area BA based on the position where the presence or absence of a plurality of units of short-period variation obtained from the image data SD is switched. Thus, the discrimination process may be performed by a binarization process like the process of step S13.

[0097] In this way, as a result of the image area detection process, the document area DA is detected. Next, the control unit 50 performs an inclination correction process, a cut-out process, a rotation process, etc. on the document 14I specified from the document area DA in the image data SD.

[0098] Next, with reference to FIG. 19, the glass stain detection process will be described. First, in step S21, the control unit 50 acquires an image (image data SD). In step S22, the control unit 50 calculates a moving average using N pixels that is the fluctuation period of the background stripes. That is, the control unit 50 calculates a moving average value using the luminance values of N pixels corresponding to the fluctuation period of the stripe pattern 62 in the background area BA. Here, in the case of a two-color stripe pattern, the fluctuation period is represented by w1 + w2 using the width w1 of the black line BL and the width w2 of the white line WL. When w1 = w2, the fluctuation period is 2w. The number of pixels located within the width of this fluctuation period (for one period) is N. The control unit 50 calculates a moving average value using the luminance values of N pixels. The control unit 50 performs this calculation of the moving average value for all the pixels of the image data SD. As a result, the calculation result of the moving average value shown in FIG. 17 is obtained. As shown in FIG. 17, a plurality of spikes GD, DS appear in the graph of the moving average value.

[0099] In step S23, the control unit 50 detects, as glass stains, those other than the edges of the original document among the spikes obtained from the moving average value. As shown in FIG. 17, among the spikes, there are a spike DS indicating the edge of the original document 14I and a spike GD indicating glass stains. Here, the position of the spike DS indicating the edge of the original document 14I has been obtained in the above-described original document area detection process. Therefore, the control unit 50 detects, as glass stains, the spikes GD other than the spike DS among all the spikes.

[0100] As a result of the glass stain detection process in this way, the control unit 50 detects glass stains. Next, the control unit 50 displays, on the display units 22, 102, information such as a message prompting the user to clean the glass of the reading unit 40.

[0101] According to this embodiment, the following effects can be obtained. (1-1) The image reading device 11 includes a reading unit 40 capable of reading an image of the document 14. The background forming unit 60 causes the reading unit 40 to read a background including a stripe pattern 61 having a specific period. The control unit 50 sets, in the image data SD obtained by the reading unit 40 reading the document 14, three or more consecutive M pixels in the intersection direction intersecting the stripe direction of the stripe pattern 62 as one unit. The control unit 50 determines, for each unit, the presence or absence of short-period fluctuations, which are periodic fluctuations in luminance values specific to the stripe pattern 62, based on the luminance values of the M pixels in each unit. The control unit 50 discriminates the document area DA and the background area BA based on the positions at which the presence or absence of short-period fluctuations in a plurality of units obtained from the image data SD switches. According to this configuration, the presence or absence of short-period fluctuations in the stripe pattern 62 is determined for each M-pixel unit (one unit), and the document area DA and the background area BA are discriminated based on the positions at which the presence or absence of short-period fluctuations switches. Therefore, the document area DA can be detected with high accuracy.

[0102] (1-2) The number of pixels in one unit is M, which is more than the number of pixels corresponding to half a period of the stripe pattern 62. While sequentially moving one target pixel in the image data SD in the intersection direction, the control unit 50 performs a predetermined calculation using the luminance values of the M pixels including the target pixel to calculate a determination value H used for determining the presence or absence of short-period fluctuations. The control unit 50 determines the presence or absence of short-period fluctuations based on the comparison result between the determination value H and a threshold value Hs, and detects the edge of the document area DA based on the position of the target pixel when the presence or absence of short-period fluctuations switches.

[0103] According to this configuration, the pixel position at which the presence or absence of short-period fluctuations switches can be detected from the comparison result between the determination value H obtained by the calculation using the luminance values of the M pixels and the threshold value Hs. Therefore, the document area DA can be detected with high accuracy by calculation using the values in the image data SD.

[0104] (1-3) The control unit 50 uses arithmetic expressions (the above-mentioned (1) expression, the above-mentioned (2) expression) that calculate, as the determination value H, a value corresponding to the magnitude of the amount of variation in short-period fluctuations using the luminance values of the M pixels. According to this configuration, in the background area BA with short-period fluctuations, the determination value H becomes a large value corresponding to the amount of fluctuation, and in the manuscript area DA without short-period fluctuations, the determination value H becomes a small value. Therefore, the manuscript area DA can be detected with high accuracy from the comparison result between the determination value H and the threshold value Hs.

[0105] (1-4) The stripe pattern 61 that the background forming unit 60 causes the reading unit 40 to read is a two-tone stripe pattern of light and dark. The control unit 50 calculates the first determination value H1 as the determination value H using the first arithmetic expression represented by the above formula (1) created on the premise that the stripe pattern 62 in the image data SD is a two-color stripe of two light and dark colors. According to this configuration, when the background stripe pattern 62 in the image data SD is a two-color stripe of two light and dark colors, the manuscript area DA can be detected with high accuracy from the comparison result between the first determination value H1 and the threshold value Hs1.

[0106] (1-5) M is an odd number. The arithmetic expression (formula (1)) is an expression that selects the larger of two difference values, which are the respective differences between the average values of k pixels (where k = (m - 1) / 2) on one side of both sides of the pixel of interest in the crossing direction and the average values of k pixels on the other side and the luminance value of the pixel of interest. The control unit 50 makes a determination on the presence or absence of short-period fluctuations based on the comparison result between the determination value H1 and the first threshold value.

[0107] According to this configuration, when the background stripe pattern 62 in the image data SD is a two-color stripe of two light and dark colors, the manuscript area DA can be detected with high accuracy from the comparison result between the first determination value H1 and the threshold value. (1-6) The stripe pattern 61 that the background forming unit 60 causes the reading unit 40 to read is a two-tone stripe pattern of light and dark. The control unit 50 calculates the second determination value H2 as the determination value H using the second arithmetic expression represented by the above formula (2) created on the premise that the stripe pattern 62 in the image data SD is a multi-color stripe of three or more colors including one or more intermediate densities between light and dark.

[0108] According to this configuration, when the background stripe pattern 62 in the image data SD is a multi-color stripe of three or more light and dark colors, the manuscript area DA can be detected with high accuracy from the comparison result between the second determination value H2 and the threshold value Hs2.

[0109] (1-7) In the second arithmetic expression of the formula (2), for M - 2 pixels out of M pixels excluding the two end pixels among the M pixels, the second arithmetic expression is given by a formula for obtaining the total value obtained by summing, in one unit, the difference values of the luminance values of the two pixels located adjacent to each pixel. The control unit 50 determines whether the pixel of interest belongs to the background area BA or the manuscript area DA based on the comparison result between the second determination value H2 indicated by the total value and the second threshold value Hs2.

[0110] According to this configuration, when the background stripe pattern 62 in the image data SD is a multicolor stripe with three or more shades of gray, the manuscript area DA can be detected with high accuracy from the comparison result between the second determination value H2 and the threshold value Hs2.

[0111] (1-8) The control unit 50 obtains the moving average value of the luminance values of M pixels for each unit. Among the pixels identified based on the comparison result between the moving average value and the third threshold value, the control unit 50 detects, as dirt on the glass surface which is the reading surface of the reading unit 40, the pixels other than the pixels at the ends of the manuscript area DA. According to this configuration, dirt on the glass surface which is the reading surface of the reading unit 40 can be detected.

[0112] (1-9) The background forming unit 60 has, as the stripe pattern 61, a background plate 43 having a vertical stripe pattern 620 in which stripes extend along the sub-scanning direction Y of the reading unit 40. According to this configuration, in the image reading apparatus using the sheet feeding method, the manuscript area DA can be detected with high accuracy without being affected by the vertical streaks caused by dirt on the glass surface.

[0113] (1-10) The stripe pattern 61 that the background forming unit 60 causes the reading unit 40 to read includes black and white. According to this configuration, since the stripe pattern 61 includes black and white, the amount of variation in the short-period variation is large. Therefore, the manuscript area DA can be detected with high accuracy.

[0114] When the reading resolution at which the reading unit 40 reads the document 14 is the first resolution, the control unit 50 calculates a first determination value H1 using a first arithmetic expression ((1) expression) based on the luminance values of M pixels. When the reading resolution is a second resolution lower than the first resolution, the control unit 50 calculates a second determination value H2 using a second arithmetic expression ((2) expression) based on the luminance values of M pixels. According to this configuration, the document area DA in the image data SD can be detected with high accuracy regardless of the difference in reading resolution.

[0115] (1-12) The document area discrimination method in the image reading apparatus 11 discriminates between the document area DA and the background area BA in the image data SD read by the reading unit 40 capable of reading the image of the document 14. This document area discrimination method includes the following processes (a) to (c). (a) Causing the reading unit 40 to read the document 14 and acquiring image data SD of the document 14 having a stripe pattern 62 with a specific period as the background. (b) Using, as one unit, three or more consecutive M pixels in the intersection direction intersecting the direction of the stripes of the stripe pattern 62 in the image data SD, and determining, for each unit, the presence or absence of short-period variation, which is a periodic variation of luminance values peculiar to the stripe pattern 62, based on the luminance values of the M pixels in each unit. (c) Discriminating between the document area DA and the background area BA based on the positions at which the presence or absence of short-period variation in a plurality of units obtained from the image data SD changes. According to this method, the document area DA in the image data SD can be detected with high accuracy.

[0116] (1-13) The program PR is executed by the computer 51 of the image reading device 11 having a reading unit 40 capable of reading the image of the document 14. The program PR causes the computer 51 to execute in order to discriminate between the document area DA and the background area BA in the image data SD read by the reading unit 40. The program PR causes the computer 51 to execute the following processes (a) to (c). (a) Cause the reading unit 40 to read the document 14 and read out from the storage unit 52 the image data SD of the document 14I having the stripe pattern 62 with a specific period as the background. (b) Using, as one unit, three or more consecutive M pixels in the crossing direction intersecting the stripe direction of the stripe pattern 62 in the image data SD, perform a determination process for determining, for each unit, the presence or absence of short-period variations that are periodic variations in luminance values peculiar to the stripe pattern 62, based on the luminance values of the M pixels for each unit. (c) Perform a discrimination process for discriminating between the document area DA and the background area BA based on the positions at which the presence or absence of short-period variations in a plurality of units obtained from the image data SD switches. By causing the computer 51 to execute this program PR, the document area DA can be detected from the image data SD with high accuracy.

[0117] (Second Embodiment) Next, with reference to FIGS. 20A to 20C and FIGS. 21A to 21C, the second embodiment will be described. In this second embodiment, the position detected as the edge of the document area DA is different from that in the first embodiment. Specifically, in the image area detection process, the determination is made while sequentially moving the pixel of interest as one unit of M pixels. Therefore, after the pixel of interest reaches the edge of the document area DA, the presence or absence of short-period variations may switch with a delay of a predetermined number of pixels. This deviation of the detection position depends on the relationship between the background color of the document 14I and the component colors of the stripe pattern 62. Therefore, in this embodiment, the positional deviation of the detection position at the edge of the document 14I is corrected by the number corresponding to the combination of the background color of the document and the component colors of the stripe pattern 62. By this correction, the document area DA is correctly detected. That is, the control unit 50 sets, as the edge of the document 14I, the pixels located outside or inside the document area DA by a predetermined number of pixels with respect to the pixel of interest when the presence or absence of short-period variations switches.

[0118] First, with reference to FIGS. 20A to 20C, a case where the background is a two-tone stripe pattern 62 with distinct light and dark shades will be described. When the stripe pattern 62 has two distinct light and dark shades, the above formula (1) is used with a unit of seven pixels including three pixels on each side of the target pixel.

[0119] As shown in FIG. 20A, when the background color of the original document 14I is different from both the white and black colors of the two shades that make up the stripe pattern 62, a position shifted inward by three pixels from the edge of the original document area DA is always detected as the detection position Dx that satisfies H ≤ Hs. In other words, the detection position Dx, which is the switching position of the presence or absence of short-period fluctuations, is always shifted inward by (M - 1) / 2 (when M = 7, it is three pixels) from the edge of the original document area DA. For this reason, the control unit 50 sets the correction position shifted outward by three pixels from the detection position Dx (the positive side in FIG. 20A) as the edge of the original document area DA.

[0120] As shown in FIG. 20B, when the background color of the original document 14I is the same as the high-concentration color (black) among the two shades (white and black) that make up the stripe pattern 62, a position shifted inward by three pixels from the edge of the original document area DA is always detected as the detection position Dx that satisfies H ≤ Hs. In other words, the detection position Dx, which is the switching position of the presence or absence of short-period fluctuations, is always shifted inward by (M - 1) / 2 (when M = 7, it is three pixels) from the edge of the original document area DA. For this reason, the control unit 50 sets the correction position shifted outward by three pixels from the detection position Dx (the positive side in FIG. 20B) as the edge of the original document area DA.

[0121] Also, as shown in FIG. 20C, when the background color of the original 14I is substantially the same as either of the two shades (white and black) that make up the stripe pattern 62, the edge of the original area DA may fall on the boundary of the two-color lines that are the constituent colors of the stripe pattern 62 in the background. In this case, a position shifted by one pixel outward from the edge of the original area DA is detected as the detection position Dx that satisfies H≦Hs. For this reason, the control unit 50 sets the correction position shifted by one pixel inward (the minus side in FIG. 20C) from the detection position Dx to the edge of the original area DA. Note that FIG. 20C shows an example in which the original 14I with a white background color is on the black line of the stripe pattern 62. Conversely, when the original 14I with a black background color is on the white line of the stripe pattern 62, similarly, the control unit 50 performs a correction to shift the detection position Dx by one pixel inward from the original area DA.

[0122] Next, with reference to FIGS. 21A to 21C, a case where the background is an unclear stripe pattern 62 with a gradation of three or more shades will be described. When the stripe pattern 62 in the background is unclear, the above formula (2) using a total of five pixels including two pixels on each side of the pixel of interest as one unit is used. Therefore, depending on the position of the edge of the original 14I with respect to the stripe pattern 62, the detection position Dx may shift by up to two pixels inside the original area DA and up to one pixel outside the original area DA.

[0123] In the examples shown in FIGS. 21A and 21B, when the edge of the original 14I with respect to the stripe pattern 62 is at this position, the detection position Dx shifts by up to two pixels inside the original area DA. In this case, the control unit 50 sets the correction position shifted by two pixels to the side facing outside the original area DA (the plus side in FIGS. 21A and 21B) from the detection position Dx as the edge of the original area DA.

[0124] Also, in the example shown in FIG. 21C, when the edge of the original 14I with respect to the stripe pattern 62 is at this position, the detection position Dx shifts by up to one pixel outside the original area DA. In this case, the control unit 50 sets the correction position shifted by one pixel to the side facing inside the original area DA (the minus side in FIG. 21C) from the detection position Dx as the edge of the original area DA.

[0125] In addition, when the image data SD is grayscale, there is a possibility that either the original document 14I or the stripe pattern 62 will have the same color. Therefore, the deviation of the detection position at the edge of the original document 14I depends only on which position of the stripe pattern 62 the edge of the original document 14I covers, regardless of the color of the original document 14I. In this case, the control unit 50 sets the correction position obtained by shifting the detection position Dx by the number of pixels of the positional deviation that depends only on which position of the stripe pattern 62 the edge of the original document 14I covers, as the edge of the original document area DA. Also, when the background color of the original document 14I is color, if the background color of that color is not the same as either of the two colors of the background stripe pattern 62 or any color between the two colors, the detection position Dx is always shifted by two pixels inside the original document area DA. In this case, the control unit 50 sets the correction position shifted by two pixels toward the outside from the detection position Dx as the edge of the original document area DA.

[0126] Therefore, according to the image reading apparatus 11 in the second embodiment, in addition to obtaining the effects (1-1) to (1-13) obtained by the image reading apparatus 11 in the first embodiment in the same manner, the following effects can be further obtained.

[0127] (2-1) The control unit 50 sets the pixels located outside or inside by a predetermined number of pixels with respect to the target pixel at the switching of the presence or absence of short-period variation as the edge of the original document area DA. According to this configuration, the original document area DA in the image data SD can be detected with higher accuracy.

[0128] Note that the above embodiment can also be changed to a form such as the following modification examples. Furthermore, a combination of the above embodiment and the following modification examples as appropriate can be used as a further modification example, or a combination of the following modification examples as appropriate can be used as a further modification example.

[0129] · The background forming unit 60 is not limited to a configuration that forms a vertical stripe pattern 620 in which the stripe direction is parallel to the sub-scanning direction Y as the stripe pattern 62. For example, as shown in FIG. 23 using the background forming unit 60 shown in FIG. 22, a configuration may be adopted in which a horizontal stripe pattern 621 in which the stripe direction is parallel to the main scanning direction X is formed as the stripe pattern 62. As shown in FIG. 22, the background forming unit 60 includes a rotatable roller 63. On the outer peripheral surface of the roller 63, a plurality of black lines BC and white lines WC extending in a direction parallel to the axis of the roller 63 (main scanning direction X) are alternately arranged in the circumferential direction. The background forming unit 60 includes a motor 65 as a driving source for rotating the roller 63. The roller 63 rotates by the driving force of the motor 65. The image sensor 42 reads the stripe pattern 62 on the outer peripheral surface of the rotating roller 63, and reads the stripe pattern 62 composed of the horizontal stripe pattern extending in the main scanning direction X shown in FIG. 23 as the background of the document 14I. In this way, the stripe pattern 62 read by the reading unit 40 from the background forming unit 60 is the horizontal stripe pattern 621 in which the stripes extend along the main scanning direction of the reading unit 40. According to this configuration, in the case of the sheet feed type image reading apparatus 11, since the glass stain becomes a vertical stripe in the image, if it is the horizontal stripe pattern 621, dust of either of the two gradation colors can be detected. For example, when the two gradation colors are white and black, dust of either white or black can be detected.

[0130] ·For example, as shown in FIG. 25 using the background forming unit 60 shown in FIG. 24, as a stripe pattern 62, a diagonal stripe pattern 622 intersecting in both the main scanning direction X and the sub-scanning direction Y may be formed. As shown in FIG. 24, the background forming unit 60 includes a rotatable roller 63. On the outer peripheral surface of the roller 63, a spiral stripe pattern 61 is formed in which black lines and white lines are alternately arranged in the axial direction along a spiral path with respect to the axis of the roller 63. The background forming unit 60 includes a motor 65 as a driving source for rotating the roller 63. The roller 63 rotates by the driving force of the motor 65. The image sensor 42 reads the diagonal stripe pattern 622 shown in FIG. 25 as the background of the document 14I by reading the spiral stripe pattern 61 formed on the outer peripheral surface of the rotating roller 63. Thus, the stripe pattern 62 read by the reading unit 40 from the background forming unit 60 may be a diagonal stripe pattern 622 intersecting both in the main scanning direction X and the sub-scanning direction Y of the reading unit 40. According to this configuration, since the stripe pattern 62 is a vertical stripe caused by glass contamination or a diagonal stripe pattern 622 having a different angle from the document 14I, the document area DA can be detected with high accuracy, and glass contamination due to dust or the like can also be detected.

[0131] ·As shown in FIG. 26, the stripe pattern 62 formed as the background of the document 14I in the image data SD may be a grid pattern 623. In the example shown in FIG. 26, the grid pattern 623 includes vertical stripes in which high-density lines and low-density lines extending in the sub-scanning direction Y are alternately arranged in the main scanning direction X, and horizontal stripes in which high-density lines and low-density lines extending in the main scanning direction X are alternately arranged in the sub-scanning direction Y. Further, the grid pattern 623 may be a diagonal grid pattern 623 in which high-density lines and low-density lines are inclined diagonally with respect to the two directions of the main scanning direction X and the sub-scanning direction Y.

[0132] · In the original area detection process, the processing may be performed with a reduced resolution in order to shorten the processing time. In this case, for example, when converting 4×4 pixels into 1 pixel to reduce the resolution, a decimation process rather than an average process is preferable. For example, in the decimation process, the luminance value of one representative pixel among the 4×4 pixels may be converted into the luminance value of 1 pixel. For example, as shown in FIG. 27, by decimating one representative pixel every 4 pixels in the main scanning direction X before reducing the resolution, calculations based on the arithmetic expression of the above (1) formula or the arithmetic expression of the above (2) formula may be performed using the luminance values n-1, n, n+1, etc. of the representative pixels. According to this configuration, the variation in the determination value H can be suppressed compared to the configuration using the average value of the luminance values of 4×4 pixels. Therefore, the original area DA can be detected with high accuracy.

[0133] · As shown in FIG. 28, the stripe pattern 61 provided on the read surface 43a of the background plate 43 only needs to have high-concentration lines and low-concentration lines arranged alternately. The high-concentration lines and the low-concentration lines are not limited to the combination of black lines BC and white lines WC. For example, as shown in FIG. 28, the stripe pattern 61 that the background forming unit 60 causes the reading unit 40 to read may include a high-concentration line G1 of the first gray color and a low-concentration line G2 of the second gray color that is lighter in concentration than the first gray color. The color with the highest concentration may be gray. Since the color with the highest concentration of the stripe pattern 61 is gray instead of black, the back image of the stripe pattern 61 that the stripe pattern 61 of the background forming unit 60 is read through the original document 14 on the opposite side can be made less noticeable.

[0134] · The stripe pattern 61 provided on the background forming unit 60 is not limited to two colors and may be a plurality of three or more colors. For example, a three-color stripe pattern may be used. Also, stripe patterns of four colors or five colors may be used. In this case, the original area DA can be detected based on the comparison result between the determination value H2 and the second threshold value Hs2 by calculating the determination value H2 (short-period variation value) using the arithmetic expression of the above (2) formula.

[0135] · The thickness or interval of the lines constituting the stripe pattern 61 may vary for each density or color. For example, the width W1 of the black line BC and the width W2 of the white line WC, which constitute the stripe pattern 61 provided on the read surface 43a of the background plate 43 or the roller 63, may be different. Further, even in the stripe pattern 61 of three or more colors, the line widths may differ for each density or color.

[0136] · The above formula (1) is an example of an arithmetic expression (first arithmetic expression) used when the stripe pattern 62 has two shades of light and dark, and other first arithmetic expressions may be used. In short, any arithmetic expression that can calculate a value of a magnitude corresponding to the variation amount of the stripe pattern 62 with two shades of light and dark is acceptable.

[0137] · The above formula (2) is an example of an arithmetic expression (second arithmetic expression) used when the stripe pattern 62 has three or more shades of light and dark (gradation), and other second arithmetic expressions may be used. In short, any arithmetic expression that can calculate a value of a magnitude corresponding to the variation amount of the short-period variation in the case of the stripe pattern 62 with three or more shades of light and dark (gradation) is acceptable.

[0138] · The stripe pattern 61 on the background forming unit 60 side is not limited to alternately repeating light and dark, and may be a multi-stage gradation. · The number of pixels M used for the manuscript area detection process may change during the detection process.

[0139] · In each of the above embodiments, the determination process for determining the presence or absence of short-period variation, which is a periodic variation of the luminance value peculiar to the stripe pattern 62, for each unit is performed as a binarization process for binarizing the determination image data HD having the determination value H as the pixel value with the threshold value Hs. However, the present invention is not limited to this. A determination process in which the control unit 50 (computer 51) makes a comparison result between the determination value H and the threshold value Hs for each unit to determine the presence or absence of short-period variation may be used. In this case, the control unit 50 may replace the pixel value of the target pixel with a value according to the determination result. For example, it may be replaced with 1 if there is short-period variation, and replaced with 0 if there is no short-period variation. Even with this configuration, binary data equivalent to the binarized image D2 can be obtained.

[0140] · The image reading device 11 may be provided as a part of a multifunction device having a scanner, a printing function, and a copying function. It may also be provided with an automatic document feeder (auto sheet feeder) for automatically feeding documents.

[0141] · The stripe pattern forming unit that forms the horizontal stripe pattern 621 parallel to the sub-scanning direction Y shown in FIG. 23 is not limited to the roller method shown in FIG. 22, and a belt method may also be used. In the case of the belt method, a configuration may be adopted in which black lines and white lines extending parallel to the belt rotation axis are drawn on the outer peripheral surface of an endless belt.

[0142] · When forming the diagonal stripe pattern 62 (622) shown in FIG. 25, the background forming unit 60 is not limited to the roller method. The background forming unit 60 may have a configuration in which a background plate (moving body) with a stripe pattern including a plurality of black lines and white lines arranged alternately in the main scanning direction X reciprocates in the main scanning direction X. Even with this configuration, it is possible to form a diagonal stripe pattern 62 (diagonal stripe pattern 622) as the background of the document 14I in the image SD.

[0143] · Patterns having a specific period are not limited to stripe patterns. A pattern in which a predetermined pattern (such as a figure) is repeated at a specific period may be used, and the elements of the repeated pattern are not limited to lines or the like.

[0144] · The program PR for document area detection processing shown as a flowchart in FIG. 18 may be executed by the computer of the host device 100. Specifically, the program PR shown in FIG. 18 may be included in a scan driver program or an application program for adding functions installed in the computer of the host device 100. By the computer of the host device 100 executing this program PR, for example, the scan driver 103 (reading control device) may be configured to include a document area detection unit composed of software.

[0145] · The background forming unit 60 is not limited to a configuration including the background plate 43 and the roller 63, and any method may be used as long as it can form a stripe pattern on the background of the image. · The program PR for glass stain detection shown in the flowchart of FIG. 19 may be installed in the computer 51 of the host device 100. Specifically, the program PR shown in FIG. 19 may be included in the scan driver program or the application program for adding functions installed in the computer 51 of the host device 100. In this case, when the computer 51 of the host device 100 executes this program PR, for example, the scan driver 103 (reading control device) is configured to include a glass stain detection unit made of software.

[0146] · The image reading device 11 is not limited to the sheet feed method, and may also be a flatbed method. The flatbed type image reading device includes a carriage that can move along the sub-scanning direction (Y direction) inside the main body. The carriage includes a light source and a reading unit. The image sensor 42 that constitutes the reading unit is arranged on the carriage such that the arrangement direction of the light receiving elements is parallel to the main scanning direction X. The carriage reciprocates in the sub-scanning direction Y using the scanning motor as a power source. The light source and the reading unit that move together with the carriage read the image of the document 14 set on the glass plate of the document table. Even with the flatbed type image reading device 11, the edge (boundary) of the document 14I in the image SD can be detected in the same manner as the sheet feed type image reading device 11 by the document area detection process of the present embodiment. In the case of a flatbed type image reading device, the background forming unit may be a background plate provided on the back surface of the document table cover that can be opened and closed with respect to the document table. The document table cover can hold the document 14 set on the document table in the closed position. When the reading unit moves in the sub-scanning direction to read the document on the document table, the stripe pattern of the background plate provided on the back surface of the document table cover is read as the background of the document. Note that the stripe pattern of the background plate provided on the back surface of the document table cover may be a stripe pattern whose stripe direction is parallel to any one of the main scanning direction X, the sub-scanning direction Y, and the diagonal direction intersecting these two directions X and Y.

[0147] · The image sensor 42 is not limited to a CMOS image sensor, and may be, for example, a MOS (Metal Oxide Semiconductor) image sensor or a CCD (charge coupled device) image sensor.

[0148] · The image sensor 42 is not limited to a linear image sensor, and may be an area image sensor. · Each functional unit in the computer 51 is not limited to being realized by a CPU, and may be realized in hardware by an electronic circuit such as an ASIC (application specific integrated circuit) and an FPGA (field-programmable gate array), or may be realized by both software and hardware.

[0149] · The material of the document is not limited to paper, and may be a resin film or sheet, a fabric, a metal film, or the like. Hereinafter, the technical idea grasped from the above-described embodiment and modification examples will be described together with the effects.

[0150] (A) An image reading apparatus is an image reading apparatus including a reading unit capable of reading an image of a document, and includes a background forming unit that causes the reading unit to read a background including a pattern having a specific period, and a control unit. In the image data obtained by the reading unit reading the document, three or more consecutive M pixels in the direction having the period of the pattern are taken as one unit, and the control unit determines, for each unit, the presence or absence of a short-period variation that is a periodic variation of luminance values specific to the pattern, based on the luminance values of the M pixels for each unit, and discriminates a document area and a background area based on the position where the presence or absence of the short-period variation switches among a plurality of units obtained from the image data. According to this configuration, the presence or absence of the short-period variation of the pattern is determined for each unit of M pixels (one unit), and the document area and the background area are discriminated based on the position where the presence or absence of the short-period variation switches. Therefore, the document area can be detected with high accuracy.

[0151] (B) In the image reading device according to (A) above, the pattern may be a stripe pattern having the specific period, and the direction having the period may be an intersecting direction intersecting the stripe direction of the stripe pattern. According to this configuration, the presence or absence of short-period variations of the stripe pattern is determined for each M pixel units (one unit), and the document area and the background area are discriminated based on the position where the presence or absence of short-period variations switches. Therefore, the document area can be detected with high accuracy.

[0152] (C) In the image reading device according to (B) above, the number of pixels in the one unit is the M that is more than the number of pixels corresponding to half of the period of the stripe pattern, and the control unit sequentially moves one target pixel in the image data in the intersecting direction, performs a predetermined calculation using the luminance values of the M pixels including the target pixel, and calculates a determination value used for determining the presence or absence of the short-period variation. The control unit determines the presence or absence of the short-period variation based on the comparison result between the determination value and a threshold value, and may detect the edge of the document area based on the position of the target pixel when the presence or absence of the short-period variation switches. According to this configuration, the pixel position where the presence or absence of the short-period variation switches can be detected from the comparison result between the determination value obtained by the calculation using the luminance values of the M pixels and the threshold value. Therefore, the document area can be detected with high accuracy by calculation using the values of the image data.

[0153] (D) In the image reading device according to (C) above, the control unit may use an arithmetic expression that calculates, as the determination value, a value corresponding to the magnitude of the variation amount of the short-period variation using the luminance values of the M pixels. According to this configuration, in the background area with short-period variations, the determination value becomes a large value corresponding to the magnitude of the variation amount, and in the document area without short-period variations, the determination value becomes a small value. Therefore, the document area can be detected with high accuracy from the comparison result between the determination value and the threshold value.

[0154] (E) In the image reading apparatus according to (C) or (D) above, the stripe pattern that the background forming unit causes the reading unit to read is a two-tone stripe pattern of light and dark, and the control unit may calculate a first determination value as the determination value using a first arithmetic expression created on the premise that the stripe pattern in the image data is a two-color stripe of two tones of light and dark. According to this configuration, when the stripe pattern of the background in the image data is a two-color stripe of two tones of light and dark, the document area can be detected with high accuracy from the comparison result between the first determination value and the threshold value.

[0155] (F) In the image reading apparatus according to (E) above, the M is an odd number, and the first arithmetic expression is an expression that selects the larger of two difference values, which are the differences between the luminance values of the target pixel and the average values of k pixels (where k = (M - 1) / 2) on one side and k pixels on the other side of the target pixel in the crossing direction, respectively. The control unit may determine the presence or absence of the short-period variation based on the comparison result between the determination value and the first threshold value. According to this configuration, when the stripe pattern of the background in the image data is a two-color stripe of two tones of light and dark, the document area can be detected with high accuracy from the comparison result between the first determination value and the threshold value.

[0156] (G) In the image reading apparatus according to (C) or (D) above, the stripe pattern that the background forming unit causes the reading unit to read is a two-tone stripe pattern of light and dark, and the control unit may calculate a second determination value as the determination value using a second arithmetic expression created on the premise that the stripe pattern in the image data is a multi-color stripe of three or more colors including one or more intermediate densities between two tones of light and dark. According to this configuration, when the stripe pattern of the background in the image data is a multi-color stripe of three or more colors, the document area can be detected with high accuracy from the comparison result between the second determination value and the threshold value.

[0157] (H) In the image reading apparatus described in (G) above, the second arithmetic expression obtains, using the luminance values of the M pixels, a total value obtained by summing, in the one unit, difference values of the luminance values of two pixels located adjacent to each of the M - 2 pixels excluding the two pixels at both ends among the M pixels. The control unit may determine whether the pixel of interest belongs to the background area or the document area based on a comparison result between the second determination value indicated by the total value and a second threshold value. According to this configuration, when the background stripe pattern in the image data is a multicolor stripe with three or more shades of gray, the document area can be detected with high accuracy from the comparison result between the second determination value and the threshold value.

[0158] (I) In the image reading apparatus according to any one of (C) to (H) above, the control unit obtains a moving average value of the luminance values of the M pixels for each of the one units, and detects, as dirt on the glass surface which is the reading surface of the reading unit, pixels other than the pixels at the ends of the document area among the pixels specified based on a comparison result between the moving average value and a third threshold value. According to this configuration, dirt on the glass surface which is the reading surface of the reading unit can be detected.

[0159] (J) In the image reading apparatus according to any one of (B) to (I) above, the background forming unit may be a background plate having a vertical stripe pattern in which stripes extend along the sub-scanning direction of the reading unit. According to this configuration, the document area can be detected with high accuracy without being affected by dirt on the glass surface.

[0160] (K) In the image reading apparatus according to any one of (B) to (J) above, the stripe pattern read by the background forming unit to the reading unit may include black and white. According to this configuration, since the stripe pattern includes black and white, the amount of variation in the short-period variation is large. Therefore, the document area can be detected with high accuracy.

[0161] (L) In the image reading apparatus according to any one of (B) to (K) above, the stripe pattern to be read by the reading unit by the background forming unit may have a gray color as the color of the highest density. According to this configuration, since the stripe pattern has a gray color instead of black as the color of the highest density, it is possible to make the back copy of the stripe pattern where the stripe pattern of the background forming unit penetrates the document and is read on the opposite side less noticeable.

[0162] (M) In the image reading apparatus according to any one of (B) to (I), (K) above, the stripe pattern read by the reading unit from the background forming unit may be a horizontal stripe pattern in which stripes extend along the main scanning direction of the reading unit. According to this configuration, in the case of an image reading apparatus using a sheet feed method, since glass dirt becomes vertical streaks in the image, if it is a horizontal stripe pattern, dust of either of the two shades of gray can be detected. For example, when the two shades of gray are white and black, dust of either white or black can be detected.

[0163] (N) In the image reading apparatus according to any one of (B) to (I), (K) above, the stripe pattern read by the reading unit from the background forming unit may be a diagonal stripe pattern that intersects both the main scanning direction and the sub-scanning direction of the reading unit. According to this configuration, since it is a vertical stripe of glass dirt or a diagonal stripe pattern with a different angle from the document, the document area can be detected with high accuracy, and glass dirt due to dust or the like can also be detected.

[0164] (O) In the image reading apparatus according to any one of (C) to (N) above, when the reading resolution at which the reading unit reads the document is the first resolution, the control unit calculates a first determination value using the first arithmetic expression described in (E) based on the luminance values of the M pixels. When the reading resolution is a second resolution lower than the first resolution, the control unit may calculate a second determination value using the second arithmetic expression described in (G) based on the luminance values of the M pixels. According to this configuration, regardless of the difference in reading resolution, the document area in the image data can be detected with high accuracy.

[0165] (P) In the image reading apparatus according to any one of (B) to (O) above, the control unit may use pixels located outside or inside by a predetermined number of pixels with respect to the target pixel at the switching of the presence or absence of the short-period variation as the edge of the document area. According to this configuration, the document area in the image data can be detected with higher accuracy.

[0166] (Q) A method for discriminating a document area in an image reading apparatus is a method for discriminating a document area and a background area in image data read by a reading unit capable of reading an image of a document, the method including: causing the reading unit to read the document to obtain image data of the document having a pattern with a specific period as a background; using, in the image data, three or more consecutive M pixels in the direction having the period of the pattern as one unit, and determining, for each unit, the presence or absence of a short-period variation, which is a periodic variation of luminance values specific to the pattern, based on the luminance values of the M pixels in each unit; and discriminating the document area and the background area based on positions at which the presence or absence of the short-period variation switches among a plurality of units obtained from the image data. According to this method, the document area in the image data can be detected with high accuracy.

[0167] (R) A program causes a computer of an image reading apparatus including a reading unit capable of reading an image of a document to execute operations for discriminating a document area and a background area in image data read by the reading unit, the operations including: causing the computer to read, from a storage unit, image data of the document having a pattern with a specific period as a background by causing the reading unit to read the document; performing a determination process of determining, for each unit, the presence or absence of a short-period variation, which is a periodic variation of luminance values specific to the pattern, based on the luminance values of M pixels in each unit, where three or more consecutive M pixels in the direction having the period of the pattern are used as one unit in the image data; and performing a discrimination process of discriminating the document area and the background area based on positions at which the presence or absence of the short-period variation switches among a plurality of units obtained from the image data. By executing this program, the document area can be detected from the image data with high accuracy.

Description of Signs

[0168] 10…Image reading system, 11…Image reading device, 13…Document support, 14…Document, 14I…Document in image data, 15…Stacker, 18…Main body, 19…Cover part, 20…Power button, 21…Operation part, 22…Display part, 23…Display area, 29…Conveyor path, 30…Conveyor mechanism, 30A…Feeding part, 31…Conveying part, 32…Discharging part, 33…Feeding roller, 34…Pair of feeding rollers, 35…Pair of conveying rollers, 36…Pair of discharging rollers, 37…Feeding motor, 38…Conveying motor, 40…Reading part, 40A…First reading part, 40B…Second reading part, 41…Light source, 41A…First light source, 41B…Second light source, 42…Image sensor, 42A…First image sensor, 42B…Second image sensor, 42a…Light receiving element, 43…Background plate, 44…Encoder, 45…Document sensor, 46…Document presence / absence sensor, 50…Control part, 51…Computer, 52…Storage part, 54…Timing generator (TG), 55…AFE, 56…Input part, 57…Output part, 60…Background forming part, 61…Strip pattern, 62…Strip pattern as an example of a pattern, 620…Vertical strip pattern, 621…Horizontal strip pattern, 622…Oblique strip pattern, 623…Lattice pattern, 63…Roller, 65…Motor as an example of a drive source, 70…Main control part, 71…Conveying control part, 72…Reading control part, 73…Image processing part, 74…Document area detection part, 75…Tilt correction part, 76…Cut-out processing part, 77…Rotation processing part, 100…Host device, 101…Operation part, 102…Display part, 103…Scan driver, PR…Program, X…Main scanning direction (width direction), x…Pixel position, Y1…Conveying direction, Y…Sub-scanning direction, SW…Width of the light receiving element, BC…Black line, W2(W)…Width dimension of the white line, BL…Black line, WL…White line, SD…Image data, w1(w)…Width dimension of the black line, w2(w)…Width dimension of the white line, SA…Reading area, DA…Document area, BA…Background area, H…Judgment value, Hs…Judgment value, H1…First judgment value, ave1,ave2…Average value, Δ1,Δ2…Difference value, Hs1…First threshold value, H2…Second judgment value, Δn-1,Δn,Δn+1…Difference value, Hs2…Second threshold value, HD…Judgment image data, DS…Spike at the edge of the document, GD…Spike of glass dirt, Dx…Detection position, G1…High-density line, G2…Low-density line.

Claims

1. An image reading apparatus including a reading unit capable of reading an image of a document, comprising: a background forming unit that causes the reading unit to read a background including a pattern having a specific period; a control unit; and in the image data obtained by the reading unit reading the document, taking three or more consecutive M pixels in the direction having the period of the pattern as one unit, the control unit determines, for each unit, the presence or absence of short-period variation, which is a periodic variation of luminance values specific to the pattern, based on the luminance values of the M pixels for each unit, and discriminates a document area and a background area based on a position at which the presence or absence of the short-period variation switches among a plurality of units obtained from the image data. An image reading apparatus characterized by this.

2. The pattern is a striped pattern having the specific period, and the direction having the period is an intersecting direction intersecting the stripe direction of the striped pattern. The image reading apparatus according to Claim 1, characterized by this.

3. The number of pixels in one unit is the M that is more than the number of pixels for half a period of the striped pattern, while sequentially moving one target pixel in the image data in the intersecting direction, the control unit performs a predetermined calculation using the luminance values of the M pixels including the target pixel to calculate a determination value used for determining the presence or absence of the short-period variation, the control unit determines the presence or absence of the short-period variation based on a comparison result between the determination value and a threshold value, and detects an edge of the document area based on a position of the target pixel when the presence or absence of the short-period variation switches. The image reading apparatus according to Claim 2, characterized by this.

4. The control unit uses an arithmetic expression that calculates, as the determination value, a value corresponding to the magnitude of the variation amount of the short-period variation using the luminance values of the M pixels. The image reading apparatus according to Claim 3, characterized by this.

5. The striped pattern that the background forming unit causes the reading unit to read is a two-tone striped pattern of light and dark, the control unit calculates a first determination value as the determination value using a first arithmetic expression created on the premise that the striped pattern in the image data is a two-color stripe of light and dark. The image reading apparatus according to Claim 3, characterized by this.

6. The M is an odd number. The first arithmetic expression is given by an expression that selects the larger value of two difference values, which are the respective differences between the average values of k pixels (where k = (M - 1) / 2) on one side of the target pixel among both sides in the crossing direction and the average values of k pixels on the other side, and the luminance value of the target pixel. The control unit determines the presence or absence of the short-period variation based on a comparison result between the determination value and a first threshold value. The image reading apparatus according to claim 5 is characterized by this.

7. The stripe pattern that the background forming unit causes the reading unit to read is a stripe pattern of two shades of light and dark. The control unit uses a second arithmetic expression created on the premise that the stripe pattern in the image data is a multicolor stripe of three or more colors including one or more intermediate densities between two shades of light and dark, and calculates a second determination value as the determination value. The image reading apparatus according to claim 3 is characterized by this.

8. The second arithmetic expression is given by an expression that obtains a total value obtained by summing, in the unit, difference values of luminance values of two pixels located adjacent to each of M - 2 pixels excluding the two pixels at both ends among the M pixels, using the luminance values of the M pixels. The control unit determines whether the target pixel belongs to the background area or the document area based on a comparison result between the second determination value indicated by the total value and a second threshold value. The image reading apparatus according to claim 7 is characterized by this.

9. The control unit obtains a moving average value of the luminance values of the M pixels for each unit, and among the pixels specified based on a comparison result between the moving average value and a third threshold value, detects pixels other than the pixels at the ends of the document area as dirt on the glass surface, which is the reading surface of the reading unit. The image reading apparatus according to claim 3 is characterized by this.

10. The background forming unit is a background plate having a vertical stripe pattern in which stripes extend along the sub-scanning direction of the reading unit. The image reading apparatus according to claim 2 is characterized by this.

11. The stripe pattern that the background forming unit causes the reading unit to read includes black and white. The image reading apparatus according to claim 2 is characterized by this.

12. The stripe pattern that the background forming unit causes the reading unit to read is characterized in that the color with the highest density is gray. The image reading apparatus according to claim 2 is characterized by this.

13. The stripe pattern that the reading unit reads from the background forming unit is a horizontal stripe pattern in which stripes extend along the main scanning direction of the reading unit. The image reading apparatus according to claim 2 is characterized by this.

14. The stripe pattern read by the reading unit from the background forming unit is an oblique stripe pattern that intersects both the main scanning direction and the sub-scanning direction of the reading unit, according to the image reading apparatus described in claim 2.

15. An image reading apparatus according to claim 3, when the reading resolution at which the reading unit reads the document is a first resolution, the control unit calculates a first determination value using the first arithmetic expression described in claim 5 based on the luminance values of the M pixels, when the reading resolution is a second resolution lower than the first resolution, the control unit calculates a second determination value using the second arithmetic expression described in claim 7 based on the luminance values of the M pixels, according to the image reading apparatus.

16. The control unit uses pixels located outside or inside by a predetermined number of pixels with respect to the target pixel at the switching of the presence or absence of the short-period variation as the edge of the document area, according to the image reading apparatus described in any one of claims 3 to 9.

17. A method for discriminating a document area in an image reading apparatus that discriminates a document area and a background area in image data read by a reading unit capable of reading an image of a document, causing the reading unit to read the document to obtain image data of the document having a pattern with a specific period as the background, using, as a unit, three or more consecutive M pixels in the direction of the period of the pattern in the image data, and determining, for each unit, the presence or absence of a short-period variation, which is a periodic variation in luminance values specific to the pattern, based on the luminance values of the M pixels for each unit, discriminating the document area and the background area based on the positions at which the presence or absence of the short-period variation switches for a plurality of units obtained from the image data, characterized by including, in the method for discriminating a document area in an image reading apparatus.

18. A program that causes a computer of an image reading apparatus including a reading unit capable of reading an image of a document to execute discrimination of a document area and a background area in image data read by the reading unit, causing the computer to read, from a storage unit, image data of the document having a pattern with a specific period as the background by causing the reading unit to read the document, In the image data, taking three or more M pixels that are continuous in the direction having the period of the pattern as one unit, based on the luminance values of the M pixels for each unit, performing a determination process of determining the presence or absence of short-period fluctuations, which are periodic fluctuations of luminance values peculiar to the pattern, for each unit. Performing a discrimination process of discriminating the document area and the background area based on the positions where the presence or absence of the short-period fluctuations of a plurality of units obtained from the image data switches. A program for causing the above to be executed.

Citation Information

Patent Citations

  • Image reading device and image reading method

    JP2023124289A