\Zxing\Common\DetectorMonochromeRectangleDetector

<p>A somewhat generic detector that looks for a barcode-like rectangular region within an image.

It looks within a mostly white region of an image for a region of black and white, but mostly black. It returns the four corners of the region, as best it can determine.

Summary

Methods
Properties
Constants
__construct()
detect()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
findCornerFromCenter()
blackWhiteRange()
$MAX_MODULES
$image
N/A

Properties

$MAX_MODULES

$MAX_MODULES

$image

$image

Methods

__construct()

__construct(mixed  $image) : mixed

Parameters

mixed $image

Returns

mixed —

detect()

detect() : mixed

<p>Detects a rectangular region of black and white -- mostly black -- with a region of mostly white, in an image.</p>

Throws

\Zxing\NotFoundException

if no Data Matrix Code can be found

Returns

mixed —

findCornerFromCenter()

findCornerFromCenter(mixed  $centerX, mixed  $deltaX, mixed  $left, mixed  $right, mixed  $centerY, mixed  $deltaY, mixed  $top, mixed  $bottom, mixed  $maxWhiteRun) : \Zxing\Common\Detector\a

Attempts to locate a corner of the barcode by scanning up, down, left or right from a center point which should be within the barcode.

Parameters

mixed $centerX
mixed $deltaX
mixed $left
mixed $right
mixed $centerY
mixed $deltaY
mixed $top
mixed $bottom
mixed $maxWhiteRun

Throws

\Zxing\NotFoundException

if such a point cannot be found

Returns

\Zxing\Common\Detector\a —

{@link com.google.zxing.ResultPoint} encapsulating the corner that was found

blackWhiteRange()

blackWhiteRange(mixed  $fixedDimension, mixed  $maxWhiteRun, mixed  $minDim, mixed  $maxDim, mixed  $horizontal) : int[]

Computes the start and end of a region of pixels, either horizontally or vertically, that could be part of a Data Matrix barcode.

Parameters

mixed $fixedDimension
mixed $maxWhiteRun
mixed $minDim
mixed $maxDim
mixed $horizontal

Returns

int[] —

with start and end of found range, or null if no such range is found (e.g. only white was found)