bug-ocrad
[Top][All Lists]
Advanced

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

Re: [Bug-ocrad] Re: OCRAD project: library is needed


From: Igor Filippov [Contr]
Subject: Re: [Bug-ocrad] Re: OCRAD project: library is needed
Date: Tue, 13 Jul 2010 12:27:52 -0400

Antonio,

Ah, the RC1 works with the official API for me, what is more the
recognition is better than for 0.19! Great work, thank you!
When can we expect the 0.20 release?

Dmitry, thank you for preparing the test case!

Igor


On Sun, 2010-07-11 at 08:27 -0400, Antonio Diaz Diaz wrote:
> Hello Dmitry,
> 
> Dmitry Katsubo wrote:
> > I expect that "N" in test cases 1 and 2 is recognized not worse then via
> > API. Also API recognizes "r" and "t", which may trigger false positives.
> 00028615-0030via Blob is gi00028615-0030 results because you are 
> cheating, twice. :-)
> 
> First, Blob is supposed to represent a "blob of ink", that is, black 
> pixels must be contiguous and must touch the four sides. By adding a 
> white frame you have "enlarged" the Blob, but this can break the code.
> 
> Second, you have again "enlarged" the blob in line 107 by using "width, 
> height" instead of "right, bottom". the correct code is:
>    Blob* b = new Blob(0, 0, width-1, height-1);
> 
> After correcting those two errors (see attached file), Blob and API 
> results are the same. "N"s aren't recognized because they are too small 
> (<10 pixels high), and short, thick slashes are often recognized as "r" 
> or "t".
> 
> To solve the problem with the small "N"s, I have just released 
> ocrad-0.20-rc1 which reduces the height limit for "N" to 9 and includes 
> the function "OCRAD_scale". See an example of use in line 152 of the 
> corrected test case attached.
> http://download.savannah.gnu.org/releases-noredirect/ocrad/ocrad-0.20-rc1.tar.gz
> http://download.savannah.gnu.org/releases-noredirect/ocrad/ocrad-0.20-rc1.tar.lz
> 
> 
> > When I change to OCRAD_greymap, I get the following result:
> 
> This is because in OCRAD_bitmap 0 is white, while in OCRAD_greymap 0 is 
> black. You need to invert the values (see attached file) or pass invert 
> = true to OCRAD_set_image. For a description of map values see ocradlib.h:
>     The format for each pixel depends on mode like this:
>     OCRAD_bitmap   --> 1 byte  per pixel;  0 = white, 1 = black
>     OCRAD_greymap  --> 1 byte  per pixel;  256 level greymap (0 = black)
>     OCRAD_colormap --> 3 bytes per pixel;  16777216 colors RGB (0,0,0 = 
> black)
> 
> 
> Best regards,
> Antonio.





reply via email to

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