* lighter convert pre transform
* make OCR more reliable
This commit is contained in:
Vincent Riquer 2015-02-21 00:06:01 +01:00
parent 408e11348d
commit 3e976e643d

View File

@ -22,9 +22,9 @@ image() {
declare -A values declare -A values
tmpfile=$(mktemp --suffix=.tiff) tmpfile=$(mktemp --suffix=.tiff)
transform='-adaptive-resize 600%x400% -contrast -channel green -threshold 50%' transform='-resize 300%x200% -contrast -channel green -threshold 50%'
if (( debug >= 3 )) if (( debug_import >= 3 ))
then then
readarray -t tactout < <(convert $transform "$1" -format tiff - | tee "${1%.png}.tiff" | tesseract -l eng -psm 4 stdin stdout) readarray -t tactout < <(convert $transform "$1" -format tiff - | tee "${1%.png}.tiff" | tesseract -l eng -psm 4 stdin stdout)
else else