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.

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.

characteristics

condition

down point

concatenation of same color in a line or a column

count of modules=(5+i)

3+i

module block of same color

block size 2*2

3

1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column

40

ration of dark modules in whole

from 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.