APP下载

基于WebGL的遥感影像滤镜模式设计与实现

2020-10-20罗霄刘思言特日根

罗霄 刘思言 特日根

【摘  要】随着遥感卫星技术的不断发展,遥感数据被应用于不同的行业当中。论文基于对遥感影像进行非真实感绘制的问题,提出了一种使用WebGL的全新模式。通过结合JavaScript与WebGL技术,实现了通过前端生成遥感影像油画滤镜的业务逻辑。最后实验证明该模式可以有效利用用户端的GPU进行影像处理,既缩短了单幅影像的处理时间,又节省了网络传输所消耗的时间。因此,该模式适合为用户提供线上遥感影像处理服務。

【Abstract】With the continuous development of remote sensing satellite technology, remote sensing data is applied in different industries. Based on the problem of non photorealistic rendering of remote sensing image, this paper proposes a new mode of using WebGL. Through the combination of JavaScript and WebGL technology, this mode realizes the business logic of generating remote sensing image oil painting filter through the front end. Finally, experiments show that this mode can effectively use the GPU of user-end for image processing, which not only shortens the processing time of a single image, but also saves the time consumed in network transmission. Therefore, the mode is suitable for providing users with online remote sensing image processing service.

【关键词】WebGL;JavaScript;非真实感绘制;GPU;油画;滤镜

【Keywords】WebGL; JavaScript; non photorealistic rendering; GPU; oil painting; filter

【中图分类号】TP391                               【文献标志码】A                                   【文章编号】1673-1069(2020)09-0194-03

1 引言

伴随计算机硬件性能发展和图像处理算法的不断进步,基于计算机算法实现的油画、水彩画、浮雕画等非真实感绘制(non photorealistic redering,NPR)的技术发展迅猛,其应用也越来越广泛[1,2]。近年来,随着遥感卫星的快速发展,遥感影像在数据量和分辨率上都有了很大的提高[3]。对遥感影像进行特殊风格的转换并最终生成装饰画也受到了卫星展馆、主题酒店、图书馆甚至个人用户的关注。遥感影像具有幅宽大、像素多[4]的特点,对遥感影像进行图像处理需要消耗大量的计算资源,因此,大多数算法都需要在后台进行计算。

随着HTML5的普及,前端可以承载客户端应用复杂的业务逻辑。WebGL[5]基于OpenGL扩展而来,将OpenGL ES 2.0[6]与JavaScript[7]结合到了一起,在不需要任何浏览器插件的情况下,完成基于GPU加速的图形绘制。通过这种处理方式,不但可以降低程序运行时对外部环境的依赖,也有效地减轻CPU的计算压力,提高了程序计算的并行程度。……

登录APP查看全文