bug-ocrad
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-ocrad] detection of joined 'fl' doesn't seem to work well


From: lode leroy
Subject: [Bug-ocrad] detection of joined 'fl' doesn't seem to work well
Date: Fri, 29 Jul 2005 15:56:46 +0200

I'm trying to understand the following piece of code (character_r11.c:124-146.
Could someone describe this in words?

Actually, it would be nice to have a one-line description of all the functions
like profile.minima profile.increasing etc..


     if( f.rp.minima() == 1 && !f.rp.increasing( f.rp.pos( 75 ) ) )
       {
       int dmax = 0; bool bar = false;
       for( int row = b.vcenter(); row > b.vpos( 25 ); --row )
         {
         int d = b.hcenter() - b.seek_left( row, b.hcenter() );
         if( d > dmax ) dmax = d;
         else if( 2 * d < dmax && dmax > 2 ) bar = true;
         if( bar && Ocrad::similar( d, dmax, 25 ) )
           {
           int col, limit = b.seek_right( b.vcenter(), b.hcenter() );
           for( col = b.hcenter(); col <= limit; ++col )
             if( b.seek_bottom( b.vcenter(), col ) < b.bottom() ) break;
           if( col > b.left() && col < b.right() )
             {
             only_guess( 0, b.left() );
             add_guess( 'f', col - 1 ); add_guess( 'l', b.right() );
             return;
             }
           }
         }
       }
     }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]