Correction method of document inclination angle

Abstract: A correction method of a document inclination angle includes the steps of: first detecting an edge of a document; second detecting an inclination amount of the document corresponding to an inclination angle according to a detected result of the edge of the document. The inclination angle represents an inclination angle of the edge of the document with respect to a first reference direction and a second reference direction perpendicular to the first reference direction. The correction method further includes correcting the inclination angle of image data of the document with respect to the first and second reference directions. The step of the correcting includes a shift processing conducting a first shift processing in which the image data are shifted to one of the first and second reference directions according to the inclination amount and conducting a second shift processing in which the image data are shifted to the other of the first and second reference directions according to the inclination amount.

Description: BACKGROUND OF THE INVENTION The present invention relates to a correction method of document inclination angle for an image reading apparatus such as a scanner, facsimile device, digital copier in which a document is placed on an image reading position, and an image of the document is read, and specifically to an image reading apparatus in which, even when the placed document is inclined, it can be corrected. In an image reading apparatus such as a scanner, facsimile device, digital copier in which a document is placed on an image reading position, and an image of the document is read, there is a case in which the document is placed while being inclined. When the inclined document is read, for example, copied (image formation), as it is, there is a possibility that some portions of the image are lost. Accordingly, in the conventional image reading apparatus, an inclination angle of the document is detected by detecting an inclination of a row of characters from image information obtained from the inclined document, and the inclination angle is corrected corresponding to obtained image information. In the above method, in order to detect the inclination angle of the document, it is necessary that image information is read (pre-scanned) after the document is previously set on a reading position. Therefore, a long period of time is necessary for detecting the inclination angle, and thereby, image reading efficiency is lowered. Further, in order to detect the inclination of a character row, it takes a long time because complicated calculation is necessary, and further, cost is increased because many memories are used for calculation. US-A-5,181,260 discloses a method for determining the amount of skew of image and a method for correcting the same by an image data processing system. It is disclose to read an original document as image data, to obtain an image inclination from the image data and finally to correct the image inclination on basis of the result of calculation of the image data. However, it is not disclose to change the magnification of the image data by varying the scanning speed and to multiple-code the image data before storing it to the image memory. Therefore the necessary calculation processes and data memory involve additional costs and processing time. US-A-5,149,977 relates to a document reader apparatus. The document discloses a method for detecting the skewing angle of documents by providing a plurality of sensors which enable the judgment means to measure the time differential between the signals from the photosensors. The time differential corresponds directly to the skew angel of the document, when the conveyance speed of the document is known. However, it is not disclosed to measure the conveyance speed, resulting in wrong calculation of the skew angel if the document does not move with the expected speed. JP 08 192939 A discloses a sheet feeding device and image reading device with photosensors being capable of determining the skew angel in order to correct the skew angel of the document by shifting mechanically the scanned document itself. This results in additional mechanical features for turning the document, which involve additional costs and the need for maintenance. SUMMARY OF THE INVENTION An object of the present invention is to shorten a time necessary for detecting the inclination angle of the document, and to increase the efficiency of image reading. Further, another object of the present invention is to shorten a time necessary for inclination angle correction, and to reduce a cost. The above objects can be attained by a correction method with the features of claim 1. Preferred further embodiments of the invention are subject matter of the dependent claims. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1(a) is a outline sectional view of an image reading apparatus. Fig. 1(b) is a outline plan view, viewed from the upper surface side of a platen of the image reading apparatus. Fig. 2 is a view showing a detection result of photo-sensors PS1 to PS5. Fig. 3 is a functional block diagram of inclination correction. Figs. 4(a), 4(b) and 4(c)are views respectively expressing a document inclined on the platen. Figs. 5(a), 5(b), 5(c) and 5(d) are views typically showing a vertical correction respectively. Figs. 6(a), 6(b), 6(c) and 6(d) are views typically showing a horizontal correction respectively. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Referring to drawings, an example of the present invention will be described below. Fig. 1(a) is an outline sectional view of an image reading apparatus and Fig. 1(b) is an outline view viewed from the upper surface side of a platen of the image reading apparatus 1. Initially, an outline of the image reading apparatus 1 will be described below. A document stacking table 11 is a means to place a document D to be read thereon. A conveying means is a means to convey the document placed on the document stacking table 11 to an image reading position, which will be described later, and in the present example, the conveying means has a feeding roller pair 12 and a conveyance belt 15 trained around a roller pair 13 and 14. The feeding roller pair 12 is a means to separate a document sheet from the document D placed on the document stacking table 11, and to send it. The conveyance belt 15 is a means to convey the document D, fed by the feeding roller pair 12, to the image reading position while the document D is being nipped between the belt 15 and the platen 17. The image reading position is a position to read the document D conveyed by the conveying means, and in the present example, because the image reading apparatus 1 reads the document D by a scanning optical system under the condition that the document D is topped, the image reading position is a predetermined position on the light transmissive platen 17. In this connection, in the present example, the image is read under the condition that the document D is stopped, however the image reading apparatus may read the document D while the document D is moved. In the image reading apparatus 1 of the present example, the document D is conveyed based on the center reference, (the center of the document conveyed by the conveying means coincides with the center line (the secondary scanning direction) of the platen 17). In this case, in the system in which the reference is an edge of the platen, when the document is inclined, at least one angle portion of an image of the document D can not be read by an image reading means 21, which will be described later. A light source 18 is a means to emit light onto the document D, which is conveyed to the image reading position on the platen 17 and stopped, and is a linear light source extending in the primary scanning direction (in Fig. 1, the direction perpendicular to the paper). The first mirror 19 and a V mirror 20 are means to guide the light, emitted from the light source 18 and reflected by the document D, to a succeeding image reading means 21. When the image of the document D is read, the light source 18 and the first mirror are integrally moved in the secondary scanning direction (the left and right direction in Fig. 1) perpendicular to the primary scanning direction, and the V mirror 20 is moved at a 1/2 moving speed of the light source 18 and the first mirror. In this connection, although not shown in the drawing, an image forming means to form an light image of the document D onto the image reading means 21 is arranged between the V mirror 20 and the image reading means 21. The image reading means 21 is a means to read the image of the document D, and is a photoelectric conversion element to photo-electrically convert the light reflected from the document D for each pixel. In the present example, the image reading means 21 is structured by a line sensor(line CCD) extending in the primary scanning direction. The image reading means 21 reads the document image for each line, and can read an image on the entire surface of the document D stopped at the image reading position when the light source 18, the first mirror 19 and the V mirror 20 are moved in the secondary scanning direction. The read document image is converted into a digital image signal, and is sent to the outside such as an image forming apparatus. The light source 18, the first mirror 19, the v mirror 20, the image reading means 21, etc., are called a scanner. The document D in which the image on the entire surface is read by the image reading means 21, is conveyed by the conveyance belt 15, and is delivered onto a sheet delivery table 16 by a sheet delivery roller, not shown in the drawing. In such the image reading apparatus 1, when the document D placed on the document stacking table 11 is conveyed to the image reading position by the conveying means, sometimes the conveying condition is different in the widthwise direction of the document D (the direction perpendicular to the conveyance direction of the document D, and in the present example, parallel to the primary scanning direction), due to a condition of the conveying means, the quality of paper of the document D, etc. Therefore, sometimes the document D is conveyed with inclination (refer to Fig. 1(b)), thereby, the document D is not stopped at a predetermined image reading position in a right angle. Accordingly, in the present example, the inclination angle of the document is detected by an inclination angle detecting means 22, and the image read by the image reading means 21 is corrected by the correcting means according to the inclination angle . Hereinafter, this structure will be explained. Initially, the detection of the inclination angle  by the inclination angle detecting means, will be explained below, referring to Figs. 1(a), 1(b), Fig. 2 which is a view showing the result of the detection by the photo-sensors PS1 to PS5, and Fig. 3 which is a functional block diagram of the inclination correction. Below the platen 17, 4 photo-sensors PS1 to PS4, which are the document detecting means, are arranged on a straight line in the direction (the primary scanning direction) perpendicular to the document conveyance direction (in the present example, the secondary scanning direction) by the conveying means. When the photo-sensors PS1 to PS4 are arranged by standing side by side with the image reading means 21, a free space in the primary scanning direction of the image reading means 21 can be efficiently utilized. A photo-sensor PS5, which is the document detecting means, is arranged with respect to the photo-sensor PS3, on the downstream side of the conveyance direction (the secondary scanning direction) by the conveying means. These photo-sensors PS1 to PS5 are means to detect an edge of the document (which is an edge portion in the conveyance direction, and in the present example, a leading edge portion in the conveyance direction) conveyed by the conveying means. In the present example, when photo-sensors PS2, PS3 and PS5 are arranged in such a manner that a distance between photo-sensors PS2 and PS3 and a distance between photo-sensors PS3 and PS5 are equal, a calculation of the inclination angle  is simplified, and cost reduction by an increase of the calculation speed and simplification of the circuit is realized. Further, when the document is detected by the photo-sensors PS1 to PS5, the light source 18 and the first mirror 19 are moved to a position not to interfere with the detection, or are structured not to interfere with the detection. Further, to make the detection by the photo-sensors PS1 to PS5 easy, it is preferable that the entire surface (or partial surface) of the conveying belt 15 has a density different from the background (white), for example, black. When the leading edge of the document D is detected by photo-sensors PS1 to PS5, while the document D is conveyed to the image reading position by the conveying means, the output signal is as shown in Fig. 2, and the leading edge of the document D is detected with time difference as shown by time t1 to t5. Herein, the inclination angle  of the document D is detected by the output signals of the photo-sensors PS2 and PS3. That is, the inclination angle  of the document D is detected by utilizing that the difference s of timing between the output signals of the photo-sensors PS2 and PS3 depends on the inclination angle  of the document D. Further, in the present example, in order to detect the inclination angle  more correctly, the conveyance speed of the document D is detected by the difference T of timing between the output signals of photo-sensors PS3 and PS5. The output signals from photo-sensors PS2, PS3, and PS5 are sent to the inclination angle calculating section 23, and the inclination angle  of the document is calculated thereby. That is, the inclination angle  of the document is obtained by calculating the following equation.  = Tan -1 (s/T) The obtained inclination angle  is stored in a inclination angle memory 24, which is an inclination angle storing means to store the inclination angle . In order to realize the relationship of the above equation, the same one side of the document D conveyed by the conveying means needs to pass the photo-sensors PS2, PS3 and PS5. The reason is as follows: when an angle of the document D passes between photo-sensors PS2 and PS3, the inclination angle  can not be detected by only these signals, and an accurate correction of the inclination angle can not be conducted. Therefore, in the present example, photo-sensors PS1 and PS4 are arranged outside the photo-sensors PS2 and PS3. According to the output signals of photo-sensors PS1 to PS4, it is detected whether one side of the document D passes the photo-sensors PS2, PS3, and PS4. That is, it is detected by calculation in the inclination angle calculating section 23 whether the condition of the equation t1 - t2 = t3 -t4 is satisfied or not, (it is not necessary that the both sides are completely equal, but the both sides may have at least the same sign). When this condition is not satisfied, the detection of the inclination angle  is erroneous, and a display (message) that conveyance of the document D is failed, is displayed on a liquid crystal display (display means), not shown, provided on an operation panel, not shown, and the image reading operation is stopped for a time. As described above, in the present example, the inclination angle  of the document is detected as follows: the document D, which is being conveyed, is detected while the document is conveyed on the conveyance path by the conveying means, and based on the result, the inclination of the document D is detected. Due to this, no pre-scanning is necessary for detecting the inclination angle  of the document, a time necessary for detecting the inclination angle of the document can be shortened, and the image reading efficiency can be increased. Further, in the present example, in order to detect the document D, a plurality of photosensors PS2 and PS3 are arranged in the direction perpendicular to the conveyance direction of the document D, thereby, the inclination angle  of the document D can be detected by a simple structure, and not only cost reduction, but also an increase of the detection efficiency of the inclination angle  can be intended. Further, when the photosensor PS5 is arranged in the conveyance direction of the document D with respect to the photo-sensor PS3, the practical conveyance speed of the document D can also be accurately detected, and thereby, the inclination angle  of the document D can be accurately detected. In the present example, the photo-sensors PS1 to PS5 are provided below the platen 17, thereby, a space can be efficiently utilized, and the inclination angle  can be accurately detected when the inclination angle  of the document D is calculated at a position near the image reading position. However, it is not limited to the above description, but the photo-sensors may be provided on the conveyance path of the document by the conveying means such as an above position of the platen 17, or a position between the feeding roller pair 12 and the conveyance belt 15. Further, in the present example, the leading edge of the document D is detected by the photo-sensors PS1 to PS5, however, the trailing edge may be detected. In the present example, the document D is detected by the photo-sensors PS1 to PS5, however, other non-contact type switch or contact type switch may be used, and the essential point is that it may be a mean by which the document D conveyed by the conveying means can be detected. Further, the light source 18 and the first mirror 19 are not moved to a position at which these units do not interfere with the detection, or are not structured so that these units do not interfere with the detection, but the light source 18 is turned on while the document D is conveyed by the conveying means, and the document D may be detected by using the image reading means 21. Next, correction of the image, read by the image reading means 21 according to the obtained inclination angle , will be described. Generally, affine transformation is known as a method to correct the image read at the inclination angle . In the affine transformation, 2 X 2 matrix calculation is conducted, and therefore, the memory capacity needs to be large. Accordingly, in the present example, the image correction by data shift processing is conducted which has been proposed in Japanese Patent Application Open to Public Inspection No. 83794/1997 by the inventors, and in which an amount of calculation and the memory are more economical. The data shift processing shifts image information for each pixel stored in the image memory 28, which is an image storing means, as the lengthwise correction or the widthwise correction, and thereby, conducts image correction. In this connection, when the image is corrected by the data shift processing, the magnification ratio of the document or the aspect ratio is changed, therefore, independent lengthwise/widthwise magnification change processing is preferably conducted. In this connection, generally, in the data shift processing and the magnification change processing, it is more easily considered that the magnification change processing is conducted after the data shift processing, because the image whose aspect ratio is disordered by the data shift processing, can be returned to cope with the original magnification. In contrast to this, when the data shift processing is conducted after the magnification change processing, the disorder of the aspect ratio caused by the data shift processing needs to be previously presumed, and the inclination angle of the read image is distorted by the magnification change processing, and its correction processing becomes complicated. However, in the image reading apparatus to read the document image by the relative movement to the document (in more detail, it is scanned by the scanning optical system) as in the present example, the magnification change in the secondary scanning direction (widthwise) can be easily conducted by changing the relative movement speed (in more detail, the moving speed of the light source 18, the first mirror 19, and the V mirror 20), and further, deterioration of the image quality by the magnification change can be prevented. Therefore, in the present example, by conducting the data shift processing after the magnification change processing, the image read at the inclination angle  is corrected. Initially, the magnification change processing will be described below, referring to Figs. 3, and Figs. 4(a), 4(b) and 4(c), which are views expressing the inclined documents on the platen 17. Fig. 4(a) is an outline view expressing the inclined document on the platen 17, Fig. 4(b) is a conceptual view showing an image D1 to be read, and Fig. 4(c) is a conceptual view showing image data after magnification change processing. As the magnification change processing, the following processing is conducted: Width (the secondary scanning direction): 1/cos  times, Length (the primary scanning direction): cos  times. In more concrete explanation, as described above, the inclination angle  of the document D is detected during conveyance of the document D by the conveying means, and the inclination angle is inputted into an inclination angle memory 24. At the time, the document D is inclined as shown in Fig. 4(a), and placed on the platen 17. Data of the inclination angle  stored in the inclination angle memory, is initially sent to a secondary scanning magnification change processing means 25. The secondary scanning magnification change processing means 25 is a means to conduct the widthwise (the secondary scanning direction) magnification change by changing the scanning (movement) speed (in the present example, the movement speed of the light source 18, the first mirror 19 and the V mirror 20) in the secondary scanning direction by the scanner, corresponding to the inclination angle . That is, in the secondary scanning magnification change processing means, the scanner is controlled so that it scans at the scanning speed of 1/cos  of the scanning speed at the life-size processing. When the scanner scans the entire surface of the document at the controlled scanning speed (read by the image reading means 21), the image signal is generated which is magnification-changed by 1/cos  times in the secondary scanning direction. The generated image signal is successively inputted to the primary scanning magnification change processing means 26, and is subjected to primary scanning magnification change processing (lengthwise magnification change processing). The primary scanning magnification change processing means 26 is a means to conduct primary scanning magnification change processing corresponding to the inclination angle  stored in the inclination angle memory 24, and the image signal is magnification changed by cos  times, for example, by the linear interpolation, or the like. As described above, the shape of the image D1 recorded on the document D on the platen 17, is changed from a rectangular (refer to Fig. 4(b)) into a parallelogram (refer to Fig. 4(c)), when the image is read and magnification change processed by the image reading means 21. As the shape is changed, the inclination angle is also changed as follows (refer to Fig. 4(c)). Angle from the widthwise (the secondary scanning) direction :  ' = Tan -1 (tan  . cos 2 ) Angle from the lengthwise (the primary scanning) direction :  " = Tan -1 (tan  /cos 2  ) As described above, the image signal subjected to magnification processing is multiple-coded by a multiple coding processing means 27. As a multiple coding method, it is preferable that the multiple coding method in which an image size is compressed so that the multiple encoding processing can be conducted by a small memory capacity, for example, an error diffusion method or a dither method is used. The image signal subjected to the multiple coding processing, is stored once in an image memory 28, which is an image storing means to store image data. Then, the image inclination is corrected by data shift processing. Incidentally, image data outputted from the scanner covers almost the entire area of the platen 17, however, in order to extract an area corresponding to the document D in it (in the case of a copier, to print the image data at the correct position of a predetermined sheet), it is necessary to grasp the correction method about the following: from which portion (the top of the document area after correction) the document area in the image data should begin. For that purpose, before the inclination of the image is corrected, it is necessary to accurately grasp the size of the document D, the document reference point, and the top of the document area after the inclination correction. In this connection, "the document reference point" used above, means an angle portion of the document D which is read at first when the image is read by the image reading means 21. Further, "the top of the document area after correction" means a position corresponding to the top of the document area of the image data after the inclination correction, and as shown in Fig. 4(c), the document reference point is expressed as (xs, ys), and the top of the document area after correction is expressed as (xt, yt). Incidentally, in the inclination correction, it is included also to correct so that the document reference point (corner of the document D) is located at the top of the document area after correction. In Fig. 4(c), an area shown by a dotted line is an area D3 of the document after inclination correction. In order to grasp them, an edge portion of the document D is detected from image data stored in the image memory 28, and the size of the document D, the document reference point (xs, ys), and the top of the document area after inclination correction (xt, yt) can be obtained. However, in order to obtain the size of the document D, the document reference point (xs, ys), and the top of the document area after inclination correction (xt, yt), processing time to calculate is necessary. Accordingly, by the following method, these can be obtained in a short time by detecting and presuming. Initially, the detection and presumption of the size of the document D will be described below. The size of the document D may be detected by a size detection means, not shown in the drawing. That is, the width of the document (the direction perpendicular to the conveyance direction) is detected when the document is placed on the document stacking table 11, and further, the length of the document D (the conveyance direction) is detected while being conveyed by the conveying means. The size of the document may be detected by a method to detect the size of the document from the detected width and length, as described above, or by a non-contact type size detection means, not shown, when the document D is placed on the platen 17. Next, the presumption of the top (xt, yt) of the document area after the inclination correction, will be described. When the size of the document D is known, the top (xt, yt) of the document area after the inclination correction can be obtained. That is, the top (xt, yt) of the document area after the inclination correction is positioned a/2 below from the center of the platen 17 (a one-dotted chain line shown by Fig. 4(a)). In the above description, the symbol a is the width in the primary scanning direction on the document D, and in the case of A4R sized document, a is 210 mm, (incidentally, the length b mm of the size A4R in the secondary scanning direction is 279 mm). Accordingly, the top of the document area is positioned 105 mm below from the center of the platen 17. In the following description, the top of the document area after the inclination correction is defined as the origin ((xt, yt) = (0, 0)). Incidentally, when the present example is applied to a copier, information of "copy size" which is the size of a transfer sheet set from an operation panel or the like, not shown, is presumed as the size of the document D, and further, in the following calculation, including the top (xt, yt) of the document area after the inclination correction, the copy size may be used as the size of the document D. In the case of a copier, because a copy size which coincides with the document D is used (so-called a life-size), or image information of the document D is magnification change processed to meet the copy size (which may be magnification changed simultaneously with the above-described secondary scanning magnification change processing or primary scanning magnification change processing), it is better to use the copy size. Next, the presumption of the document reference point (xs, ys) will be described. The presumption of the document reference point is conducted according to the size and inclination angle  of the document D. In order to obtain the document reference point, initially, the length L from the central point (an intersection of the diagonal) of the document D and the angle  are obtained. The letter L is a half length of the diagonal, and is expressed as follows: L = 1/2 X (a 2 + b 2 ) 1/2 The angle  to the central line (refer to Fig. 4(a)) is  = Tan -1 (a/b) Incidentally, because L or  is a value depending on only the size of the document D, L or  previously calculated for each sheet size is stored in a memory, and it may be allowed that L or  is directly read from the memory corresponding to the size of the document D. When L or  is obtained, the document reference position (xs, ys) can be obtained by the following equation. xs = 0, ys = a/2 - L sin ( -) X cos  Herein, a reason why the right side of ys is multiplied by cos , is that the image data is subjected to magnification change processing by the primary scanning magnification change processing means 26 (corresponding to the inclination angle  of the document D) as described above. As described above, by obtaining the size of the document D, the document reference point (xs, ys), and the top (xt, yt) of the document area after the inclination correction, by detection and presumption, image data can be detected before it is stored in the image memory 28, and not only data shift processing, which will be described later, can be conducted at once, but also, in the case where the lengthwise correction (correction in the primary scanning direction) in the data shift processing is conducted first, when the image data is stored in the image memory 28, the lengthwise correction in the data shift processing can be simultaneously conducted (that is, before the document D is read by the image reading means 21, because the document reference position and the top of the document area after the inclination correction are previously known, the image data can be stored in the image memory 28 during the lengthwise correction), and thereby, the efficiency can be further increased. Next, data shift processing will be described. The data shift processing is processing to correct the image read by the image reading means 21 according to the inclination angle  of the document stored in the inclination angle memory 24. This processing is conducted by shifting the image data stored in the image memory 28 by an inclination correction means 29, which is a correction means. That is, the inclination correction means 29 is a means to correct the inclination by data shifting the image data on the image memory 28, and amounts of movement, (respectively I, J), in which each pixel is moved in the lengthwise direction (the primary scanning direction) and in the widthwise direction (the secondary scanning direction), corresponding to the inclination angle  stored in the inclination angle memory 24), are obtained. By moving each pixel according to the amount of movement, the inclination correction of the image is conducted. Hereinafter, it will be detailed. In this connection, in the description below, the case in which the widthwise correction is carried out after the lengthwise correction, will be described, however, the reverse may be allowed. Initially, the lengthwise correction will be described below referring to Figs. 5(a), 5(b), 5(c) and 5(b), in which the lengthwise correction is typically shown. Fig. 5(a) is a view typically showing image data (the document D2) before the lengthwise correction. Fig. 5(b) is a view typically showing image data (the document D4) after the lengthwise correction. Figs. 5(c) and 5(d) are image-like views showing the data shift of the lengthwise correction. In Fig. 5(a), the image data is shifted in lengthwise (primary scanning) direction so that a straight line AA' which is in parallel to one side of the document and includes the document reference point (xs, ys), coincides with a straight line BB' which is in parallel to the secondary scanning direction (x direction) and includes "a top of the document area after the inclination correction", that is, the origin. At this time, it is necessary that the image data is not shifted in. the widthwise (secondary scanning) direction. When an arbitrary point in the image data is (x, y), an amount I of shift(movement) in the lengthwise direction can be expressed as follows: I = ys - X · tan ' In Figs. 5(a) to 5(d), the image data is moved downward if I < 0, and upward if I > 0. In this connection, ' is a function of , as described above. Accordingly, the amount of movement I is a function of x, and does not depend on y, and therefore, data having equal y has the equal amount of movement I. As shown in Fig. 5(c), common pixels in the primary scanning direction (pixels partitioned by x) of the image data (the document D2) before the lengthwise correction, are collected, and may only be shifted on the image memory 28 according to the amount I of the movement so as to match Fig. 5(d). That is, pixels may only be moved in the primary scanning (y, lengthwise) direction, and a plurality of pixels can be collectively moved, so that the amount I of the movement can be calculated for each group of pixels partitioned by x, and corrected. Then, the image data of the document D3 after the lengthwise correction becomes as shown in Fig. 5(b). Incidentally, δ formed between the slanting side in the image data after lengthwise correction and the primary scanning direction (refer to Fig. 5(b)) is expressed by a function of  as follows. δ = Tan -1 (1/(1/tan " + tan ')) = Tan -1 (1/(cos 2  (1/tan  + tan ))) Next, the widthwise correction will be explained below, referring to Figs. 6(a), 6(b), 6(c), and 6(d) which are views typically showing the widthwise correction. Fig. 6(a) is a view typically showing the image data (document D4) before the widthwise correction (after the lengthwise correction). Fig. 6(b) is a view typically showing the image data (document D3) after the widthwise correction (after the lengthwise correction). Figs. 8(c) and 6(d) are image-like views showing the data shift of the widthwise correction. In Fig. 6(a), the image data is shifted (moved) in the x direction (which is the secondary scanning direction, and is also called the widthwise direction) so that the slanting line becomes vertical. At the time, it is necessary that the image data is not shifted (moved) in the lengthwise (primary scanning) direction. When an arbitrary .point in the image data is defined as (x, y), the amount J of the shift (movement) in the widthwise direction, is expressed as follows: J = -y · tan δ In Fig. 6, when J < 0, the image data is moved in the left direction, and when J > 0, it is moved in the right direction. Accordingly, the amount of movement J is a function of y, and does not depend on x, and therefore, data having equal x has the equal amount of movement J. As shown in Fig. 6(c), common pixels in the secondary scanning direction (pixels partitioned by y) of the image data before the widthwise correction, are collected, and may only be shifted on the image memory 28 according to the amount J of the movement so as to become as shown in Fig. 6(d). That is, pixels may only be moved in the secondary scanning (x, widthwise) direction, and a plurality of pixels can be collectively moved, so that the amount J of the movement can be calculated for each group of pixels partitioned by y, and corrected. As described above, the inclination correction of the image data can be conducted by data shift processing in which the image data of the document D stored in the image memory 28 is shifted by the inclination correction means 29 according to the inclination angle  stored in the inclination angle memory 24. That is, the inclination correction can be conducted by moving (shifting) pixels, which are collected for each y (primary scanning, lengthwise) or for each x (secondary scanning, widthwise) by the lengthwise correction or the widthwise correction, on the memory. Accordingly, the total amount of calculation for the amounts of movement I, J, can be reduced. Concretely, if the image data consists of x X y pixels, the number of times of movement amount calculation may be only x + y times, and the number of times of calculation is reduced, comparing to that of the movement amount calculation of x X y times of affine transformation. Thereby, the complicated calculation is not necessary, so that time necessary for the inclination angle correction can be reduced. Further, the large memory capacity is not necessary, resulting in a cost reduction. Incidentally, the inclination angle  of the document D varies depending on various conditions such as the quality of sheet of the document D, environmental condition or condition of the conveying means, however, the document D placed on the document stacking table 11 has the same quality of sheet, and the almost same environmental condition and condition of the conveying means, and therefore, one sheet of the document D shows the same inclination angle  as that of the other document D. That is, the inclination angle  of a set of the documents D placed on the document stacking table 11 has the reproducibility with that of the document D (a sheet of a set of documents) conveyed by the conveying means. Accordingly, it is not necessary to detect the inclination angle  by the inclination angle detecting means 22 at every time when the document D is conveyed by the conveying means. In other words, an image read by the image reading means 21 can be corrected according to the inclination angle 8 of the document D already stored in the inclination angle memory 24, without detecting the inclination angle of the document D by the inclination angle detecting means 22. Accordingly, it is not necessary to detect the inclination angle  at every time when each of a plurality of documents is conveyed, therefore, time necessary for detecting the inclination angle  of the document D can be shortened, and the image reading efficiency can be increased. For example, for the first document, the inclination angle  is detected, the detected inclination angle  is stored in the inclination angle memory 24, and the inclination is corrected, and for the other documents D (the second and subsequent documents) placed on the document stacking table 11, the inclination angle  is not detected, and the inclination may also be corrected according to the inclination angle , stored in the inclination angle memory 24. Alternatively, the inclination angle  may also be detected for every n sheets of the document D conveyed by the conveying means (herein, n is an arbitrary integer, and may also be set by the operator from an operation panel or the like, not shown). Further, in the case of the document D with high frequency in use, the inclination angle  is previously set from the operation panel or the like, not shown, and is stored in the inclination angle memory 24, and according to the inclination angle  stored in the inclination angle memory 24, the inclination of the image read by the image reading means 21 may also be corrected. In the above structure, pre-scanning is not necessary to detect the inclination angle of the document, and therefore, time necessary for detecting the inclination angle of the document can be shortened, and the image reading efficiency can be increased. Further, the inclination angle detection is not necessary at every time when each of a plurality of documents is conveyed, and therefore, time necessary for detecting the inclination angle of the document can be shortened, and the image reading efficiency can be increased. Still further, pre-scanning is not necessary to detect the inclination angle of the document, and therefore, time necessary for detecting the inclination angle of the document can be shortened, and the image reading efficiency can be increased. Yet further, the inclination angle of the document can be detected by a simple structure, and therefore, not only cost reduction, but also an increase of the efficiency of the inclination angle detection can be intended. Furthermore, the inclination angle of the document can be more accurately detected. Further, the inclination angle can be corrected by a simple method of the data shift, without any complicated calculation, and therefore, time necessary for the inclination angle correction can be shortened, and a large memory capacity is not used, so that cost reduction can be intended. Furthermore, the magnification change processing in the relative movement direction is conducted without calculation, and therefore, more time shortening and cost reduction can be intended.

