C# 클래스 zxingwp7.qrcode.detector.Detector

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

파일 보기 프로젝트 열기: henningms/zxing2.0-wp7 1 사용 예제들

공개 메소드들

메소드 설명
Detector ( BitMatrix image ) : System
createTransform ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, ResultPoint alignmentPattern, int dimension ) : PerspectiveTransform
detect ( ) : DetectorResult

Detects a QR Code in an image, simply.

detect ( Object>.Dictionary hints ) : DetectorResult

Detects a QR Code in an image, simply.

보호된 메소드들

메소드 설명
calculateModuleSize ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft ) : float

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

computeDimension ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, float moduleSize ) : int

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.

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

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

processFinderPatternInfo ( FinderPatternInfo info ) : DetectorResult

비공개 메소드들

메소드 설명
calculateModuleSizeOneWay ( ResultPoint pattern, ResultPoint otherPattern ) : float

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.

round ( float d ) : int

Ends up being a bit faster than Math.round(). This merely rounds its argument to the nearest int, where x.5 rounds up.

sampleGrid ( BitMatrix image, PerspectiveTransform transform, int dimension ) : BitMatrix
sizeOfBlackWhiteBlackRun ( int fromX, int fromY, int toX, int toY ) : float

This method traces a line from a point 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.

sizeOfBlackWhiteBlackRunBothWays ( int fromX, int fromY, int toX, int toY ) : float

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 point (another finder pattern center), and in the opposite direction too.

메소드 상세

Detector() 공개 메소드

public Detector ( BitMatrix image ) : System
image zxingwp7.common.BitMatrix
리턴 System

calculateModuleSize() 보호된 메소드

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

protected calculateModuleSize ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft ) : float
topLeft ResultPoint
topRight ResultPoint
bottomLeft ResultPoint
리턴 float

computeDimension() 보호된 정적인 메소드

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.

protected static computeDimension ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, float moduleSize ) : int
topLeft ResultPoint
topRight ResultPoint
bottomLeft ResultPoint
moduleSize float
리턴 int

createTransform() 공개 메소드

public createTransform ( ResultPoint topLeft, ResultPoint topRight, ResultPoint bottomLeft, ResultPoint alignmentPattern, int dimension ) : PerspectiveTransform
topLeft ResultPoint
topRight ResultPoint
bottomLeft ResultPoint
alignmentPattern ResultPoint
dimension int
리턴 zxingwp7.common.PerspectiveTransform

detect() 공개 메소드

Detects a QR Code in an image, simply.

public detect ( ) : DetectorResult
리턴 zxingwp7.common.DetectorResult

detect() 공개 메소드

Detects a QR Code in an image, simply.

public detect ( Object>.Dictionary hints ) : DetectorResult
hints Object>.Dictionary optional hints to detector ///
리턴 zxingwp7.common.DetectorResult

findAlignmentInRegion() 보호된 메소드

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 findAlignmentInRegion ( float overallEstModuleSize, int estAlignmentX, int estAlignmentY, float allowanceFactor ) : AlignmentPattern
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 ///
리턴 AlignmentPattern

processFinderPatternInfo() 보호된 메소드

protected processFinderPatternInfo ( FinderPatternInfo info ) : DetectorResult
info FinderPatternInfo
리턴 zxingwp7.common.DetectorResult