issue103:securite
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue103:securite [2015/12/01 12:20] – créée auntiee | issue103:securite [2015/12/09 12:18] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | QR “Quick Response” codes are fast becoming a popular means of communicating snippets of information from a printed medium or other physical surface towards computers and mobile devices. They were originally developed as a replacement for the single-dimension bar code by a team from the automotive equipment design and manufacturing company Nippon Denso Co. Ltd.. The increase in the amount of different car parts handled gave rise to a desire to augment correspondingly the amount of data that could be stored on the printed labels that were used to identify the boxes in storage and during transport. | + | **QR “Quick Response” codes are fast becoming a popular means of communicating snippets of information from a printed medium or other physical surface towards computers and mobile devices. They were originally developed as a replacement for the single-dimension bar code by a team from the automotive equipment design and manufacturing company Nippon Denso Co. Ltd.. The increase in the amount of different car parts handled gave rise to a desire to augment correspondingly the amount of data that could be stored on the printed labels that were used to identify the boxes in storage and during transport. |
Since 2006, the working principles have become the ISO/IEC standard 18004:2006, and so can be seen as a recognized industry technique. The team behind this design (Masahiro Hara, Motoaki Watabe, Tadao Nojiri, Takayuki Nagaya, and Yuji Uchiyama ) won the European Patent Office 2014 Popular Prize for their efforts (http:// | Since 2006, the working principles have become the ISO/IEC standard 18004:2006, and so can be seen as a recognized industry technique. The team behind this design (Masahiro Hara, Motoaki Watabe, Tadao Nojiri, Takayuki Nagaya, and Yuji Uchiyama ) won the European Patent Office 2014 Popular Prize for their efforts (http:// | ||
- | Nowadays, QR codes are widely used in situations in which it is desirable to present printed matter containing links to electronic information, | + | Nowadays, QR codes are widely used in situations in which it is desirable to present printed matter containing links to electronic information, |
- | At the same time, the folks in graphics design have been making use of the fact that data is actually redundant inside the code; the image can be modified in various ways and still convey useful information to the reader. A recent example from 2014 is the “Guinness | + | Les codes QR « Quick Response » (réaction rapide) sont en passe de devenir un moyen populaire de communiquer des fragments d' |
- | In this article, we will see how to read and create QR codes in an Ubuntu system using various programs. Before continuing, it should be noted that several other similar systems can be found, such as Data Matrix barcodes | + | Depuis 2006, les principes de fonctionnement sont devenus la norme ISO/IEC n° 18004:2006, et peuvent ainsi être vus comme une technique industrielle reconnue. L' |
- | THE ANATOMY OF A QR CODE | + | De nos jours, les codes QR sont largement utilisés dans des situations où l'on souhaite disposer d' |
+ | |||
+ | **At the same time, the folks in graphics design have been making use of the fact that data is actually redundant inside the code; the image can be modified in various ways and still convey useful information to the reader. A recent example from 2014 is the “Guinness QR cup” by BBDO New York that has won a Caples award (http:// | ||
+ | |||
+ | In this article, we will see how to read and create QR codes in an Ubuntu system using various programs. Before continuing, it should be noted that several other similar systems can be found, such as Data Matrix barcodes (https:// | ||
+ | |||
+ | En même temps, les gens de la conception graphique utilisent le fait que les données sont en fait redondantes dans le code ; l' | ||
+ | |||
+ | Dans cet article, nous verrons comment lire et écrire des codes QR dans un système Ubuntu en utilisant différents programmes. Avant de continuer, il est à noter que plusieurs autres systèmes similaires peuvent être trouvés, tel que les codes-barres Data Matrix (https:// | ||
+ | |||
+ | **THE ANATOMY OF A QR CODE | ||
Let us consider a specific example: | Let us consider a specific example: | ||
Ligne 17: | Ligne 27: | ||
When a QR code reader is placed before this image, the first parts that are detected are the three positioning marks emphasised in gold. These give the camera a basic idea of the position of the the QR code, as well as its orientation. The small mark in red also helps understand alignment; there is only one of these on small QR codes, but larger codes use a repeating pattern to ensure coherence across the width and height of the image. | When a QR code reader is placed before this image, the first parts that are detected are the three positioning marks emphasised in gold. These give the camera a basic idea of the position of the the QR code, as well as its orientation. The small mark in red also helps understand alignment; there is only one of these on small QR codes, but larger codes use a repeating pattern to ensure coherence across the width and height of the image. | ||
- | QR codes may be of varying widths, expressed in the number of dots used. However, this has nothing to do with the actual physical size of the image, nor to the resolution of the photograph the reader has taken of it. So the second stage in code interpretation is to figure out how many dots are being used in this particular code. To do this, a simple repeating pattern of black and white dots is placed between the orientation marks (shown in green). This “timing” pattern is easy for the reader to interpret, and so figure out the number of lines and columns in the mesh. | + | QR codes may be of varying widths, expressed in the number of dots used. However, this has nothing to do with the actual physical size of the image, nor to the resolution of the photograph the reader has taken of it. So the second stage in code interpretation is to figure out how many dots are being used in this particular code. To do this, a simple repeating pattern of black and white dots is placed between the orientation marks (shown in green). This “timing” pattern is easy for the reader to interpret, and so figure out the number of lines and columns in the mesh.** |
- | The rest of the dots correspond to a mix of QR code version information, | + | Anatomie d'un code QR |
+ | |||
+ | Voici un exemple précis : | ||
+ | |||
+ | Comme on peut le voir, un code QR est une matrice bi-dimensionnelle carrée remplie de points (pixels) qui, par essence, sont des uns et zéros binaires. C'est en fait une des seules fois où un utilisateur moderne d' | ||
+ | |||
+ | Quand un lecteur de code QR est placé devant cette image, les premières parties détectées sont les trois marques de positionnement mises en évidence en doré. Elles donnent à la caméra une première idée de la position du code QR, ainsi que son orientation. Le petit repère en rouge aide aussi à comprendre l' | ||
+ | |||
+ | Les codes QR peuvent exister en plusieurs largeurs, exprimées en nombre de points utilisés. Cependant, cela n'a pas de rapport avec la taille réelle de l' | ||
+ | |||
+ | **The rest of the dots correspond to a mix of QR code version information, | ||
Error correction in QR codes uses a branch of Reed-Solomon error-correcting codes. With a bit of (perhaps over-) simplification, | Error correction in QR codes uses a branch of Reed-Solomon error-correcting codes. With a bit of (perhaps over-) simplification, | ||
Ligne 25: | Ligne 45: | ||
Nowadays, the details of how the error detection and correction are handled go quite under the radar of the human user. Software (on most consumer-grade devices) or hardware (in industrial applications) take care of this part and simply give us the decoded information in readable form. | Nowadays, the details of how the error detection and correction are handled go quite under the radar of the human user. Software (on most consumer-grade devices) or hardware (in industrial applications) take care of this part and simply give us the decoded information in readable form. | ||
- | In fact, the addition of superimposed colors to the QR code above has not made it unreadable - if you have a QR reader or application available, go ahead and see what it says! | + | In fact, the addition of superimposed colors to the QR code above has not made it unreadable - if you have a QR reader or application available, go ahead and see what it says!** |
- | SOME SOFTWARE | + | Le reste des points correspond a un mélange d' |
+ | |||
+ | La correction d' | ||
+ | |||
+ | De nos jours, les détails de comment la détection et la correction d' | ||
+ | |||
+ | En fait, l' | ||
+ | |||
+ | **SOME SOFTWARE | ||
There is in fact a selection of software available in the Ubuntu repositories to create QR codes. One of the most basic is qrencode from the apt package with the same name. This is a console-only program. For example, to encode the web page address of our favorite magazine, simply issue: | There is in fact a selection of software available in the Ubuntu repositories to create QR codes. One of the most basic is qrencode from the apt package with the same name. This is a console-only program. For example, to encode the web page address of our favorite magazine, simply issue: | ||
Ligne 44: | Ligne 72: | ||
QR-Code: | QR-Code: | ||
- | scanned 1 barcode symbols from 1 images in 0.02 seconds | + | scanned 1 barcode symbols from 1 images in 0.02 seconds** |
- | On the graphical side of things, perhaps the best known application for Ubuntu is QtQr. Using the Qt library on which the KDE desktop is based, this program also works quite well under other desktop managers, being sufficiently integrated to include dragging files to and fro. | + | Quelques logiciels |
+ | |||
+ | Il y a en fait un certain nombre de logiciels disponibles dans les dépôts Ubuntu pour créer des codes QR. Un des plus basiques est qrencode issu du paquet apt du même nom. C'est un programme uniquement en ligne de commande. Par exemple, pour encoder l' | ||
+ | |||
+ | qrencode -o qr-example1.png http:// | ||
+ | |||
+ | Ceci crée l' | ||
+ | Le même programme peut aussi créer des codes QR dans divers formats. SVG est particulièrement intéressant. La commande correspondante serait : | ||
+ | |||
+ | qrencode -o qr-example1.svg -t SVG http:// | ||
+ | |||
+ | Dans l' | ||
+ | |||
+ | zbarimg qr-example1.png | ||
+ | |||
+ | QR-Code: | ||
+ | |||
+ | scanned 1 barcode symbols from 1 images in 0.02 seconds (1 symbole code-barres scanné à partir d'une image en 0.02 secondes). | ||
+ | |||
+ | **On the graphical side of things, perhaps the best known application for Ubuntu is QtQr. Using the Qt library on which the KDE desktop is based, this program also works quite well under other desktop managers, being sufficiently integrated to include dragging files to and fro. | ||
The software contains a complete QR code generator, where the user can not only specify the type of information to be encoded (URLs, but also other structured information such as personal contact information, | The software contains a complete QR code generator, where the user can not only specify the type of information to be encoded (URLs, but also other structured information such as personal contact information, | ||
- | QtQr reads in QR codes either from image files, or by accessing the computer’s webcam if available. This is handy to read in data from a mobile phone, without needing to set up wireless communication (Bluetooth or similar). | + | QtQr reads in QR codes either from image files, or by accessing the computer’s webcam if available. This is handy to read in data from a mobile phone, without needing to set up wireless communication (Bluetooth or similar).** |
- | EDITING QR CODES | + | Du côté interface graphique, celui qui est peut-être le plus connu sous Ubuntu est QtQr. Utilisant la bibliothèque Qt sur laquelle le bureau KDE est basé, ce programme fonctionne très bien avec les autres gestionnaires de bureau aussi, étant suffisamment intégré pour inclure le déplacement des fichiers vers et depuis l' |
+ | |||
+ | Le logiciel contient un générateur complet de code QR, où l' | ||
+ | |||
+ | QtQr lit les codes QR soit à partir de fichiers images, soit en accédant à la webcam de l' | ||
+ | |||
+ | **EDITING QR CODES | ||
Once a QR code has been created, some editing can take place without altering the information contained within. To take an example, I will take the “http:// | Once a QR code has been created, some editing can take place without altering the information contained within. To take an example, I will take the “http:// | ||
Ligne 59: | Ligne 112: | ||
The first thing we can do with the black markings is to change their color. Select the markings, then choose Object > Fill and Stroke in the menu. We can play around with the fill color, and add blur for artistic effect. | The first thing we can do with the black markings is to change their color. Select the markings, then choose Object > Fill and Stroke in the menu. We can play around with the fill color, and add blur for artistic effect. | ||
- | QR codes are sufficiently robust that even relatively light colors can be used, and still function as a code. However, one should not try to go too far - ‘too far’ being colors with little contrast to the background, or a combination of light and dark colors. These do not work well with most QR readers. If we do stay within these parameters, some effects such as gradients are possible. To apply these, select the markings, and in the Fill dialog choose Gradient fill. You will need to edit the gradient end-points to make sure that both of the colors used to build the gradient are sufficiently contrasted with the background. Some experimentation may be needed for good results. | + | QR codes are sufficiently robust that even relatively light colors can be used, and still function as a code. However, one should not try to go too far - ‘too far’ being colors with little contrast to the background, or a combination of light and dark colors. These do not work well with most QR readers. If we do stay within these parameters, some effects such as gradients are possible. To apply these, select the markings, and in the Fill dialog choose Gradient fill. You will need to edit the gradient end-points to make sure that both of the colors used to build the gradient are sufficiently contrasted with the background. Some experimentation may be needed for good results.** |
- | In Inkscape, photographs may be used as patterns to fill in areas. The image (JPG, PNG or similar) is imported, then converted into a pattern using menu option Object > Pattern > Objects to Pattern. The black markings in the QR code are then selected, and filled with the new pattern. As before, it is best to use images with similar and rather dark colors - and no very light-colored spots in them (if using a white background). | + | Éditer des codes QR |
+ | |||
+ | Une fois qu'un code QR a été créé, il est possible de le modifier sans altérer l' | ||
+ | |||
+ | Les marques noires elles-mêmes sont aussi des rectangles individuels qui ont été regroupés. Si vous souhaitez enmodifier des morceaux élémentaires, | ||
+ | |||
+ | La première chose que nous pouvons faire, c'est de changer la couleur des marques noires. Sélectionnez les marques, puis choisissez Objet > Remplissage et contour dans le menu. Nous pouvons jouer avec la couleur de remplissage et ajouter du flou pour l' | ||
+ | |||
+ | Les codes QR sont suffisamment robustes pour que même des couleurs relativement claires puissent être utilisées, tout en gardant leur rôle de code. Cependant, il ne faut pas aller trop loin - « trop loin », ce sont les couleurs à trop faible contraste sur le fond ou une combinaison de couleurs claires et sombres. Celles-ci ne fonctionnent pas bien avec la plupart des lecteurs de QR. Si nous restons bien dans de telles limites, des effets sont possibles, comme les dégradés. Pour les appliquer, sélectionnez le marquage, et dans la boîte de dialogue du Remplissage choisissez Dégradé linéaire. Vous devrez modifier les limites du dégradé pour assurer que les deux couleurs utilisées dans le dégradé sont suffisamment contrastées sur le fond. Quelques essais pourront être nécessaires pour de bons résultats. | ||
+ | |||
+ | **In Inkscape, photographs may be used as patterns to fill in areas. The image (JPG, PNG or similar) is imported, then converted into a pattern using menu option Object > Pattern > Objects to Pattern. The black markings in the QR code are then selected, and filled with the new pattern. As before, it is best to use images with similar and rather dark colors - and no very light-colored spots in them (if using a white background). | ||
On the other hand, very light images can be used to color the markings, on top of a dark background. Alternatively, | On the other hand, very light images can be used to color the markings, on top of a dark background. Alternatively, | ||
This is about as far as one can go with this low-redundancy level QR code. However, if a high level of redundancy has been specified when creating the code, large areas of dots can be covered up with other graphical information. Although this will give some errors on reading, the error-correction codes used will still enable the reader to establish the original message. There are some areas of the code that must not be touched. As described in the previous section, positioning, | This is about as far as one can go with this low-redundancy level QR code. However, if a high level of redundancy has been specified when creating the code, large areas of dots can be covered up with other graphical information. Although this will give some errors on reading, the error-correction codes used will still enable the reader to establish the original message. There are some areas of the code that must not be touched. As described in the previous section, positioning, | ||
- | For further ideas on how to use Inkscape, Mark Crutch’s ongoing series in FCM is probably the place to start - try the Special Edition Volume 1 (http:// | + | For further ideas on how to use Inkscape, Mark Crutch’s ongoing series in FCM is probably the place to start - try the Special Edition Volume 1 (http:// |
- | COLOPHON | + | Dans Inkscape, les photos peuvent être utilisées comme motifs pour remplir des zones. L' |
+ | |||
+ | En revanche, les images très claires peuvent être utilisées pour colorer le marquage, sur un fond sombre. Autrement, une seule couleur peut être utilisée pour les marques, que l'on superpose sur l' | ||
+ | |||
+ | C'est à peu près tout ce qu'on peut faire avec ce code QR à faible niveau de redondance. Cependant, si un haut niveau de redondance a été spécifié à la création du code, de large plages de points peuvent être recouvertes par une autre information graphique. Bien que cela génère quelques erreurs de lecture, les codes de correction d' | ||
+ | |||
+ | Pour plus d' | ||
+ | |||
+ | **COLOPHON | ||
I would like to end with a couple of practical use-cases that go a bit further than adding dynamic content to commercial posters. In my day job as a teacher, I often give students pointers on where to obtain further information, | I would like to end with a couple of practical use-cases that go a bit further than adding dynamic content to commercial posters. In my day job as a teacher, I often give students pointers on where to obtain further information, | ||
- | A second use of QR codes is to pass along short quotations from texts. QR codes are well able to hold several paragraphs of text, about what would be useful for a single study period. So, for example, Cicero’s classical discourse against Catalina could be studied in extract form. The original text goes: | + | A second use of QR codes is to pass along short quotations from texts. QR codes are well able to hold several paragraphs of text, about what would be useful for a single study period. So, for example, Cicero’s classical discourse against Catalina could be studied in extract form. The original text goes:** |
- | “Quo usque tandem abutere, Catilina, patientia nostra? Quam diu etiam furor iste tuus nos eludet? Quem ad finem sese effrenata iactabit audacia? Nihilne te nocturnum praesidium Palati, nihil urbis vigiliae, nihil timor populi, nihil concursus bonorum omnium, nihil hic munitissimus habendi senatus locus, nihil horum ora voltusque moverunt? Patere tua consilia non sentis, constrictam iam horum omnium scientia teneri coniurationem tuam non vides? Quid proxima, quid superiore nocte egeris, ubi fueris, quos convocaveris, | + | Colophon |
+ | |||
+ | Je voudrais terminer par deux cas pratiques qui vont un peu plus loin que l' | ||
+ | |||
+ | Une seconde utilisation des codes QR est le transfert de courtes citations de textes. Les codes QR sont capables de contenir plusieurs paragraphes d'un texte, environ ce qui peut être utile pour une heure d' | ||
+ | |||
+ | **“Quo usque tandem abutere, Catilina, patientia nostra? Quam diu etiam furor iste tuus nos eludet? Quem ad finem sese effrenata iactabit audacia? Nihilne te nocturnum praesidium Palati, nihil urbis vigiliae, nihil timor populi, nihil concursus bonorum omnium, nihil hic munitissimus habendi senatus locus, nihil horum ora voltusque moverunt? Patere tua consilia non sentis, constrictam iam horum omnium scientia teneri coniurationem tuam non vides? Quid proxima, quid superiore nocte egeris, ubi fueris, quos convocaveris, | ||
Transformed into a slide for presentation to the class, once scanned, the QR code would then appear as shown (on the student’s tablet): | Transformed into a slide for presentation to the class, once scanned, the QR code would then appear as shown (on the student’s tablet): | ||
The text can then be sent off to Google Drive or a note-taking application, | The text can then be sent off to Google Drive or a note-taking application, | ||
- | As a side note, we can see through this example that QR codes are system-agnostic, | + | As a side note, we can see through this example that QR codes are system-agnostic, |
+ | |||
+ | « Quo usque tandem abutere, Catilina, patientia nostra? Quam diu etiam furor iste tuus nos eludet? Quem ad finem sese effrenata iactabit audacia? Nihilne te nocturnum praesidium Palati, nihil urbis vigiliae, nihil timor populi, nihil concursus bonorum omnium, nihil hic munitissimus habendi senatus locus, nihil horum ora voltusque moverunt? Patere tua consilia non sentis, constrictam iam horum omnium scientia teneri coniurationem tuam non vides? Quid proxima, quid superiore nocte egeris, ubi fueris, quos convocaveris, | ||
+ | |||
+ | Transformé en diapo pour une présentation à la classe, puis scanné, le code QR apparaîtra alors comme présenté (sur la tablette d'un étudiant) : | ||
+ | |||
+ | Le texte peut ensuite être déversé dans Google Drive ou une application de prise de notes, et - on peut l' | ||
+ | |||
+ | En remarque, nous pouvons voir à travers cet exemple que les codes QR sont indépendants des systèmes et qu'ils fournissent une bonne façon de transmettre des informations entre systèmes d' | ||
+ |
issue103/securite.1448968837.txt.gz · Dernière modification : 2015/12/01 12:20 de auntiee