摘要
灰度转换是整数反走样直线和曲线绘制算法中较为耗时的操作。为了提高反走样直线的绘制效率,提出了一种直接利用灰度循环控制生成反走样直线的纯整数算法。该算法采用两点反走样模式,根据对灰度值的分解、每次步进时的像素及其灰度值直接利用灰度增量控制产生,从而避免了候选点与真实直线之间的距离计算,以及由距离到灰度的转换。分析表明,该算法每次步进仅需要4~5次整数基本运算,其效率较现有整数反走样直线生成算法有大幅度提高,且具有与基本直线生成算法相似的简单性。
Gray-conversion is a time-consuming operation for drawing anti-aliased straight lines or curves. In order to improve the efficiency of drawing anti-aliased straight lines, we propose a new anti-aliasing algorithm based on a two-pixel model. Different from other anti-aliasing algorithms, a technique which controls iterations by grey values directly rather than distances is proposed. Calculations about distances between pixels and real line and distance-grey conversion are abandoned, but accurate grey values rather than estimated ones can be obtained. The analyses prove that for one step only 4-5 integer operations are invoked in this algorithm, and the drawing speed is faster than other methods. Furthermore, this algorithm can be constructed with the simplicity similar to basic scan conversion algorithms.
出处
《中国图象图形学报》
CSCD
北大核心
2013年第1期115-122,共8页
Journal of Image and Graphics
基金
辽宁省科技计划项目(2007410003)
沈阳市科技计划项目(F12-168-9-00)
关键词
直线生成
反走样
光栅转换
整数运算
灰度循环控制
灰度转换
straight line drawing
anti-aliased
scan-conversion
integer operations
grey-iteration control
grey-conversion