Image reading apparatus correcting noise in image data

An image reading apparatus includes, with the purpose of accurately correcting noise in an image due to dust on a platen, three line sensors spaced from each other in a sub scanning direction to scan an original in the sub scanning direction, a platen between the original and the three line sensors, a moving mechanism for moving the platen, a noise detection processor detecting a noise pixels from each of multiple data output from the three line sensors, a selector selecting one of a plurality of search ranges defined with reference to the noise pixel, and a corrector extracting a reference pixel for correcting the noise pixel from the selected search range to correct the noise pixel based on the value of the extracted reference pixel.

This application is based on Japanese Patent Application No. 2004-286976 filed with the Japan Patent Office on Sep. 30, 2004, the entire content of which is hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to image reading apparatuses and particularly to image reading apparatuses reading an original while transporting it.

2. Description of the Related Art

Conventionally digital copiers and similar image reading apparatuses employ a technique referred to as so-called “reading an original while passing the original.” More specifically, an original is transported relative to a fixed line sensor in a sub scanning direction orthogonal to the line sensor as the original is read.

Such image reading apparatus is provided with a transparent platen between the original and the line sensor to fix a position at which a transported original is read. The original reflects light which is in turn received via the platen by the line sensor.

As such, if dust, paper particles, flaws or other similar foreign matters (hereinafter generally referred to as “dust”) adhere on the platen's reading position, the line sensor will read the dust while reading a transported original. This provides an output image with noise in the form of a line in the sub scanning direction.

Japanese Laid-Open Patent Publication No. 2002-77584 discloses a technique for improving the image quality by replacing image data of a region where noise in the form of a line appears in the sub scanning direction with image data of regions adjacent to and located on respective sides of the region having the line noise.

However, the image data of the adjacent regions on respective sides of the noise region is not always similar to the image data of the noise region. For example, in the adjacent regions, an edge region could be present or the color could suddenly change. More specifically, it is supposed here that an original has two regions that are one region of red and the other region of black and a noise region is present in the red region near the boundary between the two regions. In this case, although the noise region should be corrected to red, the noise region could be corrected to black due to the presence of the adjacent black region.

SUMMARY OF THE INVENTION

The present invention has been made to overcome the above disadvantage and contemplates an image reading apparatus capable of accurately correcting noise generated in an image by dust existing on a platen.

To achieve the above object the present invention in one aspect provides an image reading apparatus including: a plurality of line sensors arranged to be mutually spaced in a sub scanning direction to scan an original in the sub scanning direction; a platen arranged between the original and the line sensors; a mover moving the platen at a rate relative to the line sensors, the rate being different from that of the original relative to the line sensors; a detector detecting a noise pixel based on a plurality of data output from the plurality of line sensors; a selector selecting one of a plurality of search ranges defined with reference to the noise pixel; a reference pixel extractor extracting, from the selected search range, a reference pixel for correcting the noise pixel; and a corrector correcting the noise pixel based on a value of the extracted reference pixel.

In accordance with the present invention the original is scanned in the sub scanning direction by a plurality of line sensors spaced in the sub scanning direction and between the original and the line sensors there is provided the platen moving at a rate relative to the line sensors, the rate being different from that of the original relative to the line sensors. When the platen has dust adhering thereon, the dust is read by the line sensors sequentially. As the platen is moved at a rate relative to the line sensors, the rate being different from that of the original relative to the line sensors, the dust on the platen is read by each line sensor at a different location of the original. The image reading apparatus detects a noise pixel based on a plurality of data output from the line sensors. From a search range that is selected from a plurality of search ranges defined with reference to the noise pixel, the reference pixel is extracted for correcting the noise pixel. Based on the value of the extracted reference pixel, the noise pixel is corrected. Since the search range from which the reference pixel for correcting the noise pixel is extracted is selected from a plurality of search ranges, a search range appropriate for an image on the original can be selected. The image reading apparatus can thus be provided that is capable of accurately correcting noise.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Hereinafter reference will be made to the drawings to describe embodiments of the present invention. In the following description, like components are denoted by like reference characters and also identical in name and function.

FIG. 1is a perspective view of a multi-function peripheral (MFP) including an image reading apparatus in one embodiment of the present invention. With reference to the figure, the MFP includes an image reading apparatus10operative to read an original image, and an image forming apparatus20provided under image reading apparatus10. The MFP forms an image read by image reading apparatus10on a sheet of paper or similar recording medium. Furthermore, the MFP includes a communications interface to connect with a facsimile device, a local area network (LAN), a public line or similar network.

FIG. 2schematically shows an internal configuration of image reading apparatus10. Image reading apparatus10includes an automatic document feeder (ADF)101and a main body103. ADF101includes an upper restraint plate203guiding a transported original in the vicinity of an original reading position, a timing roller pair201transporting the original to the original reading position, and a roller pair202transporting the original having moved past the reading position.

Main body103includes a platen205formed of a transparent member, a sheet passage guide207forming a portion of a path of the original, a source of light206illuminating the original at the reading position, a reflector member208reflecting the light emitted from the source of light, a reader213having three line sensors arranged in a sub scanning direction, a reflector mirror209arranged to reflect light reflected from the original and guide the reflection of light to reader213, a lens211focusing the reflection of light on reader213, an image processor215processing an electrical signal output from reader213, a motor219operative to oscillate platen205, and a motor controller217operative in response to a control signal received from image processor215to control the driving of motor219.

An original200is transported by timing roller pair201between platen205and upper restraint plate203in a direction D1. The original being transported has its image read at a reading position L by reader213successively. ADF101transports an original in the sub scanning direction, as seen at a reading position L. During the image reading operation, platen205is oscillated by motor219in a direction D2. Platen205oscillates in a direction substantially parallel to the sub scanning direction.

Reader213includes three line sensors each having a plurality of photoelectric conversion elements arranged in a main scanning direction substantially perpendicular to the sub scanning direction. The three line sensors have filters, respectively, different in spectral sensitivity and receive light reflected from an original through the filters. More specifically, the sensors have filters transmitting light of waveforms of red (R), green (G) and blue (B). Thus, the line sensor having the filter of red (R) outputs an R signal, an electrical signal indicating an intensity of red light of light reflected from an original, the line sensor having the filter of green (G) outputs a G signal, an electrical signal indicating an intensity of green light of light reflected from the original, and the line sensor having the filter of blue (B) outputs a B signal, an electrical signal indicating an intensity of blue light of light reflected from the original.

The three line sensors are arranged in the sub scanning direction in a predetermined order with a predetermined distance therebetween. In this example, the line sensors are spaced by a distance corresponding to three original reading lines, and arranged, red first, followed by green and then blue as seen in the direction in which an original is transported, although the line sensors may be spaced by different distances and arranged in different orders.

The three line sensors thus spaced and arranged simultaneously receive at the same timing the light reflected by an original at different locations. As such, the light reflected by the original at a location is initially received by the red light receiving line sensor, subsequently by the green light receiving line sensor, and finally by the blue light receiving line sensor. This delay is adjusted by image processor215, as will be described later.

Note that while in the present embodiment reader213is provided with three line sensors, it may be provided with four or more line sensors.

FIG. 3is a perspective view showing a mechanism employed to oscillate the platen. With reference to the figure, platen205is held by a platen holder221held slidably in the sub scanning direction by a guide220fixed to the main body of image reading apparatus10. Platen holder221has one surface with two arms222connected thereto. Arm222has the other end provided with a circular hole.

A shaft224at portions corresponding to the two arms222has two cams223attached thereto. Furthermore, shaft224has one end with a gear225attached thereto. Gear225is arranged to mesh with a gear226linked by a belt to the motor219drive shaft. As motor219runs, the motor's rotation is transmitted by the belt to gear226, and gear226thus rotates. As gear226rotates, gear225and shaft224rotate.

Cam223is arranged in the circular hole of arm222. As such, as shaft224rotates, the two cams223accordingly provide rotation, which is converted to translation movement of platen holder221.

Note that platen205may be oscillated by a mechanism other than that described above. For example, the platen may be oscillated by a mechanism employing a driving source, such as a piston utilizing an electromagnet, air pressure, hydraulic pressure and the like, causing linear movement.

Platen205is oscillated parallel to the sub scanning direction. When platen205is moving in a direction opposite that in which an original is transported, platen205and the original move in the opposite directions. As such, the speed of platen205relative to line sensors213R,213G,213B and that of the original relative to the line sensors are different. In contrast, when platen205is moving in the direction in which the original is transported, the speed of platen205and that of the original transported are the same in direction. Preferably, they should be different in rate. Note that while herein platen205is oscillated parallel to the sub scanning direction, the platen may be oscillated in different directions.

In the present embodiment image reading apparatus10detects noise generated by dust adhering on platen205from a read image in accordance with a theory as described hereinafter.FIGS. 4A-4Care diagrams for illustrating the theory. For the sake of illustration, an original and platen205are transported in the figures in a direction indicated by an arrow, and platen205moves at a rate which is the same in direction as and twice in magnitude that at which the original is transported. Furthermore for the sake of illustration the three line sensors are red light, green light and blue light receiving line sensors arranged red first, followed by green and then blue in the direction in which the original is transported, with a distance corresponding to three lines therebetween. R, G and B indicate outputs of the red light, green light and blue light receiving line sensors, respectively.

