DotCode is a two-dimensional (2D) matrix barcode invented in 2008 by Hand Held Products as a replacement for the outdated Code 128. At this time, it is issued by Association for Automatic Identification and Mobility (AIM) as “ISS DotCode Symbology Specification 4.0”. DotCode consists of sparse black round dots and white spaces on white background. In case of a black background the dots can be white. DotCode was developed to be used with high-speed industrial printers where printing accuracy can be low. Because DotCode by the standard does not require complicated elements like continuous lines or special shapes it can be applied with laser engraving or industrial drills.

DotCode can be represented as rectangular array with minimal size of each side 5X dots. Maximal size of DotCode is not limited by the standard (as Code 128 is not limited) but practical limit is recommended as 100x99 which can encode around 730 digits, 366 alphanumeric characters or 304 bytes.

As an extension of Code 128 barcode, DotCode allows more compact encoding of 8-bit data array and Unicode support with Extended Channel Interpretation feature. Additionally, DotCode provides much more data density and Reed–Solomon error correction which allows to restore partially damaged dotcodes. However, the main DotCode implementation, the same as Code 128, is effective encoding of GS1 data which is used in worldwide shipping and packaging industry.

History and standards

DotCode barcode was invented in 2008 by Dr. Andrew Longacre from Hand Held Products company and standardized in 2009 by AIM as “Bar code symbology specification - DotCode”. In 2019 DotCode was reviewed as “ISS DotCode Symbology Specification 4.0”.

Set of patents is registered, which are related with DotCode encoding and decoding: United States Patent US20090200386A1 by Hand Held Products Inc "Machine readable 2D symbology printable on demand" United States Patent US20090200386A1 by Datalogic IP Tech SRL "System and method for extracting bitstream data in two-dimensional optical codes" Chinese Patent CN113297872A by Fuzhou Symbol Information Technology Co ltd "Dotcode identification method and equipment"

Application

DotCode barcode can be used in the same way as Code 128 or any (2D) matrix barcode. At this time, it is used mostly to encode GS1 data in tobacco, alcoholic and non-alcoholic beverage, pharmaceutical and grocery industries. The main implementation at this time is in tobacco industry.

Main advantages of DotCode are: Full support and replacement of Code 128 codeset; Compact encoding of 8-bit data array; Unicode support with Extended Channel Interpretation feature; Effective encoding of GS1 data; Reed–Solomon error correction Ability to apply the barcode by high-speed industrial printers and other methods like laser engraving.

Barcode design DotCode represents data in rectangular structure which consists from black round dots and white spaces on white background or white round dots on black background. DotCode does not have finder pattern, like other 2D barcodes and it must be detected with slow blob detection algorithms like Gabor filter or Circle Hough Transform. All data, metadata and error correction codewords are encoded in the same dots array which does not have any visual difference.

Here are some samples of DotCode:

DotCode symbol is constructed from the following elements: Two mask bits which are represented on diagram as two green points; Data bits (data and error correction bits) which must be read from up to down (even barcode side) and from left to right (odd barcode side); Corner points, marked as red on diagram, which can be used as data bits or padding bits (black dots); Quiet zone at least 3X size of the dots.

The DotCode bits array is represented as: (Two mask bits: M2, M1)(Data bits)(Corner bits, can be data or padding bits: C1 – C6)

The data codewords in 0 – 112 range are encoded in 5-of-9 binary dot patterns which are encoded from 9 dots where 5 black dots and 4 white spaces. The rest of barcode matrix (rest from division on 9) is padded with black padding bits. The padding bits can be from 0 to 8. The logically DotCode bits array is represented as: (2 mask bits)(Data codewords 9 bits each)(Padding bits 0 – 8 bits)

DotCode size has the following requirements: Sum of DotCode width and height must be odd: ; Minimal size of each side must be 5, maximal is not limited; It is recommended to use width and height to have at least 6 padding black bits where data bits capacity rest from division on 9 more or equal 6:

Data masking

To minimize DotCode problematic symbols, the data codewords are masked to create others visual sequences. The mask pattern is applied only to data sequence and does not affect error correction codewords. DotCode standard has 4 mask pattern which are codded into 2 bits and placed as the first 2 bits of symbol bits array.

+ DotCode Mask selection bitsMaskBitsMasking operationExample:099 099 099 099 099 099 099 099 106000Adds successive multiples of 0 to each value, i.e., no change(000) 099 099 099 099 099 099 099 099 106101Adds successive multiples of 3 to each value, modulo 113(001) 099 102 105 108 111 001 004 007 017210Adds successive multiples of 7 to each value, modulo 113(002) 099 106 000 007 014 021 028 035 049311Adds successive multiples of 17 to each value, modulo 113(003) 099 003 020 037 054 071 088 105 016

Error correction

DotCode uses Reed–Solomon error correction with prime power of 3 and finite field or . The data codewords is represented with values from 0 to 112 and mask value is counted as leading data codeword from 0 to 3. In this way the data protected array length is (1 + ND). But amount of error correction codewords is calculated only from ND: , where ND is data codewords and NC - error correction codewords.

The resulting codewords NW with error correction codewords is: , where NW is all encoding codewords: 1 mask codeword + data codewords(ND) + error correction codewords(NC).

Because Reed–Solomon error correction cannot correct amount of codewords which are more than polynomial, if NW happens to exceed 112, the data is split into error correction blocks: , where B is block counts.

The data can be split into block in the following way, for each block ‘’’n’’’, for n equals 1 to B:

The error correction data is written after single data block in scrambled mode: (ND)(NC1_1)(NC2_1)(NC3_1)...(NC1_n)(NC2_m)(NC3_k)

