public final class ErrorCorrection
extends java.lang.Object
PDF417 error correction implementation.
This example is quite useful in understanding the algorithm.
ReedSolomonDecoder
Constructor and Description |
---|
ErrorCorrection() |
Modifier and Type | Method and Description |
---|---|
int |
decode(int[] received,
int numECCodewords,
int[] erasures) |
private int[] |
findErrorLocations(ModulusPoly errorLocator) |
private int[] |
findErrorMagnitudes(ModulusPoly errorEvaluator,
ModulusPoly errorLocator,
int[] errorLocations) |
private ModulusPoly[] |
runEuclideanAlgorithm(ModulusPoly a,
ModulusPoly b,
int R) |
private final ModulusGF field
public int decode(int[] received, int numECCodewords, int[] erasures) throws ChecksumException
received
- received codewordsnumECCodewords
- number of those codewords used for ECerasures
- location of erasuresChecksumException
- if errors cannot be corrected, maybe because of too many errorsprivate ModulusPoly[] runEuclideanAlgorithm(ModulusPoly a, ModulusPoly b, int R) throws ChecksumException
ChecksumException
private int[] findErrorLocations(ModulusPoly errorLocator) throws ChecksumException
ChecksumException
private int[] findErrorMagnitudes(ModulusPoly errorEvaluator, ModulusPoly errorLocator, int[] errorLocations)