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