Re: Error recognising capital 'J'

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Error recognising capital 'J'

by Bugzilla from ant_diaz@teleline.es :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Uwe,

Ocrad 0.17 has changed. It now recognizes it as a capital 'I'. Most
probably ocrad 0.18 will recognize it correctly.

By the way, if correctly converted JasJaspal.pbm.bz2 is only 1136 bytes
long, not huge at all.


Regards,
Antonio.


Uwe Dippel <udippel@...> wrote:

> We found an error at recogition of 'J', at least in 0.16.
> Even at a rather clear height, it always ends at '7', and even
> unambiguously:
>
> # Ocr Results File. Created by GNU Ocrad version 0.16
> source file JasJaspal.pnm
> total text blocks 1
> text block 1 0 0 705 129
> lines 1
> line 1 chars 35 height 22
>  95  46 13 26; 1, '7'0
> 111  54 16 18; 1, 'a'0
> 128  54 13 18; 1, 's'0
> 142  54 18 26; 1, 'p'0
> 163  54 16 18; 1, 'a'0
> 180  45  8 27; 2, '1'1, 'l'0
> 187  45 11 35; 1, 'j'0
> 202  54 16 19; 1, 'e'0
> 220  54 15 19; 1, 'e'0
> 237  49 10 24; 1, 't'0
>
> I have added the .tif for your information (pnm is so huge ...)
> What I did:
> tifftopnm JasJaspal.tif > JasJaspal.pnm
> ocrad -x JasJaspal.orf JasJaspal.pnm
>
> Thanks for looking into it - or has 0.17 been changed w.r.t. this ?


_______________________________________________
Bug-ocrad mailing list
Bug-ocrad@...
http://lists.gnu.org/mailman/listinfo/bug-ocrad

Re: Re: Error recognising capital 'J'

by Bugzilla from ant_diaz@teleline.es :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here you have a quick fix. Just apply this patch to ocrad 0.17:

--- feats_test0.cc~     2007-06-29 14:29:13.000000000 +0200
+++ feats_test0.cc      2007-07-11 20:16:59.000000000 +0200
@@ -155,7 +155,7 @@
      return 0;

    int row, col;
-  if( 2 * lp[lp.pos(50)] >= b.width() ) col = b.hpos( 25 );
+  if( ( 2 * lp[lp.pos(50)] ) + 1 >= b.width() ) col = b.hpos( 25 );
    else col = b.hpos( 75 );
    row = b.seek_top( b.vcenter(), col );
    if( row <= b.top() || ( row < b.vpos( 25 ) && b.escape_top( row, col
) ) )


Regards,
Antonio.


_______________________________________________
Bug-ocrad mailing list
Bug-ocrad@...
http://lists.gnu.org/mailman/listinfo/bug-ocrad

Re: Re: Error recognising capital 'J'

by Uwe Dippel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Antonio Diaz Diaz wrote:

> Here you have a quick fix. Just apply this patch to ocrad 0.17:

Thanks very much !! - Applied and works flawlessly !

Uwe



_______________________________________________
Bug-ocrad mailing list
Bug-ocrad@...
http://lists.gnu.org/mailman/listinfo/bug-ocrad