Line Detection

Given a textual block, the Line Detection entry in the GiDoc menu detects all its text baselines, which are marked as straight paths. The result can be clearly observed in the rightmost image of Fig. 7. As with the block, each baseline has handlers to graphically correct its position.

Figure 7: Example of line detection. From left to right: original image, contrast normalisation, skew correction, vertical projection of black-to-white transitions, and baseline detection.
Image linedetection-process

The detection method implemented in GiDoc works is illustrated in Fig. 7. The original image is normalized in contrast, skew-corrected, and then a vertical projection of black-to-white transitions is computed, from which the vertical positions of baselines are derived.

Make sure that all lines are correctly underlined for GiDoc to work accurately. Adjust text baselines if necessary, using Gimp's path tool (see path documentation). An example is shown in Fig. 8.

Figure 8: Example of manually correcting a text line.
Image layout2

giDoc Team