LU Zongqi, ZHU Yu. Fast Algorithm of Line Segment Encoding and Seed Filling Based on Line Segment Table[J]. Journal of Image and Graphics, 2009, 14(3): 499. DOI: 10.11834/jig.20090319.
Horizontal line can be used to precisely describe the shape of a certain region. Line segment table is the data structure of line. In this paper
a fast algorithm of line segment coding and seed filling based on line segment table is proposed. Every element of the table describes a horizontal line. The five parameters of the table are L
xL
xR
y and F. They denote the symbol of relationship of up and down rows
the x coordinates of left and right end
the y coordinate of the row and a flag for line type respectively. Base on line segment table
the connectivity of rows and columns can be calculated conveniently. Fast algorithm of line segment encoding follows the steps of line searching
labeling and sorting. The fast algorithm achieved by the concept of line segment table is 1/2 faster than contour filling. Results show that the data structure of line segment table is much more effective and flexible for data storage and data processing.