Properties

$image

$image : 

Type

$resultPointCallback

$resultPointCallback : 

Type

Methods

__construct()

__construct(  $image) 

Parameters

$image

detect()

detect(  $hints = null) : \Zxing\Qrcode\Detector\{@link

<p>Detects a QR Code in an image.</p>

Parameters

$hints

Throws

\Zxing\NotFoundException

if QR Code cannot be found

\Zxing\FormatException

if a QR Code cannot be decoded

Returns

\Zxing\Qrcode\Detector\{@link —

DetectorResult} encapsulating results of detecting a QR Code

getImage()

getImage() 

getResultPointCallback()

getResultPointCallback() 

processFinderPatternInfo()

processFinderPatternInfo(  $info) 

Parameters

$info

calculateModuleSize()

calculateModuleSize(  $topLeft,   $topRight,   $bottomLeft) : \Zxing\Qrcode\Detector\estimated

<p>Computes an average estimated module size based on estimated derived from the positions of the three finder patterns.</p>

Parameters

$topLeft
$topRight
$bottomLeft

Returns

\Zxing\Qrcode\Detector\estimated —

module size

findAlignmentInRegion()

findAlignmentInRegion(  $overallEstModuleSize,   $estAlignmentX,   $estAlignmentY,   $allowanceFactor) : \Zxing\Qrcode\Detector\{@link

<p>Attempts to locate an alignment pattern in a limited region of the image, which is guessed to contain it. This method uses {@link AlignmentPattern}.</p>

Parameters

$overallEstModuleSize
$estAlignmentX
$estAlignmentY
$allowanceFactor

Throws

\Zxing\NotFoundException

if an unexpected error occurs during detection

Returns

\Zxing\Qrcode\Detector\{@link —

AlignmentPattern} if found, or null otherwise

createTransform()

createTransform(  $topLeft,   $topRight,   $bottomLeft,   $alignmentPattern,   $dimension) 

Parameters

$topLeft
$topRight
$bottomLeft
$alignmentPattern
$dimension

sampleGrid()

sampleGrid(  $image,   $transform,   $dimension) 

Parameters

$image
$transform
$dimension

computeDimension()

computeDimension(  $topLeft,   $topRight,   $bottomLeft,   $moduleSize) 

<p>Computes the dimension (number of modules on a size) of the QR Code based on the position of the finder patterns and estimated module size.</p>

Parameters

$topLeft
$topRight
$bottomLeft
$moduleSize

calculateModuleSizeOneWay()

calculateModuleSizeOneWay(  $pattern,   $otherPattern) 

<p>Estimates module size based on two finder patterns -- it uses {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the width of each, measuring along the axis between their centers.</p>

Parameters

$pattern
$otherPattern

sizeOfBlackWhiteBlackRunBothWays()

sizeOfBlackWhiteBlackRunBothWays(  $fromX,   $fromY,   $toX,   $toY) 

See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of a finder pattern by looking for a black-white-black run from the center in the direction of another po$(another finder pattern center), and in the opposite direction too.</p>

Parameters

$fromX
$fromY
$toX
$toY

sizeOfBlackWhiteBlackRun()

sizeOfBlackWhiteBlackRun(  $fromX,   $fromY,   $toX,   $toY) 

<p>This method traces a line from a po$in the image, in the direction towards another point.

It begins in a black region, and keeps going until it finds white, then black, then white again. It reports the distance from the start to this point.

This is used when figuring out how wide a finder pattern is, when the finder pattern may be skewed or rotated.

Parameters

$fromX
$fromY
$toX
$toY