US RE41364 E1 Abstract A test image has a black bias on a white background. The black bias is a line set at about 45 degrees to the scan lines of a scanner. Boundary points of the scanned bias are found. A regression line is calculated from the positions of the boundary points. Differences in the positions of adjacent boundary points, together with the slope reciprocal of the regression line, are used to determine error values. The error values are compared with a gate value to determine if there are any occurrences of scan line misalignment.
Claims(22) 1. A method for determining if an image from a scanner has an occurrence of scan line misalignment, the scanner comprising a housing, a scanning platform upon which is placed a document to be scanned, a scanning module to scan the document, and a driving module to drive the scanning module, the method comprising:
scanning a document having a test image and collecting corresponding scan line image information from a plurality of scan lines in order, each scan line image having a portion of the scanned image of the test image;
using a method of searching for a predetermined boundary point to find the position of a boundary point of the test image from the information in every scan line image;
calculating a regression line from the position of the boundary point;
calculating discrepancies of corresponding positions of boundary points and the slope reciprocal of the regression line from the image information of adjacent scan lines and determining corresponding error values from every discrepancy and slope reciprocal; and
comparing every error value with a predetermined gate value to determine if the scan line images from the scanner have any occurrences of scan line misalignment.
2. The method of
3. The method of
4. The method of
andwherein (x
_{i}, y_{i}) are the positions of the boundary points chosen to calculate the regression line.5. The method of
6. The method of
averaging the gray-scale values of a plurality of pixels in a chosen white region of a scan line, half of the averaging result being a boundary reference level (V
_{P1}), and defining the gray-scale value of a pixel closest to the boundary referencing level as a first boundary reference point (P_{1}); moving forward a first predetermined number of pixels from the first boundary reference point to select a second predetermined number of pixels, the average of the gray-scale values of the second predetermined number of pixels being a white reference level (V
_{W}); moving backward the first predetermined number of pixels from the first boundary reference point to select the second predetermined number of pixels, the average of the gray-scale values of the second predetermined number of pixels being a black reference level (V
_{B}); averaging the white and the black reference levels to determine a boundary level (V
_{0}); searching for two adjacent pixels (P
_{2}, P_{3}) from the plurality of pixels of the scan lines where the boundary level between both gray-scale values of the two adjacent pixels satisfies (V_{P2}≦V_{0}≦V_{P2}), and setting these two pixels as a second and a third boundary reference point (P_{2}, P_{3}); and using the gray-scale values of the second and the third reference points (V
_{P2}, V_{P3}) and the boundary level (V_{0}) to calculate the boundary point (X) mathematically by
7. The method of
8. The method of
9. The method of
10. A method for identifying scan line misalignment in a scanner, comprising:
scanning a test image to obtain scanned image data corresponding to a plurality of scan lines of the scanner; locating one or more boundary points of the scanned test image corresponding to at least a portion of the plurality of scan lines; determining a regression line for at least a portion of the one or more boundary points; determining a corresponding error value for at least a portion of the one or more boundary points, based at least in part on the regression line; comparing one or more corresponding error values with a gate value; and determining whether the scanner has a scan line misalignment based at least in part on the comparing. 11. The method of
for a particular scan line, identifying a first boundary reference point V _{P} ; determining a white reference level V _{W} ; determining a black reference level V _{B} ; averaging the white and the black reference levels to determine a boundary level V _{0} ; selecting two pixels as a second and a third boundary reference point P _{2 } and P _{3 } that satisfy the relationship V _{P3} ≦V _{0} ≦V _{P2} , wherein V _{P2 } and V _{P3 } comprise second and third boundary reference points; and calculating a boundary point (x) mathematically by 12. The method of
determining a difference in position between a boundary point corresponding with a first scan line and a boundary point corresponding with a second scan line; determining a reciprocal of the slope of the regression line at the first scan line; and determining an error value corresponding with the first scan line based at least in part on the difference between the determined difference in position between the boundary point corresponding with the first scan line and the boundary point corresponding with the second scan line and the determined reciprocal of the slope of the regression line at the first scan line. 13. The method of
14. The method of
15. The method of
16. The method of
17. A scanner having a plurality of scan lines, the scanner comprising:
a housing; a scanning platform positioned at least partially in the housing; a scanning module positioned at least partially in the housing and configured to obtain a scanned image of the document; and a driving module positioned at least partially in the housing and configured to drive the scanning module to scan a document positioned on the scanning platform, wherein the scanner is configured to—locate one or more boundary points of the scanned image; determine a regression line for at least a portion of the one or more boundary points; determine corresponding error values for the one or more boundary points, based at least in part on the regression line; and compare one or more corresponding error values with a gate value. 18. The scanner of
19. The scanner of
20. The scanner of
right portion of the document to the lower-left portion of the document. 21. The scanner of
identify a first boundary reference point V _{P } for a particular scan line; determine a white reference level V _{W} ; determine a black reference level V _{B} ; average the white and the black reference levels to determine a boundary level V _{0} ; select two pixels as a second and a third boundary reference point P _{2} , and P _{3 } that satisfy the relationship V _{P3} ≦V _{0} ≦V _{P2} , wherein V _{P2 } and V _{P3 } comprise second and third boundary reference points; and calculate a boundary point (x) mathematically by 22. The scanner of
determine a difference in position between a boundary point corresponding with a first scan line and a boundary point corresponding with a second scan line; determine a reciprocal of the slope of the regression line at the first scan line; and determine an error value corresponding with the first scan line based at least in part on the difference between the determined difference in position between the boundary point corresponding with the first scan line and the boundary point corresponding with the second scan line and the determined reciprocal of the slope of the regression line at the first scan line. Description 1. Field of the Invention The present invention provides a method for determining if an image from a scanner has occurrences of scan line misalignments. More particularly, a software method enabling a program to determine if an image from a scanner has occurrences of scan line misalignments is disclosed. 2. Description of the Prior Art Scanners are popular computer peripherals that are used to digitize documents or pictures so that they may be stored on a computer. To ensure a high quality of these scanned images, manufacturers strive to increase the resolution of the images, and to make their colors more brilliant. But a key factor affecting the quality of scanned images is the stability of the scanning module. If the stability of the scanning module is insufficient, the images from a scanner may have misalignments or entire deletions of scan lines in the image. Please refer to FIG. Please refer to FIG. In this prior art, a search is performed within the scanned test image Hence, the prior art compares two adjacent lines and determines if the scanned test image It is therefore an objective of the present invention to provide a method for determining scan line misalignments of a scanner. Briefly, the present invention scans a test image that has a black bias on a white background. The black bias is a line set at about 45 degrees to the scan lines of the scanner. The method involves finding boundary points of the scanned bias, calculating a regression line from the positions of the boundary points, using differences in the position of adjacent boundary points together with the slope reciprocal of the regression line to determine error values, and comparing the error values with a gate value to determine if there are any occurrences of scan line misalignment. It is an advantage that the present invention can detect scan line misalignments with sub-pixel accuracy, thus fulfilling the more rigid requirements for high-level scanners. These and other objectives of the present invention will no doubt become obvious to these of ordinary skill in the art after reading the following detailed description of the preferred embodiment, which is illustrated in the various figures and drawings. Please refer to FIG. To determine if there are any occurrences of scan line misalignment, the scanning module A searching method is used to find a boundary point of the bias Please refer to FIG. Moving forward from the first boundary reference point P Because the first boundary reference point P The average of the white reference level (V Please refer to FIG. Because P After determining the boundary position points of the left boundary line for every scan line, a regression line and its slope can be calculated. The calculation of the regression line can be done using all, or only some, of the previously found boundary points. Because the calculation and mathematical significance of the regression line is a well known prior art mathematical tool, the equations are only noted here, without undue explanation. With n parts of numbers (x After calculating the regression line, the difference in the position of every boundary point is calculated (Δx Finally, each error value ERR Please refer to FIG. -
- Step
**50**: Begin. - Step
**52**: Scan the black bias**37**on the document**36**, and then collect the corresponding image information from the scan lines. - Step
**54**: Search for the position of the black bias**37**from the image information in the scan lines by way of searching for the boundary points. - Step
**56**: Are the required positions of the boundary points found? If not, go back to Step**54**. - Step
**58**: Calculate the corresponding regression line using the found positions of the boundary points. - Step
**60**: Calculate the reciprocal of the slope of the regression line (1/m). - Step
**62**: Select an appropriate gate value (TD). - Step
**64**: Calculate the differences in the positions of the boundary points (Δx_{i}=x_{i}−x_{i+1}) of the adjacent scan lines. - Step
**66**: Use the differences of step**64**and the reciprocal of the slope of the regression line of step**60**to calculate corresponding error values (ERR_{i}=|Δx_{i}−1/m|), and the error values can also be interpreted with the use of error ratios, which are equal to ERR_{i}/(1/m). - Step
**68**: Is an error value from step**66**larger than the chosen gate value? If not, go to step**72**, otherwise go to Step**70**. - Step
**70**: A scan line misalignment has occurred. Go to step**74**. - Step
**72**: There are no occurrences of scan line misalignment. - Step
**74**: Have all of the chosen boundary points been calculated? If not, go to step**64**, otherwise go to Step**76**. - Step
**76**: End.
- Step
Please refer to FIG. -
- Step
**80**: Begin. - Step
**82**: Average the gray-scale image values of the pixels in the white region and defining half of this average value as a boundary reference level V_{P1}. - Step
**84**: Find the pixel in the scan line with a gray-scale value that is closest to the boundary reference level, and define this pixel as a first boundary reference point P_{1}. - Step
**86**: After moving forward 15 pixels from the first boundary reference point, select the next 15 pixels ahead, and average the gray-scale image values of these 15 pixels to determine a white reference level V_{W}. - Step
**88**: After moving backward 15 pixels from the first boundary reference point, select the next 15 pixels behind and average the gray-scale image values of these 15 pixels to determine a black reference level V_{B}. - Step
**90**: Average the white reference level V_{W }and the black reference level V_{B }to determine a boundary level${V}_{0}=\frac{{V}_{B}+{V}_{W}}{2}.$ - Step
**92**: Search for two adjacent pixels P_{2 }and P_{3 }between where V_{0 }falls, so that V_{P3}≦V_{0}≦V_{P2}, and define these two pixels as the second and the third boundary reference points P_{2 }and P_{3}. - Step
**94**: Calculate the position of the boundary point X, using the equation$X={P}_{2}+\frac{{V}_{p\text{\hspace{1em}}2}-{V}_{0}}{{V}_{p\text{\hspace{1em}}2}-{V}_{p\text{\hspace{1em}}3}}.$ - Step
**96**: End.
- Step
In the first prior art method, a manual, visual inspection of a scanned test image is performed, which is both judgmental (as it depends on the individual experience of the testing staff) and time-consuming. In the second prior art, the comparison of gray-scale image values of two adjacent scan lines to determine if the slope of the scanned test image is equal to its original value lowers the factors of personal judgement, but the results are too rough to fulfill the requirements of high-level scanners. The present invention method, however, searches for the boundary points to determine a regression line, and can calculate the positions of the boundary points accurately within one pixel unit and the error values of all boundary points to the regression line. If the error value is larger than a predetermined gate value, a scan line misalignment is determined to have occurred. In light of the discussion above, this method fulfills the requirements of high-level scanners, and the gate value can be chosen by experienced personnel to account for different requirements. Those skilled in the art will readily observe that numerous modifications and alternations of the device may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims. Patent Citations
Classifications
Rotate |