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

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

tel.archives.ouvertes.fr
from tel.archives.ouvertes.fr More from this publisher
14.01.2014 Views

(a) Original image (b) Height map (c) Width map tel-00912566, version 1 - 2 Dec 2013 Figure 4.3: Height and width maps 4.3.1 Height and width maps These two maps represent the local average height and width of connected components in a document image. We do not use them directly in feature functions; instead, we use them as part of the computation for a distance-based feature. Each pixel of a width/height map is the weighted average of the height or width of all text-labeled connected components in a 300 × 300 block around it. Each map can be computed using the results of two image convolutions that are divided pixel by pixel. Consider that our goal is to generate the height map. We know the location of pixels for all text-labeled components of the page. We first prepare two sparse images. The first image A has height of a component for pixels of text components, and the rest of pixels are zero. The second image B has a value of one for every pixel of text components, and the rest of the pixels are zero. We also have a weighting function K of size 300×300 pixels defined as: K(x, y) = cos( πi πj ) cos( 300 300 ) where x and y are the coordinates of pixels with (0, 0) being the center of the window. Then HeightMap(i,j) = (K ∗ A) i,j (K ∗ B) i,j The width map can be computed in the same way but instead of having the height of connected components in the A image, we use widths. Figure 4.3 displays one document image and its height and width map. We also normalize our height and width maps by dividing every pixel’s value to the height and width of the document, respectively. 58

(a) Document (b) Filled text components (c) Graphical components tel-00912566, version 1 - 2 Dec 2013 Figure 4.4: A document image, its filled text and graphical components, separated using our text/graphics separation method. 4.3.2 Text components We rendered image of text components. A morphological hole-filling algorithm is applied to text components without any restrictions to ensure that there are no holes in them. This also enhances the results of applied Gabor filters that aim to capture text lines. Figure 4.4 shows a document image with all its filled components. Note that tables are not filled because they are already taken out for being graphical components. 4.3.3 Graphical components Just like text components we also use graphical components in our feature function. Figure 4.4 also displays the extracted graphical components. Pixels that belong to graphical components have a value of one, and the rest of the pixels have a value of zero. 4.3.4 Horizontal and vertical run-lengths Vertical and horizontal run-lengths are two other features computed for each document image. Consider a document image containing plain black text on a solid white background. In vertical run-length map, each white pixel of the background is replaced with the number of white runs, which are confined vertically between two black pixels of text. Then we normalize this map by dividing each pixel by the height of the image. According to this definition, pixels that belong to page margins have a maximum possible value of 1 and pixels that belong to text components have a value of zero. We use the same strategy to compute horizontal run-lengths. By 59

(a) Document (b) Filled text components (c) Graphical components<br />

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

Figure 4.4: A <strong>document</strong> image, its filled text <strong>an</strong>d graphical components, separated<br />

using our text/graphics separation method.<br />

4.3.2 Text components<br />

We rendered image <strong>of</strong> text components. A morphological hole-filling algorithm<br />

is applied to text components without <strong>an</strong>y restrictions to ensure that there are<br />

no holes in them. This also enh<strong>an</strong>ces the results <strong>of</strong> applied Gabor filters that<br />

aim to capture text lines. Figure 4.4 shows a <strong>document</strong> image with all its filled<br />

components. Note that tables are not filled because they are already taken out<br />

for being graphical components.<br />

4.3.3 Graphical components<br />

Just like text components we also use graphical components in our feature function.<br />

Figure 4.4 also displays the extracted graphical components. Pixels that<br />

belong to graphical components have a value <strong>of</strong> one, <strong>an</strong>d the rest <strong>of</strong> the pixels<br />

have a value <strong>of</strong> zero.<br />

4.3.4 Horizontal <strong>an</strong>d vertical run-lengths<br />

Vertical <strong>an</strong>d horizontal run-lengths are two other features computed for each<br />

<strong>document</strong> image. Consider a <strong>document</strong> image containing plain black text on<br />

a solid white background. In vertical run-length map, each white pixel <strong>of</strong> the<br />

background is replaced with the number <strong>of</strong> white runs, which are confined vertically<br />

between two black pixels <strong>of</strong> text. Then we normalize this map by dividing<br />

each pixel by the height <strong>of</strong> the image.<br />

According to this definition, pixels that belong to page margins have a maximum<br />

possible value <strong>of</strong> 1 <strong>an</strong>d pixels that belong to text components have a<br />

value <strong>of</strong> zero. We use the same strategy to compute horizontal run-lengths. By<br />

59

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

Saved successfully!

Ooh no, something went wrong!