FIG. 4Ais a diagram for illustrating interline correction. The image of a portion of the original is initially read by the red light receiving line sensor arranged most upstream in the direction in which the original is transported. The image is then transported by a distance corresponding to four lines, and read by the green light receiving line sensor. The image is further transported by a distance corresponding to four lines, and read by the blue light receiving sensor.

Thus an image located in an original at a single location is read by three line sensors at different times. As such, the three line sensors output signals offset in timing. Interline correction synchronizes the signals output from the three line sensors-so that the signals all correspond to a single location in the original. More specifically, output R is delayed by eight lines and output G is delayed by four lines.

Interline corrected outputs R, G and B are composited to provide a composite output, which corresponds to outputs R, G and B read at a single location in an original and composited together.

FIG. 4Bis a diagram for illustrating a composite output provided when dust adhering on a platen is read. The dust adhering on platen205is initially read by the red light receiving line sensor arranged most upstream in the direction in which an original is transported. The dust is transported by a distance corresponding to four lines, and read by the green light receiving line sensor. Since platen205moves in the same direction as the original at a rate twice that at which the original is transported, the dust moves by four lines in a period of time required for a line sensor to read the original by two lines. As such, between the time point at which the red line sensor reads the dust and that at which the green line sensor reads the dust there is introduced an offset by a period of time corresponding to reading two lines. Furthermore, the dust is transported by a distance corresponding to four lines, and read by the blue light receiving line sensor. Since platen205moves in the same direction as the original at a rate twice that at which the original is transported, between the time point at which the green line sensor reads the dust and that at which the blue line sensor reads the dust there is introduced an offset by a period of time corresponding to reading two lines.

By interline correction the red light receiving line sensor reading the dust outputs R delayed by eight lines and the green light receiving line sensor reading the dust outputs G delayed by four lines. As such, interline corrected outputs R, G and B composited together provide a composite output in which outputs R, G and B with the dust read are not composited at the same timing, offset by two lines.

Note that the figure shows a composite output provided when paper particles or similar white dust adhere on platen205and a black original is read. Despite that the white dust is read, the composite output is not white but rather an output of blue, green and red divided in three lines.

FIG. 4Cis another diagram for illustrating a composite output provided when dust adhering on a platen is read. The figure shows an example of reading dust having a size corresponding to ten lines in the sub scanning direction. Platen205moves in the same direction as an original at a rate twice that at which the original is transported. As such, the dust is read as having a size corresponding to five lines.

The dust adhering on platen205is initially read by the red light receiving line sensor arranged most upstream in the direction in which the original is transported. The dust is then transported by a distance corresponding to four lines, and read by the green light receiving line sensor. Between the time point at which the red line sensor reads the dust and that at which the green line sensor reads the dust there is introduced an offset by a period of time corresponding to reading two lines. The dust further is transported by a distance corresponding to four lines, and read by the blue light receiving line sensor. Between the time point at which the green line sensor reads the dust and that at which the blue line sensor reads the dust there is introduced an offset by a period of time corresponding to reading two lines.

By interline correction the red light receiving line sensor reading the dust outputs R delayed by eight lines and the green light receiving line sensor reading the dust outputs G delayed by four lines. As such, interline corrected outputs R, G and B composited together provide a composite output in which outputs R, G and B by five lines with the dust read are not composited at the same timing, offset by two lines. Note that the figure shows a composite output provided when paper particles or similar white dust adhere on platen205and a black original is read. Despite that the white dust is read, the composite output is an output varying in color, first in blue, followed by cyan, white yellow and then red.

The dust adhering on platen205is thus divided in an image into a plurality of lines, which are extracted for each color as a feature point to detect noise. Furthermore, such division also reduces noise caused by reading the dust.

FIG. 5is a plan, rear view of the platen. With reference to the figure, platen205has one end with a mark205A having a single color and a geometry having in the main scanning direction a length varying depending on the position in the sub scanning direction. In this description, mark205A is a black triangle. Furthermore, mark205A has one side arranged parallel to one side of platen205.

Reader213or a sensor provided separate from reader213and fixed to main body103can be used to detect the length of mark205A in the main scanning direction to detect the position of platen205relative to reader213.

FIG. 6shows a location on platen205read by reader213. Reader213has line sensors213R,213G and213B having filters of red (R), green (G) and blue (B), respectively, arranged in a direction in which an original is transported D1, red first, followed by green and then blue.

Line sensors213R,213G and213B receive light transmitted through platen205at regions205R,205G and205B, respectively. Regions205R,205G and205B are arranged to be spaced by three lines. The original initially moves past region205R, then region205G and finally region205B. As such, light reflected by the original at a location is initially received by the red light receiving line sensor213R, then the green light receiving line sensor213G, and finally the blue light receiving line sensor213B. Line sensors213R,213G,213B spaced by three lines thus will not simultaneously receive light reflected by the original at a single location.

If platen205has adhering thereto dust300having a maximal length of at most four lines, then dust300will not exist at two or more of regions205R,205G,205B concurrently as platen205moves oscillating parallel to the sub scanning direction.FIG. 6shows a case where dust300exists at region205G. In this case, light reflected by dust300is received only by line sensor213G and not received by line sensor213R or213B.

Furthermore, as platen205oscillates, dust300will exists at different regions. More specifically, when platen205moves in direction D1, dust300initially exists at region205R, then region205G and finally region205B. In contrast, when platen205moves in a direction opposite direction D1, dust300exists initially at region205B, then region205G, and finally region205R.

As such, light reflected by dust300is received in such an order that when platen205moves in direction D1the light is received initially by line sensor213R, then line sensor213G and finally line sensor213B and when platen205moves opposite to direction D1the light is received initially by line sensor213B, then line sensor213G, and finally line sensor213R.

When platen205is moving in the direction in which the original is transported, noise resulting from reading of the dust appears first in the R signal output from line sensor213R, then in the G signal output from line sensor213G and finally in the B signal output from line sensor213B. When platen205is moving in the direction opposite to the direction in which the original is transported, noise resultant from reading of the dust appears first in the B signal output from line sensor213B, then in the G signal output from line sensor213G and finally in the R signal output from line sensor213R. In other words, in what order the noise appears in the signals is determined by the direction in which platen205is moved. The order of the signals having noise therein detected can be determined to improve precision in detecting the noise.

FIG. 7is a block diagram showing a configuration of the image processor of the image reading apparatus in the present embodiment. With reference to the figure, image processor215receives R, G and B signals from reader213. Image processor215includes an analog/digital (A/D) converter251receiving an analog signal from reader213to convert the analog signal to a digital signal, a shading corrector253correcting uneven illumination provided by the source of light206or the like, an interline corrector255synchronizing the R, G and B signals to be a single line of an original, a color aberration corrector257correcting distortion in the main scanning direction introduced by lens211, a noise detection processor259detecting noise from each of the R, G and B signals, a noise corrector260effecting a process to correct a noise pixel, a controller263generally controlling image processor215, and a printer interface261used to output an image to image forming apparatus20. Controller263has a position detector265connected thereto to detect the position of platen205. Position detector265detects a length of mark205A of platen205in the main scanning direction.

Interline corrector255delays the R and G signals by eight and four lines, respectively, to synchronize the R, G and B signals to be a single line of the original, since as has been described previously, line sensors213R,213G,213B are spaced in the sub scanning direction by a distance corresponding to three lines.

Noise detection processor259receives the R, G and B signals from color aberration corrector257and from controller263the position of platen205and a direction in which platen205moves. Noise detection processor259detects a noise pixel for each of the R, G and B signals received from color aberration corrector257, and outputs to noise corrector260and controller263logical signals of “1” and “0” indicating a noise pixel and a pixel other than a noise pixel, respectively. The detail will be described later.

Noise corrector260receives the R, G and B signals from color aberration corrector257and from noise detection processor259receives for each of the R, G and B signals logical signal of “1” and “0” indicating a noise pixel and a pixel other than a noise pixel, respectively.

Noise corrector260replaces, for each of the R, G and B signals, based on a logical signal corresponding thereto, the value of a pixel determined as a noise pixel with that of a neighboring non-noise pixel. Noise corrector260outputs to the printer interface the R, G and B signals with the noise pixel replaced with the neighboring pixel. Details of noise corrector260are given hereinlater.

Controller263receives the position of platen205from position detector265and from noise detection processor259logical signals of “1” and “0” indicating a noise pixel and a pixel other than noise pixel, respectively. Controller263determines from these signals the dust's location on platen205. More specifically, it determines the position of platen205in the sub scanning direction from the position of platen205and a logical signal's line number, and the position of platen205in the main scanning direction from a location of a noise pixel of the logical signal.

The noise detection process will more specifically be described hereinafter.

As has been described with reference toFIG. 6, line sensors213R,213G and213B will read different locations on an original at the same timing. Interline corrector255synchronizes the R, G and B signals' lines to obtain R, G and B signals having read a single location on the original.

