public final class Decoder extends Object
The main class which implements QR Code decoding -- as opposed to locating and extracting the QR Code from an image.
| Constructor and Description |
|---|
Decoder()
|
| Modifier and Type | Method and Description |
|---|---|
DecoderResult |
decode(BitMatrix
|
DecoderResult |
decode(BitMatrix
Decodes a QR Code represented as a
BitMatrix.
|
DecoderResult |
decode(boolean[][] image)
|
DecoderResult |
decode(boolean[][] image, Map
Convenience method that can decode a QR Code represented as a 2D array of booleans.
|
public DecoderResultdecode(boolean[][] image) throws ChecksumException , FormatException
ChecksumException
FormatException
public DecoderResultdecode(boolean[][] image, Map <DecodeHintType ,?> hints) throws ChecksumException , FormatException
Convenience method that can decode a QR Code represented as a 2D array of booleans. "true" is taken to mean a black module.
image - booleans representing white/black QR Code modules
hints - decoding hints that should be used to influence decoding
FormatException - if the QR Code cannot be decoded
ChecksumException - if error correction fails
public DecoderResultdecode(BitMatrix bits) throws ChecksumException , FormatException
ChecksumException
FormatException
public DecoderResultdecode(BitMatrix bits, Map <DecodeHintType ,?> hints) throws FormatException , ChecksumException
Decodes a QR Code represented as a BitMatrix. A 1 or "true" is taken to mean a black module.
bits - booleans representing white/black QR Code modules
hints - decoding hints that should be used to influence decoding
FormatException - if the QR Code cannot be decoded
ChecksumException - if error correction fails