Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5 Raster –based algorithms in CAC. 5.1 area filling algorithm 5.2 distance transformation graph and skeleton graph generation algorithm 5.3 convolution.

Similar presentations


Presentation on theme: "Chapter 5 Raster –based algorithms in CAC. 5.1 area filling algorithm 5.2 distance transformation graph and skeleton graph generation algorithm 5.3 convolution."— Presentation transcript:

1 Chapter 5 Raster –based algorithms in CAC

2 5.1 area filling algorithm 5.2 distance transformation graph and skeleton graph generation algorithm 5.3 convolution filtering algorithm 目录:

3 5.1 area filling algorithm Given the boundary of an area, set the assigned color code to all pixels within the range of boundary. Currently, polygon color filling is most commonly used by area filling algorithm, there are two kinds of commonly used polygon color filling algorithm  Recursive seed filling algorithm  Scan line seed filling algorithm

4 1. Recursive seed filling algorithm Recursive seed filling algorithm is also called boundary filling algorithm. The algorithm principle is: let single pixel be filling embryo. Within the given area range, propagate through some methods and fill the whole polygon area. To implement the propagation of filling embryo, 4-connected and 8- connected approaches can be applied

5

6 2. Scan line seed filling algorithm 1 ) scan line seed filling algorithm The object of scan line seed filling algorithm is scan line segments. Scan line segments refers to the horizontal combination of adjacent equal-value pixels within the area. Its two end points take the pixels with boundary value as boundary, that is, within a line segment, there are only one type pixels. Scan line seed filling algorithm is suitable for boundary defined area. The area can be convex or concave , and can contain one or more holes.

7

8 2 ) Modification of scan line seed filling algorithm The basic idea of modification algorithm is: Once find a new inner section, push the y value(yn), left and right column values xnl, xnr into stack. At the same time, push the current section’s y value, left and right column value xl,xr to stack to store and transfer the corresponding information

9 3.Curvilinear integral based area filling algorithm Curvilinear integral based area filling algorithm utilizes green formula to calculate region area and fill region.

10 2)Algorithm implementation :  Conduct contour tracking for a region and find pixel sequence L of region boundary.  Utilize area calculation formula to recognize inner point of regional pixel set.

11 4.Applications of area filling algorithm in CAC Area filling algorithm is widely applied in Cartography and other fields such as pattern filling, distance and polygon area calculation, raster pattern local deletion, animation and graphics art processing etc.

12 1) Filling pattern

13 2)Calculate polygon area

14 SA=M 2 ·S a SB=M 2 ·S b SC=M 2 ·S c

15 §5.2 distance transformation image and skeleton image generation algorithm 1.Distance transformation image Distance transformation image algorithm is a special transformation that is applied on raster image. It transform binary image to gray image, where gray value of each pixel equals to the minimal distance from the pixel to adjacent object on raster map.

16 1)Basic idea Generate distance map from discretely distributed spatial targets according to certain distance definition, where distance of each point is minimal distance to all spatial targets. The measurement of distance is calculated based on four orientation distance.

17 (1) Euclidean distance based distance transformation image algorithm. “Euclidean distance” distance transformation formula: where coordinates of point P 1 ( i , j )and point P 2 (m , n) i, j,m, n are all integer.

18 Only If the value of a 、 b 、 c in image satisfy 1< b/a < 2 , 1<c/b < 2 , then it is approximate integer value of Euclidean distance in raster space.

19 2 ) raster image based algorithm algorithm that obtains distance transformation image The basic method is: repeatedly perform “thinning”operation on original image and perform arithmetic overlapping on “thinning” result and interim result. The stop condition is: “if perform “thinning” operation once more, the image will be all zero matrix.

20

21

22 2.Skeleton image algorithm Skeleton image is formed by pixels which are pixels with maximum gray value in distance transformation image. Skeleton image algorithm is concise, intuitive target representation method. It comprehensively utilizes outer outline and inner region information and has overwhelming advantages in describing target shape. Moreover, its “ridge line”connection relation keeps intact spatial topological structure and thus significantly extends application fields of skeleton image algorithm.

23 Skeleton image algorithm has two implementation method, one is gray image based skeleton image algorithm, the other is algorithm that directly extracts target skeleton from gray image. Gray image based skeleton image algorithm has three types. (1) Extract skeleton from distance transformation

24 (2) Utilize boundary model to extract skeleton. It utilizes discrete boundary model to approximate real shape and extract skeleton. It can obtain stable skeleton in the noise environment. However, since it is difficult to construct discrete boundary model, the extracted skeleton may be unconnected.

25 (3) Regional identifier based method. The algorithm perform “lowering” operation to all non-ridge points in parallel ground object image. It marks the image as skeleton point and background point to obtain one-pixel-width skeleton that is homotopic to the original image.

26 Distance transformation based skeleton generation algorithm

27 3. Application of distance transformation image and skeleton image Distance transformation image is often applied in cartography, various measurements of geographical space (area, density, slope, aspect) and spatial analysis (buffer region analysis, Voronoi analysis and DEM analysis) etc.

28 §5.3 Convolution filtering algorithm Filtering is a process that attenuates or suppresses a kind of periodical vibrated phenomena within a certain frequency range. The vibration here refers to the different image values (gray values) that gradually change with sampling points on the image. Therefore the filtering formulas used in communication techniques can be simply applied to digital image processing. In cartography raster data processing, normally, convolution filtering algorithms are adopted to enhance the graphics and image.

29

30

31

32 Thanks


Download ppt "Chapter 5 Raster –based algorithms in CAC. 5.1 area filling algorithm 5.2 distance transformation graph and skeleton graph generation algorithm 5.3 convolution."

Similar presentations


Ads by Google