issue103:securite
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue103:securite [2015/12/05 14:50] – d52fr | issue103:securite [2015/12/09 12:18] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 4: | Ligne 4: | ||
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, | ||
+ | |||
+ | Les codes QR « Quick Response » (réaction rapide) sont en passe de devenir un moyen populaire de communiquer des fragments d' | ||
+ | |||
+ | 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' | ||
+ | |||
+ | 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:// | **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:// | 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 | **THE ANATOMY OF A QR CODE | ||
Ligne 18: | Ligne 28: | ||
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.** | ||
+ | |||
+ | 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, | **The rest of the dots correspond to a mix of QR code version information, | ||
Ligne 26: | Ligne 46: | ||
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!** | ||
+ | |||
+ | 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 | **SOME SOFTWARE | ||
Ligne 45: | Ligne 73: | ||
scanned 1 barcode symbols from 1 images in 0.02 seconds** | scanned 1 barcode symbols from 1 images in 0.02 seconds** | ||
+ | |||
+ | 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. | **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. | ||
Ligne 51: | Ligne 98: | ||
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).** | ||
+ | |||
+ | 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 | **EDITING QR CODES | ||
Ligne 60: | Ligne 113: | ||
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.** | ||
+ | |||
+ | É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). | **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). | ||
Ligne 67: | Ligne 130: | ||
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:// | ||
+ | |||
+ | 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 | **COLOPHON | ||
Ligne 73: | Ligne 144: | ||
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): | ||
Ligne 79: | Ligne 156: | ||
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.1449323421.txt.gz · Dernière modification : 2015/12/05 14:50 de d52fr