El 2003-11-25 a las 09:28 -0300, Marcel Mourguiart escribió:
Estimados, siento si esto no es un tema del foro en particular, pero recuerdo que había gente interesada en tener un programa para el scaner ( reconocer texto ) que fuera bueno en linux, bueno me dicen que autotrace es muy pero muy bueno, no lo he probado por que no tengo scaner, pero viendo la pagina parece que es realmente bueno. En fin ahí les va:
Ah. Pero ese proyecto no es para Reconocimiento Optico de Caracteres (OCR), sino para convertir gráficos de pixels (bitmaps) a gráficos vectoriales, al estilo del CorelTrace - y la SuSE 8.2 trae la versión 0.31.1, que es la misma que está en la web... luego no han desarrollado nada en un tiempo considerable. Ciertamente, el programa tiene utilidad para escanear letras, como punto de entrada para el software que luego las reconozca... siempre y cuando encontremos otro programa que continue a partir de ese punto y saque el texto. Más abajo hago una prueba con él. En la versión 8.2 de SuSE el kde trae kooka, un manejador del escaner, que esta vez trae linkado un OCR _comercial_ y _propietario_ que funciona: KADMOS OCR engine. ¿Las malas noticias? 1) Se cuelga - el kooka, no solo el kadmos. Parece un programa de winbug. Una de las veces empezó a comer memoria, ¡hasta tragarse los dos gigas de swap que tengo! Por supuesto, el kernel empezó a cargarse tareas hasta que acertó con la culpable. Normalmente son cuelgues más benignos, pero que te hacen perder el trabajo hecho hasta el momento, siquiera sea configurar el programita. 2) A pesar de colgarse como el winbugs, no es tan bueno como el OCR que trae mi Epson para winbugs, que es capaz de escanear paginas de novelas sin equivocarse ni una letra - o al menos que yo me de cuenta - incluyendo incluso el formato correcto en el Word (tipos de letra, margenes, etc). Voy a poner un ejemplo; lo he hecho a partir de una página de un cuento de Asimov (Robot AL-76 Goes Astray - Robot AL-76 va a la deriva). El texto está en inglés, porque el de español no lo tengo escaneado en windows (en formato grafico para usar en linux, lo borré) y entonces no sirve para esta comparación. El texto ocupa bastante (son tres copias); pensé limitarlo a un párrafo, pero entonces no podriais comparar bien los rseultados... así que he dejado el trozo completo en los tres ejemplos. +++--- kooka + kadmos ----------- RobotAL-76G0esAsuay 91 bottonl ofthe trees; at the end he was winging wildly froIn one of the topnlost branches. The salne impulse that had driven the_,osse horizonta_y had driven hinl ver__y. As to how he had covered the 6fty feet froIn roots to top - Ivhether he had clhnbed,iuln_d, or 00_n - he did not know, and he didn't give a __ar_cle ofnever-lnind. 1Vhat he did know wasthat;_roperty had been desuoyed by a robot teIn_rarily in his possession. AU visiwls of reIvards vanished and _vere replaced by trenlbHng nightInares of hostile citizenry, shrieking lynch lm,bs, lalvsults, nlurder charges, andwhat M_andy Payne would say. Mostly _vhat Mirandy Payne would say. He was yelH_ wildly and hoarsely,_Hey, you robot, yoU slnash thatthing, d0 you hear? Slnash it good! You forget I ever had anything to do with it. You're a stranger to lne, see? You don't ever say a word about it. Forget it, yOU hear?' He didn't expect his orders to d0 any good; it _as o_ reflex action. \Vhat he didn't knw was that a robot always obeys a huInan order except _vhere carrying it out invoIves dangerto another hunlan. , AL-76, therefore, calnlly and InethodicaHy proceeded to denlolish his Disinto into nlbble and Mnders. Just as he was stalnping the last cubic inch under foot, Saln Tobe andhis cont_gent arrived, and RandoWlPayne, sensing thatthe re_ owners of the robot had conle, drop_ out of the tree head-6rst and rnade for regions unknolvn feet-6rst. He did not wait for his re_ard. Austill W4lde, Robotical Engineer,turned to SaIn Tobe and said,_Did you get anythhlg out ofthe robot?' 'I'obe shook his head and snarled deep in his throat. _Nothing. Not one thing. I-Ie's forgotten everythiag that_s ha;,_ed since he left the factory. He Inust have goaen --------------------------------- +++--- kooka + gocr ---------- No hace nada, no funciona. Ojo, a veces funciona, pero la imagen que tengo escaneada no le gusta y no saca nada. Así que lo hago por linea de comandos a continuación --------------------------------- +++--- gocr --------------------- ' ' Ro_orAL-76,GoesAs___ _ 9l ' bottom ofthe trees; at ?eend hewas ewingingwil_yfrom one of the t_pmost branches. The same _p_se ?at had driven ?e possehor_ontQy had driven him ve__y. _ , As _to how he had co_ered ?e Miy feet from roots to top - whether he _ad climbed, i_ped, or nown - be _'d ' not know, Qd he didn't give a p_cle ofnever-_d. What he d_ _ow was ?at property had been des_oyed _y_ a robot temporar_y _ _s _ssession. _ visions of rewards v_shed and were replaced by _emb_g ' __ ?gh_es of hos_' e ci__ny, sh_e_g lynch mobs, la_suits, murder charges, Qd what MirQdy Payne would say. Mos_y what Mirandy Payne _o_d say._ He was yellingwil' dly Qd hoarsely, 'Hey, you robot, you _ smash ?at ?ing, do you hear? Smash it good! Y_ou f_rget I ever had an_g to do wi_? it. You're a s_Qger tD me, ,see? You don't _ver say a_ word _bout it. Forget it, you hea_?' . ' ' . , He didn't expect hi's _rders to do any good; it w&s only renex action. What _e _dn't know was ?at a robot alw_ys obeys a humQ oider except where ca_ing it _ut _volves danger to another h_Q. ' _ _. AL-76, ?erefore, _almly Qd me?_cQy proceeded to demolish his Disinto inio _bble _d ninders. , ' Just as he was e?_m__g ?e last cubic _ch _der,f_t,_ SamTobeQdhiscon_gent_Rived, QdRQdolphPayne, sensing?, at thirealownersof?erobotbadcome, _op_ ' out of ?e _ee head-_st Qd made for regions _o_' feet-__t.' , _ He _'d notwait for _s rewar, d. _ ' , Au,s_Wilde, Robo_cal En_eer, _edto S_To_Q_ _ _d, 'Did you get Q_gout of?e robot3' ,, Tobe,,shook his head Qd sn_led deep _ _bis _oat. , '?o_g. Not oae, _g. He's forgonen.eve_' _t's bappened,, 's,_ce he leh ?. e factoy. He m, ust bave gonea , --------------------------------- Nota: en el caso del Presto! (a continuación), la salida es un fichero .rtf, por lo que al convertirlo a ascii he tenido que añadir 8 o 9 retornos de carro para que se vean los párrafos (sale una linea larga por párrafo, pero el Pine no lo sabe). +++--- epson + Presto! OCR ------ Robot AL-76 Goes Astray 91 bottom of the trees; at the end he was swinging wildly from one of the topmost branches. The same impulse that had driven the posse horizontally had driven him vertically. As to how he had covered the fifty feet from roots to top - whether he had climbed, jumped, or flown - he did not know, and he didn't give a particle of never-mind. What he did know was that property had been destroyed by a robot temporarily in his possession. All visions of rewards vanished and were replaced by trembling nightmares of hostile citizenry, shrieking lynch mobs, lawsuits, murder charges, and what Mirandy Payne would say. Mostly what Mirandy Payne would say. He was yelling wildly and hoarsely, 'Hey, you robot, you smash that thing, do you hear? Smash it good! You forget I ever had anything to do with it. You're a stranger to me, see? You don't ever say a word about it. Forget it, you hear?' He didn't expect his orders to do any good; it was only reflex action. What he didn't know was that a robot always obeys a human order except where carrying it out involves danger to another human. AL-76, therefore, calmly and methodically proceeded to demolish his Disinto into rubble and flinders. Just as he was stamping the last cubic inch under foot, Sam Tobe and his contingent arrived, and Randolph Payne, sensing that the real owners of the robot had come, dropped out of the tree head-first and made for regions unknown feet-first. He did not wait for his reward. Ausdn Wilde, Robotical Engineer, turned to Sam Tobe and said, 'Did you get anything out of the robot?' Tobe shook Tlis head and snarled deep in his throat. 'Nothing. Not one thing. He's forgotten everything that's happened since he left the factory. He must have gotten --------------------------------- Se ve claramente que este último programa gana por goleada (creo que veo un unico error en el texto) - y es uno de esos que viene incluido con el escanner, para windows, ni siquiera es uno de los buenos comprados aparte. El fichero gráfico es el mismo para todos - lo cual me obliga a empezar en windows con la prueba, porque ese ocr está cap**o y no puede coger un fichero de imagen, por narices tienes que escanear el documento. Eso lo han hecho para que otros no usen el OCR sin haber comprado el escanner, es un medio de protección. "Ventajas" del software comercial... ------ Probando el autotrace, mediante su GUI frontline (gnome). He trazado la misma página, y me ha tardado varios minutos, usando como un giga de swap y 600 megas de ram o así. El PC se me ha ralentizado, y es un PIV 1800Mhz con 700Mb de ram. Ahora pide permiso para sobredibujar las lineas, avisando de que necesitará memoria y tiempo... ... Lo he tenido que matar. Ha empezado a chupar memoria, y se ha tragado poco a poco los dos gigas de swap. He tenido que ir cerrando como he podido aplicaciones como el Mozilla, OpenOffice, la sesión de kde que tenía abierta (tenía el gnome y el kde en sendas "consolas virtuales" simultaneas). Y me ha costado matarlo, porque tardaba en dibujar cada pantalla un minuto. Puf... me temo que para reconocimiento de caracteres no vale, porque si se pone así para una página de cuartillo... :-( Es un problema: cuando una aplicación se desmadra y pide demasiada memoria, el kernel debía suspenderlo antes de que la ocupe toda, para que el usuario puede matarla. O matar aplicaciones por orden de más memoria a menos, que no se como hace la decisión. En este caso he podido matar al culpable manualmente, pero si me hubiera ido a lo mejor se me cae la maquina :-(
Mis sinceras disculpas a quien no le interese el tema.
Cualquier cosa que funcione en linux no es offtopic. Más rollo he puesto yo O:-) -- Saludos Carlos Robinson