Claims: A correction method of a document inclination angle () comprising the steps of: (a) first detecting an edge of a document (D) by a plurality of photosensors (PS1 -PS5) on a way of conveyance thereof by a document conveying device (13,14,15) to a reading position, wherein not all of the plurality of photosensors (PS1-PS5) are arranged on a straight line in a direction perpendicular to the document conveyance direction and the plurality of photosensors (PS1 -PS5) Include a photosensor (PS5) arranged with a predetermined distance with respect to the other photosensors in the document conveyance direction, and the document conveyance speed can be obtained by a combination of a period of time during which the document passes the plurality of photosensors and the predetermined distance; (b) second detecting an inclination amount of the document corresponding to an inclination angle () according to a detected result of the edge of the document, wherein the inclination angle represents an inclination angle of the edge of the document with respect to a first reference direction and a second reference direction perpendicular to the first reference direction and wherein the step of detecting the inclination amount is conducted on the basis of a document conveyance speed by using a difference (s) of timing between the output signals of the photosensors PS2 and PS3 and a difference (T) of timing between the output signals of the photosensors PS3 and PS5 for obtaining the inclination angle () by calculating the equation  = Tan -1 (s/T); characterized by the steps of (c) changing magnification of the image data in the second reference direction by a scanner (18, 19, 20, 21) for scanning the document by varying a scanning speed of the scanner, according to the inclination angle (); (d) multiple-coding to compress the image data before storing the image data into an image memory; and (e) correcting the inclination angle of image data of the document with respect to the first and second reference directions, wherein the step of the correcting includes a shift processing conducting a first shift processing in which the image data are shifted to one of the first and second reference directions according to the inclination amount and conducting a second shift processing in which the image data are shifted to the other of the first and second reference directions according to the inclination amount. The correction method of claim 1 further comprising the step of changing magnification of the image data in the first reference directions according the inclination amount. The correction method of claim 2, wherein the step of the changing magnification is carried out prior to the step of the correcting. The correction method of claim 1, wherein the shift processing includes the step of shifting simultaneously the image data corresponding to a plurality of pixels. The correction method of claim 4, wherein the shift processing includes the step of sifting simultaneously the image data corresponding to the plurality of pixels adjacent to each other in the first reference direction. The correction method of claim 4, wherein the shift processing includes the step of sifting simultaneously the image data corresponding to the plurality of pixels adjacent to each other in the second reference direction. The correction method of claim 1, wherein the first detecting includes the steps of: generating the image data by reading the document In a document reading position; and detecting the edge of the document on the basis of the generated image data. The correction method of claim 7, wherein the step of the first detecting is carried out by a difference of timing between output signals of the photosensors (PS2 and PS3). The correction method of claim 1 further comprising the step of changing magnification of the image data in a direction of at least one of the first and second reference directions according to the inclination amount. The correction method of claim 9, wherein the second reference direction is the document conveyance direction, and the step of changing magnification of the Image data is conducted In the first reference direction according to the inclination amount, the step of changing magnification in the second reference direction is conducted by changing a relative moving speed between the document and a document reading means. The correction method of claim 1 further comprising the step of storing the inclination amount. The correction method of claim 11, wherein the inclination amount stored In the step of storing is used for a second and succeeding documents of a plurality of documents which are conveyed one by one to a document reading position by a document conveying device, and the steps of the first and second detecting are omitted. The correction method of claim 12, wherein in the step of first detecting, the edge of a first document of the plurality of documents is detected by the plurality of photosensors on the way of conveyance thereof by a document conveying device to a reading position.

Inventors: ICHIHARA YOSHIYUKI, WASHIO KOJI, ICHIHARA, YOSHIYUKI, WASHIO, KOJI
Applicants: KONISHIROKU PHOTO IND, KONICA CORPORATION
Application year: 1998
Main classification: H04N1
IPC codes: H04N1