As such, if platen205has dust adhering thereon, R, G and B signals having read a single location on an original have one of them affected.

FIGS. 8A and 8Brepresent an example of RGB signal output from the reader.FIG. 8Ashows an example of reading a white area of an original with black dust adhering on the platen's region205R corresponding to line sensor213R. Line sensor213R reads a portion of the original with the black dust on region205R. Subsequently, the portion of the original moves to regions205G,205B corresponding to line sensors213G,213B, when the dust does not exist on regions205G,205B, since the original and platen205moves at different rates. As such line sensors213G,213B will read the original's white area. Consequently, only an R signal output from line sensor213R is reduced in lightness and line sensors213G,213B output G and B signals high in lightness. Note that herein, “lightness” indicates a value output from the three line sensors213R,213G,213B corresponding to a reflection of light.

TheFIG. 8ARGB signals' combination is seldom output when an original is read without dust adhering thereto. A combination closest thereto is a case where an area of cyan, a color complementary to red, is read.FIG. 8Brepresents RGB signal output from reader213when an original's cyan area is read. The R signal significantly drops in lightness, and the G and B signals also drops in lightness. As such, the variation in lightness of the R signal significantly dropping in lightness can be detected by using a threshold value Red1(R).

TheFIG. 8ARGB signal and theFIG. 8BRGB signal are significantly different in whether the B and G signals are affected. By detecting this difference, black dust can be detected as noise without detecting a cyan line erroneously as noise. As such, the B signal's variation in lightness is detected by using a threshold value Ref2(B). Threshold value Ref2(B) can simply be provided by the smallest one of the following values. Hereinafter, threshold values Ref2(R), Ref2(G), Ref2(B) are indicated.

(1) Detecting Dust of Achromatic Color High in Lightness

To prevent a cyan line from being detected erroneously as noise, the difference between a maximum value in lightness (255) and one of the values in lightness output from the line sensors other than line sensor213R, i.e., line sensors213G and213B, reading a color complementary to red, or cyan, can be set as Ref2(G), Ref2(B). To prevent a magenta line from being detected erroneously as noise, the difference between the maximum value in lightness (255) and one of the values in lightness output from the line sensors other than line sensor213G, i.e., line sensors213R and213B, reading a color complementary to green, or magenta, can be set as Ref2(R), Ref2(B). To prevent a yellow line from being detected erroneously as noise, the difference between the maximum value in lightness (255) and one of the values in lightness output from the line sensors other than line sensor213B, i.e., line sensors213R and213G, reading a color complementary to blue, or yellow, can be set as Ref2(R), Ref2(G).

(2) Detecting Dust of Achromatic Color Low in Lightness

To prevent a red line from being detected erroneously as noise, the difference between a minimum value in lightness (0) and one of the values in lightness output from the line sensors other than line sensor213R, i.e., line sensors213G and213B, reading red color, can be set as Ref2(G), Ref2(B). To prevent a green line from being detected erroneously as noise, the difference between the minimum value in lightness (0) and one of the values in lightness output from the line sensors other than line sensor213G, i.e., line sensors213R and213B, reading green color, can be set as Ref2(R), Ref2(B). To prevent a blue line from being detected erroneously as noise, the difference between the minimum value in lightness (0) and one of the values in lightness output from the line sensors other than line sensor213B, i.e., line sensors213R and213G, reading blue color, can be set as Ref2(R), Ref2(G).

Thus more than one threshold value Ref2(R), Ref2(G), Ref2(B) are obtained, and a minimum value thereof can simply be used.

While herein black dust is detected as noise, dust of achromatic color other than black can also be detected, since any achromatic dust affects all of R, G and B signals.

Furthermore, while herein a white original is read by way of example, an original of any color other than white may be read.

FIG. 9is a block diagram showing a configuration of the noise detection processor of the image reading apparatus in the present embodiment. With reference to the figure, noise detection processor259includes first lightness difference detectors301R,301G,301B extracting from R, G and B signals, respectively, a region having a predetermined feature, second lightness difference detectors302R,302G,302B extracting from R, G and B signals, respectively, a region having the predetermined feature, detection result extension processors303R,303G,303B extending the region extracted by the second lightness detectors302R,302G,302B to a vicinity thereof, NOR devices305R,305G,305B, AND devices307R,307G,307B, a determiner308, and detected-area extension processors309R,309G,309B.

R, G and B signals are input to noise detection processor259, one line at a time, sequentially. Note that the R, G and B signals may be input collectively by a plurality of lines or an entire image.

The first lightness difference detector301R receives the R signal and threshold value Ref1(R) and extracts from the R signal a region having the predetermined feature of a first level. This region is a region having a limited variation in lightness and a difference in lightness of at least threshold Ref1(R) from a region surrounding it. Such region is only required to have a size of at least one pixel. In this description a pixel included in a region having the predetermined feature of the first level will be referred to as a first feature pixel.

The region having the predetermined feature of the first level may be extracted by employing an edge extraction filter. More than one edge extraction filter are prepared for sizes of edge regions, respectively, and a value obtained as a result of filtering is compared with threshold value Ref1(R). A pixel satisfying a condition with threshold value Ref1(R) is determined as a center pixel of an edge region and from an edge extraction filter satisfying that condition the edge region's size is obtained.

FIGS. 10A-10Frepresent the edge extraction filter by way of example.FIG. 10Arepresents an edge extraction filter used to detect an edge region of a size of one pixel when an R signal is input, one line at a time.FIG. 10Brepresents an edge extraction filter used to detect an edge region of a size of one pixel when an R signal is input in a plurality of lines correctively.

FIG. 10Crepresents an edge extraction filter used to detect an edge region of a size of three pixels when an R signal is input, one line at a time.FIG. 10Drepresents an edge extraction filter used to detect an edge region of a size of three pixels when an R signal is input in a plurality of lines correctively.

FIG. 10Erepresents an edge extraction filter used to detect an edge region of a size of five pixels when an R signal is input, one line at a time.FIG. 10Frepresents an edge extraction filter used to detect an edge region of a size of five pixels when an R signal is input in a plurality of lines correctively.

These edge extraction filters are established under the following conditions:

(1) An edge region high in lightness is extracted when an average in lightness of pixels A and B minus that in lightness of pixel C equals at least threshold value Ref1(R):
(Average of PixelsAandB)−(Average of PixelC)>Ref1(R).

In that case, the center pixel is one of pixels A, B and C that is the highest in lightness.

(2) An edge region low in lightness is extracted when an average in lightness of pixel C minus that in lightness of pixels A and B equals at least threshold value Ref1(R):
(Average of PixelC)−(Average of PixelsAandB)>Ref1(R).

In that case, the center pixel is one of pixels A, B and C that is the lowest in lightness.

G and B signals can also be handled with an edge extraction filter similar to that used for the R signal.

The first lightness difference detectors301R,301G,301B compare a value calculated by the above described edge extraction filter with threshold values Ref1(R), Ref1(G), Ref1(B).

With reference again toFIG. 9, the first feature pixel extracted by the first lightness difference detector301R is represented by a logical signal of “1” and a pixel other than the first feature pixel is represented by a logical signal of “0” and thus output to AND device307R and determiner308.

The second lightness difference detector302R receives the R signal and threshold value Ref2(R) and extracts from the R signal a region having the predetermined feature of a second level. This region is a region having a limited variation in lightness and a difference in lightness of at least threshold Ref2(R) from a region surrounding it. Such region is only required to have a size of at least one pixel. In this description a pixel included in a region having the predetermined feature of the second level will be referred to as a second feature pixel. It should be noted that threshold value Ref2(R) is a smaller value than threshold value Ref1(R).

The region having the predetermined feature of the second level may be extracted by employing an edge extraction filter. More than one edge extraction filter are prepared for sizes of edge regions, respectively, and a value obtained as a result of filtering is compared with threshold value Ref2(R). A pixel satisfying a condition with threshold value Ref2(R) is determined as a center pixel of an edge region and from an edge extraction filter satisfying that condition the edge region's size is obtained.

The second lightness difference detectors302R,302G,302B compare a value calculated by the above described edge extraction filter with threshold values Ref2(R), Ref2(G), Ref2(B).

The second feature pixel extracted by the second lightness difference detector302R is represented by a logical signal of “1” and a pixel other than the second feature pixel is represented by a logical signal of “0” and thus output to detection result extension processor303R.

Detection result extension processor303R sets a pixel neighboring the second feature pixel extracted by the second lightness difference detector302R as a second feature pixel to extend a region having the predetermined feature of the second level. In other words, a pixel that exists in a vicinity of a pixel of “1” in value as represented by a logical signal received from the second lightness difference detector302R and has a value of “0” is changed to “1”. Noise can be detected with higher precision. A logical signal having contributed to extended region is output to NOR devices305G,305B.

The first lightness difference detector301G receives the G signal and threshold value Ref1(G) and extracts from the G signal a region having the predetermined feature of the first level. This region is a region having a limited variation in lightness and a difference in lightness of at least threshold Ref1(G) from a region surrounding it.

