The basic scripts for performing different groundtruthing and evaluating tasks
have been provided. Below is a short description of what they do:

1. ./gtgui.sh: will start the ground truth gui where the user can prepare the
ground truth by loading the image. 
2. gtgui_preview.sh: will start the ground truth gui in the preview mode there
should be one command line argument pointing to the directory which contains
the image and the ground truth file with the same name. For testing you can
start the tool by issuing following command:

$> ./gtgui_preview.sh sample/preview/

3. ./paint_segments.sh: this tool will paint the ground truth xml on the
ground truth image to generate a new ground truth image for image based
segmentation evaluation. This also uses the word bounding box xml file. A
sample wordbounding box xml file, the groundtruth file, are provided in the
sample/ directory. Following command will generate the ground truth image
"0148_271_gt.png". 

$> ./paint_segments.sh sample/img/0148_271.png sample/groundtruth/0148_271_gt_img.png sample/groundtruth/0148_271.xml sample/ocrresults/0148_271_wordbox.xml

One can use the same script to generate the result image file provided the
results from the table recognition algorithm are also in the same xml
format. A sample xml file generated by T-Recs is provided in the sample/
directory. Following command will prepare the result image "0148_271_result_img.png"

$> ./paint_segments.sh sample/img/0148_271.png sample/t-recsresult/0148_271_result_img.png sample/t-recsresult/0148_271_result.xml sample/ocrresult/0148_271_wordbox.xml

4. ./recolor_img.sh: This tool will take the ground truth image or the result
image and generate a new image with cells painted in unique colors for
visualization. This tool takes enumerator number as argument also. See the
command help by executing the script without arguments. Sample images for
ground truth and t-recs results at different levels of abstraction (i.e. for
table, rows, cols and cells) are provided in sample/gt_imgs_recolored and
sample/result_imgs_recolored.

5. ./segment_evaluation.sh : will perform the segment evaluation and record
different classes of errors for each abstraction level in the text file. See
the script comments for further detail. Currently the script is set to compare the
image files in sample/evaluation/gt and sample/evaluation/result directory and
produce error image files in sample/evaluation directory. The suffix
"model.png" shows missed(red) and oversegmentation(purple) errors where as the suffix
"result.png" shows false positives(blue) and under segmentation(shade of red) errors in
discriminating colors. 
