圆的整数反走样生成算法  被引量:4

Integral algorithm for circle anti-aliasing

在线阅读下载全文

作  者:贾银亮[1] 张焕春[1] 经亚枝[1] 

机构地区:[1]南京航空航天大学自动化学院,南京210016

出  处:《中国图象图形学报》2012年第1期130-136,共7页Journal of Image and Graphics

摘  要:针对现有圆的反走样生成算法计算复杂,反走样效果一般的缺点,提出一种基于中点画圆法的整数反走样生成算法。该算法根据像素中心到理想圆弧的距离来分配灰度,生成64级灰度的反走样圆弧。通过省略二次项来简化计算,并用简单的计算修正省略带来的误差以保证精度。为了简化计算,提出相邻像素的灰度递推方法,利用整数移位、加法、比较来实现反走样。该算法结构简单,反走样效果较好,由于避免了浮点和除法运算,便于硬件实现。Anti-aliasing for circles is complex and the existing algorithms are not working satisfactory. To improve the efficiency and the anti-aliasing effect, an integral algorithm is presented for circle anti-aliasing based on midpoint generating algorithm. The new algorithm finds the grayscales of each pixel according to the distance between the center of the pixel and the circle. A circle with a 64 levels grayscale can be drawn. The algorithm abandons the two-order epsilon and corrects the error by simple calculations. We built a method to forecast the grayscale change between neighboring pixels using integer shift, addition, and comparing without using floating-point and divisions, making it easy to implement the algorithm on hardware. The results show that the anti-alia.sing effect and its efficiency have been improved.

关 键 词:圆弧 反走样 整数运算 灰度 

分 类 号:TP391[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象