The region having the predetermined feature of the first level may be extracted by employing an edge extraction filter. More than one edge extraction filter are prepared for sizes of edge regions, respectively, and a value obtained as a result of filtering is compared with threshold value Ref1(G). A pixel satisfying a condition with threshold value Ref1(G) is determined as a center pixel of an edge region and from an edge extraction filter satisfying that condition the edge region's size is obtained.

The feature pixel extracted by the first lightness difference detector301G is represented by a logical signal of “1” and a pixel other than the first feature pixel is represented by a logical signal of “0” and thus output to AND device307G and determiner308.

The second lightness difference detector302G receives the G signal and threshold value Ref2(G) and extracts from the G signal a region having the predetermined feature of the second level. This region is a region having a limited variation in lightness and a difference in lightness of at least threshold Ref2(G) from a region surrounding it. Such region is only required to have a size of at least one pixel. In this description a pixel included in a region having the predetermined feature of the second level will be referred to as a second feature pixel. It should be noted that threshold value Ref2(G) is a smaller value than threshold value Ref1(G).

The region having the predetermined feature of the second level may be extracted by employing an edge extraction filter. More than one edge extraction filter are prepared for sizes of edge regions, respectively, and a value obtained as a result of filtering is compared with threshold value Ref2(G). A pixel satisfying a condition with threshold value Ref2(G) is determined as a center pixel of an edge region and from an edge extraction filter satisfying that condition the edge region's size is obtained.

The second feature pixel extracted by the second lightness difference detector302G is represented by a logical signal of “1” and a pixel other than the second feature pixel is represented by a logical signal of “0” and thus output to detection result extension processor303G.

Detection result extension processor303G sets a pixel neighboring the second feature pixel extracted by the second lightness difference detector302G as a second feature pixel to extend a region having the predetermined feature of the second level. A logical signal having contributed to an extended region is output to NOR devices305R,305B.

The first lightness difference detector301B receives the B signal and threshold value Ref1(B) and extracts from the B signal a region having the predetermined feature of the first level. This region is a region having a limited variation in lightness and a difference in lightness of at least threshold Ref1(B) from a region surrounding it.

The region having the predetermined feature of the first level may be extracted by employing an edge extraction filter. More than one edge extraction filter are prepared for sizes of edge regions, respectively, and a value obtained as a result of filtering is compared with threshold value Ref1(B). A pixel satisfying a condition with threshold value Ref1(B) is determined as a center pixel of an edge region and from an edge extraction filter satisfying that condition the edge region's size is obtained.

The feature pixel extracted by the first lightness difference detector301B is represented by a logical signal of “1” and a pixel other than the first feature pixel is represented by a logical signal of “0” and thus output to AND device307B and determiner308.

The second lightness difference detector302B receives the B signal and threshold value Ref2(B) and extracts from the B signal a region having the predetermined feature of the second level. This region is a region having a limited variation in lightness and a difference in lightness of at least threshold Ref2(B) from a region surrounding it. Such region is only required to have a size of at least one pixel. In this description a pixel included in a region having the predetermined feature of the second level will be referred to as a second feature pixel. It should be noted that threshold value Ref2(B) is a smaller value than threshold value Ref1(B).

The region having the predetermined feature of the second level may be extracted by employing an edge extraction filter. More than one edge extraction filter are prepared for sizes of edge regions, respectively, and a value obtained as a result of filtering is compared with threshold value Ref2(B). A pixel satisfying a condition with threshold value Ref2(B) is determined as a center pixel of an edge region and from an edge extraction filter satisfying that condition the edge region's size is obtained.

The second feature pixel extracted by the second lightness difference detector302B is represented by a logical signal of “1” and a pixel other than the second feature pixel is represented by a logical signal of “0” and thus output to detection result extension processor303B.

Detection result extension processor303B sets a pixel neighboring the second feature pixel extracted by the second lightness difference detector302B as a second feature pixel to extend a region having the predetermined feature of the second level. A logical signal having contributed to an extended region is output to NOR devices305R,305G.

NOR device305R receives from each of detection result extension processor303G,303B a logical signal having contributed to an extended region. NOR device305R outputs to AND device307R a logical signal corresponding to an inversion of an OR of two received logical signals. More specifically, a pixel which is not a second feature pixel for either a G or B signal is represented by a logical signal of “1” for output and a pixel which is a second feature pixel for at least one of the signals is represented by a logical signal of “0” for output.

AND device307R outputs to determiner308an AND of a logical signal received from the first lightness difference detector301R and that received from NOR device305R. More specifically, a pixel which is a first feature pixel for an R signal and not an extended second feature pixel for either a B or G signal is represented by a logical signal of “1” and a pixel different therefrom is represented by a logical signal of “0” for output. A pixel of “1” in value as represented by this logical signal indicates a noise pixel. Thus by NOR device305R and AND device307R a first feature pixel extracted from an R signal that has not been extracted as [[a]] an extended second feature pixel for either a G or B signal is determined as a noise pixel.

NOR device305G receives from each of detection result extension processors303R,303B a logical signal having contributed to an extended region. NOR device305G outputs to AND device307G a logical signal corresponding to an inversion of an OR of two received logical signals. More specifically, a pixel which is not a second feature pixel for either an R or B signal is represented by a logical signal of “1” for output and a pixel which is a second feature pixel for at least one of the signals is represented by a logical signal of “0” for output.

AND device307G outputs to determiner308an AND of a logical signal received from the first lightness difference detector301G and that received from NOR device305G. More specifically, a pixel which is a first feature pixel for a G signal and not an extended second feature pixel for either a R or B signal is represented by a logical signal of “1” and a pixel different therefrom is represented by a logical signal of “0” for output. A pixel of “1” in value as represented by this logical signal indicates a noise pixel. Thus by NOR device305G and AND device307G a first feature pixel extracted from a G signal that has not been extracted as an extended second feature pixel for either an R or B signal is determined as a noise pixel.

NOR device305B receives from each of detection result extension processors303R,303G a logical signal having contributed to an extended region. NOR device305B outputs to AND device307B a logical signal corresponding to an inversion of an OR of two received logical signals. More specifically, a pixel which is not a second feature pixel for either an R or G signal is represented by a logical signal of “1” for output and a pixel which is a second feature pixel for at least one of the signals is represented by a logical signal of “0” for output.

AND device307B outputs to determiner308an AND of a logical signal received from the first lightness difference detector301B and that received from NOR device305B. More specifically, a pixel which is a first feature pixel for a B signal and not an extended second feature pixel for either an R or G signal is represented by a logical signal of “1” and a pixel different therefrom is represented by a logical signal of “0” for output. A pixel of'1″ in value as represented by this logical signal indicates a noise pixel. Thus by NOR device305B and AND device307B a first feature pixel extracted from a B signal that has not been extracted as [[a]] an extended second feature pixel for either an R or G signal is determined as a noise pixel.

Determiner308receives from the first lightness difference detectors301R,301G,301B the logical signal of “1” representing the first feature pixel of R, G and B signals each, from AND devices307R,307G,307B the logical signal of “1” representing the noise pixel of R, G and B signals each, and from controller263the direction in which platen205is moved. Determiner308determines whether or not the pixel determined as a noise pixel is valid or not. A detailed description of determiner308is given hereinlater.

If detected-area extension processor309R receives a logical signal of “1” from AND device307R for a pixel, detected-area extension processor309R sets a pixel that exists in a vicinity of the pixel corresponding to the “1” to a “1” to extend a noise pixel's range. This is done to provide improved precision with which a noise pixel is corrected. The noise pixel extended in range is represented by a logical signal of “1” which is in turn output to noise corrector260.

If detected-area extension processor309G receives a logical signal of “1” from AND device307G for a pixel, detected-area extension processor309G sets a pixel that exists in a vicinity of the pixel corresponding to the “1” to a “1” to extend a noise pixel's range. This is done to provide improved precision with which a noise pixel is corrected. The noise pixel extended in range is represented by a logical signal of“1” which is in turn output to noise corrector260.

If detected-area extension processor309B receives a logical signal of “1” from AND device307B for a pixel, detected-area extension processor309B sets a pixel that exists in a vicinity of the pixel corresponding to the “1” to a “1” to extend a noise pixel's range. This is done to provide improved precision with which a noise pixel is corrected. The noise pixel extended in range is represented by a logical signal of “1” which is in turn output to noise corrector260.

FIG. 11is a flowchart showing a flow of a determination process followed by the determiner of the noise detection processor. The determination is made each time logical signals corresponding to the R, G and B signals are input. Logical signals corresponding to respective R, G and B signals are input in the order in which line sensors213R,213G,213B output respective R, G and B signals. With reference toFIG. 11, in the determination process followed by determiner308, the direction in which platen205is moved is first provided (step S01). Then, the order in which noise pixels are detected from the R, G and B signals is determined (step S02).

Based on the direction in which platen205is moved, the order in which noise pixels are expected to be detected from the R, G and B signals is determined, i.e., it is determined from which signals noise pixels are expected to be firstly, secondly and thirdly detected respectively. A signal from which the noise pixel is expected to be detected firstly is herein referred to as first signal, a signal from which the noise pixel is expected to be detected secondly is herein referred to as second signal, and a signal from which the noise pixel is expected to be detected thirdly is herein referred to as third or last signal. This order is determined in the following manner on the basis of the three conditions.

