A New Contour Filling Algorithm Based on Chain Codes Description

Contour filling is one of the most common problems in image and graphics processing and plays a very important role in many in many applications, such as image analysis, pattern recognition and computer graphics. The paper proposed a new concept of sub-chain and a new sub-chain based filling algorithm. The new algorithm is based on separating the whole contour into many simple sub contours and then does filling in each sub contour. Compared with the conventional algorithms, the new algorithm has five advantages. (1) Its speed is faster and its implementation is easier. (2) It needs less storage-just need size-fixed temporary memory or none in many cases. (3) It finds seeds for filling automatically and easily. (4) It needs neither sorting operation nor discrete Green's theorem to find the seeds for filling. (5) It can be implemented with flexible forms according to the different background of applications. Theory and experiments prove it can fill any complex regions with more convenient, faster speed, more simple, more applicable. It can be used widely in applications of graphics and image processing.