extern KADMOS_ERROR KADMOS_API rec_init (RecData *recdata, const char *file_title); extern KADMOS_ERROR KADMOS_API rec_winit (RecData *recdata, const wchar_t *file_title); extern KADMOS_ERROR KADMOS_API rel_init (RelData *reldata, const char *file_title); extern KADMOS_ERROR KADMOS_API rel_winit (RelData *reldata, const wchar_t *file_title); extern KADMOS_ERROR KADMOS_API rep_init (RepData *repdata, const char *file_title); extern KADMOS_ERROR KADMOS_API rep_winit (RepData *repdata, const wchar_t *file_title);
recdata, reldata, repdata
REC
, REL
or REP
.file_title
RE_SUCCESS or KADMOS error type.
re?_init()
loads the classifier file, specified by file_title
, for subsequent
calls of re?_info()
, re?_do()
, and rel_freeimages()
. The classifier is unloaded by
a call of re?_end()
, the allocated memory is freed. For the call of re?_init()
the values of
version
and interna
in the structures RecData
, RelData
, RepData
,
the sub structure ReInit
, and the sub structure ReParm
are concerned.
If version
is filled in, it will be checked for correctness. Else the version of the called library is filled
in by re?_init()
.
The values of interna will be set to handles of the loaded classifier data, and must not be changed before re?_end()
has been called. In the ReParm
sub structure parm
the default values of the parameters will
be filled in.
For rel_init()
:
Under rel_grid_maxlen
, rel_graph_maxlen
, and rel_result_maxlen
it has to be
specified how much memory has to be provided internally for data structures RelGrid
, RelGraph
,
and RelResult
to take the results of internal calls of rel_do()
from subsequent calls of
rep_do()
.
For rep_init()
:
If rep_memory
is set to the address of allocated memory and rep_memory_size
is set to the size of
this memory in byte, then the line recognition results of subsequent calls of rep_do()
are stored there.
The values of interna
will be set to handles of the loaded classifier data, and must not be
changed before re?_end()
has been called. In the ReParm
sub structure parm
the
default values of the parameters will be filled in. In case of success the functions return RE_SUCCESS
,
in case of error they return the related error type. The error text can be retrieved by calling re_GetErrorText()
or be displayed by calling re_DisplayErrorText()
.