C# Class zxingwp7.common.detector.MonochromeRectangleDetector

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.

Exibir arquivo Open project: henningms/zxing2.0-wp7

Public Methods

Method Description
MonochromeRectangleDetector ( BitMatrix image ) : System
detect ( ) : ResultPoint[]

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

Private Methods

Method Description
blackWhiteRange ( int fixedDimension, int maxWhiteRun, int minDim, int maxDim, bool 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.

findCornerFromCenter ( int centerX, int deltaX, int left, int right, int centerY, int deltaY, int top, int bottom, int maxWhiteRun ) : ResultPoint

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.

Method Details

MonochromeRectangleDetector() public method

public MonochromeRectangleDetector ( BitMatrix image ) : System
image BitMatrix
return System

detect() public method

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

public detect ( ) : ResultPoint[]
return ResultPoint[]