WARNING: This server is unstable and will be retired in the next days.
If you want to keep this forum available, please request immediately a migration
on the Nabble Support forum.
Forums that don't receive any migration request will be deleted forever.
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.
Recognition via Blob is giving "better" 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"
> 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 =
// Required by OCRAD, not used here: