public final class Code128Reader extends OneDReader
Decodes Code 128 barcodes.
Modifier and Type | Field and Description |
---|---|
private static int |
CODE_CODE_A |
private static int |
CODE_CODE_B |
private static int |
CODE_CODE_C |
private static int |
CODE_FNC_1 |
private static int |
CODE_FNC_2 |
private static int |
CODE_FNC_3 |
private static int |
CODE_FNC_4_A |
private static int |
CODE_FNC_4_B |
(package private) static int[][] |
CODE_PATTERNS |
private static int |
CODE_SHIFT |
private static int |
CODE_START_A |
private static int |
CODE_START_B |
private static int |
CODE_START_C |
private static int |
CODE_STOP |
private static float |
MAX_AVG_VARIANCE |
private static float |
MAX_INDIVIDUAL_VARIANCE |
Constructor and Description |
---|
Code128Reader() |
Modifier and Type | Method and Description |
---|---|
private static int |
decodeCode(BitArray row,
int[] counters,
int rowOffset) |
Result |
decodeRow(int rowNumber,
BitArray row,
java.util.Map<DecodeHintType,?> hints)
Attempts to decode a one-dimensional barcode format given a single row of
an image.
|
private static int[] |
findStartPattern(BitArray row) |
decode, decode, patternMatchVariance, recordPattern, recordPatternInReverse, reset
static final int[][] CODE_PATTERNS
private static final float MAX_AVG_VARIANCE
private static final float MAX_INDIVIDUAL_VARIANCE
private static final int CODE_SHIFT
private static final int CODE_CODE_C
private static final int CODE_CODE_B
private static final int CODE_CODE_A
private static final int CODE_FNC_1
private static final int CODE_FNC_2
private static final int CODE_FNC_3
private static final int CODE_FNC_4_A
private static final int CODE_FNC_4_B
private static final int CODE_START_A
private static final int CODE_START_B
private static final int CODE_START_C
private static final int CODE_STOP
private static int[] findStartPattern(BitArray row) throws NotFoundException
NotFoundException
private static int decodeCode(BitArray row, int[] counters, int rowOffset) throws NotFoundException
NotFoundException
public Result decodeRow(int rowNumber, BitArray row, java.util.Map<DecodeHintType,?> hints) throws NotFoundException, FormatException, ChecksumException
OneDReader
Attempts to decode a one-dimensional barcode format given a single row of an image.
decodeRow
in class OneDReader
rowNumber
- row number from top of the rowrow
- the black/white pixel data of the rowhints
- decode hintsResult
containing encoded string and start/end of barcodeNotFoundException
- if no potential barcode is foundFormatException
- if a potential barcode is found but format is invalidChecksumException
- if a potential barcode is found but does not pass its checksum