{"id":30549,"date":"2012-06-08T09:51:01","date_gmt":"2012-06-08T07:51:01","guid":{"rendered":"https:\/\/inlab.fib.upc.edu\/news\/what-are-qr-codes\/2012\/"},"modified":"2012-06-08T09:51:01","modified_gmt":"2012-06-08T07:51:01","slug":"what-are-qr-codes","status":"publish","type":"post","link":"https:\/\/inlab.fib.upc.edu\/en\/blog\/what-are-qr-codes","title":{"rendered":"What are QR codes?"},"content":{"rendered":"<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/QR_code\" target=\"_blank\" title=\"QR Code\" rel=\"noopener\">QR codes<\/a> (<em>QR Code<\/em> or <em>Quick Response Code<\/em>) are a type of 2-dimensional code (one matrix) that was developed in Japan in 1994 by <a href=\"http:\/\/www.denso-wave.com\/en\/adcd\/\" target=\"_blank\" title=\"Denso Wave (Denso Corporation)\" rel=\"noopener\">Denso Wave <\/a> for the automotive industry. The main idea was to have a code capable of emmagating more information than a conventional bar code and that, at the same time, it could be printed in small spaces (for example, a piece of the engine) without making it difficult to interpret.<\/p>\n<p><!--more--><\/p>\n<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/QR_code\" target=\"_blank\" title=\"QR Code\" rel=\"noopener\">QR codes<\/a> (<em>QR Code<\/em> or <em>Quick Response Code<\/em>) are a type of 2-dimensional code (one matrix) that was developed in Japan in 1994 by <a href=\"http:\/\/www.denso-wave.com\/en\/adcd\/\" target=\"_blank\" title=\"Denso Wave (Denso Corporation)\" rel=\"noopener\">Denso Wave <\/a> for the automotive industry. The main idea was to have a code capable of storing more information than a conventional barcode and, at the same time, that could be printed in small spaces (for example, a piece of the engine) without making it difficult to interpret.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\" size-full wp-image-1147\" alt=\"Codi QR (2D)\" src=\"https:\/\/inlab.fib.upc.edu\/wp-content\/uploads\/2012\/06\/about2dcode-e.gif\" title=\"Codi QR (2D)\" width=\"420\" height=\"150\"><\/p>\n<p>Some of the uses that are currently being given to QR codes are the coding of:<\/p>\n<ul>\n<li>Text<\/li>\n<li>URL<\/li>\n<li>Phone<\/li>\n<li>SMS message<\/li>\n<li>Contact details (vCard or MECARD)<\/li>\n<li>GPS Position<\/li>\n<li>Calendar event<\/li>\n<li>Electronic running<\/li>\n<li>WiFi Network<\/li>\n<\/ul>\n<p>The basic structure of a QR code (usually black on a white background with a clear area around it to make it easier to read) can be divided into 5 different areas containing the following information:<\/p>\n<ol>\n<li>Code version used<\/li>\n<li>Format<\/li>\n<li>Data and error correction keys<\/li>\n<li>Compulsory patterns (position, alignment, <em>timing<\/em>)<\/li>\n<li>Free zone<\/li>\n<\/ol>\n<p><img decoding=\"async\" alt=\"Structure of a QR code\" src=\"http:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/a\/a5\/QR_Code_Structure_Example_2.svg\/500px-QR_Code_Structure_Example_2.svg.png\" title=\"Structure of a QR code\"><\/p>\n<p>The main advantages of the QR code over conventional barcodes are as follows:<\/p>\n<ul>\n<li><strong>High information capacity<\/strong> (a barcode can display about 20 digits, while a QR code can display up to several hundred times more information).<\/li>\n<li><strong>Small print size<\/strong> (as it contains information both vertically and horizontally, the same information can be encoded in one-tenth the size of a traditional barcode)<\/li>\n<li>Kanji and Kana character encoding (JIS Level 1 and Level 2; 1 Kanji or Kana character can be encoded in 13 bits)<\/li>\n<li><strong>Resistant to damage and brutality<\/strong> (in carrying error correction keys, it is possible to recover up to 30% of bytes depending on the damage suffered by the code).<\/li>\n<li><strong>Readable from any 360\u00ba angle<\/strong> (thanks to the address detection patterns located in 3 of the code&#8217;s corners).<\/li>\n<li>Concatenation of the code (a QR code can be divided into smaller QR codes which, when concatenated, contain the same information as the original code).<\/li>\n<\/ul>\n<p>Although the QR code is an ISO standard (ISO\/IEC18004), its use is not subject to any type of licence as Denso Wave has released the specification of the code and does not exercise its patent rights. For this reason, on the website you can find multiple <strong>QR code generators<\/strong> (usually free of charge, although there are also more specialized paid services that allow you to use and manage the generated codes, track their use, include customizations, etc.) and <strong>libraries<\/strong> (API) so that we ourselves can create an application capable of generating and\/or reading them.<\/p>\n<p><img decoding=\"async\" alt=\"vCard by Manel Rodero (generated on goQR.me)\" src=\"http:\/\/api.qrserver.com\/v1\/create-qr-code\/?data=BEGIN%3AVCARD%0AFN%3AManel%20Rodero%0ATEL%3A%2B34934010847%0AEMAIL%3Amanel%40fib.upc.edu%0AURL%3Ahttp%3A%2F%2Finlab.fib.upc.edu%2F%0AN%3ARodero%3BManel%0AORG%3AinLab%20FIB%0AVERSION%3A3.0%0AEND%3AVCARD%0A&amp;size=200x200&amp;qzone=4\" title=\"vCard by Manel Rodero (generated on goQR.me)\"><\/p>\n<p>Some of the most popular QR code generators are the following:<\/p>\n<ul>\n<li><a href=\"http:\/\/goqr.me\/\" target=\"_blank\" title=\"goQR.me\" rel=\"noopener\">goQR.me<\/a> (Free\/Commercial). Allows you to encode Text, URL, Phone, SMS and vCard using the <a href=\"http:\/\/qrserver.com\/api\/documentation\/create-qr-code\/\" target=\"_blank\" title=\"QR Code API Documentation (QRServer)\" rel=\"noopener\"> QRServer API<\/a>. The result can be downloaded in PNG format or <a href=\"http:\/\/api.qrserver.com\/v1\/create-qr-code\/?data=BEGIN%3AVCARD%0AFN%3AManel%20Rodero%0ATEL%3A%2B34934010847%0AEMAIL%3Amanel%40fib.upc.edu%0AURL%3Ahttp%3A%2F%2Finlab.fib.upc.edu%2F%0AN%3ARodero%3BManel%0AORG%3AinLab%20FIB%0AVERSION%3A3.0%0AEND%3AVCARD%0A&amp;size=200x200&amp;qzone=4\" target=\"_blank\" title=\"goQR.me QR Code\" rel=\"noopener\"> embedded in a web page<\/a>. You can select the level of error correction, the colors of the modules and the background, the size of the resulting image in pixels and the free area around the code.<\/li>\n<li><a href=\"http:\/\/zxing.appspot.com\/generator\" target=\"_blank\" title=\"QR Code Generator from ZXing\" rel=\"noopener\">ZXing<\/a> (Free). Allows to encode Calendar Event, vCard\/MECARD, Email, GPS Position, Phone, SMS, Text, URL and WiFi Network. The result can be downloaded in PNG format or <a href=\"http:\/\/chart.apis.google.com\/chart?cht=qr&amp;chs=230x230&amp;chld=L&amp;choe=UTF-8&amp;chl=geo%3A41.38949%2C2.11337\" target=\"_blank\" title=\"GPS position of the FIB\" rel=\"noopener\"> embedded in a web page<\/a>. You can only select the error correction level and three fixed sizes of the resulting image (small, medium, large). It should be noted that the size of the free zone around the generated code is larger than strictly necessary.<\/li>\n<li><a href=\"http:\/\/delivr.com\/qr-code-generator\" target=\"_blank\" title=\"QR Code Generator by Delivr\" rel=\"noopener\">Delivr<\/a> (Free\/Comercial). It allows to encode URL, Services (Android Market, Facebook, iPhone App Store, Twitter, YouTube, etc.), MECARD, Email, SMS, Text and others. You can select the level of error correction, the size of the margin (0-10 modules), the size of the image (1x-4x) and the color of the code. The result can be downloaded in <a href=\"http:\/\/delivr.com\/qrcodegen\/img?bg=FFFFFF&amp;border=4&amp;fg=000000&amp;format=PNG&amp;mode=download&amp;param2=MECARD%3AN%3AManel%20Rodero%3BORG%3AinLab%20FIB%3BTEL%3A%2B34934010847%3BEMAIL%3Amanel%40fib%2Eupc%2Eedu%3BADR%3A%3BURL%3Ahttp%3A%2F%2Finlab%2Efib%2Eupc%2Eedu%2F%3BNOTE%3A%3B%3B&amp;scale=3&amp;secure=1\" target=\"_blank\" title=\"MECARD by Manel Rodero\" rel=\"noopener\">PNG<\/a>, <a href=\"http:\/\/delivr.com\/qrcodegen\/img?bg=FFFFFF&amp;border=4&amp;fg=000000&amp;format=EPS&amp;mode=download&amp;param2=MECARD%3AN%3AManel%20Rodero%3BORG%3AinLab%20FIB%3BTEL%3A%2B34934010847%3BEMAIL%3Amanel%40fib%2Eupc%2Eedu%3BADR%3A%3BURL%3Ahttp%3A%2F%2Finlab%2Efib%2Eupc%2Eedu%2F%3BNOTE%3A%3B%3B&amp;scale=3&amp;secure=1\" target=\"_blank\" title=\"MECARD by Manel Rodero\" rel=\"noopener\">EPS <\/a> and <a href=\"http:\/\/delivr.com\/qrcodegen\/img?bg=FFFFFF&amp;border=4&amp;fg=000000&amp;format=SVG&amp;mode=download&amp;param2=MECARD%3AN%3AManel%20Rodero%3BORG%3AinLab%20FIB%3BTEL%3A%2B34934010847%3BEMAIL%3Amanel%40fib%2Eupc%2Eedu%3BADR%3A%3BURL%3Ahttp%3A%2F%2Finlab%2Efib%2Eupc%2Eedu%2F%3BNOTE%3A%3B%3B&amp;scale=3&amp;secure=1\" target=\"_blank\" title=\"MECARD by Manel Rodero\" rel=\"noopener\">SVG <\/a> format.<\/li>\n<\/ul>\n<p>Some of the libraries and APIs that allow working with QR codes are the following:<\/p>\n<ul>\n<li><a href=\"http:\/\/qrserver.com\/api\/documentation\/create-qr-code\/\" target=\"_blank\" title=\"QRServer API\" rel=\"noopener\">QRServer API<\/a>: API used by goQR.me<\/li>\n<li><a href=\"https:\/\/developers.google.com\/chart\/infographics\/docs\/qr_codes\" target=\"_blank\" title=\"Google QR Code API\" rel=\"noopener\">Google API<\/a> (abandoned since April 2012)<\/li>\n<li><a href=\"http:\/\/code.google.com\/p\/zxing\/\" target=\"_blank\" title=\"ZXing (Java)\" rel=\"noopener\">ZXing<\/a>: Java library for managing multiple 1D\/2D codes, including QR codes<\/li>\n<li><a href=\"http:\/\/qrcodenet.codeplex.com\/\" target=\"_blank\" title=\"QrCode.Net\" rel=\"noopener\">QrCode.Net<\/a>: .Net library for managing QR codes<\/li>\n<\/ul>\n<p>When working with a QR code, the following factors must be taken into account:<\/p>\n<ul>\n<li>Symbol size (from 21 x 21 up to 177 x 177 digits in increments of 4 digits per side)<\/li>\n<li>Type and quantity of data (numeric, alphanumeric, binary and Kanji)<\/li>\n<li>Level of error correction (<strong>Low <\/strong> = 7% of bytes recovered, <strong>Medium <\/strong> = 15%, <strong>Quality <\/strong> = 25% and <strong>High <\/strong> = 30%)<\/li>\n<li>Concatenation (maximum 16 symbols to print in a narrow area)<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\" size-full wp-image-1150\" alt=\"QR code versions\" src=\"https:\/\/inlab.fib.upc.edu\/wp-content\/uploads\/2012\/06\/qrversion.gif\" title=\"QR code versions\" width=\"459\" height=\"198\"><\/p>\n<p>Given a QR code version, a certain level of error correction and the type of information to be encoded, the maximum information capacity that t<a href=\"http:\/\/www.denso-wave.com\/qrcode\/vertable1-e.html\" target=\"_blank\" title=\"QR code version\" rel=\"noopener\">he QR code can contain is established<\/a>. This is important to keep in mind because it is a limitation when reading the codes using a mobile phone because these, unlike an industrial scanner, can not read all existing versions of QR codes. Similarly, the printing size of a QR code version (which is equivalent to X modules as mentioned above) will depend on the size in millimeters of each module. As you might expect, the larger the size of the module, the easier it will be to read. Therefore, when printing, <strong> the largest module size allowed by the printing area shall be used<\/strong>, leaving, at least, a space equivalent to 4 modules around it (free area). Delivr gives some recommendations when printing QR codes so that they can be read by the maximum number of mobile phone models:<\/p>\n<ul>\n<li>32 x 32 mm, not including the free area, is the minimum size that guarantees that all camera phones on the market can read the QR code correctly<\/li>\n<li>26 x 26 mm, without including the free zone, it covers 90% of the telephones on the market<\/li>\n<li>The latest phone models with macro capabilities can handle QR codes smaller than 10mm (e.g. iPhone 4) but phones with 2 Mpx cameras without autofocus cannot<\/li>\n<li>The contrast between the background and the color of the modules is important (it must be a dark color on a light background and, even better, black on white)<\/li>\n<li>37.5 cm x 37.5 cm is a good size for signage since most QR code readers can read them at a distance of between 1.5m and 5.5m<\/li>\n<\/ul>\n<p>It should be noted that <strong>the application used to read the QR code plays a very important role<\/strong> in the process of obtaining the data encoded in the code. This is because the reading of the code is done in two steps: a) the camera of a mobile phone is used to obtain a picture of the code and b) the program uses different algorithms to decide that certain points of the image correspond to code modules. If the algorithms are good, the program will be able to compensate for the lack of sharpness caused by poor camera optics, our polish when holding the mobile phone, the lack of light and contrast in the image and use the error correction data to obtain the information that has been encoded. Some of the most popular programs to read these codes are:<\/p>\n<ul>\n<li>Android: <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.google.zxing.client.android&amp;hl=es\" title=\"Barcode Scanner\">Barcode Scanner<\/a>, <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=la.droid.qr&amp;feature=search_result\" title=\"QR Droid (Android)\">QR Droid<\/a>, <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=uk.tapmedia.qrreader&amp;feature=search_result\" title=\"QR Reader (Android)\">QR Reader<\/a><\/li>\n<li>iOS: &nbsp;<a href=\"http:\/\/itunes.apple.com\/us\/app\/barcode-reader-for-iphone\/id426941562?mt=8\" title=\"Barcode Reader (iPhone)\">Barcode Reader<\/a><\/li>\n<\/ul>\n<p>Finally, it is important to note that Spain also uses another type of bidirectional code called <strong>Bidi<\/strong>. Although their functionality is similar, <strong>Bidi codes are not the same as QR codes<\/strong>. Unlike QR codes, Bidi codes are generated using a proprietary, private and non-free encryption algorithm from Scanlife. The mobile phone company Movistar was the first to launch this system in 2008 to advertise its products (although other companies such as Vodafone and Orange and even car manufacturers, banks, clothing brands, etc. have joined in since then).<\/p>\n<p>Although at first glance there is no difference between the two types of code, <strong> it can be seen that the Bidi lacks the 3 squares of positioning in the corners that have the QR<\/strong>. For this reason, Bidi codes can only be read with the cameras and <strong> specific applications<\/strong> of each brand implemented in their own mobile devices (p. ex. <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.bidi&amp;hl=en\" title=\"BIDI (Android)\">Android<\/a> o for <a href=\"http:\/\/itunes.apple.com\/es\/app\/bidi-lector-codigos-qr-y-codigos\/id399454333?mt=8\" title=\"BIDI (iPhone)\">iOS<\/a>). These applications <strong>may not read or partially read a QR code<\/strong>, as they are specifically prepared for Bidi codes. For this reason, it is advisable to check that the application installed \u201cas standard\u201d on our mobile phone is compatible with QR codes.<\/p>\n<p>Com es pot comprovar amb una <a href=\"http:\/\/images.google.com\/images?q=codigo+bidi\" title=\"Nearby in Google Images\">simple cerca en Google Images<\/a>, existeix molta confusi\u00f3 entre els dos tipus de codi i es veuen codis QR anomenats Bidi i viceversa. For example, in the presentation of the General State Budget 2012 it was initially indicated that the code used was a Bidi when in fact it was a QR. As of today, the page has been corrected, but there are still traces of the cry in the URL of the page or <a href=\"http:\/\/www.publico.es\/espana\/428159\/el-duro-codigo-bidi-del-gobierno\" target=\"_blank\" title=\"The \u201chard\u201d code 'Bidi' of the Government\" rel=\"noopener\">in the press<\/a>.<\/p>\n<p><img decoding=\"async\" alt=\"BIDI vs QR confusion (MinHap)\" src=\"http:\/\/farm8.staticflickr.com\/7243\/7310023556_53999dc56b.jpg\" title=\"BIDI vs QR confusion (MinHap)\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>QR codes (QR Code or Quick Response Code) are a type of 2-dimensional code (one matrix) that was developed in Japan in 1994 by Denso Wave for the automotive industry. The main idea was to have a code capable of emmagating more information than a conventional bar code and that, at the same time, it [&hellip;]<\/p>\n","protected":false},"author":594,"featured_media":1145,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[572],"tags":[],"experteses":[26],"class_list":["post-30549","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","experteses-knowledgeandserviceengineering-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/posts\/30549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/users\/594"}],"replies":[{"embeddable":true,"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/comments?post=30549"}],"version-history":[{"count":0,"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/posts\/30549\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/media\/1145"}],"wp:attachment":[{"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/media?parent=30549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/categories?post=30549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/tags?post=30549"},{"taxonomy":"experteses","embeddable":true,"href":"https:\/\/inlab.fib.upc.edu\/en\/wp-json\/wp\/v2\/experteses?post=30549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}