The present invention relates to a signal processing method, signal processing apparatus, and image reading apparatus and, more particularly, to a signal processing method, signal processing apparatus, and image reading apparatus for correcting any defects formed on a transparent document by dust, scratches, and the like.
In this case, image reading in the sub-scan direction is done by mechanically moving the transparent document illumination lamp 144 and mirror 147 in the sub-scan direction with respect to the transparent document 142 while maintaining an identical velocity and phase, and making the inverted-V mirrors 148 track at the half scan velocity in the sub-scan direction so as to maintain a constant optical path length (conjugate relationship) from the transparent document 142 to the CCD 150. In this way, a two-dimensional image is read in combination with the process in the main scan direction.
The aforementioned transparent document image reading apparatus can read a so-called reflecting document which is described on an opaque material and is illuminated with light so as to process the light reflected by the material. In this case, a reflecting document is placed in place of the transparent document 142, and is illuminated with a direct light beam emitted by a reflecting document illumination lamp 145, which is turned on in place of the transparent document illumination lamp 144, and with a light beam reflected by a reflector 146. The light reflected by the reflecting document is read by the CCD 150, thus forming an image in the main scan direction as in the transparent document.
Especially, as a color reading method, a 3-line color image reading method is prevalent. That is, the reflecting document illumination lamp 145 uses a lamp having white spectral characteristics, and the CCD 150 uses a 3-line type CCD having R, G, and B color filters. Three colors (R, G, and B) of image information are simultaneously read by a single scan, and R, G, and B color signals on an identical line are superposed by an image processing circuit, thus forming a color image.
In order to correct any defects on an image due to dust, scratches, and the like on a transparent document in the aforementioned transparent document image reading apparatus, the only effective method is to retouch them using image edit software after the image is read. For this reason, a very long time is required to correct such defects.
In recent years, as such transparent document image reading apparatus, an image reading apparatus having a so-called dust/scratch removal function of detecting dust present on a transparent document and scratches on a film surface (such detection will be referred to as “dust/scratch detection” hereinafter), and removing the influences of such dust and scratches by an image process has been developed.
Referring to
The transparent document reading operation including dust/scratch removal will be explained in detail below with reference to the flow chart shown in
In step S10, the reflecting document illumination lamp 145 and infrared lamp 151 in
In step S20, the reflecting document illumination lamp 145 and transparent document illumination lamp 144 in
In step S30 and subsequent steps, dust/scratch detection and correction are executed. The principle of dust/scratch detection will be described in detail below.
The threshold value 184 is held in advance in the threshold value holding unit 24. Therefore, the dust/scratch detection unit 25 reads out this threshold value 184 from the threshold value holding unit 24, and compares it with infrared image data in turn in step S30, thus detecting the defect region 185.
If the infrared image data is smaller than the threshold value 184 (NO in step S30), the influence of dust 182 is eliminated by executing, e.g., an interpolation process of the defect region 185 based on a normal region around it in step S40. The comparison process is executed for all infrared image data, and when any defect region is detected, the corresponding normal image data undergoes interpolation (step S50).
However, the aforementioned prior art cannot normally detect a defect portion or erroneously detect even a normal portion as a defect portion due to insufficient detection precision. That is, the nearly constant level 183 of infrared rays that have been transmitted through the transparent document largely varies due to light amount errors of the infrared lamp 151, transmission errors depending on the type of color film at the emission wavelength of 880 nm of the infrared lamp 151, and sensitivity errors of the CCD 150 at the emission wavelength of 880 nm. For this reason, if the threshold value 184 is set as a fixed value, the level 183 assumes a value higher than the threshold value 184, and even a normal image portion is detected as a defect portion, or the threshold value 184 defines a gray level much lower than the level 183, and a defect region cannot be accurately detected.
The present invention has been made in consideration of the above situation, and has as its object to stably implement appropriate dust/scratch detection irrespective of the characteristics of the infrared lamp, the type of color film, and the sensitivity characteristics of the photoelectric conversion element, when a transparent document is read and a dust/scratch portion is corrected.
According to the present invention, the foregoing object is attained by providing a signal processing method for processing a visible light image signal and infrared image signal obtained by illuminating a transparent document with light beams respectively coming from a visible light source for mainly emitting visible light and an infrared light source for mainly emitting infrared light, and photoelectrically converting optical images of the transparent document, comprising a generation step of generating a histogram on the basis of the infrared image signal, a calculation step of calculating a threshold value on the basis of the histogram generated in the generation step, an extraction step of comparing the threshold value calculated in the calculation step with infrared image signal components, and extracting infrared image signal components not more than the threshold value, and an interpolation step of executing an interpolation process of the visible light image signal on the basis of the infrared image signal components extracted in the extraction step.
According to the present invention, the foregoing object is also attained by providing a signal processing apparatus for processing a visible light image signal and infrared image signal obtained by illuminating a transparent document with light beams respectively coming from a visible light source for mainly emitting visible light and an infrared light source for mainly emitting infrared light, and photoelectrically converting optical images of the transparent document, comprising generation means for generating a histogram on the basis of the infrared image signal, calculation means for calculating a threshold value on the basis of the histogram generated by the generation means, extraction means for comparing the threshold value calculated by the calculation means with infrared image signal components, and extracting infrared image signal components not more than the threshold value, and interpolation means for executing an interpolation process of the visible light image signal on the basis of the infrared image signal components extracted by the extraction means.
Further, the foregoing object is also attained by providing an image reading apparatus capable of reading a transparent document, comprising a visible light source for mainly emitting visible light, an infrared light source for mainly emitting infrared light, a photoelectric converter for converting an optical image into an electrical signal, generation means for generating a histogram on the basis of an infrared image signal obtained via the photoelectric converter by illuminating a transparent document with light emitted by the infrared light source, calculation means for calculating a threshold value on the basis of the histogram generated by the generation means, extraction means for comparing the threshold value calculated by the calculation means with infrared image signal components, and extracting infrared image signal components not more than the threshold value, and interpolation means for executing an interpolation process of a visible light image signal, obtained via the photoelectric converter by illuminating the transparent document with light emitted by the visible light source, on the basis of the infrared image signal components extracted by the extraction means.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Preferred embodiments of the present invention will be described in detail in accordance with the accompanying drawings.
The first embodiment will be explained below. Note that the arrangement of an image reading apparatus used in the first embodiment is the same as that shown in
Referring to
The transparent document reading operation upon executing dust/scratch removal in the first embodiment will be described in detail below with reference to the flow chart in
In step S10, the reflecting document illumination lamp 145 and infrared lamp 151 in
In step S20, the reflecting document illumination lamp 145 and transparent document illumination lamp 144 in
In the first embodiment, a threshold value L2 to be used in step S30 is calculated using the infrared image data temporarily stored in the infrared image memory 23 (step S21). The calculation method will be described in detail below with reference to FIGS. 3 to 5.
[in step S21.
The histogram generation unit 31 in
In step S212, the threshold value determination/save unit 32 calculates an intermediate value of the frequencies of occurrence of the generated histogram to obtain a corresponding gray level L1. Note that the intermediate value of the frequencies of occurrence is a value obtained by equally dividing the total of the frequencies of occurrence, and L1 represents the gray level when the sum of the frequencies of occurrence in ascending or descending order of gray level exceeds the intermediate value of the frequencies of occurrence. In general, since the occupation ratio of dust 102 in the overall image is small, the gray level L1 corresponding to the intermediate value of the frequencies of occurrence nearly equals the intermediate value of the gray levels of an image other than the dust 102. The gray levels of the dust 102 have a distribution, as indicated by 201 in
Therefore, in the first embodiment the intermediate value of the frequencies of occurrence of histogram data is noted, and a threshold value for detecting dust 102 is set at a gray level L2 a predetermined level .DELTA.L1 lower than this gray level L1 so as to locate it near the maximum value of the gray level distribution 201 of dust 102 (step S213). Note that this predetermined level .DELTA.L1 may be pre-set and stored in the threshold value determination/save unit 32, or the generated histogram and gray level L1 may be displayed on a display, and the user may manually input .DELTA.L1.
The threshold value determination/save unit 32 saves the threshold value L2 determined in this way, and the flow advances to step S30 in
If the infrared image data of interest is smaller than the threshold value L2 (YES in step S30), it is determined that the image data falls within the defective region 105 where data is absent due to dust 102, and the influence of dust 102 is eliminated by executing, e.g., an interpolation process of the defect region 105 based on a normal region around it (step S40). On the other hand, if the infrared image data of interest is equal to or larger than the threshold value L2 (NO in step S30), it is determined that the data falls within a region free from any influence of dust or the like. The comparison process is done for all infrared image data (step S50), and if any defect region 105 is detected, an interpolation process is executed.
As described above, according to the first embodiment, the dust 102 can be nearly accurately detected as the defect region 105 detected using a threshold value level 104, i.e., the threshold value L2.
The second embodiment will be described below.
In the first embodiment, a histogram of the frequencies of occurrence of gray levels is generated, and the threshold value L2 is obtained by subtracting the predetermined level .DELTA.L1 from the gray level L1 corresponding to the intermediate value of the frequencies of occurrence. However, in the second embodiment, the threshold value is determined using a gray level corresponding to the maximum frequency of occurrence. Since the operations are the same as those in the first embodiment except for the threshold value determination method, a description thereof will be omitted. The threshold value determination operation will be described below with reference to
The threshold value determination/save unit 32 obtains a gray level L3 corresponding to the maximum frequency of occurrence from the histogram generated. In the example shown in
Therefore, the second embodiment obtains the gray level L3 corresponding to the maximum frequency of occurrence of histogram data, and sets a threshold value used to detect dust 102 at a gray level L4 a predetermined level .DELTA.L3 lower than this gray level L3 to locate it near the maximum value of the gray level distribution 201 of dust 102. Note that this predetermined level .DELTA.L3 may be pre-set and stored in the threshold value determination/save unit 32, or the generated histogram and gray level L3 may be displayed on a display, and the user may manually input .DELTA.L3.
In the second embodiment, the threshold value L4 obtained in this way is used in place of the threshold value L2 in step S30 in
As described above, according to the second embodiment, the dust 102 can be nearly accurately detected as a defect region 305 detected using a threshold value level 304, i.e., the threshold value L4.
The third embodiment will be described below.
The third embodiment is substantially the same as the first and second embodiments, except that the threshold value is determined using a maximum gray level. Since the operations are the same as those in the first or second embodiment except for the threshold value determination method, a description thereof will be omitted. The threshold value determination operation will be described below with reference to
The threshold value determination/save unit 32 obtains a maximum gray level L5 from the histogram generated. In the example shown in
Therefore, the third embodiment obtains this maximum gray level L5, and sets a threshold value used to detect dust 102 at a gray level L6 a predetermined level .DELTA.L5 lower than this gray level L5 to locate it near the maximum value of the gray level distribution 201 of dust 102. Note that this predetermined level .DELTA.L5 may be pre-set and stored in the threshold value determination/save unit 32, or the generated histogram and gray level L5 may be displayed on a display, and the user may manually input .DELTA.L5.
In the third embodiment, the threshold value L6 obtained in this way is used in place of the threshold value L2 in step S30 in
As described above, according to the third embodiment, the dust 102 can be nearly accurately detected as a defect region 505 detected using a threshold value level 504, i.e., the threshold value L6.
The fourth embodiment will be described below.
The fourth embodiment determines a threshold value using an average gray level unlike in the first to third embodiments. Since the operations are the same as those in the first to third embodiments except for the threshold value determination method, a description thereof will be omitted. The threshold value determination operation will be described below.
As in the first embodiment, a histogram is generated on the basis of the gray levels of an infrared image read out from the infrared image memory 23. The threshold value determination/save unit 32 obtains an average gray level Lave of the histogram generated. The unit 32 obtains a threshold value Lth1 by subtracting a predetermined value .DELTA.Lave from Lave. This process can be described by:
Lth1=Lave−.DELTA.Lave
Note that this predetermined level .DELTA.Lave may be pre-set and stored in the threshold value determination/save unit 32, or the generated histogram and average gray level Lave may be displayed on a display, and the user may manually input .DELTA.Lavhe fifth embodiment will be described below.
In the fifth embodiment, the values .DELTA.L1, .DELTA.L3, .DELTA.L5, and .DELTA.Lave used in the first to fourth embodiments are set using a standard deviation calculated from histogram data of an image read using the infrared lamp 151 in
In the fourth embodiment, the threshold value Lth1 obtained in this way is used in place of the threshold value L2 in step S30 in
As described above, according to the fourth embodiment, a dust portion can be nearly accurately detected as a defect region detected using the threshold value Lth1.
As shown in
Then, a threshold value used to detect dust 102 is set at a gray level L7 the standard deviation .sigma..times.k (k is an arbitrary positive value) lower than the gray level L1 corresponding to the intermediate value of the frequencies of occurrence so as to be located near the maximum value of the gray level distribution 201 of dust 102. Note that the value k can be appropriately determined depending on the method of one of the first to fourth embodiments used.
In the fifth embodiment, the threshold value L7 obtained in this way is used in place of the threshold value L2 in step S30 in
As described above, according to the fifth embodiment, the dust 102 can be nearly accurately detected as a defect region 705 detected using a threshold value level 704, i.e., the threshold value L7.
The sixth embodiment will be described below.
The sixth embodiment determines a threshold value using the maximum gray level using a method different from that in the third embodiment which determines the threshold value using the maximum gray level L5. Note that a maximum gray level Lmax is the same as the maximum gray level L5 in the third embodiment. Since the operations are the same as those in the first to fifth embodiments except for the threshold value determination method, a description thereof will be omitted. The threshold value determination operation will be described below.
As in the first embodiment, a histogram is generated on the basis of the gray levels of an infrared image read out from the infrared image memory 23. The threshold value determination/save unit 32 obtains a maximum gray level Lmax of the histogram generated. The unit 32 then multiplies the maximum gray level Lmax by a predetermined coefficient n (<1) to obtain a threshold value Lth2. This process can be described by:
Lth2=Lmax.times.n
Note that this coefficient n may be pre-set and stored in the threshold value determination/save unit 32, or the generated histogram and maximum gray level Lmax may be displayed on a display, and the user may manually input the coefficient n.
In the sixth embodiment, the threshold value Lth2 obtained in this way is used in place of the threshold value L2 in step S30 in
As described above, according to the sixth embodiment, a dust portion can be nearly accurately detected as a defect region detected using the threshold value Lth2.
The seventh embodiment will be described below.
The seventh embodiment determines a threshold value using the average and maximum gray levels unlike in the first to sixth embodiments. Note that an average gray level Lave is the same as the average gray level Lave in the fourth embodiment, and a maximum gray level Lmax is the same as the maximum gray level L5 as in the third embodiment. Since the operations are the same as those in the first to sixth embodiments except for the threshold value determination method, a description thereof will be omitted. The threshold value determination operation will be described below.
As in the first embodiment, a histogram is generated on the basis of the gray levels of an infrared image read out from the infrared image memory 23. The threshold value determination/save unit 32 obtains an average gray level Lave and maximum gray level Lmax of the histogram generated. The unit 32 then obtains a threshold value Lth3 by multiplying the difference between the maximum gray level Lmax and average gray level Lave by a predetermined coefficient n, and subtracting the obtained product from the average gray level Lave. This process can be described by:
Lth3=Lave−(Lmax−Lave).times.n
Note that this coefficient n may be pre-set and stored in the threshold value determination/save unit 32, or the generated histogram, maximum gray level Lmax, and average gray level Lave may be displayed on a display, and the user may manually input the coefficient n.
In the seventh embodiment, the threshold value Lth3 obtained in this way is used in place of the threshold value L2 in step S30 in
As described above, according to the seventh embodiment, a dust portion can be nearly accurately detected as a defect region detected using the threshold value Lth3.
The eighth embodiment will be described below.
In the first to seventh embodiments, a threshold value used to detect dust is set on the basis of histogram data of the entire image read using the infrared lamp 151 in
The process in the eighth embodiment will be described below with reference to FIGS. 12 to 14C. Note that the same reference numerals in
Such infrared image is broken up into blocks each having a predetermined size, and histograms are calculated for respective blocks. Since the size of an objective region where the histogram is to be generated is reduced, the influence of the frequencies of occurrence of the grayscale data component 1001 of the positive image becomes larger, as shown in
Therefore, when a threshold value for dust detection is set by the same method as in the first embodiment, a threshold level 1003 (L9) becomes .DELTA.L1 lower than L8, and the dust 102 can be nearly accurately detected as a defect region 1004 without being influenced by the mixed grayscale data of the positive image, and determination errors of a cyan region can be eliminated.
In the eighth embodiment, the threshold value L9 obtained in this way is used in place of the threshold value L2 in step S30 in
As described above, according to the eighth embodiment, since defect regions due to dust are calculated for respective blocks, even when grayscale data of a film image is in a portion other than dust of an image read using the infrared lamp 151, only the dust portion can be nearly accurately detected.
When a dust/scratch correction region is determined by combining defect regions detected for respective blocks in the eighth embodiment, and a defect region detected in the first to seventh embodiments, correction with higher accuracy can be achieved.
The ninth embodiment will be described below with reference to
As has been explained in the first to eighth embodiments, since a threshold value for dust detection is set using histogram data of an infrared image read using the infrared lamp 151, only the dust portion can be nearly accurately detected. But this threshold value is set to be lower than the average value of a dust-free portion. Hence, a region to be detected is slightly narrower than a region which is actually influenced by dust.
Therefore, when a defect region 105 is detected by the method described in, e.g., the first embodiment, the ninth embodiment sets a range 1201 a predetermined size broader than the detected defect region 105 as an actual defect region, as shown in
Also, when the dust position on a read image using the transparent document illumination lamp 144 and that on a read image using the infrared lamp slight deviate from each other, the influence of such deviation can be greatly relaxed by applying the ninth embodiment.
The tenth embodiment will be described below with reference to
The tenth embodiment will explain a method which is effective when the sharpness of dust on a read image using the infrared lamp is lower than that of dust on a read image using the transparent document illumination lamp 144. Such phenomenon may occur due to out of focus, i.e., so-called chromatic aberration of a lens, since the emission main wavelength of the infrared lamp is longer than the visible wavelength range (400 nm to 700 nm) used in an image read using the transparent document illumination lamp 144.
In such case, as shown in
The eleventh embodiment of the present invention will be described below with reference to
The eleventh embodiment will explain a method which is effective when the sharpness of dust on a read image using the infrared lamp 151 is lower than that of dust on a read image using the transparent document illumination lamp 144, as in the tenth embodiment.
In the eleventh embodiment, when the grayscale data of a portion of dust 102 of an image read using the infrared lamp 151 appears in a region broader than an actual region of dust 102, as shown in
In the eleventh embodiment, the method and amount of edge correction mentioned above are not particularly specified. When the sharpness of dust on an image read using the infrared lamp 151 impairs due to chromatic aberration of a lens, as described above, it is more effective to set the method and amount of edge correction so as to correct MTF deterioration components due to that chromatic aberration.
The twelfth embodiment of the present invention will be described below. The twelfth embodiment will explain a case wherein a film holder is used upon reading a transparent document.
Upon actually reading a film, the user selects a film region while confirming an image previewed on a display of a PC connected to the image reading apparatus 1, and the selected region is read.
When the film holder 401 shown in
When the film and a portion of the film holder 401 around the film are read using the infrared lamp 151, since the portion (to be referred to as a “holder shadow” hereinafter) does not transmit any infrared light, the CCD 150 outputs low gray levels (normally ranging from 0 to 50 in case of 255 gray levels).
When the method of calculating a threshold value using the standard deviation .sigma. described in the fifth embodiment is applied to the example shown in
The twelfth embodiment will explain a method which can prevent dust/scratches from remaining uncorrected due to a low threshold value of dust/scratch discrimination obtained when the film holder 401 is included in the read region.
Initially, it must be checked if the acquired infrared image includes a holder shadow.
In order to discriminate a holder shadow in an infrared image, the gray level is compared with the threshold value Tsb in turn from a pixel on the right side in step S122, as shown in
In step S123, the same process is also done from the lower side (
It is checked in step S126 if a holder shadow is present. This step can be easily implemented by storing the presence/absence of pixels replaced by the value B′ in steps S122 to S125. If a holder shadow is not found, since holder shadow correction need not be made, the flow returns to step S21 in
If a holder shadow is found (YES in step S126), the flow advances to step S127, a region B′ replaced by 255, and a holder shadow region D, are replaced by an average value V of the gray levels of the entire read region in turn from the right side, as shown in
The boundary pixels between the holder shadow pixels D and document image pixels A are replaced by the average value like in the holder shadow pixels D for the following reason. Since the gray level of the boundary between the holder shadow and document image changes not discontinuously but continuously, a boundary portion remains after the dust/scratch process if only holder shadow pixels are replaced, and the processed image has an unwanted false edge.
As described above, the number of boundary pixels to be replaced increases with increasing resolution. This is because the number of boundary pixels that remain in an image increases with increasing resolution.
Upon completion of the replace process to the average value, the flow returns to step S21 in
As described above, when the holder shadow pixels D and boundary pixels B are replaced by the average value, the standard deviation .sigma. of an image becomes smaller than that obtained when those pixels are not replaced, upon calculating a threshold value using the standard deviation .sigma. For this reason, a threshold value used in dust/scratch discrimination can be prevented from lowering, and an appropriate threshold value can be obtained. Since those pixels are replaced by the average value, the influence of the presence of the holder shadow can be minimized compared to a case wherein the holder shadow pixels D are completely erased, thus leading to appropriate dust/scratch removal.
In the twelfth embodiment, a method suitable for the method of calculating the threshold value using the standard deviation .sigma. has been explained. Alternatively, when the holder shadow pixels D and boundary pixels B are not replaced but are removed in steps S127 to S130 in
As described above, according to the twelfth embodiment, even when the read range includes the film holder, appropriate dust/scratch correction can be achieved.
The present invention can be applied to a system constituted by a plurality of devices or to an apparatus comprising a single device.
Further, the object of the present invention can also be achieved by providing a storage medium storing program codes for performing the aforesaid processes to a computer system or apparatus (e.g., a personal computer), reading the program codes, by a CPU or MPU of the computer system or apparatus, from the storage medium, then executing the program.
In this case, the program codes read from the storage medium realize the functions according to the embodiments, and the storage medium storing the program codes constitutes the invention.
Further, the storage medium, such as a floppy disk, a hard disk, an optical disk, a magneto-optical disk, CD-ROM, CD-R, a magnetic tape, a non-volatile type memory card, and ROM can be used for providing the program codes.
Furthermore, besides aforesaid functions according to the above embodiments are realized by executing the program codes which are read by a computer, the present invention includes a case where an OS (operating system) or the like working on the computer performs a part or entire processes in accordance with designations of the program codes and realizes functions according to the above embodiments.
Furthermore, the present invention also includes a case where, after the program codes read from the storage medium are written in a function expansion card which is inserted into the computer or in a memory provided in a function expansion unit which is connected to the computer, CPU or the like contained in the function expansion card or unit performs a part or entire process in accordance with designations of the program codes and realizes functions of the above embodiments.
The present invention is not limited to the above embodiments and various changes and modifications can be made within the spirit and scope of the present invention. Therefore to apprise the public of the scope of the present invention, the following claims are made.
Number | Date | Country | Kind |
---|---|---|---|
2000-182905 | Jun 2000 | JP | national |
2001-074738 | Mar 2001 | JP | national |
This application is a divisional application of U.S. patent application Ser. No. 09/883,467, which was filed Jun. 14, 2001, to which priority under 35 U.S.C. § 120 is claimed.
Number | Date | Country | |
---|---|---|---|
Parent | 09883467 | Jun 2001 | US |
Child | 11733098 | Apr 2007 | US |