The art of computer programming, volume 1 (3rd ed.): fundamental algorithms
The art of computer programming, volume 1 (3rd ed.): fundamental algorithms
Abstract data types and the development of data structures
Communications of the ACM
The Design and Analysis of Computer Algorithms
The Design and Analysis of Computer Algorithms
How to color in a coloring book
SIGGRAPH '78 Proceedings of the 5th annual conference on Computer graphics and interactive techniques
SIGGRAPH '79 Proceedings of the 6th annual conference on Computer graphics and interactive techniques
Graphs and Hypergraphs
Graphics goodies #2—a simple, versatile procedural texture
ACM SIGGRAPH Computer Graphics
Contour filling in raster graphics
SIGGRAPH '81 Proceedings of the 8th annual conference on Computer graphics and interactive techniques
A new and fast contour-filling algorithm
Pattern Recognition
Projection filling based on contour structural points
ICCSA'03 Proceedings of the 2003 international conference on Computational science and its applications: PartIII
Science of Computer Programming
Hi-index | 0.00 |
Filling regions in raster images is the term given to the problem of extracting a connected region (that contains some preselected seed pixel) and filling it with some color. A connected region is formally defined as the collection of all pixels that are in the transitive closure of a pixel-connectivity operator that is applied to the seed. For example, the 4-pixel-connectivity operator selects all pixels that are (spatially) 4-connected to the pixel operand, and have the same color. This problem can be solved relatively easily if the fill color is distinguishable so that every pixel, once colored (i.e. flagged OLD) will not be considered again. In binary images, the fill “color” is usually a binary pattern and therefore, a “colored” pixel may still have its previous (e.g., black or white) color. This fact makes the problem non-trivial. In this paper, a region to be filled is represented as a connected directed a-cyclic planar graph in which nodes are regular regions (defined below) that are easy to handle. An arc connects a regular region to its neighbor below which shares a common horizontal sub-boundary. Based on this abstract representation of a region, a formulation of the filling problem is developed as a variant of graph traversing. The difficulties imposed by filling with a binary pattern, and the avoidance of an explicit description of the graph are explored and a solution is presented. This solution utilizes the frame buffer (that is used to display the image) for improved efficiency of a graph traversal algorithm. This method turns out to be similar to [Lieberman-78], that is shown here to be incorrect. The complexity of the new algorithm is 0(N*L+ N*Log N), compared to 0(N*L*Log N) there, where N is the number of nodes in the graph and L is the average composite degree of each node. A proof of correctness for the new algorithm is given too.