Method for determining a skew angle of a bitmap image and de-skewing and auto-cropping the bitmap image
First Claim
1. A method for determining the skew angle of a bitmap image comprised of image pixels and background pixels, comprising the steps of:
- calculating a first estimate of the skew angle for a first side of the bitmap image and a corresponding first reliability indicator, both the first estimate of the skew angle and the first reliability indicator being based on a first set of plural angles which are calculated at a plurality of positions along the first side, the first set of plural angles being based on the position of image pixels closest to the first side;
calculating a second estimate of the skew angle for a second side of the bitmap image and a corresponding second reliability indicator, both the second estimate of the skew angle and the second reliability indicator being based on a second set of plural angles which are calculated at a plurality of positions along the second side, the second set of plural angles being based on the position of image pixels closest to the second side; and
determining the skew angle in accordance with which of the first and second estimates has the better reliability indicator.
1 Assignment
0 Petitions
Accused Products
Abstract
Determining a skew angle of a bitmap image comprising of background and image pixels and de-skewing the bitmap image by the determined skew angle. The bitmap image skew angle is determined by calculating plural estimates of the skew angle with corresponding reliability indicators and thereafter selecting the estimate skew angle with the best reliability indicator as the bitmap image skew angle and then de-skew the bitmap image by the determined skew angle. Thereafter, auto-cropping the de-skewed image around a rectangle defined by a first and last column and first and last row of pixels which are not all white.
-
Citations
84 Claims
-
1. A method for determining the skew angle of a bitmap image comprised of image pixels and background pixels, comprising the steps of:
-
calculating a first estimate of the skew angle for a first side of the bitmap image and a corresponding first reliability indicator, both the first estimate of the skew angle and the first reliability indicator being based on a first set of plural angles which are calculated at a plurality of positions along the first side, the first set of plural angles being based on the position of image pixels closest to the first side;
calculating a second estimate of the skew angle for a second side of the bitmap image and a corresponding second reliability indicator, both the second estimate of the skew angle and the second reliability indicator being based on a second set of plural angles which are calculated at a plurality of positions along the second side, the second set of plural angles being based on the position of image pixels closest to the second side; and
determining the skew angle in accordance with which of the first and second estimates has the better reliability indicator. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
calculating a third estimate of the skew angle for a third side of the bitmap image and a corresponding third reliability indicator, both the third estimate of the skew angle and the third reliability indicator being based on a third set of plural angles which are calculated at a plurality of positions along the third side, the third set of plural angles being based on the position of image pixels closest to the third side; and
calculating a fourth estimate of the skew angle for a fourth side of the bitmap image and a corresponding fourth reliability indicator, both the fourth estimate of the skew angle and the fourth reliability indicator being based on a fourth set of plural angles which are calculated at a plurality of positions along the fourth side, the fourth set of plural angles being based on the position of image pixels closest to the fourth side.
-
-
3. A method according to claim 2, further comprising the steps of:
-
calculating the first set of plural angles by inverse tangent, based upon the positions of image pixels closest to the first side at a plurality of positions along the first side;
calculating the second set of plural angles by inverse tangent, based upon the positions of image pixels closest to the second side at a plurality of positions along the second side;
calculating the third set of plural angles by inverse tangent, based upon the positions of image pixels closest to the third side at a plurality of positions along the third side; and
calculating the fourth set of plural angles by inverse tangent, based upon the positions of image pixels closest to the fourth side at a plurality of positions along the fourth side.
-
-
4. A method according to claim 3, further comprising the steps of:
-
calculating a first mean of the first set of plural angles, wherein the first estimate of the skew angle is based upon the first mean;
calculating a first standard deviation of the first set of plural angles, wherein the first standard deviation is the reliability indicator for the first estimate of the skew angle;
calculating a second mean of the second set of plural angles, wherein the second estimate of the skew angle is based upon the second mean;
calculating a second standard deviation of the second set of plural angles, wherein the second standard deviation is the reliability indicator of the second estimate of the skew angle;
calculating a third mean of the third set of plural angles, wherein the third estimate of the skew angle is based upon the third mean;
calculating a third standard deviation of the third set of plural angles, wherein the third standard deviation is the reliability indicator of the third estimate of the skew angle;
calculating a fourth mean of the fourth set of plural angles, wherein the fourth estimate of the skew angle is based upon the fourth mean; and
calculating a fourth standard deviation of the fourth set of plural angles, wherein the fourth standard deviation is the reliability indicator of the fourth estimate of the skew angle.
-
-
5. A method according to claim 4, wherein the best reliability indicator is the least standard deviation from among the first, second, third and fourth standard deviations, with a corresponding mean and a minimum angle.
-
6. A method according to claim 5, wherein the bitmap image skew angle is the mean angle corresponding to the least standard deviation, from among the first, second, third and fourth standard deviation.
-
7. A method according to claim 5, wherein the bitmap image skew angle is the minimum angle corresponding to the least standard deviation from among the first, second, third and fourth standard deviations.
-
8. A method according to claim 1, wherein the background pixels are white.
-
9. A method according to claim 1, wherein the image pixels are not all white.
-
10. A method according to claim 8, wherein the background pixels are non-white.
-
11. A method according to claim 10, wherein the image pixels are of a different color than the background pixels.
-
12. A method according to claim 1, further comprising the steps of:
pre-processing the bitmap image prior to determining the skew angle by applying a filter to the bitmap image.
-
13. A method according to claim 12, wherein said filter is a median filter.
-
14. A method according to claim 1, further comprising of:
sub-sampling said bit map image prior to calculating the bit map skew angle.
-
15. A method according to claim 1, further comprising of:
de-skewing the bitmap image by the bitmap image skew angle.
-
16. A method according to claim 15, further comprising of:
auto-cropping the de-skewed image.
-
17. A method according to claim 1, further comprising of:
-
obtaining a first set of points from the bitmap image, wherein the first set of points comprises of image pixels first encountered when a set of parallel lines are traversed in a first direction from background pixels to image pixels;
calculating a first estimate of the skew angle and a corresponding first estimate of reliability, wherein the first estimate of the skew angle is based upon the first mean of plural angles derived from the coordinates of the first set of points and determined by inverse tangent, and the first estimate of reliability is based upon the standard deviation of the plural angles based upon the first set of points;
obtaining a second set of points from the bitmap image, wherein the second set of points comprises of image pixels first encountered when a second set of parallel lines are traversed in a second direction from background pixels to image pixels;
calculating a second estimate of the skew angle and a corresponding second estimate of reliability, wherein the second estimate of the skew angle is based upon a second mean of plural angles, derived from the coordinates of the second set of points and determined by inverse tangent, and the second estimate of reliability is based upon the standard deviation of the plural angles based upon the second set of points;
obtaining a third set of points from the bitmap image, wherein the third set of points comprises of image pixels first encountered when a third set of parallel lines are traversed in a third direction from background pixels to image pixels;
calculating a third estimate of the skew angle and a corresponding third estimate of reliability, wherein the third estimate of the skew angle is based upon a mean of plural angles derived from the coordinates of the third set of points and determined by inverse tangent, and the third estimate of reliability is based upon the standard deviation of the plural angles based upon the third set of points;
obtaining a fourth set of points from the bitmap image, wherein the fourth set of points comprises of image pixels first encountered when a fourth set of parallel lines are traversed in a fourth direction from background pixels to image pixels; and
calculating a fourth estimate of the skew angle and a corresponding fourth estimate of reliability, wherein the fourth estimate of the skew angle is based upon a mean of plural angles derived from the coordinates of the fourth set of points and determined by inverse tangent, and the fourth estimate of reliability is based upon the standard deviation of the plural angles based upon the fourth set of points.
-
-
18. A method according to claim 1, further comprising the steps of:
-
calculating a first set of plural angles by inverse tangent, based upon the positions of image pixels closest to the first side at a plurality of positions along the first side; and
calculating a second set of plural angles by inverse tangent, based upon the positions of image pixels closest to the first side at a plurality of positions along the first side; and
calculating a second set of plural angles by inverse tangent, based upon the positions of image pixels closest to the second side at a plurality of positions along the second side.
-
-
19. A method according to claim 18, further comprising the steps of:
-
calculating a first mean of the first set of plural angles, wherein the first estimate of the skew angle is based upon the first mean;
calculating a first standard deviation of the first set of plural angles, wherein the first standard deviation is the reliability indicator for the first estimate of the skew angle;
calculating a second mean of the second set of plural angles, wherein the second estimate of the skew angle is based upon the second mean; and
calculating a second standard deviation of the second set of plural angles, wherein the second standard deviation is the reliability indicator of the second estimate of the skew angle.
-
-
20. A method according to claim 19, wherein the best reliability indicator is the least standard deviation from among the first and second standard deviations, with a corresponding mean and a minimum angle.
-
21. A method according to claim 20, wherein the bitmap image skew angle is the mean angle corresponding to the least standard deviation, from among the first and second standard deviation.
-
22. A method according to claim 21, wherein the bitmap image skew angle is the minimum angle corresponding to the least standard deviation from among the first and second standard deviations.
-
23. A method according to claim 1, further comprising of:
-
obtaining a first set of points from the bitmap image, wherein the first set of points comprises of image pixels first encountered when a set of parallel lines are traversed in a first direction from background pixels to image pixels;
calculating a first estimate of the skew angle and a corresponding first estimate of reliability, wherein the first estimate of the skew angle is based upon the first mean of plural angles derived from the coordinates of the first set of points and determined by inverse tangent, and the first estimate of reliability is based upon the standard deviation of the plural angles based upon the first set of points;
obtaining a second set of points from the bitmap image, wherein the second set of points comprises of image pixels first encountered when a second set of parallel lines are traversed in a second direction from background pixels to image pixels; and
calculating a second estimate of the skew angle and a corresponding second estimate of reliability, wherein the second estimate of the skew angle is based upon a second mean of plural angles, derived from the coordinates of the second set of points and determined by inverse tangent, and the second estimate of reliability is based upon the standard deviation of the plural angles based upon the second set of points.
-
-
24. An apparatus for determining the skew angle of a bitmap image comprised of image pixels and background pixels, comprising of:
-
first calculating means for calculating a first estimate of the skew angle for a first side of the bitmap image and a corresponding first reliability indicator, both the first estimate of the skew angle and the first reliability indicator being based on a first set of plural angles which are calculated at a plurality of positions along the first side, the first set of plural angles being based on the position of image pixels closest to the first side;
second calculating means for calculating second estimate of the skew angle for a second side of the bitmap image and a corresponding second reliability indicator, both the second estimate of the skew angle and the second reliability indicator being based on a second set of plural angles which are calculated at a plurality of positions along the second side, the second set of plural angles being based on the position of image pixels closest to the second side; and
determining means for determining the skew angle in accordance with which of the first and second estimates has the better confidence indicator. - View Dependent Claims (25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45)
third calculating means for calculating a third estimate of the skew angle for a third side of the bitmap image and a corresponding third reliability indicator, both the third estimate of the skew angle and the third reliability indicator being based on a third set of plural angles which are calculated at a plurality of positions along the third side, the third set of plural angles being based on the position of image pixels closest to the third side; and
fourth calculating means for calculating a fourth estimate of the skew angle for a fourth side of the bitmap image and a corresponding fourth reliability indicator, both the fourth estimate of the skew angle and the fourth reliability indicator being based on a fourth set of plural angles which are calculated a plurality of positions along the fourth side, the fourth set of plural angles being based on the position of image pixels closest to the fourth side.
-
-
26. An apparatus according to claim 25, further comprising:
-
fifth calculating means for calculating the first set plural angles by inverse tangent, based upon the position of image pixels closest to the first side at a plurality of positions along the first side;
sixth calculating means for calculating the second set of plural angles by inverse tangent, based upon the position of image pixels closest to the second side at a plurality of positions along the second side;
seventh calculating means for calculating the third set of plural angles by inverse tangent, based upon the position of image pixels closest to the third side at a plurality of positions along the third side, by inverse tangent;
eighth calculating means for calculating the fourth set of plural angles by inverse tangent, based upon the position of image pixels closest to the fourth side at a plurality of positions along the fourth side.
-
-
27. An apparatus according to claim 26, further comprising:
-
ninth calculating means for calculating a first mean of the first set plural angles, wherein the first estimate of the skew angle is based upon said first mean;
tenth calculating means for calculating a first standard deviation of the first set of plural angles, wherein the first standard deviation is the reliability indicator of the first estimate of the skew angle;
eleventh calculating means for calculating a second mean of the second set of plural angles, wherein the second estimate of the skew angle is based upon said second mean;
twelfth calculating means for calculating a second standard deviation of the second set of plural angles, wherein the second standard deviation is the reliability indicator of the second estimate of the skew angle, thirteenth calculating means for calculating a third set plural angles, wherein the third estimate of the skew angle is based upon third said mean;
fourteenth calculating means for calculating a third standard deviation of the third set of plural angles, wherein the third standard deviation is the reliability indicator of the third estimate of the skew angle;
fifteenth calculating means for calculating a fourth set plural angles, wherein the fourth estimate of the skew angle is based upon fourth said mean; and
sixteenth calculating means for calculating a fourth standard deviation of the third set of plural angles, wherein the fourth standard deviation is the reliability indicator of the fourth estimate of the skew angle.
-
-
28. An apparatus according to claim 27, wherein the best reliability indicator is the least standard deviation from among the first, second, third and fourth standard deviations, with a corresponding mean and minimum angle.
-
29. An apparatus according to claim 28, wherein the bitmap image skew angle is the mean angle corresponding to the least standard deviation, from among the first, second, third and fourth standard deviations.
-
30. An apparatus according to claim 28, wherein the bitmap image skew angle is the minimum angle corresponding to the least standard deviation from among the first, second, third and fourth standard deviations.
-
31. An apparatus according to claim 24, wherein the background pixels are white.
-
32. An apparatus according to claim 24, wherein the image pixels are not all white.
-
33. An apparatus according to claim 31, wherein the background pixels are of a different color than white.
-
34. An apparatus according to claim 33, wherein the image pixels are of a different color than the background pixels.
-
35. An apparatus according to claim 24, further comprising:
pre-processing means for pre-processing the bitmap image prior to determining the skew angle by applying a filter.
-
36. An apparatus according to claim 35, wherein said filter is a median filter.
-
37. An apparatus according to claim 24, further comprising of:
sub-sampling means for sub-sampling said bit map image prior to determining the bit map skew angle.
-
38. An apparatus according to claim 24, further comprising:
de-skewing means for de-skewing the bitmap image.
-
39. An apparatus according to claim 38, further comprising:
auto- cropping means for auto-cropping the de-skewed image.
-
40. An apparatus according to claim 27, further comprising of:
-
obtaining means for obtaining a first set of points from the bitmap image, wherein the first set of points comprises of image pixels first encountered when a set of parallel lines are traversed in a first direction form background pixels to image pixels;
seventeenth calculating means for calculating a first estimate of the skew angle and a corresponding first estimate of reliability, wherein the first estimate of the skew angle is based upon the first mean of plural angles derived from the coordinates of the first set of points and determined by inverse tangent, and the first estimate of reliability is based upon the standard deviation of the plural angles based upon the first set of points;
obtaining means for obtaining a second set of points from the bitmap image, wherein the second set of points comprises of image pixels first encountered when a second set of parallel lines are traversed in a second direction from background pixels to image pixels;
eighteenth calculating means for calculating a second estimate of the skew angle and a corresponding second estimate of reliability, wherein the second estimate of the skew angle is based upon the second mean of plural angles, derived from the coordinates of the second set of points and determined by inverse tangent, and the second estimate of reliability is based upon the standard deviation of the plural angles based upon the second set of points;
obtaining means for obtaining a third set of points from the bitmap image, wherein the third set of points comprises of image pixels first encountered when a third set of parallel lines are traversed in a third direction from background pixels to image pixels;
nineteenth calculating means for calculating a third estimate of the skew angle and a corresponding third estimate of reliability, wherein the third estimate of the skew angle is based upon a mean of plural angles derived from the coordinates of the third set of points and determined by inverse tangent, and the third estimate of reliability is based upon the standard deviation of the plural angles based upon the third set of points;
obtaining means for obtaining a fourth set of points from the bitmap image, wherein the fourth set of points comprises of image pixels first encountered when a fourth set of parallel lines are traversed in a fourth direction from background pixels to image pixels; and
twentieth calculating means for calculating a fourth estimate of the skew angle and a corresponding fourth estimate of reliability, wherein the fourth estimate of the skew angle is based upon a mean of plural angles derived from the coordinates of the fourth set of points and determined by inverse tangent, and the fourth estimate of reliability is based upon the standard deviation of the plural angles based upon the fourth set of points.
-
-
41. An apparatus according to claim 24, further comprising:
-
twenty-first calculating means for calculating a first mean of the first set of plural angels, wherein the first estimate of the skew angle is based upon said first mean;
twenty-second calculating means for calculating a first standard deviation of the first set of plural angles, wherein the first standard deviation is the reliability indicator of the first estimate of the skew angle;
twenty-third calculating means for calculating a second mean of the second set of plural angles, wherein the second estimate of the skew angle is based upon second mean; and
twenty-fourth calculating means for calculating a second standard deviation of the second set of plural angles, wherein the second standard deviation is the reliability indicator of the second estimate of the skew angle.
-
-
42. An apparatus according to claim 41, wherein the best reliability indicator is the least standard deviation from among the first and second standard deviations, with a corresponding mean and minimum angle.
-
43. An apparatus according to claim 42, wherein the bitmap image skew angle is the mean angle corresponding to the least standard deviation, from among the first and second standard deviations.
-
44. An apparatus according to claim 43, wherein the bitmap image skew angle is the minimum angle corresponding to the least standard deviation from among the first and second standard deviations.
-
45. And apparatus according to claim 24, further comprising of:
-
obtaining means for obtaining a first set of points from the bitmap image, wherein the first set of points comprising of image pixels first encountered when a set of parallel lines are traversed in a first direction from background pixels to image pixels;
twenty-fifth calculating means for calculating a first estimate of the skew angle and a corresponding first estimate of reliability, wherein the first estimate of the skew angle is based upon the first mean of plural angles derived from the coordinates of the first set of points and determined by inverse tangent, and the first estimate of reliability is based upon the standard deviation of the plural angles based upon the first set of points;
obtaining means for obtaining a second set of points from the bitmap image, wherein the second set of points comprising of image pixels first encountered when a second set of parallel lines are traversed in a second direction from background pixels to image pixels;
twenty-sixth calculating means for calculating a second estimate of the skew angle and a corresponding second estimate of reliability, wherein the second estimate of the skew angle is based upon the second mean of plural angles, derived from the coordinates of the second set of points and determined by inverse tangent, and the second estimate of reliability is based upon the standard deviation of the plural angles based upon the second set of points.
-
-
46. An apparatus for determining the skew angle of a bitmap image comprised of background and image pixels, comprising:
-
a memory for storing computer executable process steps; and
a processor for executing the process steps in said memory, wherein said process steps include steps to calculate a first estimate of the skew angle for a first side of the bitmap image and a corresponding first reliability indicator, both the first estimate of the skew angle and the first reliability indicator being based on a first set of plural angles which are calculated at a plurality of positions along the first side, the first set of plural angles being based on the position of image pixels closest to the first side, calculate a second estimate of the skew angle for a second side of the bitmap image and a corresponding second reliability indicator, both the second estimate of the skew angle and the second reliability indicator being based on a second set of plural angles which are calculated at a plurality of positions along the second side, the second set of plural angles being based on the position of image pixels closest to the second side, and determine the skew angle in accordance with which of the first and second estimates has the better reliability indicator. - View Dependent Claims (47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64)
-
-
65. Computer-executable process steps stored on a computer readable medium, said process steps for determining the skew angle of a bitmap image comprised of background and image pixels, said process steps comprising:
-
code to calculate a first estimate of the skew angle for a first side of the bitmap image and a corresponding first reliability indicator, both the first estimate of skew angle and the first reliability indicator being based on a first set of plural angles which are calculated at a plurality of positions along the first side, the first set of plural angles being based on the position of image pixels closest to the first side;
code to calculate a second estimate of the skew angle for a second side of the bitmap image and a corresponding second reliability indicator, both the second estimate of the skew angle and the second reliability indicator being based on a second set of plural angles which are calculated at a plurality of positions along the second side, the second set of plural angles being based on the position of image pixels closest to the second side; and
code to determine the skew angle in accordance with which of the first and second estimates has the better reliability indicator. - View Dependent Claims (66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84)
code to calculate a third estimate of the skew angle for a third side of the bitmap image and a corresponding third reliability indicator, both the third estimate of the skew angle and the third reliability indicator being based on a third set of plural angles which are calculated at a plurality of positions along the third side, the third set of plural angles being based on the position of image pixels closest to the third side; and
code to calculate a fourth estimate of the skew angle for a fourth side of the bitmap image and a corresponding fourth reliability indicator, both the fourth estimate of the skew angle and the fourth reliability indicator being based on a fourth set of plural angles which are calculated at a plurality of positions along the fourth side, the fourth set of plural angles being based on the position of image pixels closest to the fourth side.
-
-
67. Computer-executable process steps according to claim 66, further comprising of:
-
code to calculate the first set of plural angles by inverse tangent, based upon the position of image pixels closest to the first side at a plurality of positions along the first side;
code to calculate the second set of plural angles by inverse tangent, based upon the position of image pixels closest to the second side at a plurality of positions along the second side;
code to calculate the third set of plural angles by inverse tangent, based upon the position of image pixels closest to the third side at a plurality of positions along the third side, by inverse tangent;
code to calculate the fourth set of plural angles by inverse tangent, based upon the position of image pixels closest to the fourth side at a plurality of positions along the fourth side;
code to calculate a first mean of the first set of plural angles, wherein the first estimate of the skew angle is based upon said first mean;
code to calculate a first standard deviation of the first set of plural angles, wherein the first standard deviation is the reliability indicator of the first estimate of the skew angle;
code to calculate a second mean of the second set plural angles, wherein the second estimate of the skew angle is based upon said second mean;
code to calculate a second standard deviation of the second set of plural angles, wherein the second standard deviation is the reliability indicator of the second estimate of the skew angle;
code to calculate a third mean of third set of plural angles, wherein the third estimate of the skew angle is based upon said third mean; and
code to calculate a third standard deviation of the third set of plural angles, wherein the third standard deviation is the reliability indicator of the third estimate of the skew angle;
code to calculate a fourth mean of the fourth set of plural angles, wherein the fourth estimate of the skew angle is based upon said fourth mean; and
code to calculate a fourth standard deviation of the fourth set of plural angles, wherein the fourth standard deviation is the reliability indicator of the fourth estimate of the skew angle.
-
-
68. Computer-executable process steps according to claim 67, wherein the best confidence indicator is the least standard deviation from among the first, second, third and fourth standard deviations, with a corresponding mean and minimum angle.
-
69. Computer-executable process steps according to claim 68, wherein the bitmap image skew angle is the mean angle corresponding to the least standard deviation, from among the first, second, third and fourth standard deviations.
-
70. Computer-executable process steps according to claim 68, wherein the bitmap image skew angle is the minimum angle corresponding to the least standard deviation from among the first, second, third and fourth standard deviations.
-
71. Computer-executable process steps according to claim 65, wherein the background pixels are white.
-
72. Computer-executable process steps according to claim 65, wherein the image pixels are not all white.
-
73. Computer-executable process steps according to claim 71, wherein the background pixels are non-white.
-
74. Computer-executable process steps according to claim 73, wherein the image pixels are of a different color than the background pixels.
-
75. Computer-executable process steps according to claim 65, further comprising of:
code to pre-process the bitmap image prior to calculating the skew angle, by applying a filter, wherein said filter is a median filter.
-
76. Computer-executable process steps according to claim 65, further comprising of:
code to sub-sample said bit map image prior to calculating the bit map image skew angle.
-
77. Computer-executable process steps according to claim 65, further comprising of:
code to deskew the bitmap image based upon the bitmap image skew angle.
-
78. Computer-executable process steps according to claim 77, further comprising of:
code to auto-crop the de-skewed bitmap.
-
79. Computer12-executable process steps according to claim 65, further comprising:
-
code to obtain a first set of points from the bitmap image, wherein the first set of points comprises of image pixels first encountered when a set of parallel lines are traversed in a first direction from background pixels to image pixels;
code to calculate a first estimate of the skew angle and a corresponding first estimate of reliability, wherein the first estimate of the skew angle is based upon the first mean of plural angles derived from the coordinates of the first set of points and determined by inverse tangent, and the first estimate of reliability is based upon the standard deviation of the plural angles based upon the first set of points;
code to obtain a second set of points from the bitmap image, wherein the second set of points comprises of image pixels first encountered when a second set of parallel lines are traversed in a second direction from background pixels to image pixels;
code to calculate a second estimate of the skew angle and a corresponding second estimate of reliability, wherein the second estimate of the skew angle is based upon a second mean of plural angles, derived from the coordinates of the second set of points and determined by inverse tangent, and the second estimate of reliability is based upon the standard deviation of the plural angles based upon the second set of points;
code to obtain a third set of points from the bitmap image, wherein the third set of points comprises of image pixels first encountered when a third set of parallel lines are traversed in a third direction from background pixels to image pixels;
code to calculate a third estimate of the skew angle and a corresponding third estimate of reliability, wherein the third estimate of the skew angle is based upon a mean of plural angles derived from the coordinates of the third set of points and determined by inverse tangent, and the third estimate of reliability is based upon the standard deviation of the plural angles based upon the third set of points;
code to obtain a fourth set of points from the bitmap image, wherein the fourth set of points comprises of image pixels first encountered when a fourth set of parallel lines are traversed in a fourth direction from background pixels to image pixels; and
code to calculate a fourth estimate of the skew angle and a corresponding fourth estimate of reliability, wherein the fourth estimate of the skew angle is based upon a mean of plural angles derived from the coordinates of the fourth set of points and determined by inverse tangent, and the fourth estimate of reliability is based upon the standard deviation of the plural angles based upon the fourth set of points.
-
-
80. Computer-executable process steps according to claim 65, further comprising of:
-
code to calculate a first set of plural angles by inverse tangent, based upon the position of image pixels closest to the first side at a plurality of positions along the first side;
code to calculate a second set of plural angles by inverse tangent, based upon the position of image pixels closest to the second side at a plurality of positions along the second side;
code to calculate a first mean of the first set of plural angles, wherein the first estimate of the skew angle is based upon said first mean;
code to calculate a first standard deviation of the first set of plural angles, wherein the first standard deviation is the reliability indicator of the first estimate of the skew angle;
code to calculate a second mean of the second set plural angles, wherein the second estimate of the skew angle is based upon said second mean; and
code to calculate a second standard deviation of the second set of plural angles, wherein the second standard deviation is the reliability indicator of the second estimate of the skew angle.
-
-
81. Computer-executable process steps according to claim 80, wherein the best confidence indicator is the least standard deviation from among the first and second standard deviations, with a corresponding mean and minimum angle.
-
82. Computer-executable process steps according to claim 81, wherein the bitmap image skew angle is the mean angle corresponding to the least standard deviation, from among the first and second deviations.
-
83. Computer-executable process steps according to claim 82, wherein the bitmap image skew angle is the minimum angle corresponding to the least standard deviation from among the first, second, third and fourth standard deviations.
-
84. Computer-executable process steps according to claim 65, further comprising:
-
code to obtain a first set of points from the bitmap image, wherein the first set of points comprises of image pixels first encountered when a set of parallel lines are traversed in a first direction from background pixels to image pixels;
code to calculate a first estimate of the skew angle and a corresponding first estimate of reliability, wherein the first estimate of the skew angle is based upon the first mean of plural angles derived from the coordinates of the first set of points and determined by inverse tangent, and the first estimate of reliability is based upon the standard deviation of the plural angles based upon the first set of points;
code to obtain a second set of points from the bitmap image, wherein the second set of points comprises of image pixels first encountered when a second set of parallel lines are traversed in a second direction from background pixels to image pixels; and
code to calculate a second estimate of the skew angle and a corresponding second estimate of reliability, wherein the second estimate of the skew angle is based upon a second mean of plural angles, derived from the coordinates of the second set of points and determined by inverse tangent, and the second estimate of reliability is based upon the standard deviation of the plural angles based upon the second set of points.
-
Specification