On Jun 30, 4:13 am, Tom <[email protected]> wrote:
> simple_recolor is only for display; it will assign a large number of
> random color values.
> The bounding_boxes function returns a vector in which entry n gives
> you the bounding box for the RGB value n in the image. If you don't
> call simple_recolor, these will be bounding boxes for the characters
> in left-to-right order.
>
> So, in short, don't call simple_recolor and you will probably get what
> you need.
>
> Tom
Thanks for your answer. I managed to get the bounding boxes with an
IGrouper in the following way:
autodel<IGrouper> grouper(make_StandardGrouper());
grouper->setSegmentation(segmented);
for (int k = 0; k < grouper->length(); ++k) {
rectangle r = grouper->boundingBox(k);
}
I know that it doesn't give the unique candidates, but it tries to
group them in order to find some real character. Now I would like to
call a character classifier to find a classification to use with
grouper->setClass() function. I tried in the following way:
autodel<glinerec::IModel> classifier;
FILE * modelFile = fopen("/usr/local/share/ocropus/models/
default.model","rb");
classifier =
dynamic_cast<glinerec::IModel*>(load_component(modelFile));
but it always returns a null pointer. Am I missing something? Which is
the best way to instantiate a single character classifier and classify
a character candidate?
--
You received this message because you are subscribed to the Google Groups
"ocropus" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/ocropus?hl=en.