[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ocrad] bad parameter building a Rectangle
From: |
Tilman Hausherr |
Subject: |
Re: [Bug-ocrad] bad parameter building a Rectangle |
Date: |
Sat, 14 Aug 2010 18:05:41 +0200 |
As a *temporary* workaround pending the real fix, I have tried a
"symptom" fix, because I prefer a less perfect ocr output than an abort
with no output at all. I added two code lines just before the rectangle
construction:
if (left > c.guess( g ).value)
left = std::max (0, c.guess( g ).value - 1);
Rectangle re( left, b.top(), c.guess( g ).value, b.bottom() );
apparently this does not "break" anything else, and this fix is only
active when the program would abort anyway. The total ocr output is
similar to what I'd get if I alter the image at the problem-area. The
output from the problem-area is irrelevant to me, because these areas
were just noise anyway.
Tilman
On Thu, 12 Aug 2010 17:59:52 +0200, Antonio Diaz Diaz wrote:
>Tilman Hausherr wrote:
>> bad parameter building a Rectangle
>> l = 742, t = 691, r = 741, b = 706
>>
>> In Textline::recognize2(), in the segment
>> // separate merged characters recognized by recognize1
>
>Not in vain this segment has the comment "// FIXME this block sucks". :-)
>
>It will likely take me some time to fix this because the values
> c.gv[0] code 0, value 738
> c.gv[1] code 102, value 741
> c.gv[2] code 105, value 741
>are incorrect input for this loop.
>
>
>> I can't send you the image, sadly, because as soon as I remove anything
>> meaningful, the error no longer happens. But I can offer you more trace
>> output if needed.
>
>Thanks, I'll tell you if I need it.
>
>Textline::recognize2() tries to process the "remaining" characters with
>some defect, so it is probably the buggiest part of ocrad.
>
>
>Best regards,
>Antonio.
>
>_______________________________________________
>Bug-ocrad mailing list
>address@hidden
>http://lists.gnu.org/mailman/listinfo/bug-ocrad