ZXing.PDF417.Internal.Decoder.correctErrors(int[], int[], int)

Here are the examples of the csharp api class ZXing.PDF417.Internal.Decoder.correctErrors(int[], int[], int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: dp2
Source File: Decoder.cs
View license
public DecoderResult decode(BitMatrix bits)
      {
         // Construct a parser to read the data codewords and error-correction level
         BitMatrixParser parser = new BitMatrixParser(bits);
         int[] codewords = parser.readCodewords();
         if (codewords == null || codewords.Length == 0)
         {
            return null;
         }

         int ecLevel = parser.getECLevel();
         int numECCodewords = 1 << (ecLevel + 1);
         int[] erasures = parser.getErasures();

         if (!correctErrors(codewords, erasures, numECCodewords))
            return null;
         if (!verifyCodewordCount(codewords, numECCodewords))
            return null;

         // Decode the codewords
         return DecodedBitStreamParser.decode(codewords);
      }