This application claims the right of priority under 35 U.S.C. § 119 based on Australian Patent Application No. 2005209703, filed 13 Sep. 2005, which is incorporated by reference herein in its entirety as if fully set forth herein.
The present invention relates generally to image processing, and particularly, to grid detection. The present invention also relates to a process and apparatus for determining the orientation (hereinafter “grid orientation”), spacing (hereinafter “grid spacing”), and translation (hereinafter “grid translation”) of a grid, and to a computer program product including a computer readable medium having recorded thereon a computer program for determining the grid orientation, grid spacing, and grid translation for a grid.
A number of methods exist in the art for determining the grid orientation and grid spacing. Such methods are typically part of the process for aligning a two-dimensional barcode or watermark where data is stored in a grid-like configuration.
Prior art approaches typically use a convolution-based method, such as an autocorrelation or a periodogram to determine the grid orientation and grid spacing. Both an autocorrelation and a periodogram determine the dominant frequencies in input data, which show up as peaks in output data. These peaks can then be determined, and the location of a largest peak gives the dominant frequency of the grid. The grid spacing and grid orientation of the grid can then be determined from the dominant frequency.
The major disadvantage of convolution-based methods is that they are computationally expensive, since they perform a convolution over the whole image.
Thus, a need clearly exists for an improved process for determining the grid orientation, grid spacing, and grid translation of a grid, which is less computationally expensive.
According to one aspect of the present invention there is provided a process for determining one or more parameters for data encoded in a modulated grid of dots, the process comprising the steps of:
determining one or more vectors from at least one dot of said grid to a closest other dot, the dots being modulated about a virtual grid;
using the vectors to remove the modulation to determine the virtual grid; and
determining orientation of said grid using the determined vectors.
According to another aspect of the present invention there is provided a process for determining a grid for encoded data, said process comprising the steps of:
determining a statistical averaging of the direction of displacement of a data point of the data with respect to at least one nearest neighbour data point of the data; and
determining an angular orientation of the data based on said statistical averaging
determining the grid for the data based on the angular orientation.
According to still another aspect of the present invention there is provided a process for determining the grid orientation, grid spacing, and grid translation for data encoded in a modulated grid of dots, the process comprising the steps of:
determining displacement vectors from each of at least one dot to a closest other dot;
determining the grid orientation using the displacement vectors;
determining the grid spacing; and
determining the grid translation of at least one dot using a neighbourhood of nearby dots.
According to still another aspect of the present invention there is provided a process for determining a grid for encoded data, said process comprising the steps of:
determining an angular orientation of the data, the angular orientation being determined based on a statistical averaging of the direction of displacement of a data point and a nearest neighbour data point;
determining a spacing of neighbouring data points in the grid; and
determining an offset for each data point in respect of the grid.
According to still another aspect of the present invention there is provided an apparatus for determining one or more parameters for data encoded in a modulated grid of dots, the apparatus comprising:
vector determining means for determining one or more vectors from at least one dot of said grid to a closest other dot, the dots being modulated about a virtual grid; and
modulation removing means for using the vectors to remove the modulation to determine the virtual grid;
grid orientation determining means for determining orientation of said grid using the determined vectors.
According to still another aspect of the present invention there is provided an apparatus for determining a grid for encoded data, said apparatus comprising:
statistical averaging determining means for determining a statistical averaging of the direction of displacement of a data point of the data with respect to at least one nearest neighbour data point of the data; and
angular orientation determining means for determining an angular orientation of the data based on said statistical averaging; and
grid determining means for determining the grid for the data based on the angular orientation.
According to still another aspect of the present invention there is provided an apparatus for determining the grid orientation, grid spacing, and grid translation for data encoded in a modulated grid of dots, the apparatus comprising:
displacement vector determining means for determining displacement vectors from each of at least one dot to a closest other dot;
grid orientation determining means for determining the grid orientation using the displacement vectors;
grid spacing determining means for determining the grid spacing; and
grid translation determining means for determining the grid translation of at least one dot using a neighbourhood of nearby dots.
According to still another aspect of the present invention there is provided an apparatus for determining a grid for encoded data, said apparatus comprising:
angular orientation determining means for determining an angular orientation of the data, the angular orientation being determined based on a statistical averaging of the direction of displacement of a data point and a nearest neighbour data point;
spacing determining means for determining a spacing of neighbouring data points in the grid; and
offset determining means for determining an offset for each data point in respect of the grid.
According to still another aspect of the present invention there is provided a computer program for determining one or more parameters for data encoded in a modulated grid of dots, the program comprising:
code for determining one or more vectors from at least one dot of said grid to a closest other dot, the dots being modulated about a virtual grid; and
code for using the vectors to remove the modulation to determine the virtual grid;
code for determining orientation of said grid using the determined vectors.
According to still another aspect of the present invention there is provided a computer program for determining a grid for encoded data, said program comprising:
code for determining a statistical averaging of the direction of displacement of a data point of the data with respect to at least one nearest neighbour data point of the data; and
code for determining an angular orientation of the data based on said statistical averaging
code for determining the grid for the data based on the angular orientation.
According to still another aspect of the present invention there is provided a computer program for determining the grid orientation, grid spacing, and grid translation for data encoded in a modulated grid of dots, the program comprising:
code for determining displacement vectors from each of at least one dot to a closest other dot;
code for determining the grid orientation using the displacement vectors;
code for determining the grid spacing; and
code for determining the grid translation of at least one dot using a neighbourhood of nearby dots.
According to still another aspect of the present invention there is provided a computer program for determining a grid for encoded data, said program comprising:
code for determining an angular orientation of the data, the angular orientation being determined based on a statistical averaging of the direction of displacement of a data point and a nearest neighbour data point;
code for determining a spacing of neighbouring data points in the grid; and
code for determining an offset for each data point in respect of the grid.
According to still another aspect of the present invention there is provided A computer program product having a computer readable medium having a computer program recorded therein for determining one or more parameters for data encoded in a modulated grid of dots, said computer program product comprising:
computer program code means for determining one or more vectors from at least one dot of said grid to a closest other dot, the dots being modulated about a virtual grid;
computer program code means for using the vectors to remove the modulation to determine the virtual grid; and
computer program code means for determining orientation of said grid using the determined vectors.
According to still another aspect of the present invention there is provided a computer program product having a computer readable medium having a computer program recorded therein for determining a grid for encoded data, said computer program product comprising:
computer program code means for determining a statistical averaging of the direction of displacement of a data point of the data with respect to at least one nearest neighbour data point of the data; and
computer program code means for determining an angular orientation of the data based on said statistical averaging
computer program code means for determining the grid for the data based on the angular orientation.
According to still another aspect of the present invention there is provided a computer program product having a computer readable medium having a computer program recorded therein for determining the grid orientation, grid spacing, and grid translation for data encoded in a modulated grid of dots, said computer program product comprising:
computer program code means for determining displacement vectors from each of at least one dot to a closest other dot;
computer program code means for determining the grid orientation using the displacement vectors;
computer program code means for determining the grid spacing; and
computer program code means for determining the grid translation of at least one dot using a neighbourhood of nearby dots.
According to still another aspect of the present invention there is provided a computer program product having a computer readable medium having a computer program recorded therein for determining a grid for encoded data, said computer program product:
computer program code means for determining an angular orientation of the data, the angular orientation being determined based on a statistical averaging of the direction of displacement of a data point and a nearest neighbour data point;
computer program code means for determining a spacing of neighbouring data points in the grid; and
computer program code means for determining an offset for each data point in respect of the grid.
One or more embodiments of the present invention will now be described with reference to the drawings, in which:
Modulated Grids
The appearance of the modulated grid 200 is similar to that of dots (e.g., 302) arranged according to a regular square grid 301, as seen in
The difference between the regular grid 300 and the modulated grid 200 is that the positions of the dots 202 in the modulated grid 200 are slightly modulated away from the grid positions that the dots 202 would occupy if the dots 202 were arranged according to intersection points 203 of the regular grid 201. This slight modulation serves two purposes. Firstly, the modulation makes the dots 202 of the modulated grid 200 slightly less visible than the dots 302 of the regular grid 300. This is because the human visual system is very adept at noticing regular grids. Secondly, a message in the form of digital data can be stored in a modulation of dots such as the modulation grid 200.
(−mq, −mq),
(0, −mq),
(+mq, −mq),
(−mq, +0),
(0, +0),
(+mq, +0),
(−mq, +mq),
(0, +mq), and
(+mq, +mq)
In some instances, upon being presented with a modulated grid that contains some data, it is useful to determine the grid orientation, grid spacing, and modulation quantum for the modulated grid. The determination of the grid orientation, grid spacing and modulation quantum may be achieved by utilizing the fact that, in a modulated grid, such as the modulation grid 400, the average spacing between the dots 402 will equal the grid spacing 411. However, the spacing between the dots 402 is not always equal to the grid spacing 411. Likewise, the average direction between adjacent dots, such as the dot 402 and the dot 413, is aligned with lines of the regular square grid 401. However, the direction between adjacent dots (402 and 403) is not always aligned with the lines of the grid 401.
Additionally, for a given dot (e.g., 402), it is useful to estimate where its corresponding underlying grid-point is located. This problem is referred to as finding the grid translation. The grid-point location for a dot is represented by the coordinates of the intersection point nearest the dot. For example, the grid-point location of the dot 402 is the coordinates of the intersection point 407.
In many applications, the modulated grid (e.g., 400) may undergo modification between the time that the modulated grid 400 is created, and the time when parameters (e.g., grid spacing, grid orientation) associated with the modulated grid 400 is determined. For example, the modulated grid 400 may be printed, and scanned, and undergo dot detection. During such a modification some extra dots may be introduced, or some dots may disappear, and some dots may move. Estimation of the grid parameters should be reliable even when such modifications have taken place.
Determining Grid Parameters
A process 700 for determining the grid orientation, grid spacing and grid translation of a grid of dots, will now be described with reference to FIGS. 7 to 17. The process 700 may be practiced using a general-purpose computer system 100, such as that shown in
The computer system 100 is formed by a computer module 101, input devices such as a keyboard 102 and mouse 103, output devices including a printer 115, a display device 114 and loudspeakers 117. A Modulator-Demodulator (Modem) transceiver device 116 is used by the computer module 101 for communicating to and from a communications network 120, for example connectable via a telephone line 121 or other functional medium. The modem 116 can be used to obtain access to the Internet, and other network systems, such as a Local Area Network (LAN) or a Wide Area Network (WAN), and may be incorporated into the computer module 101 in some implementations.
The computer module 101 typically includes at least one processor unit 105, and a memory unit 106, for example formed from semiconductor random access memory (RAM) and read only memory (ROM). The module 101 also includes an number of input/output (I/O) interfaces including an audio-video interface 107 that couples to the video display 114 and loudspeakers 117, an I/O interface 113 for the keyboard 102 and mouse 103 and optionally a joystick (not illustrated), and an interface 108 for the modem 116 and printer 115. In some implementations, the modem 1116 may be incorporated within the computer module 101, for example within the interface 108. A storage device 109 is provided and typically includes a hard disk drive 110 and a floppy disk drive 111. A magnetic tape drive (not illustrated) may also be used. A CD-ROM drive 112 is typically provided as a non-volatile source of data. The components 105 to 113 of the computer module 101, typically communicate via an interconnected bus 104 and in a manner which results in a conventional mode of operation of the computer system 100 known to those in the relevant art. Examples of computers on which the described arrangements can be practised include IBM-PC's and compatibles, Sun Sparcstations or alike computer systems evolved therefrom.
Typically, the application program is resident on the hard disk drive 110 and read and controlled in its execution by the processor 105. Intermediate storage of the program and any data fetched from the network 120 may be accomplished using the semiconductor memory 106, possibly in concert with the hard disk drive 110. In some instances, the application program may be supplied to the user encoded on a CD-ROM or floppy disk and read via the corresponding drive 112 or 111, or alternatively may be read by the user from the network 120 via the modem device 116. Still further, the software can also be loaded into the computer system 100 from other computer readable media. The term “computer readable medium” as used herein refers to any storage or transmission medium that participates in providing instructions and/or data to the computer system 100 for execution and/or processing. Examples of storage media include floppy disks, magnetic tape, CD-ROM, a hard disk drive, a ROM or integrated circuit, a magneto-optical disk, or a computer readable card such as a PCMCIA card and the like, whether or not such devices are internal or external of the computer module 101. Examples of transmission media include radio or infra-red transmission channels as well as a network connection to another computer or networked device, and the Internet or Intranets including e-mail transmissions and information recorded on Websites and the like.
The process 700 may alternatively be implemented in dedicated hardware such as one or more integrated circuits performing the functions or sub functions of the processes of
Inputs to the process 700 are the dot coordinates of dots of the grid, which may be stored in memory 106. The process 700 begins at step 703, where the processor 105 determines an angle representing the grid orientation of the grid. The grid orientation is determined from the dot coordinates of the dots of the grid stored in memory 106. A process 900 for determining the grid orientation for a grid, as executed at step 703, will be described in detail below with reference to
Determining the Grid Orientation
The process 900 for determining the grid orientation, as executed at step 703 of process 700, will now be described in greater detail, with reference to
The process 900 begins at a first step 902, where the processor 105 determines, for each dot of the grid, what other dot is closest to the dot. Step 902 is executed for every dot in the grid. Any known method for determining the closest dot to a given dot may be used at step 902. For example, one process for determining the closest dot to a given dot is to select each other dot in turn, determine the distance from the selected dot to each other dot, and then select the other dot where the determined distance was least. The preferred process for determining the closest dot to a given dot is a faster process where the entire grid space is divided into many ‘buckets’. Each dot is assigned to a bucket that covers the location of the given dot. To determine the closest dot to a given dot, the processor 105 starts at the bucket that covers the given dot, looks at all the dots in each bucket surrounding the given dot, and selects a dot closest to the given dot. If no dots exist in any of the surrounding buckets, the processor 105 continues to a next nearest set of buckets radially outwards, and the process continues in the same manner. This preferred process for determining the closest dot to a given dot greatly reduces the number of candidate dots considered for the closest dot.
At a following step 903, the processor 105 determines the displacement vectors from each dot to a closest other dot, which was found in step 902. Thus every dot of the grid has a corresponding displacement vector determined for the dot.
At a following step 904, the processor 105 determines, for each displacement vector determined in step 903, the angle of that displacement vector. The angle θ of a vector may be determined as follows:
θ=a tan 2(y, x)
where x and y are the horizontal and vertical components of a vector.
The process 900 continues at a following step 905, where the processor 105 determines values of variables A and B, defined as follows:
where the θi are the angles of the displacement vectors determined in step 904. The sums are taken over all displacement vectors.
A following step 906 of the process 900 then determines a grid orientation angle φ, representing the grid orientation, using the formula:
φ=a tan 2(B, A)
The process 900 concludes following step 906.
Determining the Grid Spacing
The process 1000 for determining the grid spacing of a grid as executed in step 707 of the process 700, will now be described in detail with reference to
a−x≦0 or |a−x|≦|b−y|
dot (a, b) is rejected. For the dots that are left, the dot that minimizes the function
d(a, b)=|a−x|+2|b−y|
is determined. This dot is taken to be the dot to the right of (x, y) and stored in a list of right neighbour dots configured within memory 106.
At a following step 1003, the processor 105 takes each of the right neighbour dots (a, b) stored in memory 106 at step 1002 and determines a difference vector (dx, dy) from (x, y), as follows:
(dx,dy)=(a,b)−(x,y)
where (dx, dy) is stored in a list of difference vectors configured within memory 106. As an example,
The process 1000 continues at a following step 1004, where the processor 105 takes the x-ordinate of each difference vector determined at step 1003 and generates a frequency histogram of the values of the x-ordinates.
The process 1000 continues at a following step 1005, where the processor 105 uses the histogram 1200 to determine the grid spacing. Note that most of the right neighbours dots will be clustered around the spacing of the grid. Therefore, the grid spacing is determined by taking the x-value of the most frequent x-ordinate, which in the example of
Determining the Grid Translation
The process 1300 for determining the grid translation of a grid, as executed at step 709 of the process 700, will now be described in further detail with reference to
The process begins at step 1303, where the processor 105 selects a dot that has not been processed yet from the list of dots stored in memory 106 for the grid. This selected dot is called the ‘current dot’. The processor 105 determines every dot that is within a local window of the current dot and places the dot into a list of local window dots configured within memory 106. For example,
At a following step 1305, the processor 105 takes the list of local window dots (e.g., 1404) from memory 106 and normalises the coordinates of each dot (xk,yk) so that the grid spacing becomes 2π, as follows:
The process 1300 continues at a following step 1307, where the processor 105 takes the list of normalised local window dots stored in memory 106 and determines two phasors, xOffset and yOffset:
The summation at step 1307 is taken over the list of normalised local window dots. The phase of xOffset and yOffset estimates the amount that the current dot is out of phase with its grid-point in the x and y direction, respectively.
At a following step 1309, the processor 105 determines the location of the grid-point of the current dot. Denote the current dot by (xc,yc). The grid-point (xGrid,yGrid) for the current dot is given by
The process 1300 continues at a following step 1311, where if the processor 105 determines that there are dots which have not had their grid-point determined yet, then the process 1300 returns to step 1303. Otherwise, the process 1300 concludes.
Determining the Modulation Quantum
The process 1500 for determining the modulation quantum, as executed at step 805, will now be described in detail with reference to
At a following step 1504, the processor 105 determines a frequency histogram of the y-values of each difference vector determined in step 1503. As an example,
At a following step 1505, the processor 105 uses the histogram 1600 to determine the modulation quantum of the grid. At step 1505, the processor 105 determines the peaks in the histogram 1600 near zero. A peak is defined to be a y-value having an associated frequency bar which is greater than all the frequency bars of neighbouring y-values within a given radius referred to as the “peak-window-radius”. The peak-window-radius is proportional to the grid spacing. In described processes, the peak-window-radius is preferably one tenth of the grid spacing. An example of such a peak is 1603 is shown in
Alternative Method for Determining Modulation Quantum
An alternative process 1700 for determining the modulation quantum, as at step 805 of the method 800, is shown in
At a following step 1703, the processor 105 determines the offset vector from each dot to the corresponding grid-point for the dot as determined in step 1702. Then at the next step 1704, the processor 105 determines a histogram of the y-components of the offset vectors determined in step 1703, as described above. At a following step 1705, the processor 105 determines the three largest peaks of the histogram determined at step 1704. The distance between a smallest of these peaks and the second smallest of these peaks, and the distance between the second smallest of these peaks and the largest of these peaks is approximately equal the modulation quantum for the grid. At step 1706, the processor 105 detects the average of these two distances, which is used as the modulation quantum.
Alternative Arrangements
In
In an additional alternative arrangement, instead of using only the closest dot the closest N dots may be used to determine the displacement vectors. For example, N may be equal to two (2) or four (4). This arrangement can sometimes result in more accurate grid orientation detection in very noisy grids, at the cost of complexity and speed.
In
In
Similarly, a random subset of the difference vectors may be used in steps 1503 and 1504, of the process 1500, for more accurate modulation quantum detection, at the cost of complexity and speed.
In
It is apparent from the above that the arrangements described are applicable to the computer and data processing industries.
The foregoing describes only some embodiments of the present invention, and modifications and/or changes can be made thereto without departing from the scope and spirit of the invention, the embodiments being illustrative and not restrictive.
Number | Date | Country | Kind |
---|---|---|---|
2005209703 | Sep 2005 | AU | national |