"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/common/HybridBinarizer.java" between
zxing-zxing-3.4.0.tar.gz and zxing-zxing-3.4.1.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages.

HybridBinarizer.java  (zxing-zxing-3.4.0):HybridBinarizer.java  (zxing-zxing-3.4.1)
skipping to change at line 134 skipping to change at line 134
int[] blackRow = blackPoints[top + z]; int[] blackRow = blackPoints[top + z];
sum += blackRow[left - 2] + blackRow[left - 1] + blackRow[left] + blac kRow[left + 1] + blackRow[left + 2]; sum += blackRow[left - 2] + blackRow[left - 1] + blackRow[left] + blac kRow[left + 1] + blackRow[left + 2];
} }
int average = sum / 25; int average = sum / 25;
thresholdBlock(luminances, xoffset, yoffset, average, width, matrix); thresholdBlock(luminances, xoffset, yoffset, average, width, matrix);
} }
} }
} }
private static int cap(int value, int max) { private static int cap(int value, int max) {
return value < 2 ? 2 : value > max ? max : value; return value < 2 ? 2 : Math.min(value, max);
} }
/** /**
* Applies a single threshold to a block of pixels. * Applies a single threshold to a block of pixels.
*/ */
private static void thresholdBlock(byte[] luminances, private static void thresholdBlock(byte[] luminances,
int xoffset, int xoffset,
int yoffset, int yoffset,
int threshold, int threshold,
int stride, int stride,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)