The invention relates to a method and an apparatus for coding data and for storing the encoded data as a data pattern on a storage medium, as well as to a storage medium comprising a data pattern coded in accordance with said coding scheme. The invention further relates to a method and an apparatus for reading data encoded as a data pattern from a storage medium and for decoding the encoded data.
For storage or transmission of digital data, different modulation schemes have been developed in the past. Typical modulation schemes like amplitude modulation (AM), phase modulation (PM), or quadrature amplitude modulation (QAM) are designed for statistically stationary noise like additive white Gaussian noise. Signal constellation diagrams of these modulation schemes are symmetric. However, in the presence of severe local distortions, such modulation schemes fail for correct detection.
One of the most commonly used modulation schemes for storing or transmitting digital data is the amplitude modulation. In the baseband, amplitude modulation may be one dimensional, e.g. signal on a wire, or two dimensional, e.g. signal on a surface like film. If modulated on a carrier, two amplitude modulations can be combined to form a quadrature amplitude modulation.
A known application of amplitude modulation is long term data archival based on data storage on a two-dimensional surface, e.g. on film or paper. Typically the data are recorded in the form of two-dimensional data patterns consisting of an array of black and white pixels. However, also grey value or color coded pixel arrays are used.
More generally, the data are stored on a two-dimensional surface with pattern elements forming a regular pattern. A specific value is assigned to each element during an encoding process, e.g. a color, a grey value etc. If one pattern element shall store one bit, one of only two possible values is assigned to the pattern element, e.g. the values black and white. The easiest way of decoding the bit stored in a pattern element is to look at the element and to check its value, e.g. if the element is black or white. The described system, especially if only two grey levels are used, can handle a rather strong level of noise. Unfortunately, in case of severe local distortions with high amplitudes, e.g. due to dust, it is likely to fail.
It is an object of the present invention to propose an improved solution for encoding data as a two-dimensional array of pixels.
According to a first aspect of the invention, a method for encoding data as a two-dimensional array of pixels comprises:
Accordingly, an apparatus configured to encode data as a two-dimensional array of pixels comprises:
Also, a non-transitory computer readable storage medium has stored therein instructions enabling encoding data as a two-dimensional array of pixels, which when executed by a computer, cause the computer to:
After encoding the two-dimensional array of pixels is preferably stored on a storage medium.
In one embodiment the values of the pixels within a block of pixels increase continuously from a lowest value of a first pixel to a highest value of a last pixel when considering the pixels along a spiral. The allowed blocks of pixels then differ in at least one of orientation of the spiral, location of the first pixel, and difference between the value of the first pixel and the value of the last pixel. Preferably, the continuous increase is a linear increase. During the decoding process the sequence of values is rotated until a majority of values lie on a straight line. The related code word can then be found by looking at the orientation, the number of rotations and the gradient of the line.
In another embodiment the values of the pixels within a block of pixels represent different planes. The allowed blocks of pixels then differ in at least one of inclination of the plane and orientation of the plane.
According to another aspect of the invention, a method for decoding data encoded as a two-dimensional array of pixels, the two-dimensional array of pixels consisting of blocks of pixels from an alphabet of allowed blocks of pixels, each allowed block of pixels representing two or more data bits, wherein values of the pixels within each block of pixels in said alphabet are selected from three or more allowed values and increase continuously from a lowest value of a first pixel to a highest value of a last pixel when considering the pixels along a spiral or represent a plane having an orientation and an inclination, comprises:
Accordingly, an apparatus configured to decode data encoded as a two-dimensional array of pixels, the two-dimensional array of pixels consisting of blocks of pixels from an alphabet of allowed blocks of pixels, each allowed block of pixels representing two or more data bits, wherein values of the pixels within each block of pixels in said alphabet are selected from three or more allowed values and increase continuously from a lowest value of a first pixel to a highest value of a last pixel when considering the pixels along a spiral or represent a plane having an orientation and an inclination, comprises:
Also, a non-transitory computer readable storage medium has stored therein instructions enabling decoding data encoded as a two-dimensional array of pixels, the two-dimensional array of pixels consisting of blocks of pixels from an alphabet of allowed blocks of pixels, each allowed block of pixels representing two or more data bits, wherein values of the pixels within each block of pixels in said alphabet are selected from three or more allowed values and increase continuously from a lowest value of a first pixel to a highest value of a last pixel when considering the pixels along a spiral or represent a plane having an orientation and an inclination, the instructions, when executed by a computer, causing the computer to:
The two-dimensional array of pixels is advantageously retrieved from a storage medium before decoding.
For a better understanding the invention shall now be explained in more detail in the following description with reference to the figures. It is understood that the invention is not limited to this exemplary embodiment and that specified features can also expediently be combined and/or modified without departing from the scope of the present invention as defined in the appended claims.
In the following the invention shall be explained with reference to a two-dimensional array of grey value pixels, i.e. a coding scheme using two dimensional amplitude modulation. Of course, the concept can likewise be used for more complex modulations.
A two-dimensional amplitude modulation is used for storing data on surfaces, e.g. paper or film. In that case, the digital information is stored by printing or exposing specific patterns on the surface. These patterns typically consist of small squares having different grey values. An example of such a pattern 1, which is often called a data page, is shown in
In order to address this issue, a plurality of squares are combined to a symbol, which is encoded and decoded as a whole. In the above given example of
In principle these patterns form spirals with two different orientations, four different starting points, and two different amplitudes. A related example image 3 with the described modulation is shown in
The set of values assigned to the patterns was chosen in such a way that, when ordering the values in a line taking them clockwise from the 2×2 pattern, the distance between the values of two neighbors is always the same when starting with the correct pixel. If necessary, the pattern needs to be rotated to start with the correct pixel. To give an example, the pattern
can also be written (when taking the values clockwise) as:
1.00 0.00 0.33 0.67
Rotating the sequence to the left gives:
0.00 0.33 0.67 1.00
In this example the distance between two adjacent values is always 0.33. In other words, the values lie on a straight line when displayed as a function.
If one pixel is strongly distorted, e.g.
0.00 0.91 0.67 1.00,
it is easily possible to find out which one is distorted, as the three others still lie on a line. In practice, small distortions can also be allowed for other pixels, as long as correct decisions can be made.
During the decoding process the sequence of values is rotated until a majority of values lie on a straight line. The related code word can then be found by looking at the orientation, the number of rotations and the gradient of the line.
Of course, the proposed solution is not limited to the case of 2×2 pixel patterns, nor is it mandatory that the values of adjacent pixels lie on a straight line. It is sufficient that the exact sequence of the pixel values of the pattern follows a known function.
An alternative solution making use of 2×2 pixel patterns consists in the following patterns:
These patterns essentially represent planes with different inclinations and orientations.
A corresponding apparatus 20 is shown in
A method according to the invention for decoding data encoded as a two-dimensional array 3 of pixels is schematically shown in
A corresponding apparatus 40 is depicted in
Number | Date | Country | Kind |
---|---|---|---|
14305417.9 | Mar 2014 | EP | regional |