Table of Contents

Class Detector

Namespace
ZXing.QrCode.Internal
Assembly
zxing.dll

Encapsulates logic that can detect a QR Code in an image, even if the QR Code is rotated or skewed, or partially obscured.

public class Detector
Inheritance
Detector
Derived
Inherited Members

Constructors

Detector(BitMatrix)

Initializes a new instance of the Detector class.

public Detector(BitMatrix image)

Parameters

image BitMatrix

The image.

Properties

Image

Gets the image.

protected virtual BitMatrix Image { get; }

Property Value

BitMatrix

ResultPointCallback

Gets the result point callback.

protected virtual ResultPointCallback ResultPointCallback { get; }

Property Value

ResultPointCallback

Methods

calculateModuleSize(ResultPoint, ResultPoint, ResultPoint)

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

protected virtual float calculateModuleSize(ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft)

Parameters

topLeft ResultPoint

detected top-left finder pattern center

topRight ResultPoint

detected top-right finder pattern center

bottomLeft ResultPoint

detected bottom-left finder pattern center

Returns

float

estimated module size

detect()

Detects a QR Code in an image.

public virtual DetectorResult detect()

Returns

DetectorResult

DetectorResult encapsulating results of detecting a QR Code

detect(IDictionary<DecodeHintType, object>)

Detects a QR Code in an image.

public virtual DetectorResult detect(IDictionary<DecodeHintType, object> hints)

Parameters

hints IDictionary<DecodeHintType, object>

optional hints to detector

Returns

DetectorResult

DetectorResult encapsulating results of detecting a QR Code

findAlignmentInRegion(float, int, int, float)

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

protected AlignmentPattern findAlignmentInRegion(float overallEstModuleSize, int estAlignmentX, int estAlignmentY, float allowanceFactor)

Parameters

overallEstModuleSize float

estimated module size so far

estAlignmentX int

x coordinate of center of area probably containing alignment pattern

estAlignmentY int

y coordinate of above

allowanceFactor float

number of pixels in all directions to search from the center

Returns

AlignmentPattern

AlignmentPattern if found, or null otherwise

processFinderPatternInfo(FinderPatternInfo)

Processes the finder pattern info.

protected virtual DetectorResult processFinderPatternInfo(FinderPatternInfo info)

Parameters

info FinderPatternInfo

The info.

Returns

DetectorResult