Encoding DotCode encoding size is not limited by standard, but practical encoding size in 100x99 version which includes 4950 dots can encode 366 raw data codewords, 730 digits, 365 alphanumeric characters, or 304 bytes. The data message in DotCode is represented with data codewords from 0 to 112 which are encoded with 5-of-9 binary dot patterns.

DotCode supports the following features: Natively encodes digits or ASCII charset (between 0 and 127) with A, B and C code sets and extended ASCII values (128 to 255) with Upper Shift; Effectively encodes bytes (5 bytes into 6 codewords) with Binary Latch; Encodes GS1 data; Encodes Unicode symbols with Extended Channel Interpretation feature; Supports Structured append encoding (logically using multiple barcode symbols as single data stream); Supports “Macro” encoding.

+ DotCode character setData symbolData symbolCode WordCode Set ACode Set BCode Set CDot PatternCode WordCode Set ACode Set BCode Set CDot PatternCharASCIICharASCIICharASCIICharASCII0SP32SP320010101010157Y89Y89571101011001!33!330101010101158Z90Z90581101100102"34"340201010110159[91[91591101101003#35#350301011010160\92\92601110010104$36$360401101010161]93]93611110100105%37%370510101011062^94^94621110101006&38&380610101101063_95_95630010111107'39'390710110101064NUL00`96640011011108(40(400811010101065SOH01a97650011101109)41)410901010111066STX02b986600111101010*42*421001011011067ETX03c996701001111011+43+431101011101068EOT04d1006801011110012,44,441201101011069ENQ05e1016901100111013-45-451301101101070ACK06f1027001101110014.46.461401110101071BEL07g1037101110011015/47/471510010101172BS08h10472011101100160480481610010110173HT09i10573011110010171491491710011010174LF10j10674011110100182502501810100101175VT11k10775100010111193513511910100110176FF12l10876100011011204524522010101001177CR13m10977100011101215535532110101100178SO14n11078100100111226546542210110010179SI15o11179100110011237557552310110100180DLE16p11280100111001248568562411001010181DC117q11381101000111259579572511010010182DC218r1148210110001126:58:582611010100183DC319s1158310111000127;59;592700101011184DC420t1168411000101128<60<602800101101185NAK21u1178511000110129=61=612900101110186SYN22v1188611001001130>62>623000110101187ETB23w1198711001100131?63?633100110110188CAN24x1208811010001132@64@643200111010189EM25y1218911011000133A65A653301001011190SUB26z1229011100010134B66B663401001101191ESC27{1239111100100135C67C673501001110192FS281249211101000136D68D683601010011193GS29}1259300010111137E69E693701011001194RS30~1269400011011138F70F703801011100195US31DEL1279500011101139G71G713901100101196Shift BCR/LF13/109600011110140H72H7240011001101972x Shift BHT *099700100111141I73I7341011010011983x Shift BFS *289800110011142J74J7442011011001994x Shift BGS *299900111001143K75K75430111001011005x Shift BRS *30(17)...(10)00111100144L76L76440111010011016x Shift BShift ALatch A01000111145M77M7745100101110102Latch BLatch AShift B01100011146N78N78461001101101032x Shift C2x Shift C2x Shift B01110001147O79O79471001110101043x Shift C3x Shift C3x Shift B01111000148P80P80481010011101054x Shift C4x Shift C4x Shift B10001111049Q81Q8149101011100106Latch CLatch CLatch B10011110050R82R8250101100110107FNC1FNC1FNC110111100051S83S8351101101100108FNC2FNC2FNC211000111052T84T8452101110010109FNC3FNC3FNC311001110053U85U8553101110100110Upper Shift AUpper Shift AUpper Shift A11011100054V86V8654110010110111Upper Shift BUpper Shift BUpper Shift B11100011055W87W8755110011010112Binary LatchBinary LatchBinary Latch11100110056X88X8856110100110* in lead data positions, these become “Macros”

There three main rules at message encoding start: The default starting encoding is Code Set C; In case of two digits in Code Set C (0 – 100 value) are encoded in the position of the first codeword, the message is decoded as GS1 message; If FNC1 (opposite effect to Code 128) or other non-digit codeword (101 - 112) is encoded in the position of the first codeword, the message is decoded as NON GS1 message.

Binary byte encoding

DotCode can encode full 8-bit charset in two ways: With Upper Shift, which requires 2 codewords on one (128 to 255) symbol; With Binary Latch, which requires 1 Binary Latch symbol and 6 codewords on every 5 bytes.

Upper Shift modes can encode (128 to 255) extended ASCII characters in two codewords with returning to previous mode: + DotCode Upper Shift encodingUpper Shift TypeCodewordsASCIIUpper Shift A64 to 95128 to 159Upper Shift B0 to 95160 to 255

Binary Latch mode can encode 8-bit charset and ECI sequences from 1 to 5 symbols. It uses the following rules: The data is split into block of 5 symbols (byte or ECI mode identifier) or 6 codewords; 0 – 258 values are radix converted from five base 259 into six base 103 values; 0 – 255 values are byte values; 256, 257 or 258 values marks to encode ECI sequence in next 1, 2 or 3 bytes respectively; Any DotCode codewords in the encoded sequence above 102 (from 103 to 112) interrupt or change mode.

+ DotCode Binary mode non-data codewordsCodewordOperation103Interrupt for 2x Shift C104Interrupt for 3x Shift C105Interrupt for 4x Shift C106Interrupt for 5x Shift C107Interrupt for 6x Shift C108Interrupt for 7x Shift C109Terminate with Latch to A110Terminate with Latch to B111Terminate with Latch to C112Terminate with Symbol Separation, Latch to C

As we see in the following table, Binary Latch encodes data more effectively, starting from 3 bytes.