Voronoi page segmentation

73 views
Skip to first unread message

Amy Winder

unread,
Sep 30, 2009, 7:27:40 PM9/30/09
to OCRopus

Has anyone been able to use the Voronoi page segmentation module successfully?  I can use it outside of OCRopus via the “be” and “drawing/dl” commands so that an image of the segmented document is produced, but I haven’t been able to run it within OCRopus.  The README file states that “jam” needs to be invoked to build it, but when I do so I get the following error:

 

Jamfile: No such file or directory

… found 7 targets(s)…

 

I’ve updated to version 4.3.  Is there something else I need to do to get this file?

 

Thanks for your help,

 

Amy Winder

Boise State University

 

Faisal Shafait

unread,
Oct 11, 2009, 8:39:16 AM10/11/09
to ocr...@googlegroups.com
Hi,
Sorry, the documentation is not up-to-date. Jam is deprecated and no longer supported. Current build system is scons. You need to write a top-level file for instance in C++ and call Voronoi method from it. A simple way of trying it out is to put it in commands/ folder. Here is a "quick and dirty" sample code:

#include "ocropus.h"

using namespace iulib;
using namespace ocropus;

int main(int argc, char **argv){
    bytearray in;
    intarray out;
    read_image_gray(in,stdio(argv[1],"r"));
    autodel<ISegmentPage> segmenter(make_SegmentPageByVORONOI());
    segmenter->segment(out,in);
    write_png_packed(stdio(argv[2],"w"),out);
}

If the file is in commands/ folder, it will automatically be compiled when scons is run in the ocropus/ folder.

Cheers,
Faisal
Reply all
Reply to author
Forward
0 new messages