(1) In the case where platen205is moved in the same direction as that in which the original is transported and at a lower rate than the rate at which the original is transported, the first signal is the R signal output from line sensor213R, the second signal is the G signal output from line sensor213G and the third signal is the B signal output from line sensor213B.

(2) In the case where platen205is moved in the same direction as that in which the original is transported and at a higher rate than the rate at which the original is transported, the first signal is the B signal output from line sensor213B, the second signal is the G signal output from line sensor213G and the third signal is the R signal output from line sensor213R.

(3) In the case where platen205is moved in the opposite direction to the direction in which the original is transported, the first signal is the B signal output from line sensor213B, the second signal is the G signal output from line sensor213G and the third signal is the R signal output from line sensor213R. In this case the relation between the magnitude of the rate at which platen205is moved and the magnitude of the rate at which the original is transported is irrelevant to the order in which noise pixels are detected from the signals.

In step S03, logical signals corresponding to the R, G and B signals are input. Then, noise pixel correction for three logical signals is made (step S04).

FIG. 12is a flowchart showing a flow of the noise pixel correction in step S04ofFIG. 11. With reference toFIG. 12, in the process of the noise pixel correction, a target pixel is selected from the first one of R, G and B signals to determine whether or not the target pixel is a noise pixel (step S21). Here, the target pixel is a pixel to be subjected to the noise pixel correction. Noise detection processor259receives a logical signal corresponding to the R signal and representing a noise pixel as “1”, a logical signal corresponding to the G signal and representing a noise pixel as “1” and a logical signal corresponding to the B signal and representing a noise pixel as “1”. Accordingly, in this noise pixel correction process, if a target pixel of a logical signal corresponding to the first signal is “1”, the target pixel is determined as a noise pixel. Thus, if the target pixel is a noise pixel, the process proceeds to step S25. If not, the process proceeds to step S22.

In step S22, it is determined whether or not the target pixel of the first signal is a first feature pixel. If so, the process proceeds to step S23. If not, the process proceeds to step S25. When the process proceeds to step S23, the target pixel of the first signal is not a noise pixel but the first feature pixel. In this case, a target pixel of the second signal is a first feature pixel, a target pixel of the third signal is a first feature pixel, or respective target pixels of the second and third signals are first feature pixels. In such a case, the target pixel of the first signal could be a pixel that reads dust adhering on platen205. In the following steps, it is determined whether or not the target pixel of the first signal is a pixel that reads dust adhering on platen205. Here, in such a case where a target pixel of the first signal and a target pixel of the third signal are first feature pixels and a target pixel of the second signal is not a first feature pixel, it is possible for example that white dust adheres on platen205while a green region of an original is being read.

In step S23, it is determined whether or not the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel of the first signal has been determined as a noise pixel. If so, the process proceeds to step S24. If not, the process proceeds to step S25. This determination is made on the basis of a logical signal that is previously input to noise detection processor259and representing the noise pixel of the line having been subjected to the noise pixel correction as “1”.

In step S24, the target pixel of the first signal is changed to a noise pixel. Specifically, value “0” of the target pixel of the logical signal corresponding to the first signal and representing a noise pixel as “1” is changed to “1”. Namely, when the target pixel of the first signal is the first feature pixel and the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel of the first signal is a noise pixel, the target pixel of the first signal is changed to the noise pixel.

The target pixel of the first signal is changed to the noise pixel in step S24on the condition that:

the target pixel of the first signal is the first feature pixel, at least one of the target pixel of the second signal and the target pixel of the third signal is the first feature pixel and the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel of the first signal is a noise pixel.

In the following step S25, it is determined whether or not the target pixel of the second signal is a noise pixel. If so, the process proceeds to step S30. If not, the process proceeds to step S26.

In step S26, it is determined whether or not the target pixel of the second signal is a first feature pixel. If so, the process proceeds to step S27. If not, the process proceeds to step S30. When the process proceeds to step S27, the target pixel of the second signal is not a noise pixel but the first feature pixel. In this case, the target pixel of the first signal is a first feature pixel, the target pixel of the third signal is a first feature pixel, or respective target pixels of the first and third signals are first feature pixels. In such a case, the target pixel of the second signal could be a pixel that reads dust adhering on platen205. In the following steps, it is determined whether or not the target pixel of the second signal is a pixel that reads dust adhering on platen205.

In step S27, it is determined whether or not the target pixel of the first signal is a noise pixel. If so, the process proceeds to step S29. If not, the process proceeds to step S28. When the target pixel of the first signal is a noise pixel, the target pixel of the second signal is changed to a noise pixel.

In step S28, it is determined whether or not the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel of the second signal has been determined as a noise pixel. If so, the process proceeds to step S29. If not, the process proceeds to step S30. This determination is made on the basis of a logical signal that is previously input to noise detection processor259and representing the noise pixel of the line having been subjected to the noise pixel correction as “1”.

In step S29, the target pixel of the second signal is changed to a noise pixel. Specifically, value “0” of the target pixel of the logical signal corresponding to the second signal and representing a noise pixel as “1” is changed to “1”. In step S29, the target pixel of the second signal is changed to the noise pixel on the following condition:

(1) the target pixel of the second signal is the first feature pixel and the target pixel of the first signal is the noise pixel, this condition including the condition that respective target pixels of the second and first signals are first feature pixels and the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel of the first signal is a noise pixel; or

(2) respective target pixels of the second and third signals are first feature pixels and the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel of the second signal is a noise pixel.

In the subsequent step S30, it is determined whether or not the target pixel of the third signal is a noise pixel. If so, the process proceeds to step S35. If not, the process proceeds to step S31.

In step S31, it is determined whether or not the target pixel of the third signal is a first feature pixel. If so, the process proceeds to step S32. If not, the process proceeds to step S35. When the process proceeds to step S32, the target pixel of the third signal is not a noise pixel but the first feature pixel. In this case, the target pixel of the first signal is the first feature pixel, the target pixel of the second signal is the first feature pixel, or respective target pixels of the first and second signals are the first feature pixels, and it is possible that the target pixel of the third signal is a pixel that reads dust adhering on platen205. In the following steps, it is determined whether or not the target pixel of the third signal is a pixel that reads dust adhering on platen205.

In step S32, it is determined whether or not the target pixel of the second signal is a noise pixel. If so, the process proceeds to step S34. If not, the process proceeds to step S33. When the target pixel of the second signal is a noise pixel, the target pixel of the third signal is determined as a noise pixel.

In step S33, it is determined whether or not the target pixel of the first signal is a noise pixel. If so, the process proceeds to step S34. If not, the process proceeds to step S35. Namely, when the target pixel of the first signal is a noise pixel, the target pixel of the third signal is determined as a noise pixel. If the first feature pixel is not detected from the second signal, the first feature pixel detected from the third signal is determined as a noise pixel, in such a case where white dust adheres on platen205while a green region of an original is being read.

In step S34, the target pixel of the third signal is changed to a noise pixel. Specifically, value “0” of the target pixel of the logical signal corresponding to the third signal and representing a noise pixel as “1” is changed to “1”. In step S34, the target pixel of the third signal is changed to the noise pixel on the following condition:

(1) the target pixel of the third signal is the first feature pixel and the target pixel of the second signal is the noise pixel, this condition including the condition that respective target pixels of the third and second signals are first feature pixels and the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel of the second signal is a noise pixel; or

(2) the target pixel of the third signal is the first feature pixel and the target pixel of the first signal is the noise pixel, this condition including the condition that respective target pixels of the third and first signals are first feature pixels and the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel of the first signal is a noise pixel.

In the subsequent step S35, it is determined whether or not a subsequent target pixel is present. If so, the process returns to step S21. If not, the process is ended. In this way, the noise pixel correction is made for all pixels of logical signals input to noise detection processor259.

With noise pixel corrector311, first feature pixels extracted from at least two of the R, G and B signals are corrected to noise pixels on the condition that, for one of the R, G and B signals, the pixel of the preceding line that is at the same position in the main scanning direction as the first feature pixel is a noise pixel. In this way, even if large dust adheres on platen205that results in first feature pixels extracted from at least two of the R, G and B signals, noise can be detected from the R, G and B signals.

FIG. 13is a flowchart showing a flow of a correction process followed by the noise corrector. To noise corrector260, R, G and B signals and logical signals corresponding to the R, G and B signals and representing a noise pixel as “1” are input. In the correction process, these signals are used to correct a noise pixel.

With reference toFIG. 13, a target pixel P of the input R, G and B signals for a line is set as a pixel to be processed, and it is determined whether or not target pixel P is a noise pixel in any of the R, G and B signals (step S51). If so, the process proceeds to step S52. If not, the process proceeds to step S58.

In step S51A, a search range is determined. The search range is determined by selecting one of a middle search range that is defined in advance with reference to target pixel P, a right search range and a left search range. The determination of the search range is described hereinlater. After the search range is determined in step S51A, the process proceeds to step S52.

