WO2021140348A1 - Method for generating a two-dimensional code storing image data, and for decoding the stored data, and computer-readable program product and storage medium - Google Patents

Method for generating a two-dimensional code storing image data, and for decoding the stored data, and computer-readable program product and storage medium Download PDF

Info

Publication number
WO2021140348A1
WO2021140348A1 PCT/HU2021/050001 HU2021050001W WO2021140348A1 WO 2021140348 A1 WO2021140348 A1 WO 2021140348A1 HU 2021050001 W HU2021050001 W HU 2021050001W WO 2021140348 A1 WO2021140348 A1 WO 2021140348A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
data
dimensional code
intensity
code
Prior art date
Application number
PCT/HU2021/050001
Other languages
French (fr)
Inventor
László Szabó
András Vágó
Original Assignee
Szabo Laszlo
Vago Andras
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from HU2000292A external-priority patent/HUP2000292A2/en
Application filed by Szabo Laszlo, Vago Andras filed Critical Szabo Laszlo
Publication of WO2021140348A1 publication Critical patent/WO2021140348A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes

Definitions

  • the invention is primarily related to a method for producing a personal identification document comprising a two-dimensional code and for generating a two-dimensional code storing image information.
  • the invention further relates to a method for decoding data stored in a two-dimensional code, to a computer program product, and to a computer-readable storage medium.
  • the prior art includes a number of technical solutions for compressing images, among others, colour images, the compression enabling the image information to be stored in a two-dimensional code, which code can be placed on a personal identification document.
  • US 7,742,649 B2 discloses an image compression method that makes use of the symmetry found in faces or heads for reducing image size.
  • a two-dimensional barcode disposed on a personal identification document may include, in an encoded form, a photograph, signature, fingerprint of the owner of the document, and also further data. All the information is stored in the barcode, so the identification can be carried out directly by reading the barcode, without accessing a network or a central database. Because the colours and brightness of the images may affect the method, the images are normalized to a near-identical brightness before compression.
  • the reduced-size image that was compressed making use of symmetries can be further compressed by applying JPEG2000, or other compression methods.
  • the reduced-size image is restored by applying these other compression methods (if such were applied), followed by restoring the entire image from the reduced-size one.
  • the data indicated in the document can also be stored in other data storage devices that can, for example, form a part of the identification document.
  • the disadvantages of this technical solution are that the compression has a high computational demand, and that in the case of strongly asymmetrical images it cannot be applied effectively.
  • human faces and heads usually exhibit natural asymmetry. If this asymmetry is removed, the identification of the image and the corresponding person may become more difficult.
  • US 2003/0152250 A1 discloses a personal identification instrument (document) that includes the colour, monochrome, or grayscale photograph of the document’s owner in an encoded form, for example in an encrypted form.
  • the stored encoded photograph may be different from the photo appearing on the document (for example, it can be taken at a different angle).
  • the information stored in an encoded form can be applied for identifying the owner of the document on its own, i.e. , without using a database or an authentication station.
  • the photograph can be printed on the document, for example in the form of colour, monochrome, or grayscale dots or blocks.
  • US 9,189,722 B2 discloses a technical solution wherein data are stored in motion QR codes, which motion QR codes can be used for personal identification documents or electronic tickets.
  • motion QR codes can store larger amounts of data.
  • a network connection is required, i.e., off-line identification is only possible after downloading the identification database.
  • the disadvantage of this solution is that the motion code can only be displayed on electronic media (screens), i.e., on conventional personal identification documents, tickets, or season tickets only a series of the individual codes constituting the motion code can be shown, which has a significant space demand.
  • US 7,158,669 B2 discloses an image compression method that can be applied also for colour images.
  • the method involves grouping the pixels according to their colour values, which is followed by reducing the number of colours by merging together groups of nearby colours, and then by compressing the image.
  • the compressed image contains information related to the original image (for example size and resolution), while it also contains the image data, compressed for each colour. Both JPEG and ZIP compression are applied for compressing the image.
  • US 7,450,134 B2 also discloses an image compression method. In the course of the exemplary compression method shown in Fig.
  • a header is generated wherein it is indicated if the original image contained alpha values, and, if yes, then the alpha values are grouped together, separated from the colour values, and then the image is compressed by applying a lossless compression method, for example by using GZIP compression.
  • the steps of the image decompression process are shown in Fig. 5 of the document, wherein first a lossless decompression step is performed. If the data also include alpha values, then the separately grouped colours and alpha values are assigned to each other again, in correspondence to the given pixels. Finally, the header generated during the compression process is removed from the beginning of the data sequence.
  • a unique personal identifier (AADFIAAR) storing the personal data of citizens was introduced in India by the UIDAI (Unique Identification Authority of India).
  • the AADFIAAR identifier was a unique 12-bit sequence that has since been replaced with a QR code.
  • the QR code also stores the photograph of the owner of the identifier. According to the Indian technical solution, the photograph is stored in the QR code in JP2000 format, i.e. , in a JPEG2000-com pressed format, embedded in a byte block.
  • the disadvantage of this technical solution is that by applying the JPEG 2000 compression method the size of the byte block adapted for generating the QR code cannot be reduced to such an extent that the physical size of the generated QR code is small enough to fit on a conventional personal identification document (i.e., that the code can be disposed on the document). Due to the low compression ratio, the physical size of the QR code generated by the Indian solution is approximately 40-50 mm, and the code is printed on a standalone ID document.
  • the object of the technical solution according to the invention is to provide a method for producing a personal identification document and for generating a two-dimensional code storing image information that eliminates the drawbacks of prior art solutions to the greatest possible extent.
  • the primary object of the invention is to provide a method enabling efficient image compression, whereby a small-sized two-dimensional code (with a height and width in the order of at most a few centimetres) can be generated, which two-dimensional code can even be disposed on a personal identification document.
  • a further object of the invention is to provide a method for generating a standard two- dimensional code that is capable of storing an image suited for personal identification taking into account the size limits specified in the standard.
  • Another object of the invention is to provide a method realizing such a degree of image compression that - in addition to the image information - additional data, for example additional data related to the image, or even additional images can be stored in the two-dimensional code.
  • the objects of the invention also include providing a method wherein the image information stored in the two-dimensional code generated in the course of the method can be decrypted and decoded at least to an extent that enables visual assessment (for example personal identification) - for example by carrying out the inverse operations of the encoding method in a reverse order - by using exclusively the information stored in the two-dimensional code.
  • a still further object of the invention is to provide a method that enables secure, encrypted storage of information in the two-dimensional code.
  • the objects of the invention also include a decoding method, a computer program product adapted for carrying out the method, and a computer-readable storage medium.
  • the objects set before the invention have been achieved by providing the method for producing a personal identification document according to claim 1 , the method for generating a two-dimensional code adapted for storing image information according to claim 2, the decoding method according to claim 18, the computer program product according to claim 20, and the computer-readable storage medium according to claim 21 .
  • Preferred embodiments of the invention are defined in the dependent claims.
  • the advantage of the technical solution according to the invention is that by applying compression the size of the image (even a colour image) can be reduced by such an extent that the image information originating from the colour image can be stored in a two-dimensional code having limited storage capacity.
  • the compression ratio can be significantly increased, and thus the two-dimensional code can be produced with a smaller physical size compared to the prior art solutions, which allows for disposing the two-dimensional code for example on conventional personal identification documents, e.g., on identity cards and passports.
  • the solution comprising a header removal step is highlighted, applying which the size of the already compressed image can be further reduced, even by half. This is because, as it has been recognised, in the case of identical applications the different images to be stored in the two- dimensional code typically have identical headers, so, provided that the identical header is known, this known information need not be stored in the two-dimensional code.
  • a further advantage of the method according to the invention is that for decoding the image information and the optional additional data stored in the two-dimensional code, access to a database or network is not required, and thus the method according to the invention can be applied also at locations where network infrastructure is limited or non-existent.
  • Another advantage of the method according to the invention is that the data, including the image information (photograph), can be stored in the two-dimensional code in an encrypted manner, thereby improving the security of the application of the two- dimensional code.
  • FIG. 1 is the flowchart of a preferred embodiment of the method for encoding image information according to the invention
  • Fig. 2 is a flow diagram of another preferred embodiment of the encoding method according to the invention
  • Fig. 3 shows three examples for encoding methods that apply image compression to a different extent
  • Fig. 4 is a flow diagram of a preferred embodiment of the decoding method according to the invention.
  • Fig. 5 is a flow diagram of another preferred embodiment of the decoding method according to the invention.
  • Fig. 6 is an example for the output produced by the decoding method according to the invention, the decoding method being applied for decoding the two- dimensional codes according to Fig. 3,
  • Fig. 7 is an example for applying the encoding and decoding methods according to the invention for greyscale images
  • Fig. 8 is an example related to different types of two-dimensional code generated from the image of Fig. 5 applying the encoding method according to the invention.
  • Fig. 9 is a further example for different types of two-dimensional code generated by the encoding method according to the invention from a different image.
  • Fig. 1 is a flowchart of a preferred embodiment of the method for generating a two- dimensional code storing image information according to the invention.
  • the method comprises the step of processing an image 10 utilizing a computer device, said image preferably being a colour, grayscale, or monochrome image.
  • the image 10 is preferably loaded from a database, computer, scanner, or other storage medium, while an image provided by a camera, for example a live camera image can also be applied.
  • the image 10 is preferably of a known format, preferably BMP, JPG, PNG, or TIFF format.
  • An exemplary image 10 is a BMP-format image that consists of 190x246 pixels, has a resolution of 600 dpi and a colour depth of 32 bits (see the initial image 10 in Fig. 3).
  • the image 10 is compressed in an image compression step S100 that generates a compressed image 12.
  • JPEG compression is applied in the course of the image compression step S100, thereby producing from the image 10 a compressed image 12 having JPEG or JPG format.
  • the compression ratio of JPEG compression is approx. 80%, i.e. , the size of the compressed image 12 is approximately 20% of the image 10.
  • other compression methods even known compression methods can also be applied in the course of the method, while the compressed image 12 can also be generated applying a combination of different compression methods, for example by sequentially performing multiple different compression methods.
  • the image compression step S100 further comprises an intensity reduction step S110 (see Fig.
  • the image 10 (which can be a colour or grayscale image 10) is transformed by modifying the intensity values corresponding to individual pixels thereof, such that the intensity values are mapped with an intensity- reducing function, and thereby the compressed size of the compressed image 12 is further reduced.
  • the intensity reduction step S110 a preferred mode of carrying out the intensity reduction step S110 is described in more detail.
  • the compressed image 12 is transformed into sequential encoded data 16 in a transcoding step S130.
  • the pixel values of the compressed image 12 are encoded, preferably by applying Basel 0, Base32, Base36, Base64, Basel 28 encoding, or other known encoding types.
  • the sequential encoded data 16 contains the encoded values of individual pixels, preferably in the order of the pixels of the compressed image 12.
  • the pixel values are encoded by colour channel, for example applying red, green, and blue colour channels, with the sequential encoded data 16 containing the encoded values in the order of the pixels of the compressed image 12.
  • the sequential encoded data 16 will only include the digits 0-9, i.e., it will have numeric format.
  • the sequential encoded data 16 may contain 32 different characters that preferably consist of the capital letters of the English alphabet (A-Z) and the digits from 2 to 7.
  • the sequential encoded data 16 may contain 36 different characters consisting of the capital letters of the English alphabet (A-Z) and the digits 0-9. In the case of Base32 and Base36 encoding the sequential encoded data 16 will have alphanumeric format.
  • the sequential encoded data 16 can contain 64 different characters, of which 62 are the small and capital letters of the English alphabet (a-z and A-Z) and the digits 0-9, which are complemented by two special characters, for example the characters “+” and 7’.
  • the sequential encoded data 16 will have byte format.
  • sequential encoded data 16 may also contain the encoded values in a predetermined order that is different from the order of the pixels of the compressed image 12.
  • the sequential encoded data 16 is encrypted in a cryptography step S150, with the sequential encrypted data 18 generated by the encryption being encoded, like with the transcoding step S130, by applying Basel 0, Base32, Base36, Base64, Basel 28 or other known type of encoding, where the type of encoding can be identical to or different from the encoding applied for generating the sequential encoded data 16.
  • a code generation step S140 a two-dimensional code 20 is generated from the transformed data that was generated by encoding from the sequential encrypted data 18, the two-dimensional code 20 preferably being a two- dimensional barcode, by way of example QR code, DataMatrix code, or PDF-417 code.
  • the advantage of applying the cryptography step S150 is that it further improves the security of the data stored in the two-dimensional code 20, and thus the two- dimensional code 20 can also be safely utilized for applications requiring enhanced security, for example for payment transactions.
  • the information stored in the two-dimensional code 20 cannot be obtained by executing the opposite-direction operation of Basel 0, Base32, Base36, Base64, Basel 28 or other known type of encoding on the read-out data, because for obtaining the information it is also necessary to decrypt the encrypted data, and to execute the inverse of the image compression step S100.
  • the steps of the method for reading out the two-dimensional code 20 data and for decrypting the information stored in the two-dimensional code 20 are described in more detail in relation to Figs. 6-7.
  • AES Advanced Encryption Standard
  • AES is an algorithm for encrypting secret information that is also accepted by the US National Security Agency (NSA).
  • the AES block size applied in the course of the method according to the invention is preferably 128 bits, with a preferred key size of 256 bits, but other block and key sizes known from the prior art may also be applied, for example 64, 128, 196, or 256-bit keys can also be utilized.
  • the same parameters are applied for the AES algorithm.
  • the key can preferably be a public key, a private key, or a combination thereof.
  • the public key portion is preferably specified by the issuer of the two-dimensional code 20, and this key portion is preferably also known to the device adapted to read out the two-dimensional code 20. If, for example, the two-dimensional code 20 is applied to a personal identification document, then the public key portion is preferably specified by the authority that issues the personal identification document, while the private key portion is specified by the owner of the personal identification document.
  • the private key portion is preferably a code, for example a personal identification code or PIN code that in the case of the given two-dimensional code 20 is known, for example, solely by the owner of the personal identification document.
  • the owner of the personal identification document When the two-dimensional code 20 is read out, the owner of the personal identification document must enter this code (utilized during the encryption process) for restoring the data stored in the two-dimensional code 20. To provide the security of the data stored in the two-dimensional code 20, it is preferably necessary to apply a sufficiently complex key.
  • the generated key is encoded applying the key size specified as a parameter of the AES, i.e. , for example by 256-bit encoding, which is followed by setting the block size for the encryption (e.g., a block size of 128 bits), and generating the sequential encrypted data 18.
  • the sequential encrypted data 18 is encoded (transformed) in a manner similar to the transcoding step S130, for example applying Basel 0, Base32, Base36, Base64, Basel 28 or other known type of encoding, and then the two-dimensional code 20 is generated, in a code generation step S140, from the transformed data thus obtained.
  • the cryptography step S150 may comprise the application of other known encryption methods or combinations thereof, provided that the encryption method does not overly increase (for example, does not double) the size of information to be stored in the two- dimensional code 20.
  • the capacity of the two-dimensional code 20, that is, the amount of information that can be stored in the two-dimensional code 20 is basically determined, as described below, by the format of the transformed data generated from the sequential encrypted data 18. If the two-dimensional code 20 is a QR code, then as much as 7089 bytes of numeric-format data (containing the digits 0-9) can be loaded into the two-dimensional code 20 (the QR code), so the maximum size of numeric-format data can be 7089 bytes. With alphanumeric-format data (containing the digits 0-9 and the capital letters of the English alphabet) a maximum of 4296 bytes (characters), while in the case of data also containing small letters and/or special characters, maximum 2953 bytes (characters) can be loaded into the QR code.
  • the maximum size of the alphanumeric-format transformed data generated from the sequential encrypted data 18 can be 4296 bytes, while in case the transformed data generated from the sequential encrypted data 18 also contains small letters or other special characters, the transformed data can have a maximum size of 2953 bytes.
  • the two-dimensional code 20 can preferably be displayed on an electronic device, for example a mobile phone, tablet, or computer, and can also be printed on paper or engraved into a plastic surface by laser engraving.
  • the two-dimensional code 20 can be preferably printed on tickets and season tickets, for example on bus-, rail-, or air tickets, or theatre, movie theatre, or concert tickets or combined tickets, and it can also be applied - for example by engraving or printing - to personal identification documents, for example an identity card, passport, or driving license.
  • personal identification documents are often made from plastic, which allows that the two- dimensional code 20 can be applied to the personal identification document by laser engraving.
  • the advantage of laser engraving is that it can produce much smaller-sized two-dimensional codes 20 than for example conventional laser or inkjet printers.
  • two-dimensional codes 20 produced by laser engraving are more difficult to reproduce or copy than the two-dimensional codes 20 produced by simple printing, because two-dimensional codes 20 produced by high-resolution laser engraving cannot be reproduced even by photocopying or scanning.
  • the two-dimensional code 20 and/or the transformed data that is generated from sequential encrypted data 18 and is applied for generating the two-dimensional code 20 can also be loaded into other data storage media, for example into a chip disposed in the personal identification document, and the two-dimensional code 20 can also be placed or displayed in an electronic personal identification document.
  • the size of the two-dimensional code 20 can be reduced. Smaller-sized two-dimensional codes 20 can be implemented and displayed at a smaller physical size, which widens the field of application of the method, i.e. , the method according to the invention can be applied also in such situations wherein the space available for displaying the two-dimensional code 20 is limited.
  • Fig. 2 illustrates the steps of another preferred embodiment of the method, preferably in the case of a colour or grayscale image 10.
  • the properties of the image 10 are identical to the properties of the image 10 described in relation to Fig. 1.
  • the image compression step S100 is carried out in multiple stages, sequentially applying multiple compression steps.
  • a compressed image 12 is generated in an image compression step S100’, which image compression step S100’ is preferably JPEG compression; however, any other known image compression methods can also be applied.
  • Colour images 10 typically have a size of 3-4 bytes per pixel, which is made up of values of the three primary colours (in the case of an RGB image: red, green, and blue) and the alpha (opacity) value. In the case of RGB and RGBA images, each of these values amounts to 1 byte of information.
  • the size of a grayscale image 10 is 1-2 bytes per pixel, depending on if the image contains an alpha channel (alpha values).
  • the size of a colour image 10 is at least one-and-a-half times the size of a grayscale image 10, so with colour images 10 it is particularly preferable to apply further compression that preferably compresses the colour information (intensity values) of the colour image 10; however, this additional compression adapted to reduce the intensity values can also be applied for grayscale images 10.
  • a reduced-intensity image 13 is generated from the compressed image 12 by transforming/modifying, preferably reducing the intensity values of the pixels of the image.
  • the intensity values are mapped applying an intensity-reducing function, where in the course of the mapping the intensity values do not increase.
  • the intensity-reducing function is applied for assigning a predetermined intensity value to the intensity value of each pixel; preferably the assigned (mapped) intensity values are smaller or equal to the original intensity values.
  • the intensity-reducing function is preferably a discrete or continuous function, more preferably a monotonic decreasing discrete or continuous function.
  • the reduction of the pixel intensity values involves darkening the image. This is because darker colours have lower corresponding intensity values; for example, the RGB code of the colour white is (255; 255; 255), while the RGB code of the colour black is (0; 0; 0). Likewise, the RGB code of a pure red colour is (255; 0; 0), with the RGB codes (204; 0; 0), (153; 0; 0), (102; 0; 0), and (51 ; 0; 0) corresponding to progressively darker colours. For encoding smaller number values, it is sufficient to apply a smaller character set, so the two-dimensional code 20 can store more data.
  • the intensity reduction step S110 can be applied for reducing the pixel intensity values also in the case of grayscale images 10.
  • certain given pixels of the image 10 and the compressed image 12 are mapped utilizing the same intensity-reducing function.
  • a particular set of the pixels is mapped utilizing the same intensity-reducing function.
  • different amounts of darkening are applied to the relevant and the less relevant regions of the image 10.
  • the central portion of the image 10 that is expected to show the person’s face
  • the portion of the image 10 that is expected to only include the background are mapped applying different intensity-reducing functions, i.e. , certain predetermined regions of the image 10 can be darkened to a different extent.
  • the colour compression step S110 is carried out utilizing mutually independent intensity-reducing functions for the different colour channels, the intensity values corresponding to the different colour channels being preferably mapped (darkened) applying different intensity-reducing functions.
  • the pixels of the image 10 are mapped by independent intensity-reducing functions, i.e., the individual pixels are transformed applying different intensity-reducing functions, with the intensity-reducing functions corresponding to the particular pixels being chosen taking into account the probability of the given pixel being a background pixel.
  • the intensity-reducing function is a linear function that is adapted to reduce the initial intensity values in a proportionate manner, by way of example the mapped intensity value is between 10 and 90%, preferably between 50 and 90%, more preferably between 60 and 80% of the corresponding initial intensity value.
  • Another preferred embodiment is constituted by combinations of the above described preferred embodiments of the intensity reduction step S110, by way of example a combination wherein, in the case of a colour image 10 the intensity values of the individual pixels are mapped (darkened) applying different, independent intensity- reducing functions for different colour channels in the intensity reduction step S110, the intensity-reducing functions corresponding to the different colour channels are linear functions that are adapted to reduce the particular intensity values for example by 10-90%, preferably by 50-90%, more preferably by 60-80%.
  • a compression ratio of approximately 50% can be preferably attained, so, by applying the intensity reduction step S110 after the image compression step S100 the size of the reduced-intensity image 13 will be approximately 10% of the original image 10 (the size compressed image 12 is approx. 20% of the original one), which amounts to a combined compression ratio of approx. 90%.
  • the intensity reduction step S110 can be applied in a manner analogous to the process described above, except that the image 10 contains only one colour channel instead of three.
  • the image compression step S100 is made up of the image compression step S100’, the intensity reduction step S110, and the header removal step S120.
  • the image compression step S100 may comprise another process or other processes (even known processes), and the order of the applied processes and steps can be changed.
  • the steps constituting the image compression step S100 also the order of these steps is predetermined, based on which the generated two-dimensional code 20 can be decoded.
  • the headerless image 14 is transformed into sequential encoded data 16 in a transcoding step S130.
  • the features of the transcoding step S130 and the sequential encoded data 16 are preferably identical to the features described in relation to Fig. 1.
  • the sequential encoded data 16 is thereafter encrypted in a cryptography step S150, followed by transforming the generated sequential encrypted data 18 in a similar manner to the transformation carried out in the transcoding step S130, thereby generating transformed data.
  • the features of the cryptography step S150 are identical to the features described in relation to Fig. 1 .
  • a two-dimensional code 20 is generated from the transformed data that was generated from the sequential encrypted data 18, said code preferably being - in line with the above description related to Fig. 1 - a two- dimensional barcode, by way of example QR code, DataMatrix code, or PDF-417 code.
  • the preferred embodiment of Fig. 2 is capable of providing higher compression ratios, i.e. , it generates smaller-sized sequential encoded data 16 from the same image 10, and thus the size of the sequential encrypted data 18 and the transformed data generated from it will also be smaller (provided that other parameters of the method, e.g., the parameters of the cryptography step S150 are the same).
  • the two-dimensional code 20 is a QR code
  • the QR code is generated from reduced-size data
  • the size of the QR code will also be reduced, i.e., a QR code with fewer QR dots can be generated. Displaying the smaller QR code (containing fewer QR dots) requires smaller physical space (at the same resolution), which is particularly preferable for such applications of the method wherein the space available for displaying the two- dimensional code 20 is limited, for example in the case of personal identification documents.
  • images 10 of a predetermined size, resolution, and format are preferably applied.
  • the image information to be stored in the two-dimensional code 20 can relate to images 10 with different size, and/or resolution, and/or format.
  • the image 10 is optionally generated by appropriately adjusting the parameters of an image having an arbitrary image format, resolution, and size. For example, image size can be modified by shrinking, magnifying, discarding certain parts, or cropping.
  • the image 10 thus generated can preferably be of a known file format, or of a unique dedicated file format created for the particular application. Without information on the file format, it is impossible or very difficult to decode the image information stored in the two-dimensional code 20 generated from the dedicated file-format image 10, which further improves the operational security of the method according to the invention.
  • the image compression step S100’ implemented applying JPEG compression, and the intensity reduction step S110 can also be performed in a reverse order.
  • a further preferred embodiment of the method is constituted by also performing an image correction process (or image correction processes), for example contrast enhancement, on the image 10, and carrying out the steps of the method according to the invention applying this corrected image.
  • an image correction process or image correction processes
  • contrast enhancement for example contrast enhancement
  • the two-dimensional code 20 also stores additional information in addition to the image information.
  • the additional information can comprise, by way of example, at least one of the following: the name, personal data (e.g. place and date of birth, etc.), signature, biometric identifiers (e.g. fingerprint or fingerprints) of the holder of the personal identification document, or another photograph - for example, one different to the one included on the personal identification document - of the holder. Disposing the two-dimensional code 20 on the personal identification document provides an additional security feature that makes it more difficult to copy or counterfeit the personal identification document.
  • the two- dimensional code 20 is primarily adapted to contain an image showing the product, while the additional information can be for example the name, manufacturer, manufacturing date, identifier or any other parameter of the product that is deemed necessary by the manufacturer, or any combination thereof.
  • the additional information it is expedient to convert the additional information to the format of the sequential encoded data 16.
  • the sequential encoded data 16 is alphanumeric data generated by Base32 or Base36 encoding
  • the format having a broader character set will be applied, also determining the amount of data that can be stored in the two-dimensional code 20.
  • a given two- dimensional code 20 can store a smaller amount of data having a format with a broader character set compared to data of a format with a narrower character set.
  • aggregated data can be generated, and in this preferred embodiment the two- dimensional code 20 can preferably be generated after encrypting the aggregated data, i.e. , after performing the cryptography step S150.
  • the encoded additional information is stored in the aggregated data before or after the sequential encoded data 16.
  • an empty space of predetermined size is pre-allocated in the aggregated data for storing the encoded additional data, with the encoded additional data being preferably inserted into this predetermined space. If the size of the encoded additional data is smaller than the available space of predetermined size, then the remaining space or spaces is/are filled up with predetermined, preferably zero, data values or another separator (delimiter values).
  • the additional information is preferably brought to the same format as the transformed data generated from the sequential encrypted data 18, producing the aggregated data in such a manner.
  • the two-dimensional code 20 is generated from the aggregated data.
  • a further preferred embodiment is the combination of the implementations for storing the additional information applied in the two preferred embodiments described above, in which case only a portion of the additional information needs to be stored in encrypted form.
  • the first aggregated data can be encrypted in a cryptography step S150, thereby generating sequential encrypted data 18 from the first aggregated data.
  • the other portion of the additional information is preferably converted to the format of the transformed data generated from the sequential encrypted data 18 (producing encoded additional information), followed by concatenating the transformed data with the encoded additional information for generating second aggregated data.
  • the two-dimensional code 20 is generated from the second aggregated data.
  • a further preferred embodiment is obtained if the alpha channel is removed before or after the image compression step S100.
  • This step is adapted for generating from a 32-bit image 10 (containing 32 bits of data per pixel) - that in addition to the colours red, green, and blue also stores 8 bits of alpha (opacity) data for each pixel - a 24-bit colour image (containing 24 bits per pixel), i.e., it reduces the size of the image 10 by approximately 25%.
  • Grayscale images 10 may also contain an alpha channel; in such a case the size of the image 10 is reduced from 16 bits per pixel to 8 bits per pixel by removing the alpha channel, which yields a further approx. 50% reduction of image size.
  • Fig. 3 shows three examples for encoding methods that apply image compression to a different extent.
  • the examples utilize the same image 10 as input data, the image being a colour (32-bit RGB) image having a size of 9656 bytes.
  • Example 1 the image 10 is compressed in an image compression step S100’ implemented applying JPEG compression, thereby producing the compressed image 12.
  • the compressed image 12 is also a colour image that has a size of 1983 bytes, i.e., the method has compressed the initial image by 79.5%, the size of the compressed image 12 being 20.5% of the size of the image 10.
  • sequential encoded data 16 (not shown in the figure) are generated from the compressed image 12.
  • the sequential encoded data 16 is Base64 encoded (alphanumeric) data containing the small and capital letters of the English alphabet and the digits 0-9.
  • the size of the sequential encoded data 16 in Base64 format is 2740 bytes.
  • the QR code shown in the figure is generated, as two-dimensional code 20, from the sequential encoded data 16, which is a version 39 QR code containing 173 x 173 QR dots.
  • the two-dimensional code 20 is magnified to 6 times its original size.
  • the size of the two- dimensional code 20 allows that the two-dimensional code 20 can be displayed on a personal identification document or on any ticket.
  • the two-dimensional code 20 according to this example is a QR code that can also be displayed on an electronic device, can be read utilizing any type of QR code reader, and returns the sequential encoded data 16.
  • a compressed image 12 having a size of 1983 bytes is generated from the image 10 applying the method according to Example 1 , i.e. , in an image compression step S100’.
  • the compressed image 12 is further compressed into a reduced-intensity image 13 that has a size of 1263 bytes.
  • the reduced-intensity image 13 is also a colour image that has 60% darker colours than the compressed image 12.
  • the size of the sequential encoded data 16 is 1780 bytes.
  • the two- dimensional code 20’ generated from the sequential encoded data 16 is a version 31 QR code that contains 141 x 141 QR dots.
  • the generated two-dimensional code 20’ can be read utilizing any QR code reader device, for example a mobile phone; however, by reading the code with a device that does not include the decoding method according to the invention only the sequential encoded data 16 applied for generating the two-dimensional code 20’ can be restored.
  • the small size of the two-dimensional code 20 generated according to Example 2 allows that the two-dimensional code 20 can be displayed on a personal identification document or on any type of ticket.
  • Example 3 For generating the two-dimensional code 20”, in Example 3 the steps also carried out in Example 2 are performed, i.e., JPEG compression in an image compression step S100 and the intensity reduction step S110, with the colours of the compressed image 12 being also darkened by 60% in the course of the latter.
  • the header of the colour compressed image 13 is removed in a header removal step S120 (not shown).
  • the size of the headerless image 14 (not shown) is 643 bytes, from which a sequential encoded data 16 with a size of 953 bytes (not shown) can be generated in Base64 (alphanumeric) format.
  • the two-dimensional code 20” generated from this sequential encoded data 16 is a version 23 QR code containing 109 x 109 QR dots.
  • two-dimensional codes 20, 20’, 20” smaller than 2 x 2 cm can be comfortably printed on or laser-engraved into different types of tickets, for example theatre, movie theatre, or concert tickets as well as bus, train, or air tickets and personal identification documents.
  • personal identification documents for example identity cards, passports, driving licenses, etc.
  • small-sized two-dimensional codes 20, 20’, 20 as possible, for example with a size of at most 2 cm x 2 cm, preferably at most 1 .5 cm x 1.5 cm, more preferably at most 1 cm x 1 cm, such that there is sufficient space on the document for showing the obligatory data included thereon even in case the two- dimensional code 20, 20’, 20” is displayed thereon.
  • the physical size of the two-dimensional codes 20, 20’, 20” can also be reduced by reducing the size of the image 10, and it is thus possible to produce two-dimensional codes 20, 20’, 20” smaller than 1 cm x 1 cm, for example with a maximum size of 0.5 cm x 0.5 cm.
  • These very small-sized two-dimensional codes 20, 20’, 20” can be disposed on personal identification documents even more easily (preferably applying laser engraving), which further widens the range of application of the method according to the invention.
  • the invention also relates to a decoding method that can be applied for retrieving and restoring the information stored in the two-dimensional code 20.
  • a computer device is utilized for carrying out the steps described in detail in relation to Figs. 4-5 on the two- dimensional code 20 generated by the encoding method according to the invention, preferably the reverse/inverse operations of the steps carried out in the course of the encoding process, preferably in a reverse order.
  • Fig. 4 shows the steps of a preferred embodiment of the decoding method according to the invention.
  • the decoding method is applied for restoring the information stored in the two-dimensional code 20, in the course of which, in an input step S200, the two- dimensional code 20 is read applying a code reader device.
  • the code reader device is a device adapted for reading the two-dimensional code 20, preferably a code reader device corresponding to the type of the two-dimensional code 20, by way of example a barcode reader, QR code reader or mobile phone.
  • the code reader device reads out the contents stored in the two-dimensional code 20 (read-out data 21). If the two-dimensional code 20 was generated from the transformed data generated from the sequential encrypted data 18, then the read-out data 21 is identical to the transformed data. If the two-dimensional code 20 also stored - at least partially - non-encrypted additional information, i.e. , the two-dimensional code 20 had been generated from aggregated data or from second aggregated data, then the read-out data 21 is identical to the aggregated data or the second aggregated data, respectively.
  • the read-out data 21 is converted into byte format, followed by decrypting it, in a decryption step S205, into decrypted data 29.
  • the conversion into byte format is preferably performed applying a decoding process corresponding to the Basel 0, Base32, Base36, Base64, or Basel 28 encoding applied for generating the two-dimensional code 20.
  • the decryption step S205 the inverse operation of the cryptography step S 150 is carried out, in the course of which the key applied for the encryption is generated; for example, in the case of a key consisting of a public and a private part, by concatenating the public and private key portions.
  • the private key portion can preferably be entered into the computer device adapted for carrying out the decoding, for example utilizing a keyboard, a mobile phone touchscreen or a special document scanner peripheral device, by the owner of the two-dimensional code 20.
  • the decoding computer device is preferably identical to the code reader device applied for reading the two- dimensional code 20.
  • the format of the key applied in the decryption step S205 must preferably be identical to the format of the key applied in the cryptography step S150.
  • the key applied in the cryptography step S150 is a 256-bit key
  • the key applied in the decryption step S205 must also be a 256-bit key.
  • the keys applied in the cryptography step S150 and in the decryption step S205 have different size, then the decryption step S205 cannot be carried out correctly, i.e. , the contents of the two-dimensional code 20 cannot be read out.
  • decoded data 22 are generated in a decoding step S210.
  • the inverse operation (decoding) of the transcoding step S130 (encoding) is performed.
  • the decrypted data 29 can be transformed into decoded data 22 applying the corresponding Basel 0, Base32, Base36, Base64 or Basel 28 decoding process.
  • the two-dimensional code 20 was generated applying the method according to Fig. 1 , then the decoded data 22 is a decoded image that is identical to the compressed image 12.
  • the decoded data 22 is preferably identical to the combination of the compressed image 12 and the additional information. If a different decoding type than the type of encoding is applied in the two above cases, then the decoded data 22 will not be identical to the compressed image 12, or to the combination of the compressed image 12 and the additional information.
  • a decompression step S240 the decoded data 22 or the portion thereof containing image information is decompressed into a restored image 25, the restored image 25 being restored to an extent necessary for visual inspection, i.e. the restored image 25 and the image 10 can be visually compared; for example, based on a restored image 25 obtained by the decryption of a two-dimensional code 20 generated from an image 10 showing a person, the person shown in the image (photograph) can be identified, i.e. his/her identity can be verified.
  • the inverse operations of the operations carried out in a step corresponding to the image compression step S100 are carried out, while in the case of applying multiple subsequent compressions the inverse operations of the compression steps are performed in a reverse order.
  • the decompression step S240 includes an intensity restoring step S230 that is described in detail below in relation to Fig. 5.
  • Fig. 5 illustrates the steps of another preferred embodiment of the decoding method according to the invention.
  • the two- dimensional code 20 is read in an input step S200, thereby producing the read-out data 21 ; then, the read-out data 21 is converted into byte format as it was described in relation to Fig. 4, which is followed by decrypting it into decrypted data 29 in a decryption step S205, and decoding the decrypted data 29 in a decoding step S210 (thus generating decoded data 22).
  • the features of the input step S200, of the conversion into byte format, the decryption step S205, and the decoding step S210 are the same as the features set forth above in relation to Fig. 4.
  • the two-dimensional code 20 also stored additional information (for example fully encrypted, partially encrypted, or non-encrypted additional information), then the additional information is separated from the image information, in accordance with its storage mode, in the corresponding steps of the decoding method.
  • additional information for example fully encrypted, partially encrypted, or non-encrypted additional information
  • the data portion containing the image information is preferably separated from the portion containing the additional information. If during the encoding process the additional information was inserted into a space of predetermined size located before or after the image information, then this portion of predetermined size is preferably separated, and is handled separately from the portion of the decoded data 22 that contains the image information, producing from it restored additional information 26 (not shown) that is preferably identical to the additional information stored in the two-dimensional code 20.
  • the header that was removed during the encoding process is added, in step S220, to the portion of the decoded data 22 that contains image information.
  • the header is stored separately, such that during decoding it can be added to the corresponding image. If the encoding process is carried out on images 10 that are of the same format and have identical parameters, then the information stored in the headers of these images 10 will also be identical, so in the header addition step S220 the same header has to be added to the portion of the decoded data 22 that contains image information.
  • the image with added header 23 that was generated in the header addition step S220 is transformed into a restored-intensity image 24 in an intensity restoring step S230, with the intensity values of the pixels being restored in the course of the intensity restoring step S230.
  • the intensity-reducing function applied in the intensity reduction step S110 is not bijective, it does not have an exactly defined inverse function.
  • an intensity enhancing function is applied that is adapted to give the inverse of the mapping for one-to-one mapped elements, and in such a case where different initial intensity values correspond to the same mapped intensity value, one of the corresponding initial intensity values, by way of example the smallest or the greatest intensity value, or the average thereof, is assigned to this particular mapped intensity value.
  • the compressed image 12 was darkened by a given amount in the intensity reduction step S110, then the image with added header 23 is brightened by the same amount in the intensity restoring step S230, thereby approximately restoring the original intensity values of the pixels.
  • different intensity-reducing functions for example, different amounts of darkening
  • a different intensity-enhancing function for example, different amounts of brightening
  • the restored-intensity image 24 is decompressed, in a decompression step S240’, applying the inverse operations of the compression process or in the case of applying multiple subsequent compressions in the course of the compression process, by performing the respective inverse operations of the compression processes in a reverse order.
  • the restored image 25 produced by decompression is preferably essentially identical to the original image 10, or to a variant thereof falling into a predetermined tolerance range.
  • the code reader device adapted for reading the two-dimensional code 20 is a mobile phone, and the mobile phone comprises a computer program product adapted for performing the steps of the decoding method according to the invention, then a restored image 25 that is essentially identical to the image 10 and restored additional information 26 that essentially corresponds to the additional information stored in the two-dimensional code 20 can also be displayed on the screen of the mobile phone.
  • the method according to the invention has the advantage that database access is not required during the decoding of the two-dimensional code 20 as all the necessary information is encoded in the two-dimensional code 20, which allows for applying the method in an off-line manner, preferably at such locations where a network connection is not available.
  • Fig. 6 shows the result of reading the two-dimensional codes 20, 20’, 20” of the examples according to Fig. 3 utilizing a mobile phone adapted for implementing the decoding method according to the invention.
  • the restored image 25 and the restored additional information 26 - the latter preferably being the same as the additional information stored in the two- dimensional code 20, 20’, 20” - appear on the screen of the mobile phone.
  • the restored additional information 26 comprises the name and the date of birth of the person shown in the restored image 25, as well as the number and validity date of the person’s personal identification document.
  • Fig. 7 illustrates the application of the encoding and decoding method according to the invention in the case of a grayscale image 10.
  • the encoding method is applied for generating the two-dimensional code 20 which is a QR code.
  • the restored image 25 and also the restored additional information 26 - which latter includes, as with Fig. 6, a name, a date of birth, and the number and validity date of the personal identification document - appear on the screen of the mobile phone.
  • Fig. 8 further examples are shown for the applications of the encoding method according to the invention, wherein different types of two-dimensional code 20, by way of example a QR code 20a, a DataMatrix code 20b, and a PDF-417 code 20c, are generated from the same image 10.
  • the image 10 is identical to the image 10 of the examples of Fig. 3, i.e., the image 10 is a colour image with a size of 9656 bytes. ln Fig. 8 there can easily be discerned the difference between the physical size of the particular two-dimensional codes 20; the QR code 20a can be implemented in the smallest physical size, while the DataMatrix code 20b and PDF-417 code 20c of the same data content have larger physical size (shown at the same resolution).
  • a QR code 20a a DataMatrix code 20b and a PDF-417 code 20c are shown, but with a different input image 10.
  • the QR code 20a has the smallest physical size, so in such applications where there is only a limited space for displaying the two-dimensional code 20, preferably QR codes 20a are applicable as the two-dimensional code 20.
  • the method for producing a personal identification document containing a two- dimensional code 20 according to the invention preferably applies the encoding method according to the invention for generating the two-dimensional code 20.
  • the two-dimensional code 20 stores - preferably in an encrypted manner - the facial image and other personal identification data of the holder of the personal identification document.
  • the two-dimensional code 20 is applied to the personal identification document by laser engraving, which allows that the two-dimensional code 20 can be produced readably at a much smaller size than applying conventional printing (for example, utilizing conventional laser or inkjet printers).
  • two-dimensional codes 20 produced by laser engraving are more difficult to reproduce or copy than the two-dimensional codes 20 produced by simple printing, because two-dimensional codes 20 produced by high-resolution laser engraving cannot be reproduced even by photocopying or scanning.
  • the two-dimensional code 20, or its contents (even in encrypted form) can also be loaded into other data storage media, for example into a chip disposed in the personal identification document.
  • the computer program according to the invention comprises instructions that, when the instructions are executed by a computer, the computer performs the steps of the encoding and/or decoding method according to the invention.
  • the computer program comprises instructions corresponding to the steps of the encoding method according to Fig. 1 or Fig. 2, and/or to the steps of the decoding method according to Fig. 4 or Fig. 5.
  • the computer-readable storage medium comprises instructions that, when the instructions are executed by a computer, the computer performs the steps of the encoding and/or decoding method according to the invention, for example the steps of the methods according to Figs. 1-2 or Figs. 4-5.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Toxicology (AREA)
  • Electromagnetism (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The invention is a method for producing a personal identification document comprising a two-dimensional code (20, 20', 20") storing image information, the method comprising the steps of processing an image (10) utilizing a computer device by generating, in an image compression step (S100), a compressed image (12) from the image (10), transforming, in a transcoding step (S130), the compressed image (12) into sequential encoded data (16), generating, in a cryptography step (S150), sequential encrypted data (18) from the sequential encoded data (16), and generating, in a code generation step (S140), the two-dimensional code (20, 20', 20") based on the sequential encrypted data (18). Further, the invention is method for generating a two-dimensional code (20, 20', 20") storing image information and a method for decoding data stored in a two-dimensional code (20, 20', 20"), as well as a computer program product and a computer-readable storage medium.

Description

METHOD FOR GENERATING A TWO-DIMENSIONAL CODE STORING IMAGE DATA, AND FOR DECODING THE STORED DATA, AND COMPUTER-READABLE PROGRAM PRODUCT AND STORAGE MEDIUM
TECHNICAL FIELD
The invention is primarily related to a method for producing a personal identification document comprising a two-dimensional code and for generating a two-dimensional code storing image information. The invention further relates to a method for decoding data stored in a two-dimensional code, to a computer program product, and to a computer-readable storage medium.
BACKGROUND ART
The prior art includes a number of technical solutions for compressing images, among others, colour images, the compression enabling the image information to be stored in a two-dimensional code, which code can be placed on a personal identification document.
US 7,742,649 B2 discloses an image compression method that makes use of the symmetry found in faces or heads for reducing image size. Thanks to the image compression, a two-dimensional barcode disposed on a personal identification document may include, in an encoded form, a photograph, signature, fingerprint of the owner of the document, and also further data. All the information is stored in the barcode, so the identification can be carried out directly by reading the barcode, without accessing a network or a central database. Because the colours and brightness of the images may affect the method, the images are normalized to a near-identical brightness before compression. The reduced-size image that was compressed making use of symmetries can be further compressed by applying JPEG2000, or other compression methods. In the course of restoring the compressed image, first the reduced-size image is restored by applying these other compression methods (if such were applied), followed by restoring the entire image from the reduced-size one. In addition to being stored in the barcode, the data indicated in the document can also be stored in other data storage devices that can, for example, form a part of the identification document. The disadvantages of this technical solution are that the compression has a high computational demand, and that in the case of strongly asymmetrical images it cannot be applied effectively. Moreover, human faces and heads usually exhibit natural asymmetry. If this asymmetry is removed, the identification of the image and the corresponding person may become more difficult.
US 2003/0152250 A1 discloses a personal identification instrument (document) that includes the colour, monochrome, or grayscale photograph of the document’s owner in an encoded form, for example in an encrypted form. The stored encoded photograph may be different from the photo appearing on the document (for example, it can be taken at a different angle). The information stored in an encoded form can be applied for identifying the owner of the document on its own, i.e. , without using a database or an authentication station. After being encoded, the photograph can be printed on the document, for example in the form of colour, monochrome, or grayscale dots or blocks.
US 9,189,722 B2 discloses a technical solution wherein data are stored in motion QR codes, which motion QR codes can be used for personal identification documents or electronic tickets. Compared to conventional two-dimensional codes, motion QR codes can store larger amounts of data. Basically, for identification or for verifying the validity of the code a network connection is required, i.e., off-line identification is only possible after downloading the identification database. The disadvantage of this solution is that the motion code can only be displayed on electronic media (screens), i.e., on conventional personal identification documents, tickets, or season tickets only a series of the individual codes constituting the motion code can be shown, which has a significant space demand.
US 7,158,669 B2 discloses an image compression method that can be applied also for colour images. The method involves grouping the pixels according to their colour values, which is followed by reducing the number of colours by merging together groups of nearby colours, and then by compressing the image. The compressed image contains information related to the original image (for example size and resolution), while it also contains the image data, compressed for each colour. Both JPEG and ZIP compression are applied for compressing the image. US 7,450,134 B2 also discloses an image compression method. In the course of the exemplary compression method shown in Fig. 4 of the document, a header is generated wherein it is indicated if the original image contained alpha values, and, if yes, then the alpha values are grouped together, separated from the colour values, and then the image is compressed by applying a lossless compression method, for example by using GZIP compression. The steps of the image decompression process are shown in Fig. 5 of the document, wherein first a lossless decompression step is performed. If the data also include alpha values, then the separately grouped colours and alpha values are assigned to each other again, in correspondence to the given pixels. Finally, the header generated during the compression process is removed from the beginning of the data sequence.
In 2009, a unique personal identifier (AADFIAAR) storing the personal data of citizens was introduced in India by the UIDAI (Unique Identification Authority of India). In the initial implementation, the AADFIAAR identifier was a unique 12-bit sequence that has since been replaced with a QR code. In addition to the personal data stored in the earlier implementation, the QR code also stores the photograph of the owner of the identifier. According to the Indian technical solution, the photograph is stored in the QR code in JP2000 format, i.e. , in a JPEG2000-com pressed format, embedded in a byte block. The disadvantage of this technical solution is that by applying the JPEG 2000 compression method the size of the byte block adapted for generating the QR code cannot be reduced to such an extent that the physical size of the generated QR code is small enough to fit on a conventional personal identification document (i.e., that the code can be disposed on the document). Due to the low compression ratio, the physical size of the QR code generated by the Indian solution is approximately 40-50 mm, and the code is printed on a standalone ID document.
DESCRIPTION OF THE INVENTION
In light of the known technical solutions there is a need for a more effective method adapted, for example, for producing a personal identification document in the course of which a two-dimensional code storing image information can be generated.
The object of the technical solution according to the invention is to provide a method for producing a personal identification document and for generating a two-dimensional code storing image information that eliminates the drawbacks of prior art solutions to the greatest possible extent. The primary object of the invention is to provide a method enabling efficient image compression, whereby a small-sized two-dimensional code (with a height and width in the order of at most a few centimetres) can be generated, which two-dimensional code can even be disposed on a personal identification document.
A further object of the invention is to provide a method for generating a standard two- dimensional code that is capable of storing an image suited for personal identification taking into account the size limits specified in the standard.
Another object of the invention is to provide a method realizing such a degree of image compression that - in addition to the image information - additional data, for example additional data related to the image, or even additional images can be stored in the two-dimensional code.
The objects of the invention also include providing a method wherein the image information stored in the two-dimensional code generated in the course of the method can be decrypted and decoded at least to an extent that enables visual assessment (for example personal identification) - for example by carrying out the inverse operations of the encoding method in a reverse order - by using exclusively the information stored in the two-dimensional code.
A still further object of the invention is to provide a method that enables secure, encrypted storage of information in the two-dimensional code.
The objects of the invention also include a decoding method, a computer program product adapted for carrying out the method, and a computer-readable storage medium.
The objects set before the invention have been achieved by providing the method for producing a personal identification document according to claim 1 , the method for generating a two-dimensional code adapted for storing image information according to claim 2, the decoding method according to claim 18, the computer program product according to claim 20, and the computer-readable storage medium according to claim 21 . Preferred embodiments of the invention are defined in the dependent claims. The advantage of the technical solution according to the invention is that by applying compression the size of the image (even a colour image) can be reduced by such an extent that the image information originating from the colour image can be stored in a two-dimensional code having limited storage capacity.
It has been recognised that by applying the method according to the invention and the preferred embodiments thereof the compression ratio can be significantly increased, and thus the two-dimensional code can be produced with a smaller physical size compared to the prior art solutions, which allows for disposing the two-dimensional code for example on conventional personal identification documents, e.g., on identity cards and passports. Among the preferred embodiments the solution comprising a header removal step is highlighted, applying which the size of the already compressed image can be further reduced, even by half. This is because, as it has been recognised, in the case of identical applications the different images to be stored in the two- dimensional code typically have identical headers, so, provided that the identical header is known, this known information need not be stored in the two-dimensional code.
A further advantage of the method according to the invention is that for decoding the image information and the optional additional data stored in the two-dimensional code, access to a database or network is not required, and thus the method according to the invention can be applied also at locations where network infrastructure is limited or non-existent.
Another advantage of the method according to the invention is that the data, including the image information (photograph), can be stored in the two-dimensional code in an encrypted manner, thereby improving the security of the application of the two- dimensional code.
BRIEF DESCRIPTION OF THE DRAWINGS
Preferred embodiments of the invention are described below by way of example with reference to the following drawings, where
Fig. 1 is the flowchart of a preferred embodiment of the method for encoding image information according to the invention, Fig. 2 is a flow diagram of another preferred embodiment of the encoding method according to the invention,
Fig. 3 shows three examples for encoding methods that apply image compression to a different extent,
Fig. 4 is a flow diagram of a preferred embodiment of the decoding method according to the invention,
Fig. 5 is a flow diagram of another preferred embodiment of the decoding method according to the invention,
Fig. 6 is an example for the output produced by the decoding method according to the invention, the decoding method being applied for decoding the two- dimensional codes according to Fig. 3,
Fig. 7 is an example for applying the encoding and decoding methods according to the invention for greyscale images,
Fig. 8 is an example related to different types of two-dimensional code generated from the image of Fig. 5 applying the encoding method according to the invention, and
Fig. 9 is a further example for different types of two-dimensional code generated by the encoding method according to the invention from a different image.
MODES FOR CARRYING OUT THE INVENTION
Fig. 1 is a flowchart of a preferred embodiment of the method for generating a two- dimensional code storing image information according to the invention. The method comprises the step of processing an image 10 utilizing a computer device, said image preferably being a colour, grayscale, or monochrome image. The image 10 is preferably loaded from a database, computer, scanner, or other storage medium, while an image provided by a camera, for example a live camera image can also be applied. The image 10 is preferably of a known format, preferably BMP, JPG, PNG, or TIFF format. An exemplary image 10 is a BMP-format image that consists of 190x246 pixels, has a resolution of 600 dpi and a colour depth of 32 bits (see the initial image 10 in Fig. 3).
The image 10 is compressed in an image compression step S100 that generates a compressed image 12. Preferably, JPEG compression is applied in the course of the image compression step S100, thereby producing from the image 10 a compressed image 12 having JPEG or JPG format. In general, the compression ratio of JPEG compression is approx. 80%, i.e. , the size of the compressed image 12 is approximately 20% of the image 10. Instead of JPEG compression, other compression methods, even known compression methods can also be applied in the course of the method, while the compressed image 12 can also be generated applying a combination of different compression methods, for example by sequentially performing multiple different compression methods. In order to further reduce the size of the compressed image 12, the image compression step S100 further comprises an intensity reduction step S110 (see Fig. 2), wherein the image 10 (which can be a colour or grayscale image 10) is transformed by modifying the intensity values corresponding to individual pixels thereof, such that the intensity values are mapped with an intensity- reducing function, and thereby the compressed size of the compressed image 12 is further reduced. Referring to Fig. 2, a preferred mode of carrying out the intensity reduction step S110 is described in more detail.
The compressed image 12 is transformed into sequential encoded data 16 in a transcoding step S130. In the transcoding step S130, the pixel values of the compressed image 12 are encoded, preferably by applying Basel 0, Base32, Base36, Base64, Basel 28 encoding, or other known encoding types. The sequential encoded data 16 contains the encoded values of individual pixels, preferably in the order of the pixels of the compressed image 12. In the case of a colour image 10 and/or compressed image 12 the pixel values are encoded by colour channel, for example applying red, green, and blue colour channels, with the sequential encoded data 16 containing the encoded values in the order of the pixels of the compressed image 12.
If Basel 0 encoding is applied in the transcoding step S130, the sequential encoded data 16 will only include the digits 0-9, i.e., it will have numeric format. With Base32 encoding, the sequential encoded data 16 may contain 32 different characters that preferably consist of the capital letters of the English alphabet (A-Z) and the digits from 2 to 7. With Base36 encoding, the sequential encoded data 16 may contain 36 different characters consisting of the capital letters of the English alphabet (A-Z) and the digits 0-9. In the case of Base32 and Base36 encoding the sequential encoded data 16 will have alphanumeric format. If Base64 encoding is applied, the sequential encoded data 16 can contain 64 different characters, of which 62 are the small and capital letters of the English alphabet (a-z and A-Z) and the digits 0-9, which are complemented by two special characters, for example the characters “+” and 7’. In the case of Base64 encoding the sequential encoded data 16 will have byte format.
In the course of the transcoding step S130, other such encoding solutions may also be applied that yield sequential encoded data 16 with numeric, alphanumeric, or byte format as a result. The sequential encoded data 16 may also contain the encoded values in a predetermined order that is different from the order of the pixels of the compressed image 12.
After the transcoding step S130, the sequential encoded data 16 is encrypted in a cryptography step S150, with the sequential encrypted data 18 generated by the encryption being encoded, like with the transcoding step S130, by applying Basel 0, Base32, Base36, Base64, Basel 28 or other known type of encoding, where the type of encoding can be identical to or different from the encoding applied for generating the sequential encoded data 16. In a code generation step S140, a two-dimensional code 20 is generated from the transformed data that was generated by encoding from the sequential encrypted data 18, the two-dimensional code 20 preferably being a two- dimensional barcode, by way of example QR code, DataMatrix code, or PDF-417 code.
The advantage of applying the cryptography step S150 is that it further improves the security of the data stored in the two-dimensional code 20, and thus the two- dimensional code 20 can also be safely utilized for applications requiring enhanced security, for example for payment transactions. When the two-dimensional code 20 is read out in the course of the method according to the invention, the information stored in the two-dimensional code 20 cannot be obtained by executing the opposite-direction operation of Basel 0, Base32, Base36, Base64, Basel 28 or other known type of encoding on the read-out data, because for obtaining the information it is also necessary to decrypt the encrypted data, and to execute the inverse of the image compression step S100. The steps of the method for reading out the two-dimensional code 20 data and for decrypting the information stored in the two-dimensional code 20 are described in more detail in relation to Figs. 6-7.
In the course of the cryptography step S150 preferably AES (Advanced Encryption Standard) encryption is applied; AES is an algorithm for encrypting secret information that is also accepted by the US National Security Agency (NSA). The AES block size applied in the course of the method according to the invention is preferably 128 bits, with a preferred key size of 256 bits, but other block and key sizes known from the prior art may also be applied, for example 64, 128, 196, or 256-bit keys can also be utilized. For a particular field of application, preferably the same parameters are applied for the AES algorithm. The key can preferably be a public key, a private key, or a combination thereof. By way of example, for applications requiring particularly high security it is expedient to utilize a combination of public and private keys. The public key portion is preferably specified by the issuer of the two-dimensional code 20, and this key portion is preferably also known to the device adapted to read out the two-dimensional code 20. If, for example, the two-dimensional code 20 is applied to a personal identification document, then the public key portion is preferably specified by the authority that issues the personal identification document, while the private key portion is specified by the owner of the personal identification document. The private key portion is preferably a code, for example a personal identification code or PIN code that in the case of the given two-dimensional code 20 is known, for example, solely by the owner of the personal identification document. When the two-dimensional code 20 is read out, the owner of the personal identification document must enter this code (utilized during the encryption process) for restoring the data stored in the two-dimensional code 20. To provide the security of the data stored in the two-dimensional code 20, it is preferably necessary to apply a sufficiently complex key.
In a preferred embodiment of the method, the generated key is encoded applying the key size specified as a parameter of the AES, i.e. , for example by 256-bit encoding, which is followed by setting the block size for the encryption (e.g., a block size of 128 bits), and generating the sequential encrypted data 18. The sequential encrypted data 18 is encoded (transformed) in a manner similar to the transcoding step S130, for example applying Basel 0, Base32, Base36, Base64, Basel 28 or other known type of encoding, and then the two-dimensional code 20 is generated, in a code generation step S140, from the transformed data thus obtained.
The cryptography step S150 may comprise the application of other known encryption methods or combinations thereof, provided that the encryption method does not overly increase (for example, does not double) the size of information to be stored in the two- dimensional code 20.
The capacity of the two-dimensional code 20, that is, the amount of information that can be stored in the two-dimensional code 20 is basically determined, as described below, by the format of the transformed data generated from the sequential encrypted data 18. If the two-dimensional code 20 is a QR code, then as much as 7089 bytes of numeric-format data (containing the digits 0-9) can be loaded into the two-dimensional code 20 (the QR code), so the maximum size of numeric-format data can be 7089 bytes. With alphanumeric-format data (containing the digits 0-9 and the capital letters of the English alphabet) a maximum of 4296 bytes (characters), while in the case of data also containing small letters and/or special characters, maximum 2953 bytes (characters) can be loaded into the QR code. Accordingly, if the two-dimensional code 20 is a QR code, then the maximum size of the alphanumeric-format transformed data generated from the sequential encrypted data 18 can be 4296 bytes, while in case the transformed data generated from the sequential encrypted data 18 also contains small letters or other special characters, the transformed data can have a maximum size of 2953 bytes.
The two-dimensional code 20 can preferably be displayed on an electronic device, for example a mobile phone, tablet, or computer, and can also be printed on paper or engraved into a plastic surface by laser engraving. The two-dimensional code 20 can be preferably printed on tickets and season tickets, for example on bus-, rail-, or air tickets, or theatre, movie theatre, or concert tickets or combined tickets, and it can also be applied - for example by engraving or printing - to personal identification documents, for example an identity card, passport, or driving license. Personal identification documents are often made from plastic, which allows that the two- dimensional code 20 can be applied to the personal identification document by laser engraving. The advantage of laser engraving is that it can produce much smaller-sized two-dimensional codes 20 than for example conventional laser or inkjet printers. In addition to their smaller size, a further advantage of two-dimensional codes 20 produced by laser engraving is that laser-engraved two-dimensional codes 20 are more difficult to reproduce or copy than the two-dimensional codes 20 produced by simple printing, because two-dimensional codes 20 produced by high-resolution laser engraving cannot be reproduced even by photocopying or scanning. In the case of personal identification documents, the two-dimensional code 20 and/or the transformed data that is generated from sequential encrypted data 18 and is applied for generating the two-dimensional code 20 can also be loaded into other data storage media, for example into a chip disposed in the personal identification document, and the two-dimensional code 20 can also be placed or displayed in an electronic personal identification document.
If the amount of data loaded into the two-dimensional code 20 is smaller than the maximum that can be loaded therein, the size of the two-dimensional code 20 can be reduced. Smaller-sized two-dimensional codes 20 can be implemented and displayed at a smaller physical size, which widens the field of application of the method, i.e. , the method according to the invention can be applied also in such situations wherein the space available for displaying the two-dimensional code 20 is limited.
Fig. 2 illustrates the steps of another preferred embodiment of the method, preferably in the case of a colour or grayscale image 10. The properties of the image 10 are identical to the properties of the image 10 described in relation to Fig. 1.
In the preferred embodiment according to Fig. 2, the image compression step S100 is carried out in multiple stages, sequentially applying multiple compression steps. By way of example, in the preferred embodiment according to Fig. 2 a compressed image 12 is generated in an image compression step S100’, which image compression step S100’ is preferably JPEG compression; however, any other known image compression methods can also be applied.
Colour images 10 typically have a size of 3-4 bytes per pixel, which is made up of values of the three primary colours (in the case of an RGB image: red, green, and blue) and the alpha (opacity) value. In the case of RGB and RGBA images, each of these values amounts to 1 byte of information. The size of a grayscale image 10 is 1-2 bytes per pixel, depending on if the image contains an alpha channel (alpha values). Therefore, the size of a colour image 10 is at least one-and-a-half times the size of a grayscale image 10, so with colour images 10 it is particularly preferable to apply further compression that preferably compresses the colour information (intensity values) of the colour image 10; however, this additional compression adapted to reduce the intensity values can also be applied for grayscale images 10.
In the preferred embodiment according to claim 2, preferably in an intensity reduction step S110, a reduced-intensity image 13 is generated from the compressed image 12 by transforming/modifying, preferably reducing the intensity values of the pixels of the image. In the intensity reduction step S110 the intensity values are mapped applying an intensity-reducing function, where in the course of the mapping the intensity values do not increase. The intensity-reducing function is applied for assigning a predetermined intensity value to the intensity value of each pixel; preferably the assigned (mapped) intensity values are smaller or equal to the original intensity values. In the course of the mapping a single mapped intensity value is assigned to each intensity value; however, the same mapped intensity value can be assigned to more than one intensity values. The intensity-reducing function is preferably a discrete or continuous function, more preferably a monotonic decreasing discrete or continuous function.
The reduction of the pixel intensity values involves darkening the image. This is because darker colours have lower corresponding intensity values; for example, the RGB code of the colour white is (255; 255; 255), while the RGB code of the colour black is (0; 0; 0). Likewise, the RGB code of a pure red colour is (255; 0; 0), with the RGB codes (204; 0; 0), (153; 0; 0), (102; 0; 0), and (51 ; 0; 0) corresponding to progressively darker colours. For encoding smaller number values, it is sufficient to apply a smaller character set, so the two-dimensional code 20 can store more data.
The intensity reduction step S110 can be applied for reducing the pixel intensity values also in the case of grayscale images 10.
In a preferred embodiment of the method according to the invention, in the intensity reduction step S110 certain given pixels of the image 10 and the compressed image 12 are mapped utilizing the same intensity-reducing function.
In a further preferred embodiment of the invention, a particular set of the pixels is mapped utilizing the same intensity-reducing function. Preferably, different amounts of darkening are applied to the relevant and the less relevant regions of the image 10. By way of example, in such applications wherein the image 10 is a facial image of a person, the central portion of the image 10 (that is expected to show the person’s face) and the portion of the image 10 that is expected to only include the background are mapped applying different intensity-reducing functions, i.e. , certain predetermined regions of the image 10 can be darkened to a different extent.
In a preferred embodiment, in the case of an RGB- or RGBA-encoded colour image 10 the colour compression step S110 is carried out utilizing mutually independent intensity-reducing functions for the different colour channels, the intensity values corresponding to the different colour channels being preferably mapped (darkened) applying different intensity-reducing functions.
In a further preferred embodiment of the invention the pixels of the image 10 are mapped by independent intensity-reducing functions, i.e., the individual pixels are transformed applying different intensity-reducing functions, with the intensity-reducing functions corresponding to the particular pixels being chosen taking into account the probability of the given pixel being a background pixel.
In a preferred embodiment of the invention the intensity-reducing function is a linear function that is adapted to reduce the initial intensity values in a proportionate manner, by way of example the mapped intensity value is between 10 and 90%, preferably between 50 and 90%, more preferably between 60 and 80% of the corresponding initial intensity value.
Another preferred embodiment is constituted by combinations of the above described preferred embodiments of the intensity reduction step S110, by way of example a combination wherein, in the case of a colour image 10 the intensity values of the individual pixels are mapped (darkened) applying different, independent intensity- reducing functions for different colour channels in the intensity reduction step S110, the intensity-reducing functions corresponding to the different colour channels are linear functions that are adapted to reduce the particular intensity values for example by 10-90%, preferably by 50-90%, more preferably by 60-80%.
In the intensity reduction step S110 a compression ratio of approximately 50% can be preferably attained, so, by applying the intensity reduction step S110 after the image compression step S100 the size of the reduced-intensity image 13 will be approximately 10% of the original image 10 (the size compressed image 12 is approx. 20% of the original one), which amounts to a combined compression ratio of approx. 90%.
It has to be noted that in the case of a grayscale image 10 the intensity reduction step S110 can be applied in a manner analogous to the process described above, except that the image 10 contains only one colour channel instead of three.
We have recognised that virtually all known image formats comprise a header that for example stores the size of the image 10, or other information characteristic of the given image format. The information content of the headers of images 10 that have identical parameters, for example identical pixel count, resolution, etc. is preferably identical. By removing the header containing this identical information, the amount of information to be stored in the two-dimensional code 20 can be reduced, which further increases the compression ratio. The header of the reduced-intensity image 13 is removed in a header removal step S120, thereby generating a headerless image 14. The removed header can be reapplied at a later stage of the decoding process (see below). Removing the header yields a size reduction of approx. 50%, so the size of the headerless image 14 is approx. 5% of the size of the original image 10, which amounts to a compression ratio of approx. 95%.
In the preferred embodiment according to Fig. 2, therefore, the image compression step S100 is made up of the image compression step S100’, the intensity reduction step S110, and the header removal step S120. In further preferred embodiments, the image compression step S100 may comprise another process or other processes (even known processes), and the order of the applied processes and steps can be changed. However, in the particular fields of application of the method according to the invention the steps constituting the image compression step S100, also the order of these steps is predetermined, based on which the generated two-dimensional code 20 can be decoded.
In a preferred method illustrated in Fig. 2, the headerless image 14 is transformed into sequential encoded data 16 in a transcoding step S130. The features of the transcoding step S130 and the sequential encoded data 16 are preferably identical to the features described in relation to Fig. 1. The sequential encoded data 16 is thereafter encrypted in a cryptography step S150, followed by transforming the generated sequential encrypted data 18 in a similar manner to the transformation carried out in the transcoding step S130, thereby generating transformed data. The features of the cryptography step S150 are identical to the features described in relation to Fig. 1 .
In a code generation step S140, a two-dimensional code 20 is generated from the transformed data that was generated from the sequential encrypted data 18, said code preferably being - in line with the above description related to Fig. 1 - a two- dimensional barcode, by way of example QR code, DataMatrix code, or PDF-417 code. In comparison with the preferred embodiment according to Fig. 1 , the preferred embodiment of Fig. 2 is capable of providing higher compression ratios, i.e. , it generates smaller-sized sequential encoded data 16 from the same image 10, and thus the size of the sequential encrypted data 18 and the transformed data generated from it will also be smaller (provided that other parameters of the method, e.g., the parameters of the cryptography step S150 are the same). If the two-dimensional code 20 is a QR code, and the QR code is generated from reduced-size data, then the size of the QR code will also be reduced, i.e., a QR code with fewer QR dots can be generated. Displaying the smaller QR code (containing fewer QR dots) requires smaller physical space (at the same resolution), which is particularly preferable for such applications of the method wherein the space available for displaying the two- dimensional code 20 is limited, for example in the case of personal identification documents.
In addition to the methods described in relation to Figs. 1 and 2 the method according to the invention has further preferred embodiments, for example the embodiments described in the following.
In certain applications of the method according to the invention, for example for generating two-dimensional codes 20 displayed on a given type of personal identification document, images 10 of a predetermined size, resolution, and format are preferably applied. Flowever, in the case of other applications, the image information to be stored in the two-dimensional code 20 can relate to images 10 with different size, and/or resolution, and/or format. In a preferred embodiment of the method according to the invention, the image 10 is optionally generated by appropriately adjusting the parameters of an image having an arbitrary image format, resolution, and size. For example, image size can be modified by shrinking, magnifying, discarding certain parts, or cropping. The image 10 thus generated can preferably be of a known file format, or of a unique dedicated file format created for the particular application. Without information on the file format, it is impossible or very difficult to decode the image information stored in the two-dimensional code 20 generated from the dedicated file-format image 10, which further improves the operational security of the method according to the invention.
If more than one compression methods are applied, they can be performed one after the other in any order, but are preferably executed in such an order that provides the highest compression ratio for the image 10. In the preferred embodiment according to Fig. 2, the image compression step S100’ implemented applying JPEG compression, and the intensity reduction step S110 can also be performed in a reverse order.
A further preferred embodiment of the method is constituted by also performing an image correction process (or image correction processes), for example contrast enhancement, on the image 10, and carrying out the steps of the method according to the invention applying this corrected image.
In another preferred embodiment, the two-dimensional code 20 also stores additional information in addition to the image information. If the method according to the invention is applied for generating a two-dimensional code 20 disposed on a personal identification document, the additional information can comprise, by way of example, at least one of the following: the name, personal data (e.g. place and date of birth, etc.), signature, biometric identifiers (e.g. fingerprint or fingerprints) of the holder of the personal identification document, or another photograph - for example, one different to the one included on the personal identification document - of the holder. Disposing the two-dimensional code 20 on the personal identification document provides an additional security feature that makes it more difficult to copy or counterfeit the personal identification document.
In case the method according to the invention is applied for generating a two- dimensional code 20 disposed on products or product packagings, the two- dimensional code 20 is primarily adapted to contain an image showing the product, while the additional information can be for example the name, manufacturer, manufacturing date, identifier or any other parameter of the product that is deemed necessary by the manufacturer, or any combination thereof.
In the course of the method, it is expedient to convert the additional information to the format of the sequential encoded data 16. For example, if the sequential encoded data 16 is alphanumeric data generated by Base32 or Base36 encoding, then it is expedient to also convert the additional information into the corresponding Base32 or Base36 alphanumeric format. In the case of different formats, the format having a broader character set will be applied, also determining the amount of data that can be stored in the two-dimensional code 20. As it was set forth in the foregoing, a given two- dimensional code 20 can store a smaller amount of data having a format with a broader character set compared to data of a format with a narrower character set.
By concatenating the encoding additional information and the sequential encoded data 16, aggregated data can be generated, and in this preferred embodiment the two- dimensional code 20 can preferably be generated after encrypting the aggregated data, i.e. , after performing the cryptography step S150. The encoded additional information is stored in the aggregated data before or after the sequential encoded data 16. Preferably, an empty space of predetermined size is pre-allocated in the aggregated data for storing the encoded additional data, with the encoded additional data being preferably inserted into this predetermined space. If the size of the encoded additional data is smaller than the available space of predetermined size, then the remaining space or spaces is/are filled up with predetermined, preferably zero, data values or another separator (delimiter values).
In another preferred embodiment of the method according to the invention, wherein the improved-security storage of the additional information is not necessary, the additional information is preferably brought to the same format as the transformed data generated from the sequential encrypted data 18, producing the aggregated data in such a manner. In such case, the two-dimensional code 20 is generated from the aggregated data.
A further preferred embodiment is the combination of the implementations for storing the additional information applied in the two preferred embodiments described above, in which case only a portion of the additional information needs to be stored in encrypted form. In this case, it is expedient to convert the portion of the additional information that is to be encrypted to the same format as the sequential encoded data 16, and then concatenate it therewith, generating a first aggregated data. The first aggregated data can be encrypted in a cryptography step S150, thereby generating sequential encrypted data 18 from the first aggregated data. The other portion of the additional information is preferably converted to the format of the transformed data generated from the sequential encrypted data 18 (producing encoded additional information), followed by concatenating the transformed data with the encoded additional information for generating second aggregated data. The two-dimensional code 20 is generated from the second aggregated data.
In the case of applying the method according to the invention for an image 10 containing an alpha channel, a further preferred embodiment is obtained if the alpha channel is removed before or after the image compression step S100. This step is adapted for generating from a 32-bit image 10 (containing 32 bits of data per pixel) - that in addition to the colours red, green, and blue also stores 8 bits of alpha (opacity) data for each pixel - a 24-bit colour image (containing 24 bits per pixel), i.e., it reduces the size of the image 10 by approximately 25%. Grayscale images 10 may also contain an alpha channel; in such a case the size of the image 10 is reduced from 16 bits per pixel to 8 bits per pixel by removing the alpha channel, which yields a further approx. 50% reduction of image size.
Fig. 3 shows three examples for encoding methods that apply image compression to a different extent. The examples utilize the same image 10 as input data, the image being a colour (32-bit RGB) image having a size of 9656 bytes.
Example 1
In Example 1 , the image 10 is compressed in an image compression step S100’ implemented applying JPEG compression, thereby producing the compressed image 12. The compressed image 12 is also a colour image that has a size of 1983 bytes, i.e., the method has compressed the initial image by 79.5%, the size of the compressed image 12 being 20.5% of the size of the image 10. In the subsequent step of the method, sequential encoded data 16 (not shown in the figure) are generated from the compressed image 12. In this example, the sequential encoded data 16 is Base64 encoded (alphanumeric) data containing the small and capital letters of the English alphabet and the digits 0-9. The size of the sequential encoded data 16 in Base64 format is 2740 bytes. In the code generation step S140, the QR code shown in the figure is generated, as two-dimensional code 20, from the sequential encoded data 16, which is a version 39 QR code containing 173 x 173 QR dots. For easier visibility, the two-dimensional code 20 is magnified to 6 times its original size. The size of the two- dimensional code 20 allows that the two-dimensional code 20 can be displayed on a personal identification document or on any ticket. Of course, the two-dimensional code 20 according to this example is a QR code that can also be displayed on an electronic device, can be read utilizing any type of QR code reader, and returns the sequential encoded data 16.
Example 2
In this example, a compressed image 12 having a size of 1983 bytes is generated from the image 10 applying the method according to Example 1 , i.e. , in an image compression step S100’. In an intensity reduction step S110, the compressed image 12 is further compressed into a reduced-intensity image 13 that has a size of 1263 bytes. The reduced-intensity image 13 is also a colour image that has 60% darker colours than the compressed image 12.
Applying Base64 encoding for encoding the colour compressed image 13, the size of the sequential encoded data 16 (alphanumeric format data) is 1780 bytes. The two- dimensional code 20’ generated from the sequential encoded data 16 is a version 31 QR code that contains 141 x 141 QR dots. The generated two-dimensional code 20’ can be read utilizing any QR code reader device, for example a mobile phone; however, by reading the code with a device that does not include the decoding method according to the invention only the sequential encoded data 16 applied for generating the two-dimensional code 20’ can be restored. The small size of the two-dimensional code 20 generated according to Example 2 allows that the two-dimensional code 20 can be displayed on a personal identification document or on any type of ticket.
Example 3
For generating the two-dimensional code 20”, in Example 3 the steps also carried out in Example 2 are performed, i.e., JPEG compression in an image compression step S100 and the intensity reduction step S110, with the colours of the compressed image 12 being also darkened by 60% in the course of the latter. The header of the colour compressed image 13 is removed in a header removal step S120 (not shown). The size of the headerless image 14 (not shown) is 643 bytes, from which a sequential encoded data 16 with a size of 953 bytes (not shown) can be generated in Base64 (alphanumeric) format. The two-dimensional code 20” generated from this sequential encoded data 16 is a version 23 QR code containing 109 x 109 QR dots.
As it is apparent from the examples included above, it is possible to attain different image compression ratios with the same initial image 10. At higher compression ratios the size of the two-dimensional code 20, 20’, 20” decreases, which enables a wider- range application of the two-dimensional code 20, 20’, 20”. For example, two- dimensional codes 20, 20’, 20” smaller than 2 x 2 cm can be comfortably printed on or laser-engraved into different types of tickets, for example theatre, movie theatre, or concert tickets as well as bus, train, or air tickets and personal identification documents. In the case of personal identification documents, for example identity cards, passports, driving licenses, etc. - especially due to the fixed size of the documents - it is expedient to apply as small-sized two-dimensional codes 20, 20’, 20” as possible, for example with a size of at most 2 cm x 2 cm, preferably at most 1 .5 cm x 1.5 cm, more preferably at most 1 cm x 1 cm, such that there is sufficient space on the document for showing the obligatory data included thereon even in case the two- dimensional code 20, 20’, 20” is displayed thereon. Furthermore, the physical size of the two-dimensional codes 20, 20’, 20” can also be reduced by reducing the size of the image 10, and it is thus possible to produce two-dimensional codes 20, 20’, 20” smaller than 1 cm x 1 cm, for example with a maximum size of 0.5 cm x 0.5 cm. These very small-sized two-dimensional codes 20, 20’, 20” can be disposed on personal identification documents even more easily (preferably applying laser engraving), which further widens the range of application of the method according to the invention.
In addition to the image encoding method the invention also relates to a decoding method that can be applied for retrieving and restoring the information stored in the two-dimensional code 20. In the course of the decoding method, a computer device is utilized for carrying out the steps described in detail in relation to Figs. 4-5 on the two- dimensional code 20 generated by the encoding method according to the invention, preferably the reverse/inverse operations of the steps carried out in the course of the encoding process, preferably in a reverse order.
Fig. 4 shows the steps of a preferred embodiment of the decoding method according to the invention. The decoding method is applied for restoring the information stored in the two-dimensional code 20, in the course of which, in an input step S200, the two- dimensional code 20 is read applying a code reader device. The code reader device is a device adapted for reading the two-dimensional code 20, preferably a code reader device corresponding to the type of the two-dimensional code 20, by way of example a barcode reader, QR code reader or mobile phone.
In the input step S200, the code reader device reads out the contents stored in the two-dimensional code 20 (read-out data 21). If the two-dimensional code 20 was generated from the transformed data generated from the sequential encrypted data 18, then the read-out data 21 is identical to the transformed data. If the two-dimensional code 20 also stored - at least partially - non-encrypted additional information, i.e. , the two-dimensional code 20 had been generated from aggregated data or from second aggregated data, then the read-out data 21 is identical to the aggregated data or the second aggregated data, respectively.
In the course of the decoding method according to Fig. 4, the read-out data 21 is converted into byte format, followed by decrypting it, in a decryption step S205, into decrypted data 29. The conversion into byte format is preferably performed applying a decoding process corresponding to the Basel 0, Base32, Base36, Base64, or Basel 28 encoding applied for generating the two-dimensional code 20. In the decryption step S205, the inverse operation of the cryptography step S 150 is carried out, in the course of which the key applied for the encryption is generated; for example, in the case of a key consisting of a public and a private part, by concatenating the public and private key portions. The private key portion, if it exists, can preferably be entered into the computer device adapted for carrying out the decoding, for example utilizing a keyboard, a mobile phone touchscreen or a special document scanner peripheral device, by the owner of the two-dimensional code 20. The decoding computer device is preferably identical to the code reader device applied for reading the two- dimensional code 20. The format of the key applied in the decryption step S205 must preferably be identical to the format of the key applied in the cryptography step S150. By way of example, if the key applied in the cryptography step S150 is a 256-bit key, then the key applied in the decryption step S205 must also be a 256-bit key. In case the keys applied in the cryptography step S150 and in the decryption step S205 have different size, then the decryption step S205 cannot be carried out correctly, i.e. , the contents of the two-dimensional code 20 cannot be read out.
After the decryption step S205, decoded data 22 are generated in a decoding step S210. In the course of the decoding process, the inverse operation (decoding) of the transcoding step S130 (encoding) is performed. By way of example, if the transcoding step S130 was performed applying Basel 0, Base32, Base36, Base64 or Basel 28 encoding, then the decrypted data 29 can be transformed into decoded data 22 applying the corresponding Basel 0, Base32, Base36, Base64 or Basel 28 decoding process. If the two-dimensional code 20 was generated applying the method according to Fig. 1 , then the decoded data 22 is a decoded image that is identical to the compressed image 12. In case the method generating the two-dimensional code 20 was applied for storing in the two-dimensional code 20 image information as well as other data, for example additional information, then the decoded data 22 is preferably identical to the combination of the compressed image 12 and the additional information. If a different decoding type than the type of encoding is applied in the two above cases, then the decoded data 22 will not be identical to the compressed image 12, or to the combination of the compressed image 12 and the additional information.
In a decompression step S240, the decoded data 22 or the portion thereof containing image information is decompressed into a restored image 25, the restored image 25 being restored to an extent necessary for visual inspection, i.e. the restored image 25 and the image 10 can be visually compared; for example, based on a restored image 25 obtained by the decryption of a two-dimensional code 20 generated from an image 10 showing a person, the person shown in the image (photograph) can be identified, i.e. his/her identity can be verified. In the decompression step S240 preferably the inverse operations of the operations carried out in a step corresponding to the image compression step S100 are carried out, while in the case of applying multiple subsequent compressions the inverse operations of the compression steps are performed in a reverse order. The decompression step S240 includes an intensity restoring step S230 that is described in detail below in relation to Fig. 5. Fig. 5 illustrates the steps of another preferred embodiment of the decoding method according to the invention. In the course of this decoding method, first the two- dimensional code 20 is read in an input step S200, thereby producing the read-out data 21 ; then, the read-out data 21 is converted into byte format as it was described in relation to Fig. 4, which is followed by decrypting it into decrypted data 29 in a decryption step S205, and decoding the decrypted data 29 in a decoding step S210 (thus generating decoded data 22). The features of the input step S200, of the conversion into byte format, the decryption step S205, and the decoding step S210 are the same as the features set forth above in relation to Fig. 4.
If the two-dimensional code 20 also stored additional information (for example fully encrypted, partially encrypted, or non-encrypted additional information), then the additional information is separated from the image information, in accordance with its storage mode, in the corresponding steps of the decoding method. In the following, we describe the case wherein the additional information is fully encrypted, i.e. , the decoded data 22 contains both image information and additional information.
In the decoded data 22, the data portion containing the image information is preferably separated from the portion containing the additional information. If during the encoding process the additional information was inserted into a space of predetermined size located before or after the image information, then this portion of predetermined size is preferably separated, and is handled separately from the portion of the decoded data 22 that contains the image information, producing from it restored additional information 26 (not shown) that is preferably identical to the additional information stored in the two-dimensional code 20.
In the example according to Fig. 5, the header that was removed during the encoding process is added, in step S220, to the portion of the decoded data 22 that contains image information. Preferably, in the course of the encoding process the header is stored separately, such that during decoding it can be added to the corresponding image. If the encoding process is carried out on images 10 that are of the same format and have identical parameters, then the information stored in the headers of these images 10 will also be identical, so in the header addition step S220 the same header has to be added to the portion of the decoded data 22 that contains image information. The image with added header 23 that was generated in the header addition step S220 is transformed into a restored-intensity image 24 in an intensity restoring step S230, with the intensity values of the pixels being restored in the course of the intensity restoring step S230. Because the intensity-reducing function applied in the intensity reduction step S110 is not bijective, it does not have an exactly defined inverse function. In the course of the intensity restoring step S230, an intensity enhancing function is applied that is adapted to give the inverse of the mapping for one-to-one mapped elements, and in such a case where different initial intensity values correspond to the same mapped intensity value, one of the corresponding initial intensity values, by way of example the smallest or the greatest intensity value, or the average thereof, is assigned to this particular mapped intensity value.
For example, if the compressed image 12 was darkened by a given amount in the intensity reduction step S110, then the image with added header 23 is brightened by the same amount in the intensity restoring step S230, thereby approximately restoring the original intensity values of the pixels. If different intensity-reducing functions (for example, different amounts of darkening) were applied for each colour channel in the course of the encoding process, then - in accordance with the encoding method - a different intensity-enhancing function (for example, different amounts of brightening) must be applied for each colour channel in the course of the decoding process.
Finally, the restored-intensity image 24 is decompressed, in a decompression step S240’, applying the inverse operations of the compression process or in the case of applying multiple subsequent compressions in the course of the compression process, by performing the respective inverse operations of the compression processes in a reverse order. The restored image 25 produced by decompression is preferably essentially identical to the original image 10, or to a variant thereof falling into a predetermined tolerance range.
If the code reader device adapted for reading the two-dimensional code 20 is a mobile phone, and the mobile phone comprises a computer program product adapted for performing the steps of the decoding method according to the invention, then a restored image 25 that is essentially identical to the image 10 and restored additional information 26 that essentially corresponds to the additional information stored in the two-dimensional code 20 can also be displayed on the screen of the mobile phone. The method according to the invention has the advantage that database access is not required during the decoding of the two-dimensional code 20 as all the necessary information is encoded in the two-dimensional code 20, which allows for applying the method in an off-line manner, preferably at such locations where a network connection is not available.
If the method applied for generating the two-dimensional code 20 had additional steps, then the inverse operations of these steps must be performed in the course of the decoding process, in the appropriate (i.e. , reverse) order.
Fig. 6 shows the result of reading the two-dimensional codes 20, 20’, 20” of the examples according to Fig. 3 utilizing a mobile phone adapted for implementing the decoding method according to the invention. After reading the two-dimensional code 20, 20’, 20”, the restored image 25 and the restored additional information 26 - the latter preferably being the same as the additional information stored in the two- dimensional code 20, 20’, 20” - appear on the screen of the mobile phone. In the case illustrated in the figure the restored additional information 26 comprises the name and the date of birth of the person shown in the restored image 25, as well as the number and validity date of the person’s personal identification document.
Fig. 7 illustrates the application of the encoding and decoding method according to the invention in the case of a grayscale image 10. The encoding method is applied for generating the two-dimensional code 20 which is a QR code. After reading the two- dimensional code 20 utilizing a mobile phone comprising a computer program product carrying out the steps of the decoding method according to the invention, the restored image 25 and also the restored additional information 26 - which latter includes, as with Fig. 6, a name, a date of birth, and the number and validity date of the personal identification document - appear on the screen of the mobile phone.
In Fig. 8, further examples are shown for the applications of the encoding method according to the invention, wherein different types of two-dimensional code 20, by way of example a QR code 20a, a DataMatrix code 20b, and a PDF-417 code 20c, are generated from the same image 10. The image 10 is identical to the image 10 of the examples of Fig. 3, i.e., the image 10 is a colour image with a size of 9656 bytes. ln Fig. 8 there can easily be discerned the difference between the physical size of the particular two-dimensional codes 20; the QR code 20a can be implemented in the smallest physical size, while the DataMatrix code 20b and PDF-417 code 20c of the same data content have larger physical size (shown at the same resolution).
Like in Fig. 8, in Fig. 9 the application of the method according to the invention and the different types of two-dimensional code 20 generated in the course of the method, for example a QR code 20a, a DataMatrix code 20b and a PDF-417 code 20c are shown, but with a different input image 10. It can be observed also in this example that of the different-type two-dimensional codes 20 shown in the figure (which codes all store the same information) the QR code 20a has the smallest physical size, so in such applications where there is only a limited space for displaying the two-dimensional code 20, preferably QR codes 20a are applicable as the two-dimensional code 20.
The method for producing a personal identification document containing a two- dimensional code 20 according to the invention preferably applies the encoding method according to the invention for generating the two-dimensional code 20. Preferably, the two-dimensional code 20 stores - preferably in an encrypted manner - the facial image and other personal identification data of the holder of the personal identification document. The two-dimensional code 20 is applied to the personal identification document by laser engraving, which allows that the two-dimensional code 20 can be produced readably at a much smaller size than applying conventional printing (for example, utilizing conventional laser or inkjet printers). In addition to their smaller size, a further advantage of two-dimensional codes 20 produced by laser engraving is that laser-engraved two-dimensional codes 20 are more difficult to reproduce or copy than the two-dimensional codes 20 produced by simple printing, because two-dimensional codes 20 produced by high-resolution laser engraving cannot be reproduced even by photocopying or scanning. In the case of personal identification documents, the two-dimensional code 20, or its contents (even in encrypted form) can also be loaded into other data storage media, for example into a chip disposed in the personal identification document.
The computer program according to the invention comprises instructions that, when the instructions are executed by a computer, the computer performs the steps of the encoding and/or decoding method according to the invention. By way of example, the computer program comprises instructions corresponding to the steps of the encoding method according to Fig. 1 or Fig. 2, and/or to the steps of the decoding method according to Fig. 4 or Fig. 5.
The computer-readable storage medium according to the invention comprises instructions that, when the instructions are executed by a computer, the computer performs the steps of the encoding and/or decoding method according to the invention, for example the steps of the methods according to Figs. 1-2 or Figs. 4-5.
The manner of industrial application of the invention follows from the characteristics of the technical solution described above. It is apparent from the above description that the invention has fulfilled the objectives set before it in an exceedingly advantageous manner compared to the state of the art. The invention is, of course, not limited to the preferred embodiments described in detail above, but further variants, modifications and developments are possible within the scope of protection determined by the claims.
List of reference signs
10 image
12 compressed image
13 reduced-intensity image
14 headerless image
16 sequential encoded data
18 sequential encrypted data
20, 20’, 20” two-dimensional code 20a QR code
20b DataMatrix code
20c PDF-417 code
21 read-out data
22 decoded data
23 image with added header 24 restored-intensity image
25 restored image
26 restored additional information
29 decrypted data
S100 image compression step
S100’ image compression step
S110 intensity reduction step
S120 header removal step S130 transcoding step
S140 code generation step
S 150 cryptography step
S200 reading step
S205 decryption step S210 decoding step
S220 header addition step
S230 intensity restoring step
S240 decompression step
S240’ decompression step

Claims

1. A method for producing a personal identification document comprising a two- dimensional code (20, 20’, 20”) storing image information, the method comprising the steps of processing an image (10) utilizing a computer device by
- generating, in an image compression step (S100), a compressed image (12) from the image (10),
- transforming, in a transcoding step (S130), the compressed image (12) into sequential encoded data (16),
- generating, in a cryptography step (S150), sequential encrypted data (18) from the sequential encoded data (16), and
- generating, in a code generation step (S140), the two-dimensional code (20, 20’, 20”) based on the sequential encrypted data (18), characterised in that
- the image compression step (S100) comprises an intensity reduction step (S110) in which the image (10) is transformed by modifying intensity values corresponding to individual pixels thereof in a way that the intensity values are mapped with an intensity-reducing function, and
- the two-dimensional code (20, 20’, 20”) is engraved into a surface of a personal identification document by a laser engraving device.
2. A method for generating a two-dimensional code (20, 20’, 20”) storing image information, the method comprising the steps of processing an image (10) utilizing a computer device by
- generating, in an image compression step (S100), a compressed image (12) from the image (10),
- transforming, in a transcoding step (S130), the compressed image (12) into sequential encoded data (16),
- generating, in a cryptography step (S150), sequential encrypted data (18) from the sequential encoded data (16), and
- generating, in a code generation step (S140), the two-dimensional code (20, 20’, 20”) based on the sequential encrypted data (18), characterised in that the image compression step (S100) comprises
- an intensity reduction step (S110) in which the image (10) is transformed by modifying intensity values corresponding to individual pixels thereof in a way that the intensity values are mapped with an intensity-reducing function.
3. The method according to claim 2, characterised in that in the intensity reduction step (S110) the same intensity-reducing function is applied for the entire image (10).
4. The method according to claim 3, characterised in that in the case of RGB or RGBA-encoded colour images (10) the same intensity-reducing function is applied for all colour channels in the intensity reduction step (S110).
5. The method according to any of claims 2 to 4, characterised in that the intensity- reducing function is a linear function, preferably a linear function adapted to reduce the intensity values of the image (10) by 10-90%, preferably by 50-90%, more preferably by 60-80%.
6. The method according to any of claims 2 to 5, characterised in that in the transcoding step (S130) the sequential encoded data (16) is generated from the pixel values of the compressed image (12) by applying Basel 0, Base32, Base36, Base64 or Basel 28 encoding, and the generated sequential encoded data (16) is numeric, alphanumeric, or byte-format data.
7. The method according to any of claims 2 to 6, characterised in that transformed data is generated from the sequential encrypted data (18) by applying Basel 0, Base32, Base36, Base64 or Basel 28 encoding, and the two-dimensional code (20) is generated from the transformed data.
8. The method according to any of claims 2 to 7, characterised in that in the cryptography step (S150) a symmetric-key encryption algorithm is applied, wherein the key of the algorithm is a private key, a public key, or a combination of a private key and a public key.
9. The method according to any of claims 2 to 8, characterised by also storing additional information in the two-dimensional code (20, 20’, 20”), wherein encoded additional data is generated from the additional information, said additional data having the same format as the sequential encoded data (16) of the compressed image (12), and aggregated data is generated by merging the sequential encoded data (16) and the encoded additional data, and the cryptography step (S150) is performed on the aggregated data.
10. The method according to claim 9, characterised in that in the aggregated data the encoded additional data is inserted before or after the sequential encoded data (16) of the compressed image (12).
11. The method according to claim 9 or 10, characterised in that in the aggregated data the encoded additional data is inserted into a space having a predetermined size before or after the sequential encoded data (16) of the compressed image (12), and, if the size of the encoded additional data is smaller than the available space of predetermined size, then the remaining space is filled up with predetermined data values, preferably null values.
12. The method according to any of claims 9 to 11 , characterised in that the additional information comprises textual information.
13. The method according to any of claims 2 to 12, characterised in that the image (10) is provided in a predetermined image format, at a predetermined resolution and size, for which the image (10) is generated by optionally adjusting the parameters of an image having an arbitrary image format, resolution, and size.
14. The method according to any of claims 2 to 13, characterised by removing, in the image compression step (S100), a header of the image (10), and generating a headerless compressed image (12).
15. The method according to any of claims 2 to 14, characterised in that the two- dimensional code (20, 20’ 20”) is a two-dimensional barcode, preferably a QR code (20a), a DataMatrix code (20b), or a PDF-417 code (20c).
16. The method according to any of claims 2 to 15, characterised in that the image information stored in the two-dimensional code (20, 20’, 20”) is a facial image of a natural person, the additional information comprises at least one of identification data and biometric data of the natural person, and the two-dimensional code (20, 20’, 20”) is applied on a personal identification document.
17. The method according any of claims 2 to 16, characterised in that the image information stored in the two-dimensional code (20, 20’, 20”) is a photograph of a product, the additional information comprises at least one identification data of the product, for example, a production date or a product number, and the two-dimensional code (20, 20’, 20”) is applied on the product or on a packaging thereof.
18. A method for decoding data stored in a two-dimensional code, characterised by performing, on a two-dimensional code (20, 20’, 20”) generated by the method according to any of claims 2-17, the following steps by applying a computer device:
- reading, in a reading step (S200), the two-dimensional code (20, 20’, 20”) by a code reader device, and converting it into a byte format,
- generating, in a decryption step (S205), decrypted data (29) by decrypting the byte-format data by using a key corresponding to a cryptography step (S150),
- transforming, in a decoding step (S210), the decrypted data (29) into decoded data (22) by applying an inverse of a transcoding step (S130), and
- in a decompression step (S240), decompressing the decoded data while also performing an intensity restoring step (S230), in the course of which a restored image (25) is generated, wherein the image is restored to an extent required for visual assessment.
19. The method according claim 18, characterised in that in the decompression step (S240) the image (10) or a variant thereof falling in a predetermined tolerance range is restored by mapping, in the intensity restoring step (S230), the intensity values of individual pixels using an intensity enhancement function.
20. A computer program product characterised by comprising instructions adapted for performing, when being run on one or more computers, the method according to any of claims 2 to 19.
21. A computer-readable storage medium storing a computer program adapted for performing an encoding or a decoding method, characterised in that, when the computer program is run on a computer, the stored data and instructions perform the method according to any of claims 2 to 19.
PCT/HU2021/050001 2020-01-08 2021-01-07 Method for generating a two-dimensional code storing image data, and for decoding the stored data, and computer-readable program product and storage medium WO2021140348A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
HUP2000008 2020-01-08
HUP2000008 2020-01-08
HUP2000292 2020-09-03
HU2000292A HUP2000292A2 (en) 2020-09-03 2020-09-03 Method, computer program and computer-readable medium to generate identity document and 2d code for storing image data and to decode data from such code.

Publications (1)

Publication Number Publication Date
WO2021140348A1 true WO2021140348A1 (en) 2021-07-15

Family

ID=89666386

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/HU2021/050001 WO2021140348A1 (en) 2020-01-08 2021-01-07 Method for generating a two-dimensional code storing image data, and for decoding the stored data, and computer-readable program product and storage medium

Country Status (1)

Country Link
WO (1) WO2021140348A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766064B1 (en) * 2000-03-10 2004-07-20 General Electric Company Method and apparatus for performing a contrast based dynamic range management algorithm
US20050040240A1 (en) * 2003-04-16 2005-02-24 Jones Robert L. Three dimensional data storage
US20080074366A1 (en) * 2006-09-21 2008-03-27 Marc Drader Cross-talk correction for a liquid crystal display
US20090154802A1 (en) * 2007-12-13 2009-06-18 Hon Hai Precision Industry Co., Ltd. Method and apparatus for image compression and decompression

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766064B1 (en) * 2000-03-10 2004-07-20 General Electric Company Method and apparatus for performing a contrast based dynamic range management algorithm
US20050040240A1 (en) * 2003-04-16 2005-02-24 Jones Robert L. Three dimensional data storage
US20080074366A1 (en) * 2006-09-21 2008-03-27 Marc Drader Cross-talk correction for a liquid crystal display
US20090154802A1 (en) * 2007-12-13 2009-06-18 Hon Hai Precision Industry Co., Ltd. Method and apparatus for image compression and decompression

Similar Documents

Publication Publication Date Title
US7656559B2 (en) System and method for generating a signed hardcopy document and authentication thereof
US8442221B2 (en) Method and apparatus for image encryption and embedding and related applications
US5867112A (en) Software method of compressing text and graphic images for storage on computer memory
CA2109554C (en) Secure document and method and apparatus for producing and authenticating same
US8316425B2 (en) Method and apparatus for authenticating printed documents
JP4899003B2 (en) High resolution barcode and document with verification function
US20130181057A1 (en) Barcode Device
JP3829143B2 (en) How to embed a screen code that can store large amounts of data on paper
US7107453B2 (en) Authenticatable graphical bar codes
CN101163188B (en) Image processing apparatus, image reading apparatus, image forming apparatus, image processing method
JP2007251929A (en) Selective image encoding and replacement
JP2004127297A (en) Bar code having extended visibility, system and method thereof
EP1291819A2 (en) Digital watermark embeddig
JP2007300617A (en) Super resolution encoded microprinting through postscript
JP2002062803A (en) Authentication document, authentication form, and system for issuing and verifying authentication document
US6804373B1 (en) Method and system using renormalized pixels for public key and compressed images watermarks on prints
WO2021140348A1 (en) Method for generating a two-dimensional code storing image data, and for decoding the stored data, and computer-readable program product and storage medium
JP2009505133A (en) Data encryption and decryption method using pixels
Chhajed et al. Novel approach to data hiding in binary images minimizing distortion
Singh et al. A novel approach for encoding and decoding of high storage capacity color QR code
CN1140875C (en) 2D chaotic graphics method for security and antiforge purpose
JPH0764481A (en) Secret maintaining method for top secret document
Wu Limitations and requirements of content-based multimedia authentication systems
Afrizal et al. Printing Document Security Based on Bit Mapping Technique on Character American Standard Code For Information Interchange (ASCII)
Onai et al. Data encoding based on tricolor matrix barcodes

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21717195

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21717195

Country of ref document: EP

Kind code of ref document: A1