14.01.2014 Views

Segmentation of heterogeneous document images : an ... - Tel

Segmentation of heterogeneous document images : an ... - Tel

Segmentation of heterogeneous document images : an ... - Tel

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix B<br />

Implementation <strong>an</strong>d<br />

s<strong>of</strong>tware<br />

tel-00912566, version 1 - 2 Dec 2013<br />

During the course <strong>of</strong> this PhD thesis, m<strong>an</strong>y applications <strong>an</strong>d comm<strong>an</strong>d line tools<br />

are developed. Some are developed for the purpose <strong>of</strong> <strong>document</strong>, data or feature<br />

visualization <strong>an</strong>d some are developed to perform computation for different<br />

parts <strong>of</strong> the system. Finally, all the pieces have come together as a single unified<br />

program that c<strong>an</strong> be applied on <strong>an</strong>y <strong>document</strong> image using one comm<strong>an</strong>d line<br />

tool.<br />

The comm<strong>an</strong>d line tool is written in C++ using both QT, OpenCV <strong>an</strong>d<br />

libLBGFS libraries. The cross-platform s<strong>of</strong>tware with 6800 lines <strong>of</strong> code is developed<br />

on a Windows machine using Micros<strong>of</strong>t Visual Studio <strong>an</strong>d is ported into<br />

Linux for testing <strong>an</strong>d evaluation.<br />

The general syntax <strong>of</strong> the comm<strong>an</strong>d line tool is:<br />

• DematSeg [Options] FolderPath<br />

where folder path is the location <strong>of</strong> .TIFF <strong>document</strong> <strong>images</strong>. Without <strong>an</strong>y<br />

option, the application opens each <strong>document</strong> image in the folder path in a<br />

multi-threaded framework <strong>an</strong>d applies page segmentation on every <strong>document</strong><br />

image. Options c<strong>an</strong> be used to generate features or to train different parts <strong>of</strong><br />

the system. Options are:<br />

• ”-gn”: This option redirects the application to process all <strong>document</strong> <strong>images</strong><br />

in the folder path for the purpose <strong>of</strong> extracting connected components<br />

<strong>an</strong>d generating features for them. All features will come together in a single<br />

file that should later be used for training. The application expects to<br />

find the corresponding XML ground truth file for each <strong>document</strong> image in<br />

the same folder. XML ground-truths should have a name consisting <strong>of</strong> the<br />

base name <strong>of</strong> the <strong>document</strong> plus one <strong>of</strong> the suffixes: ” GT”, ” PrimaGT”<br />

or ”pc-” as prefix (ICDAR2009 default naming). If a ground truth file is<br />

not available, the application simply ignores that <strong>document</strong> <strong>an</strong>d continues<br />

processing the remaining <strong>document</strong>s in the folder.<br />

116

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!