A description of the search range is given here.FIGS. 14A to 14Cshow exemplary search ranges. InFIGS. 14A to 14C, R, G and B signals are represented in two-dimensional form and one box represents one pixel. Pixels within noise402are detected as noise pixels.FIG. 14Ashows a middle search range. Supposing that a pixel401is a target pixel P, middle search range403is defined by the range including pixel401, seven pixels on the left thereof and seven pixels on the right thereof that are arranged in the main scanning direction. Here, middle search range403is not limited to the exemplified size herein shown and may be larger or smaller than this size. The middle search range may be any that includes noise pixels and pixels that are not noise pixels.FIG. 14Bshows a right search range. Right search range404is defined by the range including pixel401at one end (the leftmost end inFIG. 14B) and 14 pixels on one side (on the right inFIG. 14B) of pixel401that are arranged in the main scanning direction. Right search range404is not limited to the exemplified size herein shown and may be larger or smaller than this size. The right search range may be any that includes noise pixels and pixels that are not noise pixels.FIG. 14Cshows a left search range. Left search range405is defined by the range including pixel401at the other end (the rightmost end inFIG. 14C) and 14 pixels on the other side (on the left inFIG. 14C) of pixel401that are arranged in the main scanning direction. Left search range405is not limited to the exemplified size herein shown and may be larger or smaller than this size. The left search range may be any that includes noise pixels and pixels that are not noise pixels. Middle search range403, right search range404and left search range405are used for determining a range from which a candidate pixel for replacement of the value of target pixel P is selected.

With reference again toFIG. 13, in step S52, it is determined whether or not target pixel Pr of the R signal is a noise pixel. If so, the process proceeds to step S53. If not, the process skips step S53and proceeds to step S54. In step S53, an R-signal correction is made to correct target pixel Pr of the R signal. For example, target pixel Pr may be replaced with the average, maximum or minimum value of a plurality of non-noise pixels neighboring target pixel Pr.

In step S54, it is determined whether or not target pixel Pg of the G signal is a noise pixel. If so, the process proceeds to step S55. If not, the process skips step S55and proceeds to step S56. In step S55, a G-signal correction is made to correct target pixel Pg of the G signal. For example, target pixel Pg may be replaced with the average, maximum or minimum value of a plurality of non-noise pixels neighboring target pixel Pg.

In step S56, it is determined whether or not target pixel Pb of the B signal is a noise pixel. If so, the process proceeds to step S57. If not, the process skips step S57and proceeds to step S58. In step S57, a B-signal correction is made to correct target pixel Pb of the B signal. For example, target pixel Pb may be replaced with the average, maximum or minimum value of a plurality of non-noise pixels neighboring target pixel Pb.

In step S58, it is determined whether or not there is a pixel to be used as the next target pixel. If present, the process returns to step S51and repeats the aforementioned procedure. If not, this process is ended.

FIG. 15is a flowchart showing a flow of the process of determining the search range in step S51A ofFIG. 13. With reference toFIG. 15, in determining the search range, it is determined whether target pixel P is a noise pixel in all of the R, G and B signals (step S61). If so, the process proceeds to step S74. If not, the process proceeds to step S62. In step S62, it is determined whether target pixel P is a noise pixel in any one of the R, G and B signals. If so, the process proceeds to step S67. If not, the process proceeds to step S63. Thus, when the process proceeds to step S74, target pixel P is a noise pixel in all of the R, G and B signals. When the process proceeds to step S67, target pixel P is a noise pixel in one of the R, G and B signals. When the process proceeds to step S63, target pixel P is a noise pixel in two of the R, G and B signals.

In the case where target pixel P is a noise pixel in one of the R, G and B signals, the search range is determined based on the remaining two signals whose target pixel P is not a noise pixel. One of the two signals of the R, G and B signals is referred to as a first signal and the other signal is referred to as a second signal.

In step S67, with the first signal having a value P1of target pixel P, the average of the pixel value (hereinafter pixel average) AveL1of the first signal in left search range405and pixel average AveR1of the first signal in right search range404are calculated.

In step S68, with the second signal having a value P2of target pixel P, pixel average AveL2of the second signal in left search range405and pixel average AveR2of the second signal in right search range404are calculated.

In step S69, it is determined whether the absolute value of the difference (hereinafter absolute difference) between pixel average AveL1and value P1of target pixel P is smaller than the absolute difference between pixel average AveR1and value P1of target pixel P, and the absolute difference between pixel average AveL2and value P2of target pixel P is smaller than the absolute difference between pixel average AveR2and value P2of target pixel P. If so, the process proceeds to step S71. If not, the process proceeds to step S70. The process proceeds to step S71when the average of the pixel value in left search range405is close to the value of target pixel P for both of the first signal and the second signal. In step S71, left search range71is selected and the process returns to the correction process.

In step S70, it is determined whether the absolute difference between pixel average AveL1and value P1of target pixel P is equal to or larger than the absolute difference between pixel average AveR1and value P1of target pixel P, and the absolute difference between pixel average AveL2and value P2of target pixel P is equal to or larger than the absolute difference between pixel average AveR2and value P2of target pixel P. If so, the process proceeds to step S72. If not, the process proceeds to step S73. The step proceeds to step S72when the average of the pixel value in right search range404is close to the value of target pixel P for both of the first signal and the second signal. In step S72, right search range404is selected and the process returns to the correction process.

If both of the conditions in steps S69and step S70are not satisfied, the process proceeds to step S73. In step S73, middle search range403is selected and the process returns to the correction process.

In the case where target pixel P is a noise pixel in two of the R, G and B signals, the search range is determined on the basis of one remaining signal whose target pixel P is not a noise pixel.

In step S63, for the signal whose target pixel P is not a noise pixel, using value P0of target pixel P, pixel average AveL0in left search range405and pixel average AveR0in right search range404are calculated.

In step S64, it is determined whether the absolute difference between pixel average AveL0and value P0of target pixel P is smaller than the absolute difference between pixel average AveR0and value P0of target pixel P. If so, the process proceeds to step S65. If not, the process proceeds to step S70. Thus, the process proceeds to step S65when the pixel average in left search range405is close to the value of target pixel P. In step S65, left search range405is selected and the process returns to the correction process. The process proceeds to step S66when the pixel average in right search range404is close to the value of target pixel P. In step S66, right search range404is selected and the process returns to the correction process.

In the case where target pixel P is a noise pixel in all of the R, G and B signals, the search range cannot be determined from the value of target pixel P.

In step S74, it is determined whether a preceding line is present. Here, the preceding line refers to R, G and B signals that are input to noise corrector260immediately before the R, G and B signals that are currently processed are input thereto. If no preceding line is present, the process proceeds to step S73. If present, the process proceeds to step S75. In step S73, middle search range403is selected and the process returns to the correction process.

In step S75, a search range that is determined for the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel is selected, and the process returns to the correction process. Regarding image reading apparatus10in the present embodiment, noise pixels continue in the sub scanning direction. Therefore, it is highly possible that the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel is a noise pixel. Further, it is highly probable, when platen205is moved at a different rate from the rate at which the original is transported, for a line preceding a line for which the noise pixel is present in all of the three signals, the noise pixel is present in one or two signals. Moreover, since the target pixel and the pixel of the preceding line that is at the same position in the main scanning direction as the target pixel are adjacent to each other, it is highly probable that pixels adjacent to these pixels in the main scanning direction are close to each other. Therefore, the search range determined for the preceding line is employed.

FIG. 16is a flowchart showing a flow of the R-signal correction process in step S53ofFIG. 13. With reference toFIG. 16, in the R-signal correction process, a search range is set (step S101). The search range set here is the search range determined in the process described above and is one of middle search range403, right search range404and left search range405.

In step S102, a candidate pixel S is selected from the pixels included in the search range that is set in step S101. In the subsequent step S103, a determination is made as to whether or not the candidate pixel is appropriate for correcting target pixel P. In the process of making the determination regarding the candidate pixel, one of a return value indicating the result of the determination as to whether or not candidate pixel S selected in step S102is appropriate for correcting target pixel P and a return value indicating that the determination cannot be made is returned.

In the subsequent step S104, the process proceeds to step S105if candidate pixel S selected in step S102is appropriate for correcting target pixel P. If not, the process proceeds to step S110. If it cannot be determined whether or not the candidate pixel is appropriate, the process proceeds to step S116.

It is determined that a pixel is appropriate as a candidate pixel if all of the following conditions are satisfied:

(1) candidate pixel S is not a noise pixel in any of the R, G and B signals; and

(2) for a signal of target pixel P that is not a noise pixel, respective values of target pixel P and candidate pixel S are close to each other.

