1. Field of the Invention
The present invention relates to an image reading apparatus that reads an original and a control program therefor, and in particular relates to an image reading apparatus that detects deterioration in image quality due to dust, scratches, dirt, etc., and a control program therefor.
2. Description of the Related Art
Conventional color image reading apparatuses will be described with reference to FIGS. 9 to 16.
FIG. 9 shows the internal construction of a color image reading apparatus that is a first conventional image reading apparatus.
In FIG. 9, reference numeral 3004 denotes an original illuminating lamp, which is implemented by a Xenon tube with external electrodes. Reference numeral 3001 denotes an original glass on which an original is placed. Reference numeral 3003 denotes an original pressing plate that presses the original placed on the original glass 3001 so as to prevent the original from lifting with respect to the original glass 3001, and also functions as a cover that protects the original glass 3001 from dirt and scratches. Reference numeral 3008 denotes a first mirror support on which the original illuminating lamp 3004 and a first mirror 3005 are mounted. Reference numeral 3009 denotes a second mirror support on which a second mirror 3006 and a third mirror 3007 are mounted. The first mirror 3005, the second mirror 3006, and the third mirror 3007 guide reflected light from the original to a three-line color CCD line sensor 3011.
Reference numeral 3010 denotes an optical lens that focuses the reflected light of the original guided by the first mirror 3005, the second mirror 3006, and the third mirror 3007 on the three-line color CCD line sensor 3011 to form an image thereon. The three-line color CCD line sensor 3011 is composed of three line sensors, separates or decompose the focused reflected light of the original into three colors RGB, and converts the color-decomposed light into electrical signals. The three line sensors are disposed so as to read at different positions in a sub-scanning direction. Reference numeral 3012 denotes an optical system driving motor that drives the first mirror support 3008 and the second mirror support 3009 in the directions shown by the arrows A and B in the drawing, and is implemented by a stepping motor, a DC motor, or the like being used.
Reference numeral 3002 denotes a standard white plate used when obtaining a reference signal for performing shading correction, and is composed of a material whose color does not change over time or according to environmental conditions such as temperature and humidity. Reference numeral 3013 denotes a first reflecting shade that is disposed so as to increase the efficiency of the original illuminating lamp 3004 and mainly directs light beams emitted on an opposite side to an original surface towards the original surface. Reference numeral 3014 denotes a second reflecting shade that increases the efficiency of the original illuminating lamp 3004 in the same way as the first reflecting shade 3013, as well as converging the light beams onto the original surface and suppressing the generation of shadows when the original is formed of image-formed sheet segments pasted on a sheet or is a three-dimensional object.
With the above construction, whenever an original is read, shading correction is performed in advance using the standard white plate 3002.
FIG. 10 is a diagram useful in explaining an operation for white shading correction. In FIG. 10, a region from P1 to P2 denotes the read area for one line of the three-line color CCD line sensor 3011. A waveform L1 shows a read waveform obtained by reading the main surface of the standard white plate 3002 before white shading correction, while a waveform L2 shows a read waveform after white shading correction. The following three causes are usually responsible for non-uniformity in the waveform L1:
(1) Variations in the sensitivity of the individual photodiodes that compose the three-line color CCD line sensor 3011;
(2) Luminous intensity distribution of the original illuminating lamp 3004; and
(3) Light falloff at edges of the optical lens 3010
White shading correction is for correcting pixel by pixel the waveform L1 that is the waveform data obtained by reading the standard white plate 3002 so as for the waveform L1 to become flat like the waveform L2.
FIG. 11 is a block diagram showing the internal construction of a white shading correction circuit in the image reading apparatus appearing in FIG. 9.
In FIG. 11, reference numeral 3301 denotes a shading memory with a capacity equal to 7,500 words×16 bits. The shading memory 3301 is used in the following operations that are required for performing white shading correction:
(1) A line addition which is a process of adding read image data for a plurality of lines;
(2) An averaging process that averages pixel by pixel the data obtained by the line addition;
(3) A CD calculation process that calculates a correction coefficient; and
(4) Storage of the calculated correction coefficient.
Reference numeral 3302 denotes a selector that selects data to be written in the shading memory 3301. Reference numeral 3303 denotes a shading target storage register that stores a white shading target value Kdat. Reference numeral 3304 denotes a division circuit for performing the CD calculation, and operation thereof will be described later. Reference numeral 3305 denotes an addition circuit that performs the line addition, with the addition circuit 3305 receiving an input image signal VI(n) and read data from the shading memory 3301 that has been read out in synchronization with the input image signal VI(n) and outputting an addition result thereof. Reference numeral 3306 denotes an averaging circuit, and performs an averaging process by bit shifting alone and therefore the number of lines to be averaged is limited to 2n. Reference numeral 3307 denotes a white shading correction circuit that performs a multiplication process pixel by-pixel on the input image signal VI(n) and a correction coefficient value CD(n) read out from the shading memory 3301, with a result thereof being outputted as white corrected data VO(n).
With this construction, white shading correction is performed as described below.
First, the original illuminating lamp 3004 is turned on and read image data for sixty-four lines on the standard white plate 3002 are added and written into the shading memory 3301. At this time, the selector 3302 is controlled so as to select an output from the addition circuit 3305.
Next, the selector 3302 is controlled so as to select an output from the averaging circuit 3306. The averaging circuit 3306 performs an averaging process for 64 lines by shifting an output from the shading memory 3301 by six bits. Next, the selector 3302 is controlled so as to select an output from the division circuit 3304. The division circuit 3304 uses the output from the shading memory 3301 and the white shading target value Kdat set in the shading target storage register 3303 to perform a calculation according to Equation 1 below and outputs the resulting value O(n):O(n)=Kdat/M(n)  (1)
Here, M(n) denotes the output from the shading memory 3301, O(n) denotes the calculation result, and n denotes the pixel number. It should be noted that the above calculation process will be referred to as the “CD calculation”. The above process causes the white shading correction coefficient CD(n) to be stored in the shading memory 3301.
When an original is read, the input image signal VI(n) and the white shading correction coefficient CD(n) read out from the shading memory 3301 are synchronized, inputted to the white shading correction circuit 3307, and multiplied together, which makes it possible to obtain a flat characteristic like the waveform L2 shown in FIG. 10.
As described above, white shading correction is performed for each of the RGB signals outputted from the three-line color CCD line sensor 3011.
Next, a method of detecting foreign matter such as dust that adheres to the standard white plate 3002 in the image reading apparatus of FIG. 9 will be described.
FIG. 12 shows the standard white plate 3002. In FIG. 12, the part labeled “α”, denotes shading sampling points at which shading sampling is performed, reference numeral 3201 denotes adhering dust, scratches, or dirt at a part of the same points. The detection of dust, scratches, or dirt (hereinafter this will be referred to as “dust detection”) on the standard white plate 3002 is performed as follows.
First, a region β on the standard white plate 3002 is read while moving the mirror support 3008. Next, a shading coefficient is calculated from the image data obtained by the reading and is stored in the shading memory 3301. By thus moving the mirror support 3008 during reading, the shading coefficient in the region β is assumed to have a value for the case where there is no dust.
Next, the shading coefficient value for the case where there is no dust that is stored in the shading memory 3301, is read by a CPU, not shown, and stored in a work memory, not shown either, for software processing. Next, shading sampling is performed on the shading sampling points α and image data obtained by the shading sampling is subjected to the addition and averaging processes and the resulting image data is stored in the shading memory 3301. Then, the CPU reads out the image data at the sampling points α stored in the shading memory 3301, multiplies the read image data by the shading coefficient read out previously, to thereby execute a white shading process, and stores the result thereof in the aforementioned work memory.
FIG. 13 shows waveforms of the shading results. In FIG. 13, a waveform L3 is the read waveform of the region β, a waveform L4 is the result of the shading correction performed by the CPU on the sampling points α, and symbol G1 denotes the part corresponding to the dust 3201. The differences between adjacent pixels in the corrected data are detected and parts where the difference value is equal to or greater than a predetermined value are determined to be dust. In FIG. 13, the part G1 is determined to be dust.
FIG. 14 is a block diagram showing the internal construction of a white shading correction circuit in a second conventional image reading apparatus. This second conventional image reading apparatus includes the white shading correction circuit shown in FIG. 14 in place of the white shading correction circuit (see FIG. 11) of the first conventional image reading apparatus. It should be noted that in FIG. 14, component elements that are the same as in the white shading correction circuit appearing in FIG. 11 have been given the same reference numerals corresponding to those in FIG. 11 are designated by identical reference numerals, and description thereof is omitted.
In FIG. 14, reference numeral 3701 denotes a selector that selects an input for the shading memory 3301. Reference numeral 3702 denotes a replace circuit that replaces data in the shading memory 3301 with image data on which shading correction has been performed. Reference numeral 3703 denotes a dust determining circuit that compares an output from the replace circuit 3702 with an upper limit determination level UP stored in an upper limit determination level storage register 3704 or a lower limit determination level DOWN stored in a lower limit determination level storage register 3705. When the output from the replace circuit 3702 is either higher than the upper limit determination level UP or lower than the lower limit determination level DOWN, the dust determining circuit 3703 sets a dust determination flag stored in a predetermined register, not shown, to “1”. The dust determining circuit 3703 operates in conjunction with the operation of the replace circuit 3702.
FIG. 15 shows a waveforms indicative of the result of the dust detecting operation that uses the white shading correction circuit in the image reading apparatus appearing in FIG. 14. Waveforms L5 and L6 respectively correspond to the waveforms L3 and L4 shown in FIG. 13, and G2 corresponds to G1. At the part G2 corresponding to the dust 3201, the waveform L6 is lower than the lower limit determination level DOWN, so that the dust determination flag is “1”, and it is determined that dust is present.
However, there are the following problems with the dust detection methods employed by the first and second conventional image reading apparatuses described above.
First, (1) according to the white shading correction circuit of the first conventional image reading apparatus, a long time period is required for soft shading to be performed, and if a dust detecting operation is performed when the apparatus is activated, the startup time becomes long. Also, (2) in the case where a long time period is required for soft shading to be performed and the dust detection operation is performed page by page, there is a marked degradation in reading efficiency and hence in productivity.
Furthermore, (3) according to the white shading correction circuit of the second conventional image reading apparatus, the accuracy of dust detection deteriorates due to random noise components in the image data for each single line.
FIG. 16 shows part of the image data that has been subjected to shading correction and with which data in the shading memory 3301 has been replaced by the replace circuit 3702 in the image reading apparatus of FIG. 14. In FIG. 16, the phenomenon (3) above is illustrated. In the figure, the upper limit determination level UP and the lower limit determination level DOWN are shown above and below a shading target level. A region γ shows a part where dust is present, and since an output from the replace circuit 3702 corresponding to the region γ is below the lower limit determination level DOWN, it is determined that dust is present. An image data part G3 falls below the lower limit determination level DOWN due to random noise components, so that this part is also determined to be dust by the dust determining circuit.
On the other hand, although it would be conceivable to set the determination levels higher to avoid the influence of random noise components such setting would make it impossible to detect all but large pieces of dust, resulting in a fall in the determination accuracy.