Re: [CBLX] OCR efficace sous linux ?

[ Thread Index | Date Index | More lists.tuxfamily.org/carrefourblinux Archives ]


Et en plus de la réponse de Dominique A. je t'envois en pj un script:
tesseract-ocr doit être installé, 
et dans ton home tu as besoin d'un répo lin_scans/
Comme d'hab, rendre exécutable, mettre dans ~/bin ou /usr/local/bin et
lancer, puis entrer un nom de fichier comme demandé, et patienter!!!
Voir ensuite dans ~/lin_scans/

Aldo. 


On Tue, Oct 06, 2009 at 01:08:13PM +0200, Dominique Asselineau wrote:
> coolbrother@xxxxxxxxxx wrote on Tue, Oct 06, 2009 at 01:05:55PM +0200
> > Merci beaucoup, je vais tester tesseract-ocr car il fonctionne en ligne de
> > comande,
> > et donc pour moi, ça mange pas de pain de l'essayer.
> > Par contre, connaissez-vous un utilitaire pour scanner en ligne de commande ?
> 
> scanimage du paquet sane-utils, sous Debian.
> 
> dom
> --
> 
> ---
> --
>    CarrefourBLinuX MailingListe
>    Pour obtenir de l'aide, envoyez le sujet  help  à:
>    carrefourblinux-request@xxxxxxxxxxxxxxxxxxx
>    Archives:
>    http://listengine.tuxfamily.org/lists.tuxfamily.org/carrefourblinux

-- 
  Dig that crazy beat on the drums:  VINUX !!!  The best is getting better!
  ----------------------------------<http://vinux.org.uk>------------------
#!/bin/bash
# Scan2OCR script
# O. La Rosa - 30-01-2008 - Public - rev. 02-02-2008  
# 
# Default resolution = 600. Feel free to modify it... depending on the OCR
# prog you're currently using...
# 

# 

# Default scan output directory:
dr="lin_scans"
#dr="$HOME/lin_scans"

cd ~
mkdir $dr
cd $dr

clear

echo "Scan2TIF2OCR ! ! ! 


Current directory = `pwd` 

 "
read -p"Full output file name will be (something.tif): " outf
test -z "$outf" && echo "Aborted!" && sleep 1 && exit
echo "
Scanning to TIFF! Then converting to TXT through TesserAct-OCR!

.... Please wait ...

	x = 215mm  y = 297mm  mode = Gray  format = TIFF  output = OCR.TXT

	Copied to dir $dr  to file $outf 
 "

#scanimage -l 0 -t 0 -x 215 -y 297 --mode Gray --format tiff >`pwd`/$outf
#scanimage -l 0 -t 0 -x 215 -y 297 --mode Gray --format tiff --resolution 150 >`pwd`/$outf
#scanimage -l 0 -t 0 -x 215 -y 297 --mode Gray --format tiff --resolution 175 >`pwd`/$outf
#scanimage -l 0 -t 0 -x 215 -y 297 --mode Gray --format tiff --resolution 300 >`pwd`/$outf
scanimage -l 0 -t 0 -x 215 -y 297 --mode Gray --format tiff --resolution 600 >`pwd`/$outf
/usr/bin/tesseract $outf $outf.ocr
rm $outf.ocr.map
rm $outf.ocr.raw

echo "Finished!
  "

ls -s1rt `pwd`/$outf*

exit


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/