US 7454088 B2 Abstract Exemplary methods for estimating an orientation angle and a translation values for scanned images are disclosed. The methods described herein may be embodied as logic instructions on a computer-readable medium. In one exemplary implementation meaningful image information is removed from a scanned image, resulting in a transformed image that comprises alternating, parallel lines disposed at an orientation angle relative to an orthogonal axis. The orientation angle may be determined using geometric techniques or statistical correlation techniques, and statistical correlation techniques may be implemented to determine translation values.
Claims(17) 1. A method, comprising:
filtering a scanned image to obtain a transformed image, wherein the transformed image comprises a series of substantially parallel lines of alternating binary pixel values; and
determining an orientation angle of the scanned image using properties of the transformed image, wherein determining an orientation angle of the scanned image using properties of the transformed image comprises determining an orientation angle using the arctangent of an estimated number of changes in binary pixel values along one or more columns of the transformed image divided by an estimated number of changes in binary pixel values along one or more rows of the transformed image.
2. The method of
3. The method of
estimating the number of changes in binary pixel values along the one or more rows of the transformed image;
estimating the number of changes in binary pixel values along the one or more columns of the transformed image.
4. The method of
5. The method of
generating a matrix, z, wherein z comprises rows of uniform binary values, and wherein the binary values of one row differ from the binary values of the remaining rows; for a series of angles θi, wherein θmin ≦θi ≦θmax, repeating the operations:
generating a transformed matrix zθ by rotating the matrix z through θi degrees;
generating at least one set of coordinates (xθ, yθ);
computing a correlation function between the binary values of the transformed image and the image zθ positioned at (xθ, yθ) of the transformed image; and
selecting the angle θi that maximizes the correlation function.
6. The method of
subtracting a printing angle from the orientation angle to estimate a rotation angle;
rotating the scanned image through the rotation angle; and
determining an (x, y) coordinate set that maximizes a correlation between a portion of the scanned image and an original digital image.
7. A computer-readable medium comprising computer-executable instructions that, when executed, direct a computer to:
remove meaningful image information from a scanned image to generate a transformed image;
determine an orientation angle of the scanned image using the transformed image;
subtract a printing angle from the orientation angle to estimate a rotation angle; and
rotate the scanned image through the rotation angle.
8. The computer readable medium of
9. The computer readable medium of
10. The computer readable medium of
11. The computer readable medium of
generate a binary matrix, z, wherein z comprises rows of uniform binary values, and wherein the binary values of one row differ from the binary values of the remaining rows;
for a series of angles θi, wherein θmin ≦θi ≦θmax:
generate an image zθ
0 by rotating z through θi degrees;generate at least one set of coordinates (xθ, yθ);
compute a correlation function between the binary values of the transformed image and the image zθ positioned at (xθ, yθ) of the transformed image; and
select the angle θi that maximizes the correlation function.
12. The computer readable medium of
determine an (x, y) coordinate set that maximizes a correlation between a portion of the scanned image and an original digital image.
13. A method, comprising:
filtering a scanned image to obtain a transformed image, wherein the transformed image comprises a series of substantially parallel lines of alternating binary pixel values;
determining an orientation angle of the scanned image using properties of the transformed image;
subtracting a printing angle from the orientation angle to estimate a rotation angle; and
rotating the scanned image through the rotation angle.
14. The method of
15. The method of
estimating a number of changes in binary pixel values along one or more rows of the transformed image;
estimating a number of changes in binary pixel values along one or more columns of the transformed image; and
determining an orientation angle using the arctangent of the number of changes in binary values along one or more columns divided by the number of changes in binary values along one or more rows.
16. The method of
generating a matrix, z, wherein z comprises rows of uniform binary values, and wherein the binary values of one row differ from the binary values of the remaining rows;
for a series of angles θi, wherein θmin ≦θi ≦θmax, repeating the operations:
generating a transformed matrix zθ by rotating the matrix z through θi degrees;
generating at least one set of coordinates (xθ, yθ);
computing a correlation function between the binary values of the transformed image and the image zθ positioned at (xθ, yθ) of the transformed image; and
selecting the angle θi that maximizes the correlation function.
17. The method of
determining an (x, y) coordinate set that maximizes a correlation between a portion of the scanned image and an original digital image.
Description The described subject matter relates to electronic computing, and more particularly to estimating the orientation angle and translation values of scanned images. Images such as photographs, pictures, logos, etc. may be created using digital rendering techniques, or using analog techniques which may be digitized. Digital images may be stored in a suitable storage medium such as, e.g., a hard disk drive, CD-ROM, etc., and may be transmitted across digital communication networks for viewing and/or printing at remote locations. In certain applications, e.g., security and counterfeit detection, it may be desirable to compare a scanned copy of a digital image to the original digital image to assess the fidelity of the scanned copy to the original digital image. Because the scanning process is imprecise, the scanned copy may appear rotated about an axis. Also, the image may be displaced, or translated, within the frame captured by the scanned copy. It is desirable to remove this rotation and/or translation before performing a comparison between the scanned copy and the original digital image. Implementations described and claimed herein address these and other issues by providing multiple approaches to estimating the orientation angle and translation amount of a scanned image. The approaches may be used independently or in conjunction with one another. In an exemplary implementation a method is provided. The method comprises filtering a scanned image to obtain a transformed image, wherein the transformed image comprises a series of substantially parallel lines of alternating binary pixel values, and determining an orientation angle of the scanned image using properties of the transformed image. In another exemplary implementation, a computer-readable medium is provided. The computer readable medium comprises computer-executable instructions that, when executed, direct a computer to remove meaningful image information from a scanned image to generate a transformed image and to determine an orientation angle of the scanned image using the transformed image. In another exemplary implementation, a method is provided for determining a translation amount between a first image h of size (m×m) and second image z of size (n×n), where m>n. The method comprises computing a correlation value between the second image z and a subimage of the first image h at a plurality of (x, y) coordinate sets of the image h, storing correlation values and the associated (x, y) coordinate set in a suitable memory location, and determining the (x, y) coordinate set that maximizes the correlation value. In another exemplary implementation, a computer-readable medium is provided. The computer medium has computer-executable instructions that, when executed, direct a computer to determine a translation amount between a first image h of size (m×m) and second image z of size (n×n), where m>n, by performing operations comprising comparing correlation values between the image z and a subimage of the image h at a plurality of (x, y) coordinate sets of the image h, and determining the (x, y) coordinate set that maximizes the correlation value. In another exemplary implementation, a method of estimating a rotation amount and translation coordinates for a scanned image of a printed copy of an original digital image is provided. The original digital image comprises a logo of known dimensions surrounded by a border of known dimensions. A scanned image is scaled by a sizing factor to create a scaled image that has the same dimensions as the original digital image. The scaled image is rotated through a range of angles. At each rotation angle a rowsum difference vector and a columnsum difference vector are computed, and a threshold is applied to the rowsum vector and the columnsum vector to select a plurality of candidate (x, y) coordinate locations. A correlation value is computed between the scaled image and the original digital image at the plurality of candidate (x, y) coordinate locations, and the (x, y) coordinate location and the rotation angle associated with the maximum correlation value are stored in a memory location. The (x, y) coordinate set and rotation angle associated with the maximum correlation value are selected from the memory location. In another exemplary implementation a computer readable medium is provided. The computer readable medium has computer executable instructions that, when executed, direct a computer to estimate a rotation amount and translation coordinates for a scanned image of a printed copy of an original digital image. The original digital image comprises a logo of known dimensions surrounded by a border of known dimensions. The scanned image is scaled by a sizing factor to create a scaled image that has the same dimensions as the original digital image. A plurality of correlation values between the original digital image and the scaled, scanned image positioned at a plurality of orientation angles and (x, y) coordinate pairs are calculated and stored in association with the orientation angle and the (x, y) coordinate pair. The (x, y) coordinate set and rotation angle associated with the maximum correlation value are selected. Described herein are exemplary methods for estimating an orientation angle and a translation values for scanned images. The methods described herein may be embodied as logic instructions on a computer-readable medium. When executed on a processor, the logic instructions cause a general purpose computing device to be programmed as a special-purpose machine that implements the described methods. Exemplary Computing System Computing device Computing device A number of program modules may be stored on the hard disk Computing device When used in a LAN networking environment, computing device Generally, the data processors of computing device Exemplary Images Estimating Rotation Angle In exemplary embodiments, the orientation angle, θ, is estimated by removing meaningful image information from the scanned image to obtain a transformed image that comprises a series of parallel lines of alternating binary values. Removing meaningful image information from the scanned image implies that the shape (or area, size, etc) of the halftone dot information imparted by the printing process should be removed, leaving only the information about the average spacing between halftone dot matrices. This average spacing information is strictly dependent on the orientation and parameters of printing & scanning process and independent of the grayscale information conveyed by the halftone dots. The orientation angle, θ, may be determined using properties of the binary values of the average spacing. In an exemplary embodiment, meaningful image information can be removed from the scanned image Y by applying a linear shift invariant filter to the image. Assuming that the original 40×40 image was printed as a square of 0.5 inches and scanned at a resolution of 600 dpi, the corresponding resolution is (600*0.5)/40=7.5 lines per image pixel. Two linear shift invariant filters have proven useful in removing meaningful image information from the scanned image when the scanning is performed at the resolution of 600 dpi. The first linear shift invariant filter has an impulse given by:
The second linear shift invariant filter has an impulse response given by:
In applying the linear shift invariant filters, C is chosen to be a large constant. Empirically, a constant C=32 proved effective when the linear shift invariant filters were applied iteratively over five iterations. It will be appreciated that C may take on values other than 32. For different scanning resolutions and processes, other shift-invariant filters may also be useful. Furthermore, even for this scanning resolution we are considering (i.e., 600 dpi), the presented filters are exemplary and other shift invariant filters may also produce equivalently useful results. These filters were derived as a result of a series of experiments. More generally, assume an original image S of dimensions (n×n) is printed to a square of dimensions (l×l). The printed image is scanned to generate an image X, scanned at a resolution of P dots per inch. Hence, the scanned image X will have dimensions of (l·P×l·P). Next, the linear shift invariant filters are applied iteratively to the image Y. Hence, at operation In practice, the operations of Referring to If, at operation At operation In an alternate embodiment a correlation-based pattern matching technique is implemented to estimate an orientation angle δ. Conceptually, the technique generates a plurality of images, each of which has a line oriented at an angle of ε degrees, and overlays the images at randomly chosen coordinates on the translated image Y. Correlations between the images and the translated image Y are calculated and averaged for each angle ε, where ε is varied in increments between a lower limit and an upper limit. The angle ε that produces the maximum correlation is selected as the orientation angle δ. At operation At each angle θ At operation By contrast, if, at operation At operation The particular data structure depicted in Estimating Translation Amount Referring back to In Equation (1), i≦1≦n, and j≦1≦n. Using this notation, the coordinates (x Several assumptions are made for the purpose of simplifying this description. First, the image H is assumed to be of size (m×m) and the image z is assumed to be of size (n×n). Assuming H and z are square simplifies the description of these techniques. However, the techniques work equally well when neither H nor z are squares. Hence, the description of H as size (m×m) and the description of z as size (n×n) are not intended to limit the geometry of these images to squares. The nomenclature (m×m) and (n×n) should be construed to include non-square rectangles. In addition, this description assumes that n≦m, i.e., that the image z can be embedded entirely within the image H. This assumption simplifies the description of these techniques. However, similar techniques can be applied when n>m. Accordingly, nothing in this description should be construed as limiting n to a value less than or equal to m. One exemplary technique, referred to as the oracle method, involves positioning the image z at each coordinate set (i, j) of the image H that permits z to remain within the limits of H and determining a correlation between z and a sub-image h of the image H that is the same size as the image Z. The coordinate set (i, j) that results in the maximum correlation between h and Z is selected to represent the x and y offset coordinates (x In Equation (2), i≦1≦n, and j≦1≦n. The oracle method estimates the offset coordinates (x
In equation (3), S={0, 1, 2, . . . ,(m−n)}. At operation By contrast, if at operation At operation The oracle method, while accurate, is computationally expensive. Accordingly, exemplary embodiments implement approximations of the oracle method that are computationally less expensive. One exemplary embodiment computes the L Assuming an image a, a subsampled image a may be computed using the following equation:
Equation (5) assumes that the size of the image a is divisible by p, such that the size of the image ã is equal to the size of a divided by p. Once the subsampled images of h
At operation At operation At operation In an exemplary embodiment, the values of S In another exemplary embodiment, subsampled versions of h and z are used to estimate the translation parameters (x The first step may be expressed as finding the coordinates ({circumflex over (x)}
At operation At operation At operation In an exemplary embodiment, the values of S The second step may be expressed as finding the coordinates ({circumflex over (x)}
In Equation (10), {tilde over (S)} At operation At operation At operation In an exemplary embodiment, the values of S The idea behind the two-step process is generally applicable to a multi-step (e.g., q-step) process. In a multi-step process, subsampled versions of the original images (resized versions) are computed for each of these steps (i.e., a total of q of them), such that the images for the last step are exactly equal to the original images and the sizes of these resized images are in increasing order for each step. Then, the oracle solution may be computed for the first step (i.e., using the smallest size images) and the solution may be refined at each next step using the resized versions of the original images for the corresponding step. The refinement may concentrate on a specific area that is suggested by the refined solution from the previous step. Furthermore, different kinds of resizing procedures may be used in order to produce these different resized images. By way of example, averaging techniques discussed in the previous steps may be used, but there are other kinds of resizing methods that are well-known in the literature (i.e., different decimation and interpolation methods well-known in the signal processing literature). Joint Estimation of Rotation and Translation In another implementation the rotation and translation amount are estimated jointly. In an exemplary implementation, a digital image of known dimensions is surrounded by a border also of known dimensions. The border may be substantially entirely white or substantially entirely dark. A scanned version of a printed copy of the digital image and logo is resized to fit the digital image. The resized image is then rotated through a series of angles, θ At operation At operation At operation A difference vector is calculated by subtracting from the i The analogous procedure is repeated for the column sums, and the resulting elements of the difference vector for which the absolute value is larger than a threshold are stored as potential candidates for a displacement parameter x (operation For each of the candidate displace parameter pairs (x In an exemplary implementation operations In an exemplary implementation additional processing optionally may be performed to refine the search around the selected values the orientation angle θ and displacement coordinate set (x In an exemplary implementation additional processing optionally may be performed to convert the values of the displacement coordinate set (x Although the described arrangements and procedures have been described in language specific to structural features and/or methodological operations, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or operations described. Rather, the specific features and operations are disclosed as preferred forms of implementing the claimed present subject matter. The methods that are explained here are used for matching an original image to a translated and rotated version of it. These techniques may be useful in several different applications, including motion compensation in digital video compression. In case of digital video, these techniques may be used to match blocks and the translation and rotation parameters found determine the motion vector that correspond to that block. Patent Citations
Classifications
Legal Events
Rotate |