PEN Optical ID and codes - entropia/tip-toi-reveng GitHub Wiki

OID

The Optical Identification (OID) is the Tip-Toi's method for coding numbers into patterns of black squares. These patterns are then printed on the surface of the Tip-Toi's products, read and decoded by the pen and used as input for the running script. Despite being visible with the bare eye, the code only interferes marginally with the printed content. "Codierung im digitalen Papier (Detail einer Spielkarte)" by Schwesterschlumpf

(Image "Codierung im digitalen Papier (Detail einer Spielkarte)" by Schwesterschlumpf CC-BY-SA 3.0)

An OID is encoded in a pattern of 16 pixels that spans over a square of 1 mm x 1 mm. The pixels (0,05 mm x 0,05 mm each) of the first row and column are used to define a grid. As the third pixel in the first column has a slight indent, so the orientation of the pattern can be determined.

The remaining pixels are not aligned to the 4x4 grid defined by the other pixels. Instead, the quaternary value of the remaining pixels is defined by the spacial deviation from the intersection: from bottom right (0) over bottom left (1), top left (2) to top right (3):

Out of these 9 pixels, the pixel on the top left works as a checksum/parity bit. The others are read by row from top left (most significant bit) to bottom right (least significant bit). There is an HTML/JS-OID-Decoder in this github-repository, that illustrates the decoding interactively. Note: The raw value of the integer is obfuscated by using a mapping table / an offset.

OID 1.5 (used in TipToi)

Number of indices: 15,000
Pattern size: 1.0 x 1.0 mm²
Visual Interference: 2.8%
Error Rate: < 0.5%
(source: http://www.sonix.com.tw/category-en-956)

OID Codes used by tttool

The tttool accepts non-raw OID codes to identify products and items.

The codes seem to be used in the following way (please correct if wrong):

  • 0 onwards: Media-OIDs - OIDs used to register a program, e.g. WWW_Bauernhof (1), WWW_Weltatlas (45), ...
  • 999 downwards: Language OIDs
  • 1000..14999: Objects/Items - Object-OID*s used within scripts of a Tip-Toi product especially to use the pen to identify interactive objects.
  • The raw-code 65535 is used as ignored code for neutral places on the paper. It can be generated with tttool oid-code --raw 65535

For your own projects, it is suggested to use:

  • 900 onwards: MOIDs.
  • 1000..14999: OOIDs.