Documentation

MaskPatternTester

Receives a QRDataInterface object and runs the mask pattern tests on it.

ISO/IEC 18004:2000 Section 8.8.2 - Evaluation of masking results

Tags
see
http://www.thonky.com/qr-code-tutorial/data-masking

Table of Contents

$dataInterface  : QRDataInterface
The data interface that contains the data matrix to test
__construct()  : mixed
Receives the QRDataInterface
getBestMaskPattern()  : int
shoves a QRMatrix through the MaskPatternTester to find the lowest penalty mask pattern
testPattern()  : int
Returns the penalty for the given mask pattern
testLevel1()  : int
Checks for each group of five or more same-colored modules in a row (or column)
testLevel2()  : int
Checks for each 2x2 area of same-colored modules in the matrix
testLevel3()  : int
Checks if there are patterns that look similar to the finder patterns (1:1:3:1:1 ratio)
testLevel4()  : float
Checks if more than half of the modules are dark or light, with a larger penalty for a larger difference

Properties

Methods

getBestMaskPattern()

shoves a QRMatrix through the MaskPatternTester to find the lowest penalty mask pattern

public getBestMaskPattern() : int
Tags
see
MaskPatternTester
Return values
int —

testPattern()

Returns the penalty for the given mask pattern

public testPattern(int $pattern) : int
Parameters
$pattern : int
Tags
see
QROptions::$maskPattern
see
QRMatrix::$maskPattern
Return values
int —

testLevel1()

Checks for each group of five or more same-colored modules in a row (or column)

protected testLevel1(array<string|int, mixed> $m, int $size) : int
Parameters
$m : array<string|int, mixed>
$size : int
Return values
int —

testLevel2()

Checks for each 2x2 area of same-colored modules in the matrix

protected testLevel2(array<string|int, mixed> $m, int $size) : int
Parameters
$m : array<string|int, mixed>
$size : int
Return values
int —

testLevel3()

Checks if there are patterns that look similar to the finder patterns (1:1:3:1:1 ratio)

protected testLevel3(array<string|int, mixed> $m, int $size) : int
Parameters
$m : array<string|int, mixed>
$size : int
Return values
int —

testLevel4()

Checks if more than half of the modules are dark or light, with a larger penalty for a larger difference

protected testLevel4(array<string|int, mixed> $m, int $size) : float
Parameters
$m : array<string|int, mixed>
$size : int
Return values
float —

Search results