On Wed, Aug 12, 2009 at 08:24, Bill<[email protected]> wrote:
>
> Hi,
> I have a problem with the extract_subimage method from imgpos.h. I'm
> trying to get subimages from a larger image. Then I would like to
> binarize the subimage, but I get a segmentation fault. The code looks
> like this:
>
>        bytearray line, binline;
>
>        extract_subimage(line, clean, x0, y0, x1, y1);
>        if(line.length()!=0) binarizer->binarize(binline, line);
>        else printf("error in bin");
>
> The x,y coordinates are 100% accurate ints.

I can't tell anything from this.  Most likely, your coordinates are
wrong and you're giving an empty image to the binarizer.

The way to debug this is to print the dimensions of "line", and if
they look right, save the subimage.

Tom

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to