Introduction

d-touch is a system that allows to create graphic symbols, or visual markers, that can be read automatically by a computer or a mobile phone, and at the same time can be visually meaningful for people. This is because the algorithm used in d-touch is quite flexible in reading shapes, as long as a number of rules are respected.

You can draw the markers using any tool you like, you can either use a bitmap-oriented application (e.g. Gimp, Photoshop, ..), vector graphics editor (e.g. Inkscape, Illustrator, Freehand, ...) or even draw on paper and scan your drawing.

This document will first introduce the rules that have to be followed to draw functional d-touch visual markers, then it will describe the functioning of the DTAnalyser application which should help you in drawing functional markers.

Essential Constraints

For simplicity we will consider only black and white markers. The essential rule to create a valid d-touch visual marker is in the nesting of black and white areas or regions. To illustrate what we mean by “nesting” and “regions” let’s take into account a few examples. The following is just a black region:


The shape of the region does not matter, so the following 2 are also just black regions:



Next is the first example of nesting, 1 black region containing 1 white region:

And now more nesting, 1 black region containing 2 white regions (note that it’s just 1 black region):


Let’s look at more nesting, 1 black region containing 1 white region which in turn contains 1 black region:


Finally even more nesting, a black region containing 2 white regions, the one on the left containing 1 black region and the one on the right containing 2 black regions:


Marker Definition

Now that the concept of nesting black and white regions should be clear, let’s introduce the basic rule that defines a d-touch marker:

A valid marker can be composed of a black region containing 3 or more white regions, and at least half of these white regions must contain one or more black regions. This makes exactly 3 levels of nesting – it must be no more and no less. However, there is no limit in the number and shape of the regions.

The following is the “minimal” valid marker:


It is a black region containing 3 white regions (the minimum number of regions allowed); 2 of the white regions contain 1 black region (the majority 2 is larger than half of 3), one contains none.

Let’s now look at some other valid markers.
A black region containing 5 white regions, 4 of them containing 2 black regions and 1 of them empty:


A black region containing 7 white regions, 6 of them containing 1 black region and 1 of them containing 3 black regions:


A black region containing 4 white regions, one white region contains 5 black regions (the “hello” balloon), one white region contains 3 black regions (the face with eyes and mouth), and two white regions contain 1 black region (the two ears). Note how the counter (i.e. the “hole”) in the ’e’ and ’o’ is filled to avoid having more than 3 levels of nesting.


Below are 3 additional examples:


When you draw a marker, you can draw it any order you prefer, starting from a detail and then going out, or starting from the outline and then adding details inside. In fact, you can draw the markers however you like using the tools provided, and to erase and modify them as much as you want.



Here follows some other examples:

a black region
that contains 3 white regions
each of the white regions contains 1, 2 and 4 black regions

 

a black region
that contains 3 white regions
one of the white regions contains 3 black regions, and the other two white regions contain 4 black regions

 

a black region
that contains 7 white regions
one of the white regions contains 0 black regions, four of them contain 1 black region, and the last one contains 3 white regions

 

a black region
that contains 4 white regions
each of the white regions contains 5, 9, 14 and 15 black regions


Two more examples:

(note in the example above how the counter (i.e. the "hole") in the 'e', 'd' and 'o' is filled to avoid having more than 3 levels of nesting)

Marker ID

Each valid marker is associated to a numerical identifier, an ID, which can be used to link digital information to it. The ID is defined by the structure of each marker, in the sense of how black and white regions are nested. Markers that have the same structure will be associated to the same ID, even if they have different shapes. The marker ID is provided by the d-touch analyser (it can also be calculated by hand: it is the comma-separated sequence of integer numbers representing the number of black regions inside each white region – if in doubt just use the analyser).

Robust Markers

If the rules mentioned and exemplified above are followed, any drawing can be recognised by the d-touch algorithm, at least if a clear, steady picture is taken from a reasonable distance. However, often pictures can be blurred, perhaps because shot while moving, and the definition of “reasonable distance” depends on the resolution of the camera used — mobile phone cameras can have very low resolution. d-touch markers can be more or less robust to blur and low resolution issues – at a general level, small details are the first to suffer from blur and low resolution, at least compared to more bold parts of the same drawing. The DTAnalyser application, introduced in the following session, provides some information about the robustness of the analysed markers.

Hints and Common Problems

One common problem in the creation of markers is the occurrence of too many levels of nesting. For example in the following case there is a black region containing 3 white regions, and each of the white regions contain a number of letters (5, 5 and 6 from top to bottom), but the letters 'e', 'o', 'd' and 'a' contain inside them a white region, which is not allowed by the system.



To familiarise yourself with the system, we suggest that you try to reproduce one of the example markers depicted in the instructions. Try to reproduce it exactly as it is and then try to introduce some errors and see how the d-touch analyser reports them. We also suggest that at the beginning you ignore the robustness and resolution issues, just make valid markers. At a later stage, try to make markers that are "Good for a mobile phone".