Diff for scripts/shell/sms/sms.markiza.sk/aocr.sh between version 1.2 and 1.3
| version 1.2, 2002/09/10 23:24:11 |
version 1.3, 2002/09/11 10:03:49 |
| Line 36 if [ "X$1" = "X" ]; then |
|
| Line 36 if [ "X$1" = "X" ]; then |
|
| fi |
fi |
| |
|
| # |
# |
| |
# `convert' binary test |
| |
# |
| |
|
| |
CONVERT=`which convert`; |
| |
if [ "X$CONVERT" = "X" ]; then |
| |
echo "Sorry, 'convert' binary not found, aocr.sh cannot run."; |
| |
exit; |
| |
fi |
| |
|
| |
# |
| # Input parameters parsing |
# Input parameters parsing |
| # |
# |
| |
|
| PICTURE="$1"; |
PICTURE="$1"; |
| DEBUG="0"; |
DEBUG="0"; |
| VERBOSE="0"; |
VERBOSE="0"; |
| if [ "X$2" == "X-d" ]; then DEBUG="1"; fi |
if [ "X$2" = "X-d" ]; then DEBUG="1"; fi |
| if [ "X$2" == "X-v" ]; then VERBOSE="1"; fi |
if [ "X$2" = "X-v" ]; then VERBOSE="1"; fi |
| |
|
| # |
# |
| # Color tables |
# Color tables |
| Line 58 FA9='2,6,6,3,3,5,8,6' |
|
| Line 68 FA9='2,6,6,3,3,5,8,6' |
|
| # Frequency color analyse |
# Frequency color analyse |
| # |
# |
| |
|
| FACLR=$( convert ${PICTURE} txt:- |\ |
FACLR=$( "${CONVERT}" "${PICTURE}" txt:- |\ |
| cut -d'#' -f2 |\ |
cut -d'#' -f2 |\ |
| sort |\ |
sort |\ |
| uniq -c |\ |
uniq -c |\ |
|
|
| # Frequency font analyse |
# Frequency font analyse |
| # |
# |
| |
|
| FAFNT=$( convert "${PICTURE}" txt:- |\ |
FAFNT=$( "${CONVERT}" "${PICTURE}" txt:- |\ |
| egrep "${FACLR}" |\ |
egrep "${FACLR}" |\ |
| cut -d: -f1 |\ |
cut -d: -f1 |\ |
| cut -d, -f1 |\ |
cut -d, -f1 |\ |
Platon Group <platon@platon.org> http://platon.org/
|
|