液晶与显示, 2016, 31 (4): 392, 网络出版: 2016-04-13  

基于灰度控制的任意端点直线反走样算法研究

Anti-aliasing algorithm for arbitrary-endpoint line based on gray control
作者单位
1 空军工程大学 航空航天工程学院, 陕西 西安 710038
2 陕西华燕航空仪表有限公司, 陕西 汉中 723102
3 陆军航空兵学院 飞行理论系,北京 101123
摘要
针对使用灰度控制算法不能准确绘制端点不在像素中心点的直线的问题,结合Wu算法,提出了一种基于灰度控制的任意端点直线反走样算法。介绍了Wu算法思想和灰度控制反走样算法,对两种算法进行数学分析,提出灰度控制不能解决的问题及问题产生的后果。结合Wu算法提出了新的基于灰度控制的算法,新算法减少了距离计算和灰度转换的计算,同时解决了任意端点直线的反走样问题。对新算法的效率和反走样效果进行仿真计算。仿真结果表明,新算法比Wu算法效率更高,绘制直线所用时间平均减少33.91%;新算法比灰度控制算法绘制直线更准确,特别是在直线移动的过程中,有较好的动态显示效果。本文提出的新算法,效率较高,显示效果较好,具有很高的应用价值。
Abstract
Aiming at the problem that gray control algorithm can’t draw accurately a line whose endpoints do not in the center of a pixel, combined with the Wu algorithm, an anti-aliasing algorithm for arbitrary-endpoint line based on gray control is proposed. Firstly, Wu algorithm and gray control algorithm are introduced in the paper. Through analyzing the both algorithms, advantages and disadvantages of them are proposed. Then, combined with the Wu algorithm, a new algorithm based on gray control is put forward. The new algorithm reduces the calculation of distance and gray transformation, solves the anti-aliasing problem of arbitrary-endpoint line. Finally, the efficiency and anti-aliasing performance of the new algorithm is simulated. The simulation results show that the new algorithm has higher efficiency than the Wu algorithm, consuming time is reduced by an average of 3391% when drawing a line, and is more accurate and has better anti-aliasing effect than the gray control algorithm. Especially in the process of line’s moving, the algorithm has a good dynamic display effect. The new algorithm proposed in this paper has higher efficiency, better display effect and very high application value.

杨军锋, 李乐意, 杜军, 王海明, 杨朴. 基于灰度控制的任意端点直线反走样算法研究[J]. 液晶与显示, 2016, 31(4): 392. YANG Jun-feng, LI Le-yi, DU Jun, WANG Hai-ming, YANG Pu. Anti-aliasing algorithm for arbitrary-endpoint line based on gray control[J]. Chinese Journal of Liquid Crystals and Displays, 2016, 31(4): 392.

关于本站 Cookie 的使用提示

中国光学期刊网使用基于 cookie 的技术来更好地为您提供各项服务,点击此处了解我们的隐私策略。 如您需继续使用本网站,请您授权我们使用本地 cookie 来保存部分信息。
全站搜索
您最值得信赖的光电行业旗舰网络服务平台!