In step S105, it is determined whether or not target pixel P is a noise pixel that reads white dust. This determination is made by comparing value Pr of target pixel P of the R signal with a predetermined value. If value Pr is larger than the predetermined value, it can be determined that the target pixel is a noise pixel reading white dust because of the high lightness. If it is determined that the target pixel is a noise pixel reading white dust, the process proceeds to step S106. If not, namely if the target pixel is a noise pixel reading black dust, the process proceeds to step S108. Alternatively, a determination may be made as to whether or not target pixel P is a noise pixel reading black dust and then it may be determined whether or not value Pr of target pixel P of the R signal is smaller than a predetermined value. If Pr is smaller than the predetermined value, it can be determined that the target pixel is a noise pixel reading black dust because of the low lightness.

In step S106, it is determined whether or not a value Sr of candidate pixel S of the R signal is smaller than a variable Tmin. If so, the process proceeds to step S107. If not, the process skips step S107and proceeds to step S110. Variable Tmin is a variable for storing the minimum value of value Sr of candidate pixel S of the R signal, among pixels in the search range, for which the determination of appropriateness is made in step S103. Here, the initial value of variable Tmin is set to a value larger than the maximum value “255” of the pixel value.

In step S108, it is determined whether or not value Sr of candidate pixel S of the R signal is larger than a variable Tmax. If so, the process proceeds to step S109. If not, the process skips step S109and proceeds to step S110. Variable Tmax is a variable for storing the maximum value of value Sr of candidate pixel S of the R signal, among pixels in the search range, for which the determination as to appropriateness is made in step S103. Here, the initial value of variable Tmax is set to a value smaller than the minimum value “0” of the pixel value.

In step S110, it is determined whether or not the next candidate pixel is present in the search range. If so, the process returns to step S102. If not, the process proceeds to step S111. Namely, all pixels included in search range403are successively set as a candidate pixel (step S110) and the operation described above is performed on each candidate pixel. Accordingly, as variable Tmin, the minimum value of candidate pixel S of the R signal that is appropriate and included in the search range is stored. Variable Tmin is a value for correcting value Pr of target pixel P of the R signal when target pixel P of the R signal is a noise pixel resultant from reading white dust. As variable Tmax, the maximum value of the candidate pixel of the R signal that is appropriate and included in the search range is stored. Variable Tmax is a value for correcting value Pr of target pixel P of the R signal when target pixel P of the R signal is a noise pixel resultant from reading black dust.

In step S111, it is determined whether or not a value for replacement is determined. If target pixel P is a noise pixel reading white dust and variable Tmin is equal to or smaller than 255, variable Tmin is used as a value for replacement and the process proceeds to step S112. If target pixel P is a noise pixel reading black dust and variable Tmax is equal to or larger than zero, variable Tmax is used as a value for replacement and the process proceeds to step S112. Otherwise, the process proceeds to step S115.

In step S112, it is determined whether or not target pixel P is a noise pixel reading white dust. If so, the process proceeds to step S113. If not, namely target pixel P is a noise pixel reading black dust, the process proceeds to step S114. Alternatively, it may be determined whether or not target pixel P is a noise pixel reading black dust.

In step S113, value Pr of target pixel P of the R signal is set to the value stored as variable Tmin that is a value for replacement of the white dust. In step S114, value Pr of target pixel P of the R signal is set to the value stored as variable Tmax that is a value for replacement of the black dust. Then this process returns to the correction process.

In step S115, the search range set in step S101is extended in the sub scanning direction and the resultant search range is used as a new search range.

FIGS. 17A to 17Cshow exemplary search ranges that are produced by extending respective search ranges shown inFIGS. 14A to 14Cin the sub scanning direction. InFIG. 17A, a search range403A has three lines including additional two lines on respective sides of middle search range403with respect to the sub scanning direction. InFIG. 17B, a search range404A has three lines including additional two lines on respective sides of right search range404with respect to the sub scanning direction. InFIG. 17C, a search range405A has three lines including additional two lines on respective sides of left search range405with respect to the sub scanning direction. The degree of extension is not limited to the exemplified one and the search range may have five lines with additional two lines on each side with respect to the sub scanning direction.

With reference again toFIG. 16, in step S115, the extended search range is selected and the process proceeds to step S101. The extended search range that is newly set is thus used to follow the above-described process.

The process proceeds to step S116if it cannot be determined whether or not a pixel in the search range is candidate pixel S appropriate for correction. Thus, in step S116, average value Ave of pixels in the search range of the R signal is calculated. Naturally, in calculating average value Ave, value Pr of target pixel P of the R signal is not used. In step S117, value Pr of target pixel P of the R signal is set to the calculated average value Ave and the process is ended.

FIG. 18is a flowchart showing a flow of the determination process for the candidate pixel in step S103ofFIG. 16. With reference toFIG. 18, in the process of making the determination regarding the candidate pixel, it is determined whether or not candidate pixel S is a pixel other than a noise pixel in any of the R, G and B signals (step S121). If candidate pixel S is not a noise pixel in any of the R. G and B signals, the process proceeds to step S122and otherwise to step S129. In step S129, the signal “inappropriate” indicating that the candidate pixel is inappropriate for correcting the target pixel is returned to the R-signal correction process, and the current process is ended.

In step S122, it is determined whether or not target pixel P is a pixel other than a noise pixel in the G signal. If so, the process proceeds to step S123. If not, the process proceeds to step S127. In step S123, it is determined whether or not target pixel P is a pixel other than a noise pixel in the B signal. If so, the process proceeds to step S124. If not, the process proceeds to step S126.

In step S127, it is determined whether or not target pixel P is a pixel other than a noise pixel in the B signal. If so, the process proceeds to step S128. If not, the process proceeds to step S131.

The process proceeds to step S124when the R signal of target pixel P is to be corrected and target pixel P is not a noise pixel in remaining two signals, i.e., G and B signals. The process proceeds to step S126or S128when the R signal of target pixel P is to be corrected and target pixel P is not a noise pixel in at least one of the remaining G and B signals. When the process proceeds to step S126, target pixel P of the G signal is not a noise pixel. When the process proceeds to step S128, target pixel P of the B signal is not a noise pixel. When the process proceeds to step S131, target pixel P is a noise pixel in all of the R, G and B signals. In this case, the signal “determination impossible” indicating that the determination as to whether or not the candidate pixel is appropriate cannot be made is returned to the R-signal correction process, and the current process is ended.

In step S124, using the fact that target pixel P of the G signal is not a noise pixel, it is determined whether or not the absolute value of the difference between a value Sg of candidate pixel S of the G signal and a value Pg of target pixel P of the G signal is equal to or smaller than 20. If so, the process proceeds to step S125. If not, the process proceeds to step S129. It is thus determined whether or not value Sg of candidate pixel S of the G signal is close to value Pg of target pixel P of the G signal. The threshold value is not limited to “20”.

In step S125, using the fact that target pixel P of the B signal is not a noise pixel, it is determined whether or not the absolute value of the difference between a value Sb of candidate pixel S of the B signal and a value Pb of target pixel P of the B signal is equal to or smaller than 20. If so, the process proceeds to step S130. If not, the process proceeds to step S129. It is thus determined whether or not value Sb of candidate pixel S of the B signal is close to value Pb of target pixel P of the B signal. The threshold value is not limited to “20”.

Through steps S124and S125, candidate pixel S for correcting value Pr of target pixel P of the R signal that is a noise pixel is selected. Then, the signal “appropriate” indicating that candidate pixel S selected in step S130is appropriate for correcting target pixel P is returned to the R-signal correction process and the current process is ended.

In step S126, using the fact that target pixel P of the G signal is not a noise pixel, it is determined whether or not the absolute value of the difference between value Sg of candidate pixel S of the G signal and value Pg of target pixel P of the G signal is equal to or smaller than 20. If so, the process proceeds to step S130. If not, the process proceeds to step S129. It is thus determined whether or not value Sg of candidate pixel S of the G signal is close to value Pg of target pixel P of the G signal. The threshold value is not limited to “20”.

In step S128, using the fact that target pixel P of the B signal is not a noise pixel, it is determined whether or not the absolute value of the difference between value Sb of candidate pixel S of the B signal and value Pb of target pixel P of the B signal is equal to or smaller than 20. If so, the process proceeds to step S130. If not, the process proceeds to step S129. It is thus determined whether or not value Sb of candidate pixel S of the B signal is close to value Pb of target pixel P of the B signal. The threshold value is not limited to “20”.

Through step S126or S128, candidate pixel S for correcting value Pr of target pixel P of the R signal that is a noise pixel is selected. Then, the signal “appropriate” indicating that candidate pixel S selected in step S130is appropriate for correcting target pixel P is returned to the R-signal correction process and the current process is ended.

FIG. 19is a flowchart showing a flow of the G-signal correction process in step S55ofFIG. 13. In this flow of the G-signal correction process, any step different from the corresponding one of the R-signal correction process is indicated by a reference with letter “A” added thereto. In the following, steps different from those of the R-signal correction process are described.

In step S106A, it is determined whether or not value Sg of candidate pixel S of the G signal is smaller than variable Tmin. If so, the process proceeds to step S107A. If not, the process skips step S107A and proceeds to step S110. Variable Tmin is a variable for storing the minimum value of value Sg of candidate pixel S of the G signal, among pixels in the search range, for which the determination of appropriateness is made in step S103. Here, the initial value of variable Tmin is set to a value larger than the maximum value “255” of the pixel value.

