« Bien » numériser un document avec XSane et gocr

Même si tesseract est surement le meilleur des moteurs d’ocr libre, gocr se défend aussi, bien qu’étant moins puissant par moment. tesseract est aussi puissant qu’ennuyeux à mettre en oeuvre 🙁

J’utilise gocr 0.45 en liaison avec XSane pour récupérer les données.

Pour cet essai, j’ai pris mon exemplaire de « 1984 » en anglais. Pour installer Xsane et gocr, sous mon archlinux, il m’a suffit d’entrer un petit :

yaourt -S xsane gocr

Quand aux réglages utilisés, le plus simple est encore la capture d’écran ci-dessous :

reglage xsane pour l'OCR

Après avoir sélectionné la zone à numériser, j’ai lancé la récupération, puis le visionneur m’a donné l’image png à analyser.

Essai de xsane pour de l'ocr

Il m’a suffit de cliquer sur le bouton concernant l’OCR, et voici le résultat :

IT wAs a bright cold day Ap, and the clocks were
striking thirteen. Winston Smth, his chin nuzzle to his
breast an efort to escape the vile wind, slipped qckly
through the glass doors of Victo Msions, tho4gh not
qckly enough to prevent a swirl of gtty d4st from
Lnteng along with hîm.
The hlway smelt of boiled cabbage d old rag mats.
At one end of it a colo4red poster, too large for indoor
Iî’play, had been tacked to the wa. It depicted simply an
’11cro4s face, more th a metre wide: the face ofa man
n bo4t forty-five, with a heavy black mo4stache and
1’1d1y hdsome features. Winston made for the stairs.
l t w no 4se trying the lift. Even at the best ofmes it was
rIc{cn worke, and at present the electc c4rrent was c4t
l l’l Lre daylight ho4rs. It was part ofthe economy drive
1 rt;ration for Hate Week. The Aat was seven ghts-
11l ;1l Wston, who was thjrty-nine and had a varicose
ll’c’ lvc his right kle, went slowly, resig several
l c’ 1 m way. On each lding, opposite the lift shaft,
l33 ‘l’r with the enormo4s face gazed fiom the wall. It
I ‘ c l’s’ pires which are so contved at the eyes
Ilw yl ;34t when you move. BIG BhOTHE
l W n ‘ l'(; l l I NG YOU, the caption beneath it r.
ll’ LI t a fity voice was reang o4t a list of
glr3 wlic’I I,d sumetg to do with the production of
g a; l1. ‘ I 1 L vicc came from oblong metal plaq4e like
u t3lll’l li- -rr which formed part of the surface of the
_ ght-tu1l w;ll. Winston tumed a switch d the voice
tl3wll tlceh e words were s di gsh-

Le résultat est loin d’être parfait, mais au moins, il reste lisible 😉

Pour l’image PNG, cliquez ici. Pour le texte obtenu, cliquez ici. Il reste encore du chemin à faire, mais tant que l’on est pas obligé de tout retaper à la main, c’est le principal 😉