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

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

2 Examples 7

1. Example

Project: ZXing.Net
Source File: PDF417ScanningDecoder.cs
View license
private static DecoderResult decodeCodewords(int[] codewords, int ecLevel, int[] erasures)
      {
         if (codewords.Length == 0)
         {
            return null;
         }

         int numECCodewords = 1 << (ecLevel + 1);

         int correctedErrorsCount = correctErrors(codewords, erasures, numECCodewords);
         if (correctedErrorsCount < 0)
         {
            return null;
         }
         if (!verifyCodewordCount(codewords, numECCodewords))
         {
            return null;
         }

         // Decode the codewords
         DecoderResult decoderResult = DecodedBitStreamParser.decode(codewords, ecLevel.ToString());
         if (decoderResult != null)
         {
            decoderResult.ErrorsCorrected = correctedErrorsCount;
            decoderResult.Erasures = erasures.Length;
         }
         return decoderResult;
      }

2. Example

Project: zxing-core
Source File: PDF417ScanningDecoder.cs
View license
private static DecoderResult decodeCodewords(int[] codewords, int ecLevel, int[] erasures)
      {
         if (codewords.Length == 0)
         {
            return null;
         }

         int numECCodewords = 1 << (ecLevel + 1);

         int correctedErrorsCount = correctErrors(codewords, erasures, numECCodewords);
         if (correctedErrorsCount < 0)
         {
            return null;
         }
         if (!verifyCodewordCount(codewords, numECCodewords))
         {
            return null;
         }

         // Decode the codewords
         DecoderResult decoderResult = DecodedBitStreamParser.decode(codewords, ecLevel.ToString());
         if (decoderResult != null)
         {
            decoderResult.ErrorsCorrected = correctedErrorsCount;
            decoderResult.Erasures = erasures.Length;
         }
         return decoderResult;
      }