In step S108A, it is determined whether or not value Sg of candidate pixel S of the G signal is larger than variable Tmax. If so, the process proceeds to step S109A. If not, the process skips step S109A and proceeds to step S110. Variable Tmax is a variable for storing the maximum value of value Sg of candidate pixel S of the G signal, among pixels in the search range, for which the determination as to appropriateness is made in step S103. Here, the initial value of variable Tmax is set to a value smaller than the minimum value “0” of the pixel value.

In step S116A, average value Ave of pixels in the search range of the G signal is calculated. Naturally, in calculating average value Ave, value Pg of target pixel P of the G signal is not used.

In step S113A, value Pg of target pixel P of the G signal is set to the value stored as variable Tmin that is a value for replacement of the white dust. In step S114A, value Pg of target pixel P of the G signal is set to the value stored as variable Tmax that is a value for replacement of the black dust. In step S117A, value Pg of target pixel P of the G signal is set to average Ave of the G signal in the search range. Then this process returns to the correction process.

FIG. 20is a flowchart showing a flow of the determination process for the candidate pixel in step S103ofFIG. 19. In this flow, any step different from the corresponding one of the determination process inFIG. 18is indicated by a reference with letter “A” added thereto. In the following, steps different from those of the determination process inFIG. 18are chiefly described.

In step S122A, it is determined whether or not target pixel P is a pixel other than a noise pixel in the R signal. If so, the process proceeds to step S123. If not, the process proceeds to step S127.

The process proceeds to step S124A when the G signal of target pixel P is to be corrected and target pixel P is not a noise pixel in remaining two signals, i.e., R and B signals. The process proceeds to step S126A or S128when the G signal of target pixel P is to be corrected and target pixel P is not a noise pixel in at least one of the remaining R and B signals. When the process proceeds to step S126A, target pixel P of the R signal is not a noise pixel. When the process proceeds to step S128, target pixel P of the B signal is not a noise pixel. When the process proceeds to step S131, target pixel P is a noise pixel in all of the R, G and B signals. In this case, the signal “determination impossible” indicating that the determination as to whether or not the candidate pixel is appropriate cannot be made is returned to the R-signal correction process, and the current process is ended.

In step S124A, using the fact that target pixel P of the R signal is not a noise pixel, it is determined whether or not the absolute value of the difference between value Sr of candidate pixel S of the R signal and value Pr of target pixel P of the R signal is equal to or smaller than 20. If so, the process proceeds to step S125. If not, the process proceeds to step S129. Thus, it is determined whether or not value Sr of candidate pixel S of the R signal is close to value Pr of target pixel P of the R signal. The threshold value is not limited to “20”.

Through steps S124A and S125, candidate pixel S for correcting value Pg of target pixel P of the G signal that is a noise pixel is selected. Then, the signal “appropriate” indicating that candidate pixel S selected in step S130is appropriate for correcting the target pixel is returned to the G-signal correction process and the current process is ended.

In step S126A, using the fact that target pixel P of the R signal is not a noise pixel, it is determined whether or not the absolute value of the difference between value Sr of candidate pixel S of the R signal and value Pr of target pixel P of the R signal is equal to or smaller than 20. If so, the process proceeds to step S130. If not, the process proceeds to step S129. Thus, it is determined whether or not value Sr of candidate pixel S of the R signal is close to value Pr of target pixel P of the R signal. The threshold value is not limited to “20”.

Through step S126A or S128, candidate pixel S for correcting value Pg of target pixel P of the G signal that is a noise pixel is selected. Then, the signal “appropriate” indicating that candidate pixel S selected in step S130is appropriate for correcting target pixel P is returned to the R-signal correction process and the current process is ended.

FIG. 21is a flowchart showing a flow of the B-signal correction process in step S57ofFIG. 13. In the flow of the B-signal correction process, any step different from the corresponding one of the R-signal correction process is indicated by a reference with letter “B” added thereto. In the following, steps of the B-signal correction process different from those of the R-signal correction process are described.

In step S106B, it is determined whether or not value Sb of candidate pixel S of the B signal is smaller than variable Tmin. If so, the process proceeds to step S107B. If not, the process skips step S107B and proceeds to step S110. Variable Tmin is a variable for storing the minimum value of value Sb of candidate pixel S of the B signal, among pixels in the search range, for which the determination of appropriateness is made in step S103. Here, the initial value of variable Tmin is set to a value larger than the maximum value “255” of the pixel value.

In step S108B, it is determined whether or not value Sb of candidate pixel S of the B signal is larger than variable Tmax. If so, the process proceeds to step S109B. If not, the process skips step S109B and proceeds to step S110. Variable Tmax is a variable for storing the maximum value of value Sb of candidate pixel S of the B signal, among pixels in the search range, for which the determination as to appropriateness is made in step S103. Here, the initial value of variable Tmax is set to a value smaller than the minimum value “0” of the pixel value.

In step S116B, average value Ave of pixels in the search range of the B signal is calculated. Naturally, in calculating average value Ave, value Pb of target pixel P of the B signal is not used.

In step S113B, value Pb of target pixel P of the B signal is set to the value stored as variable Tmin that is a value for replacement of the white dust. In step S114B, value Pb of target pixel P of the B signal is set to the value stored as variable Tmax that is a value for replacement of the black dust. In step S117B, value Pb of target pixel P of the B signal is set to calculated average value Ave of the B signal in the search range and the process returns to the correction process.

FIG. 22is a flowchart showing a flow of the determination process for the candidate pixel in step S103ofFIG. 21. In this flow, any step different from the corresponding one of the determination process inFIG. 18is indicated by a reference with letter “B” added thereto. In the following, steps different from those of the determination process inFIG. 18are chiefly described.

In step S123B, it is determined whether or not target pixel P is a pixel other than a noise pixel in the R signal. If so, the process proceeds to step S124. If not, the process proceeds to step S126.

In step S127B, it is determined whether or not target pixel P is a pixel other than a noise pixel in the R signal. If so, the process proceeds to step S128B. If not, the process proceeds to step S131.

The process proceeds to step S124when the B signal of target pixel P is to be corrected and target pixel P is not a noise pixel of remaining two signals, i.e., R and G signals. The process proceeds to step S126or S128B when the B signal of target pixel P is to be corrected and target pixel P is not a noise pixel in at least one of the remaining R and G signals. When the process proceeds to step S126, target pixel P of the G signal is not a noise pixel. When the process proceeds to step S128B, target pixel P of the R signal is not a noise pixel. When the process proceeds to step S131, target pixel P is a noise pixel in all of the R, G and B signals. In this case, the signal “determination impossible” indicating that the determination as to whether or not the candidate pixel is appropriate cannot be made is returned to the R-signal correction process, and the current process is ended.

In step S125B, using the fact that target pixel P of the R signal is not a noise pixel, it is determined whether or not the absolute value of the difference between value Sr of candidate pixel S of the R signal and value Pr of target pixel P of the R signal is equal to or smaller than 20. If so, the process proceeds to step S130. If not, the process proceeds to step S129. Thus, it is determined whether or not value Sr of candidate pixel S of the R signal is close to value Pr of target pixel P of the R signal. The threshold value is not limited to “20”.

Through steps S124and S125B, candidate pixel S for correcting value Pb of target pixel P of the B signal that is a noise pixel is selected. Then, the signal “appropriate” indicating that candidate pixel S selected in step S130is appropriate for correcting the target pixel is returned to the B-signal correction process and the current process is ended.

In step S128B, using the fact that target pixel P of the R signal is not a noise pixel, it is determined whether or not the absolute value of the difference between value Sr of candidate pixel S of the R signal and value Pr of target pixel P of the R signal is equal to or smaller than 20. If so, the process proceeds to step S130. If not, the process proceeds to step S129. Thus, it is determined whether or not value Sr of candidate pixel S of the R signal is close to value Pr of target pixel P of the R signal. The threshold value is not limited to “20”.

Through step S126or S128B, candidate pixel S for correcting value Pb of target pixel P of the B signal that is a noise pixel is selected. Then, the signal “appropriate” indicating that candidate pixel S selected in step S130is appropriate for correcting the target pixel is returned to the R-signal correction process and the current process is ended.

As heretofore discussed, image reading apparatus10in the present embodiment selects a candidate pixel used for correcting a noise pixel from pixels of a signal different from the signal with the noise pixel. In other words, the candidate pixel is determined based on pixels of other data reading the same location of the original as the noise pixel. Thus, noise resultant from reading dust is corrected with a pixel selected from neighboring pixels, and accordingly the image quality after the correction can be improved.

Note that while the present embodiment has been described with reader213fixed to main body103by way of example, alternatively, the present invention is also applicable to moving reader213for scanning. For example, the upper restraint plate is of monochromatic color of white or black, and reader213or the source of light206, reflector mirror209and reflector member208are moved in the sub scanning direction for scanning. During the scan, platen205can be oscillated in the sub scanning direction to detect dust adhering on platen205.

Further note that while the search range extends in the main scanning direction with the target pixel at the center, the search range may extend in the direction crossing the main scanning direction