public final class RSS14Reader extends AbstractRSSReader
Modifier and Type | Field and Description |
---|---|
private static int[][] |
FINDER_PATTERNS |
private static int[] |
INSIDE_GSUM |
private static int[] |
INSIDE_ODD_TOTAL_SUBSET |
private static int[] |
INSIDE_ODD_WIDEST |
private static int[] |
OUTSIDE_EVEN_TOTAL_SUBSET |
private static int[] |
OUTSIDE_GSUM |
private static int[] |
OUTSIDE_ODD_WIDEST |
private java.util.List<Pair> |
possibleLeftPairs |
private java.util.List<Pair> |
possibleRightPairs |
Constructor and Description |
---|
RSS14Reader() |
Modifier and Type | Method and Description |
---|---|
private static void |
addOrTally(java.util.Collection<Pair> possiblePairs,
Pair pair) |
private void |
adjustOddEvenCounts(boolean outsideChar,
int numModules) |
private static boolean |
checkChecksum(Pair leftPair,
Pair rightPair) |
private static Result |
constructResult(Pair leftPair,
Pair rightPair) |
private DataCharacter |
decodeDataCharacter(BitArray row,
FinderPattern pattern,
boolean outsideChar) |
private Pair |
decodePair(BitArray row,
boolean right,
int rowNumber,
java.util.Map<DecodeHintType,?> hints) |
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 int[] |
findFinderPattern(BitArray row,
boolean rightFinderPattern) |
private FinderPattern |
parseFoundFinderPattern(BitArray row,
int rowNumber,
boolean right,
int[] startEnd) |
void |
reset()
Resets any internal state the implementation has after a decode, to prepare it
for reuse.
|
count, decrement, getDataCharacterCounters, getDecodeFinderCounters, getEvenCounts, getEvenRoundingErrors, getOddCounts, getOddRoundingErrors, increment, isFinderPattern, parseFinderValue
decode, decode, patternMatchVariance, recordPattern, recordPatternInReverse
private static final int[] OUTSIDE_EVEN_TOTAL_SUBSET
private static final int[] INSIDE_ODD_TOTAL_SUBSET
private static final int[] OUTSIDE_GSUM
private static final int[] INSIDE_GSUM
private static final int[] OUTSIDE_ODD_WIDEST
private static final int[] INSIDE_ODD_WIDEST
private static final int[][] FINDER_PATTERNS
private final java.util.List<Pair> possibleLeftPairs
private final java.util.List<Pair> possibleRightPairs
public Result decodeRow(int rowNumber, BitArray row, java.util.Map<DecodeHintType,?> hints) throws NotFoundException
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 foundpublic void reset()
Reader
reset
in interface Reader
reset
in class OneDReader
private Pair decodePair(BitArray row, boolean right, int rowNumber, java.util.Map<DecodeHintType,?> hints)
private DataCharacter decodeDataCharacter(BitArray row, FinderPattern pattern, boolean outsideChar) throws NotFoundException
NotFoundException
private int[] findFinderPattern(BitArray row, boolean rightFinderPattern) throws NotFoundException
NotFoundException
private FinderPattern parseFoundFinderPattern(BitArray row, int rowNumber, boolean right, int[] startEnd) throws NotFoundException
NotFoundException
private void adjustOddEvenCounts(boolean outsideChar, int numModules) throws NotFoundException
NotFoundException