Esempio n. 1
0
 /// <summary>
 /// Converts one row of luminance data to 1 bit data. May actually do the conversion, or return
 /// cached data. Callers should assume this method is expensive and call it as seldom as possible.
 /// This method is intended for decoding 1D barcodes and may choose to apply sharpening.
 /// </summary>
 /// <param name="y">The row to fetch, which must be in [0, bitmap height).</param>
 /// <param name="row">An optional preallocated array. If null or too small, it will be ignored.
 /// If used, the Binarizer will call BitArray.clear(). Always use the returned object.
 /// </param>
 /// <returns> The array of bits for this row (true means black).</returns>
 public BitArray getBlackRow(int y, BitArray row)
 {
     if (binarizer == null)
     {
         return(matrix.getRow(y, row));
     }
     else
     {
         return(binarizer.getBlackRow(y, row));
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Converts one row of luminance data to 1 bit data. May actually do the conversion, or return
 /// cached data. Callers should assume this method is expensive and call it as seldom as possible.
 /// This method is intended for decoding 1D barcodes and may choose to apply sharpening.
 /// </summary>
 /// <param name="y">The row to fetch, which must be in [0, bitmap height).</param>
 /// <param name="row">An optional preallocated array. If null or too small, it will be ignored.
 /// If used, the Binarizer will call BitArray.clear(). Always use the returned object.
 /// </param>
 /// <returns> The array of bits for this row (true means black).</returns>
 public BitArray getBlackRow(int y, BitArray row)
 {
     return(binarizer.getBlackRow(y, row));
 }