1. Field of the Invention
The present invention relates to an image reading device and a method of controlling the same, and more particularly to a technique of correcting for the skew in an original in a case where the front and back sides of the original are read simultaneously.
2. Description of the Related Art
Recently, image reading devices for use in digital copying machines, flatbed scanners, and the like has been provided with a function for simultaneously reading the front and back sides of an original during a single conveyance of the original.
In general, in an image reading device of the above-mentioned type, the front and back sides of an original are read by a front-side sensor and a back-side sensor, respectively. For this reason, when the original is skewed, an image read from the front side and an image read from the back side are produced in a state rotated from each other by an angle twice the skew angle of the original. Therefore, a skew correction technique plays a particularly important role in simultaneously reading the two sides of the original.
Conventionally, a skew correction technique is generally employed in which a skew of an original is corrected by bringing the leading edge of the original into abutment with a registration roller and thereby warping the original, during conveyance of the original to a reading position.
However, such a skew correction technique, which is based on the mechanical construction of the image reading device is an impediment to increasing the speed of reading originals. To solve this problem, there has been proposed a technique in which when an original is in a skewed state, the original is read as it is, the skew angle of the original is detected and skew correction is performed according to the detected skew angle of the original, using a CPU and a dedicated skew correction circuit, etc. (see Japanese Patent Laid-Open Publication No. 2004-254166).
The image reading device disclosed in Japanese Patent Laid-Open Publication No. 2004-254166, however, is required to be provided with the skew correction circuit comprising a circuit for correcting an image read from the front side of an original and a circuit for correcting an image read from the back side of the same. This causes an increase in the total circuit size, which leads to an increase in the manufacturing costs of the image reading device.
The present invention provides an image reading device which corrects images read from respective first and second sides of an original without increasing the total circuit size.
In a first aspect of the present invention, there is provided an image reading device comprising a reading unit configured to read image data from both sides of an original in a single feeding operation, the reading unit including a first reading section configured to read an image on a first surface of an original, and a second reading section configured to read an image on a second surface of the original, a detection unit configured to detect a skew angle of the original read by the first reading section, with respect to the first reading section, and a correction unit configured to correct image data read by the first reading section and image data read by the second reading section, according to the skew angle of the original detected by the detection unit.
In a second aspect of the present invention, there is provided a method of controlling an image reading device, comprising reading an image on a first surface of an original by a first reading section and reading an image on a second surface of the original by a second reading section in a single feeding operation, detecting a skew angle of the original read by the first reading section, with respect to the first reading section, and correcting image data read by the first reading section and image data read by the second reading section, according to the skew angle of the original detected by the detecting.
In a third aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing a computer-executable program for causing a computer to execute a method of controlling an image reading device, wherein the method comprises reading an image on a first surface of an original by a first reading section and reading an image on a second surface of the original by a second reading section in a single feeding operation, detecting a skew angle of the original read by the first reading section, with respect to the first reading section, and correcting image data read by the first reading section and image data read by the second reading section, according to the skew angle of the original detected by the detecting.
According to the present invention, it is possible to correct images read from respective first and second sides of an original without increasing the total circuit size.
The features and advantages of the invention will become more apparent from the following detailed description taken in conjunction with the accompanying drawings.
The present invention will now be described in detail below with reference to the accompanying drawings showing an embodiment thereof.
When a read command is issued via a console section 202, the automatic document feeder 201 is capable of sequentially feeding a plurality of originals one by one to the reading position. In this case, the automatic document feeder 201 feeds the originals while separating one original from the others e.g. by a separation roller.
The scanner unit 200 optically reads an image on an original fed to the reading position by the automatic document feeder 201 to photoelectrically convert the read image to electronic image data, and then transfers the electronic image data to the printer unit 203.
The scanner unit (image reading device) 200 has a “both-surface simultaneous reading function” for substantially simultaneously reading images on the respective front and back sides of the original during a single conveyance of the original to the reading position. Therefore, in the following description, the scanner unit (image reading device) 200 will be referred to as a both-side simultaneous reading device 200.
The printer unit 203 prints an image on a recording sheet based on the image data transferred thereto. The printer unit 203 can employ any of various printing methods, such as the electrophotographic printing method and the inkjet printing method. After printing the image on the recording sheet, the printer unit 203 discharges the recording sheet onto the discharge tray 208.
In this case, images on the both sides of each original 100 are read substantially simultaneously during the passage of the original 100 over the original platen glass 107. More specifically, while the original 100 is passing through a position opposed to a front-side reading section 106, the front surface of the original 100 is irradiated with light by a light source 105 of the front-side reading section 106, whereby the image on the front surface of the original 100 is read by the front-side reading section 106. Further, while the original 100 is passing through a position opposed to a back-side reading section 109, the back side of the original 100 is irradiated with light by a light source 108 of the back-side reading section 109, whereby the image on the back side of the original 100 is read by the back-side reading section 109.
In other words, the images on the both sides of the original 100 are read substantially simultaneously in a single feeding operation of the original 100 onto the original platen glass 107, and hence it is not required to feed the same original 100 onto the original platen glass 107 a plurality of times to read the images on the both sides of the original 100.
The front-side reading section 106 and the back-side reading section 109 are disposed at the respective lower and upper surfaces of the original platen glass 107. Therefore, images on the both sides of the original 100 are read by a so-called moving original reading method (see arrows in
The front-side reading section 106 and the back-side reading section 109 are configured similarly, and they respectively have the light sources 105 and 108, 100% magnification lenses 302 and 402, and line image sensors 301 and 401. It should be noted that the line image sensor 301 will also be referred to as the first reading section, the line image sensor 401 as the second reading section, and each of the line image sensors will also be referred to as the line sensor. The line image sensors 301 and 401 have a width equal to or larger than the width of the original 100 in the sub scanning direction.
In the moving original reading, the front and back sides of the original 100 are irradiated with light by the respective light sources 105 and 108. Reflected light from the front (back) surface of the original 100, i.e. image light reflecting a front-side (back-side) image enters the line image sensor 301 (401) via the 100% magnification lens 302 (402). The line image sensor 301 (401) photoelectrically converts the image light from the front (back) surface of the original 100 to electronic image data, and outputs the electronic image data.
The ROM 502 also stores in advance application programs for causing the CPU 501, i.e. a computer to execute processes described hereinafter with reference to
The CPU 501, the ROM 502, and the RAM 503 are connected to a system bus 504. Further, the front-side and back-side reading sections 106 and 109 are connected to the system bus 504 via respective interface controllers 505 and 506. Furthermore, an image processing unit 507 is connected to the system bus 504, and a hard disk drive (HDD) 509 is also connected to the same via a hard disk (HD) controller 508.
During the passage of the original 100 before the locations of the respective reading sections 106 and 109, the front-side reading section 106 and the back-side reading section 109 irradiate the front and back-sides of the original 100 with light from the respective light sources 105 and 108 under the control of the CPU 501. Then, the front-side reading section 106 and the back-side reading section 109 photoelectrically convert image lights from the front and back-sides of the original 100 by the respective line image sensors 301 and 401.
Next, the front-side reading section 106 and the back-side reading section 109 converts image data (analog data) obtained by the photoelectrical conversion to digital image data and outputs the digital image data to the interface controllers 505 and 506, respectively. The interface controllers 505 and 506 each function as a storage control unit and store the image data from the respective front-side and back-side reading sections 106 and 109 in respective different areas in the RAM 503.
The image processing unit 507 performs various kinds of image correction, such as shading correction, on the image data that is read from the front and back sides of the original 100 and is stored in the RAM 503.
In the present embodiment, the skew angle (image inclination angle) of the original 100 is defined as an angle of skew of the original 100 with respect to the direction of arrangement of pixel arrays of the line image sensor 301.
The CPU 501 causes the HD controller 508 to store the image data subjected to image processing by the image processing unit 507, in the hard disk drive 509. It should be noted that the image processing unit 507 performs various kinds of image processing on image data stored in the hard disk drive 509 under the control of the CPU 501 and stores the processed image data in the hard disk drive 509 again.
Next, a method of detecting the skew angle of an original will be described with reference to
Thereafter, when an upper left corner L of the original 100 is detected in a pixel position corresponding to a point B of the line image sensor 301 (S803), the CPU 501 causes the timer to stop counting (S804). When the original 100 is in a skewed state, the distance between the point A and the point B in a direction orthogonal to an original conveying direction, i.e. a one-line reading width WD becomes shorter than the width (length) of the original 100 associated with the main scanning direction. The CPU 501 determines the distance between the point A and the point B in the direction orthogonal to the original conveying direction, i.e. the one-line reading width WD, based on image data read from the original 100.
Then, the CPU 501 multiplies the conveying speed of the original 100 by the count of the timer to thereby calculate a conveying distance D over which the original 100 was conveyed from the time point the upper right corner R of the original 100 corresponding to the point A was detected by the line image sensor 301 to the time point the upper left corner L corresponding to the point B was detected by the same (S805).
Next, the CPU 501 calculates a skew angle θ of the original 100 by the following equation 1, using the distance between the point A and the point B, i.e. the one-line reading width WD of the original 100 and the conveying distance D (S806):
θ=tan−1D/WD
After calculating the skew angle θ of the original 100 by the equation (1), the CPU 501 performs skew correction on the read front-side image data of the original. This skew correction on the read front-side image data of the original is performed by causing the image processing unit 507 to subject the read original image data (see
Now, let it be assumed that the image on the front side (front surface) of the original 100 is read by the front-side reading section 106 and image data DA from the front side is temporarily stored in a writing area of the RAM 503 by the interface controller 505 as illustrated in
Now, the CPU 501 sets the aforementioned writing area of the RAM 503 where the image data DA has been written and the skew angle θ of the original 100, for the image processing unit 507 (S901 in
Then, the CPU 501 configures various initial settings of the image processing unit 507 so as to correct the inclination of the image due to the skew of the original 100 (which will be hereinafter referred to as “skew correction”) (S902 in
nowStartLineAddr: address of the RAM 503 from where the leading end of a line is to be read this time
Addr: address (data reading position) of the RAM 503 from where data is to be read this time
pixelCount: pixel count value in the main scanning direction
lineCount: line count value in the sub scanning direction
The CPU 501 initializes the variable nowStartLineAddr to Reg_StartAddr indicative of a pixel address at the leftmost end of a leading line (a leading row in the main scanning direction) of pixels of the stored image data of the original 100. The CPU 501 initializes the variable Addr as well to Reg_StartAddr, similarly to nowStartLineAddr. It should be noted that in the present embodiment, each pixel of image data is associated with a minimum unit of data storage area, referred to hereinafter, in the RAM 503.
The CPU 501 initializes the variable pixelCount to Reg_Width. The value Reg_Width is a variable representing the length (pixel count) in the width direction of the original 100 corresponding to the main scanning direction. Further, the CPU 501 initializes the variable lineCount to Reg_Line. The value Reg_Line is a variable indicative of the length (pixel count) of the original 100 in the sub scanning direction.
After having initialized each of the variables, the CPU 501 starts the image processing unit 507 (S903). The image processing unit 507 issues a bus read transaction to the RAM 503 to acquire image data stored in the address (Addr) (S904).
Then, to perform skew correction on the read front-side image data, the image processing unit 507 calculates a write address of a pixel of the read front-side image data for writing the same in the RAM 503 (S905). In this case, the image processing unit 507 calculates the write address of the pixel subjected to image rotation processing, using affine transformation.
In the image rotation processing performed using affine transformation, e.g. when a rectangle ABCD in
X′=x·cos θ−y·sin θ (2-1)
y′=x·sin θ+y·cos θ (2-2)
In the step S905, the image processing unit 507 uses the skew angle θ of the original 100 calculated in the step S806 in
Next, the image processing unit 507 issues a bus write transaction to the RAM 503 so as to write image data of the pixel acquired in the step S904 in the calculated write address (address in the RAM 503) (S906).
Next, the image processing unit 507 decrements the current pixelCount value by 1 (S907) and increments the current Addr value by 1 (S908). Then, the image processing unit 507 determines whether or not the pixelCount value has become equal to 0, i.e. whether skew correction (image rotation processing) on image data of the last pixel on the one line (one row in the main scanning direction) has been completed (S909).
If the image processing unit 507 determines that the skew correction (image rotation) on the image data of the last pixel on the one line has not been completed, the process returns to the step S904, wherein the image processing unit 507 performs the same skew correction (image rotation) on image data of the next pixel on the same line.
On the other hand, if the pixelCount value has become equal to 0, i.e. if the skew correction (image rotation) on the image data of the last pixel on the one line has been completed, the image processing unit 507 resets the variables so as to perform the same skew correction (image rotation) on the next line.
Specifically, the image processing unit 507 resets the variable Addr to a value obtained by adding the value of Reg_Pitch to the value of nowStartLineAddr (S910). The reset Addr value indicates an address for writing image data of a first pixel on the next line in the RAM 503.
More specifically, as shown in
Then, the image processing unit 507 initializes various settings for converting the write address of each pixel of the next line, i.e. for performing skew correction by image rotation (S911). Specifically, the image processing unit 507 adds the Reg_Pitch value to the nowStartLineAddr value. Further, the image processing unit 507 sets the variable pixelCount to Reg_width to enable reading of a next line of image data. Furthermore, the image processing unit 507 decrements the lineCount value by 1 and sets the variable shakouCount to 1.
Then, the image processing unit 507 determines whether or not the lineCount value has become equal to 0 (S912). If it is determined that the lineCount value has not become equal to 0, which means that skew correction processing by image rotation on all the lines has not been completed, the process returns to the step S904, wherein the image processing unit 507 performs the same skew correction processing on the next line by image rotation.
On the other hand, if the lineCount value has become equal to 0, i.e. if the skew correction by image rotation on all the lines has been completed, the image processing unit 507 terminates the skew correction processing on the front-side image data.
The skew correction processing thus performed corrects the skew of an image of the front-side image data DA inclined due to the skew of the original shown in
In the skew correction of the front-side image data of the original 100, the front-side image data read by the front-side reading section 106 is temporarily stored in the RAM 503 in the uncorrected state, as described hereinbefore. Then, the skew angle θ of the original 100 is calculated based on the size (Reg_Width and Reg_Line) of the original 100, the one-line reading width WD of the original 100 and the conveying distance D, and the image processing unit 507 determines write addresses of the RAM 503 for the front-side image data subjected to the image rotation processing by affine transformation, and writes the image data in the determined write addresses.
On the other hand, in the skew correction of the back-side image data of the original 100, using the size, skew angle θ, etc. of the original 100 determined during the skew correction of front-side image data, the back-side image data read by the back-side reading section 109 is directly written in addresses determined by the skew correction (image rotation processing).
The interface controller 506 is configured as shown in
More specifically, as shown in
The register 506A stores various kinds of setting information for the interface controller 506. Specifically, the CPU 501 sets the size Reg_Width of the original 100 in the main-scanning direction, the size Reg_Pitch of the same including margins in the main-scanning direction, and the size Reg_Line of the same in the sub-scanning direction, as indicated in
Further, the CPU 501 sets in the register 506A a skew correction unit pixel count Reg_XRepNum as indicated in
Reg—XRepNum=1/tan θ (3)
The address generator 506B generates address information for writing read image data in the RAM 503, based on the various settings set in the register 506A and various timing signals.
The image interface 506E transfers image data read by the back-side reading section 109 from the back-side of an original 100 to the FIFO 506D and transfers a timing signal to the address generator 506B at the same time.
The FIFO 506D temporarily stores the back-side image data transferred from the image interface 506E, and transfers the image data according to a request signal from the bus interface 506C. The bus interface 506C packs the address information from the address generator 506B and the image data from the FIFO 506D, and issues a write transaction to the RAM 503 via a system bus 404.
Next, with reference to
Now, it be assumed that a straight line recorded on the back-side of an original 100 in a manner extending parallel with the direction of the width of the original 100 corresponding to the main scanning direction is read by the back-side reading section 109 while the original 100 is being normally conveyed in a non-skewed state. In this case, the straight line recorded on the back-side and extending parallel with the direction of the width thereof is read by the back-side reading section 109, as an image representing a straight line extending parallel with the main scanning direction, as indicated by reference numeral 1501 in
It should be noted that reference numeral 1502 in
When the straight line recorded on the back-side of the original 100 in a manner extending parallel with the direction of the width of the original 100 is read in a state where the original 100 is skewed, the straight line is generally written in the RAM 503 as image data of a straight-line like image inclined with respect to the main scanning direction as indicated by reference numeral 1601 in
In order to write image data of the straight line on the original 100, which is written in parallel with the direction of the width of the original 100, in the RAM 503, such that an image of the straight line is not inclined with respect to the main scanning direction as shown in
In this case, writing in the RAM 503 is performed on a line-by-line basis, and therefore it is required to generate write addresses for writing pieces of image data of each line in the RAM 503, according to the skew angle θ of the original 100. In the examples shown in
Next, with reference to
When the image on the back-side of the original is read by the back-side reading section 109, the CPU 501 initializes the settings which are stored in the register 506A within the interface controller 506 for use by the address generator 506B, as follows (S1901):
nowStartLineAddr=Reg_StartAddr
Addr=Reg_StartAddr
pixelCount=Reg_Width
lineCount=Reg_Line
shakouCount=0
wherein
nowStartLineAddr: address of the RAM 503 where the leading end of a line is to be written in this time
Addr: address of the RAM 503 where data is to be written this time
pixelCount: pixel count value in the main scanning direction
lineCount: line count value in the sub scanning direction
shakouCount: pixel count value indicative of the number of pixels of the same line in a non-skewed state
Next, the bus interface 506C issues to the RAM 503 via the system bus 504 a write transaction for writing the back-side image data stored in the FIFO 506D, in an address Addr generated by the address generator 506B (S1902).
When the write transaction is terminated, the address generator 506B decrements the pixelCount value by 1 (S1903) and increments the Addr value by 1 (S1904) so as to write data of a next pixel of the back-side image data.
Further, the address generator 506B increments the shakouCount value by 1 (S1905).
Then, the address generator 506B determines whether or not the incremented shakouCount value has reached the Reg_XRepNum value preset in the register 506A (S1906). If it is determined that the incremented shakouCount value has reached the Reg_XRepNum value, the process proceeds to a step S1907. In the steps S1907 et seq., the write addresses of respective next pieces of next back-side image data corresponding in number to the skew correction unit pixel count are updated for skew correction. First, in the step S1907, the address generator 506B determines whether or not the skew angle θ of the original 100 is positive. The skew angle θ is determined as positive when a right side edge of the original, as viewed from the line image sensor 301 or 401, passes the line image sensor 301 or 401 earlier than a left side edge thereof. On the other hand, when the left side edge of the original passes the line image sensor 301 or 401 earlier than the right side edge of the same, the skew angle θ is determined as negative. Further, when the right side edge and left side edge of the original simultaneously pass the line image sensor 301 or 401, it is determined that the skew angle θ is equal to 0.
If the skew angle θ of the original 100 is positive, the address generator 506B subtracts the Reg_Pitch value from the current Addr value, and sets a value obtained by the subtraction, as a new Addr value (S1908). If the skew angle θ of the original 100 is equal to 0 or negative, the address generator 506B adds the Reg_Pitch value to the current Addr value, and sets a value obtained by the addition, as a new Addr value (S1909).
In the present embodiment, it is assumed that the line image sensor 301 of the front-side reading section 106 and the line image sensor 401 of the back-side reading section 109 are arranged parallel to each other. In this case, when the skew angle of the original 100 with respect to the front-side line image sensor 301 is equal to θ, the skew angle of the original 100 with respect to the back-side line image sensor 401 is approximately equal to θ. Therefore, when skew correction for the front surface is performed in a manner illustrated in
By executing the steps S1906 to S1909, image data read from the back-side of the original is written in the RAM 503 in a state subjected to skew correction as shown in
After generating the new Addr in the step S1908 or S1909, the address generator 506B initializes the shakouCount value to 1 (S1910), and then the process proceeds to a step S1911. It should be noted that if the address generator 506B determines that the shakouCount value has not reached the Reg_XRepNum value preset in the register 506A (S1906), the process skips over the steps S1907 to S1910 to the step S1911.
In the step S1911, the address generator 506B determines whether or not the pixelCount value has become equal to 0, i.e. whether or not data of one line of pixels has all been written in the RAM 503. If it is determined that all the data of one line of pixels has not been written in the RAM 503, the process returns to the step S1902, wherein the address generator 506B performs the same write address control for the next pixel of the same line.
On the other hand, if the pixelCount value has become equal to 0, which means that the all the data of one line of pixels has been written in the RAM 503, the address generator 506B resets the various variables so as to perform the same write address control for pixels of the next line.
Specifically, the address generator 506B adds the Reg_Pitch value to the nowStartLineAddr value, and sets a value obtained by the addition, as an Addr value for a first pixel of the next line (S1912). Then, the address generator 506B initializes the various settings for writing data of pixels of the next line in the RAM 503 (S1913).
Specifically, the address generator 506B adds the Reg_Pitch value to the nowStartLineAddr value. Further, the address generator 506B sets pixelCount to Reg_width to enable reading of data of a next one line of pixels. Furthermore, the address generator 506B increments the lineCount value by 1 and sets the shakouCount value to 1.
Then, the address generator 506B determines whether or not the lineCount value has become equal to 0 (S1914). If it is determined that the lineCount value has not become equal to 0, which means that there is at least one line which has not yet been subjected to the process for writing data of pixels thereof in a skew-corrected state into the RAM 503, the process returns to the step S1902.
On the other hand, if the lineCount value has become equal to 0, i.e. if the image data has been written in the RAM 503 in a state where skew correction has been performed on all the lines, the address generator 506B terminates the process for writing back-side image data into the RAM 503 in a state where skew correction has been performed.
As described above, storage addresses for storing image data read from an original by the line image sensor 401 are determined to be respective storage addresses rotated through a skew angle of the original with respect to storage addresses where image data would be stored if the skew of the original detected by the line image sensor 301 were not taken into account.
This address control makes it possible to make use of a skew angle detected by the line image sensor 301 for skew correction of both of front-side image data and back-side image data of the original, whereby the front-side image data and the back-side image data can be corrected without providing separate skew correction circuits for the front surface and the back-side, respectively.
It should be noted that the image data of the original read as described above is written in the RAM 503 and is then stored in the hard disk drive 509. After the skew correction, the image data stored in the hard disk drive 509 may be printed by the printer unit 203 or sent to an external apparatus via a network, not shown. Further, the printing by the printer unit 203 or the transmission through the network may be performed automatically or according to a user instruction.
Aspects of the present invention can also be realized by a computer of a system or apparatus (or devices such as a CPU or MPU) that reads out and executes a program recorded on a memory device to perform the functions of the above-described embodiment, and by a method, the steps of which are performed by a computer of a system or apparatus by, for example, reading out and executing a program recorded on a memory device to perform the functions of the above-described embodiment. For this purpose, the program is provided to the computer for example via a network or from a recording medium of various types serving as the memory device (e.g., computer-readable medium).
While the present invention has been described with reference to an exemplary embodiment, it is to be understood that the invention is not limited to the disclosed exemplary embodiment. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims priority from Japanese Patent Application No. 2009-283974 filed Dec. 15, 2009, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2009-283974(PAT.) | Dec 2009 | JP | national |