com.google.zxing.common.detector
Class MonochromeRectangleDetector

java.lang.Object
  extended by com.google.zxing.common.detector.MonochromeRectangleDetector

public final class MonochromeRectangleDetector
extends Object

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.

Since:
BlackBerry API 6.0.0

Constructor Summary
MonochromeRectangleDetector(BitMatrix image)
           
 
Method Summary
 ResultPoint[] detect()
          Detects a rectangular region of black and white -- mostly black -- with a region of mostly white, in an image.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

MonochromeRectangleDetector

public MonochromeRectangleDetector(BitMatrix image)
Since:
BlackBerry API 6.0.0


Method Detail

detect

public ResultPoint[] detect()
                     throws ReaderException

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

Returns:
ResultPoint[] describing the corners of the rectangular region. The first and last points are opposed on the diagonal, as are the second and third. The first point will be the topmost point and the last, the bottommost. The second point will be leftmost and the third, the rightmost
Throws:
ReaderException - if no Data Matrix Code can be found
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.