摘要
区域填充是一个将指定不规则区域内部像素填充为填充色的过程,在计算机辅助设计和图像处理等领域有广泛应用。现有算法存在着只适用于四连通区域或者算法速度不高等缺点。提出了一种可以运用在八连通区域上的扫描线种子填充算法,同时在算法的实现上摒弃函数调用方式,以线性空间来模拟栈结构。通过对数十万个不规则区域的测试统计,此算法不但适用于八连通区域的填充,速度上也有7%~33%不同程度的提高。
The process of filling the inner pixels of specified area with specified color called area filling, it' s used widely in the fields of Computer-Aided Design and Computer Graphics. Existing algorithms have the disadvantages of low speed or can only be used on 4-adjacent connection area. This paper presents an improved scan line algorithm for area filling, based on the analysis of the classical one. The new algorithm can be applied on 8-adjacent connection area. Moreover, we use lineal space instead of classical stack and access data directly in the implemental details. Compared with the former algorithms, the speed was accelerated to 107% -133%, got by testing nearly one million irregularly areas.
出处
《计算机应用研究》
CSCD
北大核心
2006年第6期177-179,共3页
Application Research of Computers
关键词
八连通
区域填充
扫描线算法
种子点
高速
8-adjacent Connection
Area Filling
Scan Line Algorithm
Seed Point
High-speed