extern KADMOS_ERROR KADMOS_API rec_collect_kernel(const RecData *rec); extern KADMOS_ERROR KADMOS_API rel_collect_kernel(const RelData *rel);
rec, rel
RecData
or RelData
.RE_SUCCESS or KADMOS error type.
These functions collect images after the initialization with re_collect_init()
. The parameter is a pointer
to a structure RecData
or RelData
. They can be called with this pointer after calls to
rec_do()
or rel_do()
. They write the recognized images into the file image_file_title
depending upon the values of save_value_min
and save_value_max
(see re_collect_init()
).
To collect image data with rel_collect_kernel()
the parameter typograph
in ReParm
must be set with TYPO_KEEPIMG
. Only this way gives the warranty that the collected images are stored same as the
recognition in REC
. Otherwise only the circumscribed rectangles of the original images will be stored, and then
neighboring characters can incur into the image. The function re?_collect_kernel() can be used with different classifiers and
data structures. To start the data collection re_collect_kernel
the function re_collect_init()
should be called. To stop the collection re_collect_end()
should be called.
If in the module REP
in RepData
the position rel_hook
is set to
rel_collect_kernel()
, then after every internal call of rel_do()
the raster images of the best
segmentation alternatives are collected.
If in the module REL
or REP
the position rec_hook
is set to
rec_collect_kernel()
, then after every internal call of rec_do()
the current image is output.
At the modules REL
and REP
a call of rel_collect_kernel()
resp a set of
rel_hook
with rel_collect_kernel()
makes more sense, because only the images of the best segmenting
alternative then be output, but not the discarded alternatives.
If rec_collect_kernel()
or rel_collect_kernel()
were used as a hook function, these hook functions
should be disabled when calling re_collect_end()
:
rel
→rec_hook=NULL;
rep
→rec_hook=NULL;
rep
→rel_hook=NULL;