mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 13:04:05 -08:00
348ebf3adc
- ported the HybridBinarizer from Java for improved 2D binarization - updated BinaryBitmap to report if it supports cropping and rotation - test binary updates to compare both binarizers like it used to git-svn-id: https://zxing.googlecode.com/svn/trunk@1489 59b500cc-1b3d-0410-9834-0bbf25fbcc57
46 lines
1.1 KiB
Bash
Executable file
46 lines
1.1 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
blackboxpath="../core/test/data/blackbox"
|
|
|
|
if [ "$*" != "" ]; then
|
|
formats="$*"
|
|
else
|
|
formats="ean13 ean8 upce upca qrcode"
|
|
fi
|
|
|
|
passed=0;
|
|
failed=0;
|
|
oldcat="";
|
|
|
|
for format in $formats; do
|
|
for pic in `ls ${blackboxpath}/${format}-*/*.{jpg,JPG,gif,GIF,png,PNG} 2>/dev/null | sort -n`; do
|
|
category=${pic%/*};
|
|
category=${category##*/};
|
|
if [ "$oldcat" != "$category" ]; then
|
|
echo "***** $oldcat finished - $passed of $((passed+failed)) passed **** ***** ******* ***** *********************"
|
|
oldcat=$category;
|
|
passed=0;
|
|
failed=0;
|
|
fi
|
|
echo -n "Processing: $pic ... "
|
|
tmp="${pic}"
|
|
tmp="${tmp%JPG}";
|
|
tmp="${tmp%jpg}";
|
|
tmp="${tmp%gif}";
|
|
tmp="${tmp%GIF}";
|
|
tmp="${tmp%png}";
|
|
tmp="${tmp%PNG}";
|
|
txt="${tmp}txt";
|
|
expected=`cat "$txt"`;
|
|
actual=`build/zxing $pic`;
|
|
if [ "$expected" == "$actual" ]; then
|
|
echo "passed."
|
|
passed=$((passed+1));
|
|
else
|
|
echo -e "FAILED\n Expected: $expected\n Detected: $actual"
|
|
failed=$((failed+1));
|
|
fi
|
|
done
|
|
done
|
|
echo "***** $oldcat finished - $passed of $((passed+failed)) passed **** ***** ******* ***** *********************"
|