作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2006, Vol. 32 ›› Issue (5): 63-64,121.

• 软件技术与数据库 • 上一篇    下一篇

新区入栈的区域填充扫描线算法

张荣国 1,刘焜 2   

  1. 1. 太原科技大学计算机学院,太原 030024;2. 合肥工业大学,合肥 230009
  • 出版日期:2006-03-05 发布日期:2006-03-05

Area Filling Scan Line Algorithm with Pushing New Area into Stack

ZHANG Rongguo1, LIU Kun2   

  1. 1. School of Computer, Taiyuan Scientific Technique University, Taiyuan 030024;2. Hefei University of Technology, Hefei 230009
  • Online:2006-03-05 Published:2006-03-05

摘要: 针对传统区域填充存在的一些欠缺,提出了一种新的区域填充扫描线算法。该算法在处理同一条扫描线上的多个填充区域时,分成向上搜索和向下搜索两种情况进行,每种情况又都可能出现多个搜索新区;在填充过程中,考虑到当前扫描线区间的左右连续性和上下相关性,只需将出现的新搜索区压入堆栈,不需要将相邻的每根扫描线都压入堆栈,从而减少了像素的重复判读和回溯区的搜索时间,避免了不必要的进栈出栈处理,提高了填充效率。

关键词: 区域填充;扫描线;像素点;回溯区

Abstract: Against the defect of traditional area filling, this paper presents a new method for area filling scan line algorithm. To deal with areas on same scan line, different searching directions need to be processed separately, new searching areas may be found in this process. Considering the continuity and relativity of current scan line, it needs only push the new searching areas rather than every scan line area into stack in filling. In this case, it will decrease the number of repeated pixel reading, reduce the time spent on retrospective searching area, avoid needless operations of push stack and pop stack, raise the filling efficiency

Key words: Area filling; Scan line; Pixel point; Retrospective searching area