Presentation is loading. Please wait.

Presentation is loading. Please wait.

Document Image Processing 1.Geometrical Transforms 2.Linear Filters 3.Morphological Operations 4.Connected Component Labeling 5.Binarization 6.Contour.

Similar presentations


Presentation on theme: "Document Image Processing 1.Geometrical Transforms 2.Linear Filters 3.Morphological Operations 4.Connected Component Labeling 5.Binarization 6.Contour."— Presentation transcript:

1 Document Image Processing 1.Geometrical Transforms 2.Linear Filters 3.Morphological Operations 4.Connected Component Labeling 5.Binarization 6.Contour Tracing 7.X-Y Cuts 8.Smearing 9.Fourier Transform 10.Hough Transform 11.Docstrum 12.Moments and Features

2 Geometric Transforms Transform Invariants

3 Affine transforms cover a linear combination of translations, scale, and rotation I(x,y) is the original image I’(x’,y’) is the transformed image Affine Transforms TypePropertiesMeaning Translationa ij = 0; i,j = 1,2 Scalinga 12 =a 21 =0 Rotationa 11 = a 12 =- a 21 = a 22 = Slanta 11 = 1 a 12 = a 21 = 0 a 22 = 1 : rotation angle : slant angle

4 Linear Filters Convolution Equation Smoothing Low pass filter Vertical edge Sensitive filter Laplacian Edge Operator Vertical Line Sensitive filter Enhancement filter

5 Morphological Operators

6 Dilation For each background pixel superimpose the structuring element on top of the input image so that the origin of the structuring element coincides with the input pixel position. If at least one pixel in the structuring element coincides with a foreground pixel in the image underneath, then the input pixel is set to the foreground value. If all the corresponding pixels in the image are background, however, the input pixel is left at the background value.

7 For each foreground pixel superimpose the structuring element on top of the input image so that the origin of the structuring element coincides with the input pixel position. If every pixel in the structuring element coincides with a foreground pixel in the image underneath, then the input pixel is left as is. If any pixel coincides with background, however, the input pixel is changed to background. Erosion

8 Opening and Closing Opening: Erosion followed by Dilation using the same kernel Closing: Dilation followed by Erosion using the same kernel

9 Hit and Miss Kernel has 1s, 0s, and don’t-care If the 1s and 0s in the kerenel exactly match 1s and 0s in image, then the pixel underneath the origin is set to 1 else 0 Corner finding kernels Final result is “OR” of the outputs 1)used to locate isolated points in a binary image. 2)used to locate the end points on a binary skeleton -four hit-and-miss passes - one for each rotationskeleton 3)used to locate the triple points (junctions) on a skeleton.

10 Thinning NT(P1) = no. of 0 to 1 transitions in the ordered sequence, NZ(P1) = no. of non-zero neighbors of P1 Set P1 to 0 If 1

11 Vornoi Diagrams and Convex Hulls Thickening can be performed by thinning the background Convex hull of a binary shape can be visualized by imagining stretching an elastic band around the shape. The elastic band will follow the convex contours of the shape, but will `bridge' the concave contours. 1a and 1b are used for skeletonization of background. On each thickening iteration till convergence, each element is used in turn, and in each of its 90° rotations. Structuring elements 2a and 2b are used similarly to prune the skeleton until convergence to get VORNOI diagram.

12 Connected Component Labeling Scan the image by moving along a row reach a point p to be labeled –Examines neighbors of p which have already been encountered in the scan (i) to the left of p, (ii) above it, and (iii and iv) the two upper diagonal terms. –If all four neighbors are 0, assign a new label to p –else if only one neighbor is 1 assign its label to p –else if one or more of the neighbors are 1 assign one of the labels to p and note the equivalences. After completing the scan, the equivalent label pairs are sorted into equivalence classes and a unique label is assigned to each class.

13 Binarization

14 Original gray scaleGlobal threshold Adaptive (T= mean) threshold with 7x7 neighborhood Adaptive (T=mean-C) threshold with 7x7 neighborhood; C=7 and C=10 Using T= median instead of the mean Adaptive Thresholding

15 Contour Tracing

16 Chain Code Contours

17 Features Structural Features Number of holes Euler Number = no. of components – no. of holes Geometrical Features Sizes in x and y direction, aspect ratio, perimeter, area Maximum and minimum distances from boundary to center of mass Compactness = Perimeter 2 / (4 Pi. Area) Signatures = projection profiles Moments = area of the object = center of mass

18 X-Y Cuts Autocorrelation function of the projection profile, k is the lag parameter If k=k p is the first peak following the peak at k=0, sharpness of peak is given by

19

20 Smearing Run Length Smearing (RLS) Change runs of white pixels of length below a threshold to black Horizontal RLS Vertical RLS and AND

21 Fourier Transform

22 Document Images and FT

23 Hough Transform Parametric Form Global Peaks in Accumulator Space

24

25 Docstrum Slope Histograms Use local information Connect a mark (component) with K (=4..6) neighbors Histogram of the slopes More efficient than projection profiles Docstrum is the radius and angle plot of the slopes


Download ppt "Document Image Processing 1.Geometrical Transforms 2.Linear Filters 3.Morphological Operations 4.Connected Component Labeling 5.Binarization 6.Contour."

Similar presentations


Ads by Google