How to create QRcode page5

top page   previous page   next page

top page > QRcode > How to create QRcode > page5: Mask pattern.

2.5 Mask pattern

If one color modules are much than other color or pattern like "finder pattern" exists, decoder application can have many mistake. To prevent above case,best mask pattern which is selected from among 8 pattern is covered in QRcode.

2.5.1 Range of masking

Range of masking is code words which is excepted "finder pattern","timing pattern" etc.

2.5.2 Condition of masking

We have 8 mask pattern in QRcode. Mask pattern indicator is 3 bit long binary representation.

mask pattern indicatorcondition
000(i+j) mod 2 = 0
001i mod 2 = 0
010j mod 3 = 0
011(i+j) mod 3 = 0
100(( i div 2)+(j div 3)) mod 2 = 0
101(ij) mod 2 + (ij) mod 3 = 0
110((ij) mod 2 +(ij) mod 3) mod 2 = 0
111((ij)mod 3 + (i+j) mod 2) mod 2 = 0
"mod" means remainder calculation, "div" means integer divide

in mask pattern 000....
at (20,20) : (20+20) mod 2 = 0 and reverse bit
at (19,20) : (20+19) mod 2 = 1 and do not reverse bit

2.5.3 Select mask pattern

We estimate result of above mask pattern to select. We select a mask pattern which has least down point to calculate in which below table. In addition conditions are applied to whole symbol.

characteristicsconditiondown point
concatenation of same color in a line or a columncount of modules=(5+i)3+i
module block of same colorblock size 2*23
1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column
40
ration of dark modules in wholefrom 50±(5+k)% to 50±(5+(k+1))%10*k

I think it is not very important to select mask pattern exactly.
In fact there is different between result of JIS X0510(1999) appendix 8 and JIS X0510(2004) appendix G in same data. And below result may is not exactly good.


We select a mask pattern "011" in example data.


next page : Format information.

previous page    [1] [2] [3] [4] [5] [6] [7]   next page