[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ocrad] internal error: insert_space, track not set yet.
From: |
Tilman Hausherr |
Subject: |
Re: [Bug-ocrad] internal error: insert_space, track not set yet. |
Date: |
Mon, 16 Aug 2010 19:16:56 +0200 |
On Mon, 16 Aug 2010 16:58:25 +0200, Antonio Diaz Diaz wrote:
>Hello Tilman,
>
>Tilman Hausherr wrote:
>> ocrad: internal error: insert_space, track not set yet
>
>It seems you are testing ocrad with unusual images. :-)
I'm not doing this on purpose, but my images are a wide variety of
stuff.
>> I also noticed that pending is empty, pending_tall and pending_short are
>> not empty,
>
>So the line was made of very high and very short characters without one
>single medium-sized character?
>
>If this is the case, I'll have to add some code to decide which size
>should be considered normal for characters in such a line. (Or remove
>the whole line if it is noise).
My image has all text removed and only noise :-)
Why not accept that some images might really have some very high and
very small characters? Its not that unlikely, e.g. with advertisements:
"free beer coupon *" in huge characters, and "* not valid in
Lampukistan" in very small characters. If you make a real change,
there's always the risk that you'd get worse results for the majority of
images while solving a problem that almost never happens. Maybe a
solution would be that if there are no medium characters, to just add
one element that produces a space...
On the other hand, I just thought of another "symptom" fix, and it
works: at the end of Textblock::Textblock(), replace
tlpv[i]->insert_spaces();
with
if (tlpv[i]->height() > 0)
tlpv[i]->insert_spaces();
Tilman