A new approach for real-time imaging from laser beam to complex targets
-
摘要: 针对激光雷达探测中复杂目标姿态获取困难、目标与光斑真实耦合情况难获取等问题,提出了一种基于GPU编程的激光束照射复杂目标图像实时生成新方法。基于现代图形硬件的GPU编程技术和帧缓存对象特性,该算法以每个平面光源矩阵为观察者,在光源空间坐标系中渲染当前场景并将渲染结果记录到内存纹理中,然后在世界坐标中将光源观察到的结果复原和映射到模型上,可以实现实时映射渲染。采用深度缓存原理、纹理映射原理和OSG文件读写插件,即可正确获取模型每个三角面片顶点上的光源辐照度、顶点位置及面片法线等信息。经测试,该算法普适性强、能够读取多种格式三维文件,适应于均匀或非均匀面光源,对系统图形硬件的要求很低,能够满足两个面光源准实时性计算需求,可以准实时得到模型被照射面片所属部件、被照射三角面片顶点、法线信息以及三角面片顶点接收到的辐照强度值。该算法可为激光照明、识别探测等提供参考和依据。Abstract: Target detection by lidar is challenging due to the difficulty in obtaining the complex attitude of targets and capturing the real coincidence between target and facula. To address this problem, in this paper, a real-time mapping method of laser beam to complex targets based on GPU programming is proposed. By taking advantages of modern graphics hardware with respect to GPU programming technology and frame buffer object merit, the proposed approach takes each surface light source matrix as the observer, renders the current scene in the light source spatial coordinate system, and records the rendering results into the memory texture. To realize real-time mapping and rendering, the results observed by the light source in the world coordinates are restored and mapped to the model. Based on deep cache principle of Zbuffer and texture mapping principle, the model information (e.g., light source irradiance, vertex position and patch normal on the vertex of each triangular patch) can be correctly obtained with virtue OSG file reading-writing plug-in. Extensive experiments demonstrate the strong universality of the proposed algorithm. It is powerful in reading three-dimension files of various formats and is suitable for uniform or non-uniform surface light sources. It meets the quasi real-time computational requirements of two surface light sources with low requirements on system graphics hardware. Various model information could be acquired in quasi real-time, e.g., the components of the illuminated surface piece, the vertices of the illuminated triangular surface, the normal information and the irradiation intensity received by the vertex of the triangular patch. The algorithm is novel in providing reference and basis for laser illumination, recognition and detection.
-
Key words:
- frame buffer object /
- deep cache /
- surface light source /
- complex target /
- real-time mapping
-
表 1 光源类输入输出约定
Table 1. Description of input and output about light source class
No. name description data type 1 lightPos light position input/vec3 2 lightDir light direction input/vec3 3 lightUp light waggling direction Input/vec3 4 lightSize light size input/vec2 5 lightDataW width of light data Input/int 6 lightDataH height of light data input/int 7 lightID light ID input/int 8 lightMaxAttenuation the farthest distance the light source can reach input/double 9 lightData light data input/W*H 10 lightSpaceImage rendering results in the light source spatial coordinate system output/numerical matrix 表 2 三角面片上辐照度信息
Table 2. Irradiance information on triangular patches
part name x/m y/m z/m x/m y/m z/m x/m y/m z/m x/m y/m z/m energy/
(μW·m−2)first vertex second vertex third vertex identity normal of a triangle cylinder1 0.1736 0.12 0.9848 0.0872 0.12 0.9962 0.0872 0.00 0.9962 0.1305 0.00 0.9914 132867.00 cylinder1 0.0872 0.12 0.9962 0.0000 0.00 1.0000 0.0872 0.00 0.9962 0.0436 0.00 0.9990 132867.00 box4 0.0500 0.20 2.0800 0.0500 0.20 2.2000 0.0500 0.00 2.2000 1.0000 0.00 0.0000 111684.00 box4 0.0000 0.20 2.2000 0.0000 0.00 2.2000 0.0500 0.00 2.2000 0.0000 0.00 1.0000 111684.00 box4 −0.0500 0.20 2.2000 −0.0500 0.00 2.2000 0.0000 0.00 2.2000 0.0000 0.00 1.0000 16894.30 cylinder1 0.0872 0.48 0.9962 0.0000 0.48 1.0000 0.0000 0.36 1.0000 0.0436 0.00 0.9990 14565.00 cylinder1 0.0000 0.48 1.0000 −0.0872 0.36 0.9962 0.0000 0.36 1.0000 −0.0436 0.00 0.9990 14565.00 box4 −0.0500 0.20 2.0800 −0.0500 0.00 2.0800 −0.0500 0.00 2.2000 −1.0000 0.00 0.0000 14203.50 box4 0.0000 −0.20 2.2000 0.0000 0.00 2.2000 −0.0500 0.00 2.2000 0.0000 0.00 1.0000 14203.50 box4 −0.0500 0.40 2.0800 −0.0500 0.20 2.0800 −0.0500 0.20 2.2000 −1.0000 0.00 0.0000 14148.40 -
[1] 鲍文卓, 丛明煜, 张伟, 等. 基于面元网格化的空间目标光学特性计算方法[J]. 哈尔滨工业大学学报, 2010, 42(5):710-715Bao Wenzhuo, Cong Mingyu, Zhang Wei, et al. An optical characteristics calculating method based on surface mesh-creation for space targets[J]. Journal of Harbin Institute of Technology, 2010, 42(5): 710-715 [2] 徐灿, 张雅声, 李鹏, 等. 基于OpenGL拾取技术的空间目标光学横截面积计算[J]. 光学学报, 2017, 37:0720001Xu Can, Zhang Yasheng, Li Peng, et al. Calculation of optical cross section areas of spatial objects based on OpenGL picking technique[J]. Acta Optica Sinica, 2017, 37: 0720001 [3] 许兴星, 丁雷. 基于OpenGL的星载可见光相机成像仿真系统[J]. 红外, 2017, 38(7):15-21Xu Xingxing, Ding Lei. Spaceborne visible light camera imaging simulation system based on OpenGL[J]. Infrared, 2017, 38(7): 15-21 [4] 孙华燕, 郭惠超, 范有臣, 等. 激光主动成像中的BRDF特性[J]. 红外与激光工程, 2017, 46:S106004Sun Huayan, Guo Huichao, Fan Youchen, et al. Analysis of BRDF character in active laser imaging[J]. Infrared and Laser Engineering, 2017, 46: S106004 [5] 韩意, 陈明, 谢剑锋, 等. 地基光学望远镜对目标飞行器成像的仿真与验证[J]. 红外与激光工程, 2019, 48:1214002Han Yi, Chen Ming, Xie Jianfeng, et al. Simulation & validation of ground-based optical-telescope imaging on target craft[J]. Infrared and Laser Engineering, 2019, 48: 1214002 [6] Yue Yufang, Zang Feizhou, Zou Kai, et al. Numerical simulation on optical cross section of complex targets[J]. Chinese Journal of Computational Physics, 2017, 34(1): 109-118. [7] 张发强, 张维光, 万文博. 基于光线追迹的红外探测光学系统杂散辐射研究[J]. 红外与激光工程, 2019, 48:090406Zhang Faqiang, Zhang Weiguang, Wan Wenbo. Research on stray radiation of infrared detection optical system based on ray-tracing[J]. Infrared and Laser Engineering, 2019, 48: 090406 [8] 汪喆. 基于光线跟踪算法的空间目标光散射特性研究[D]. 西安: 西安电子科技大学, 2018Wang Zhe. Study of the light scattering characteristics from the spatial target based on ray tracing[D]. Xi’an: Xidian University, 2018 [9] 王锐, 钱学雷. OpenSceneGraph三维渲染引擎设计与实践[M]. 北京: 清华大学出版社, 2009Wang Rui, Qian Xuelei, OpenSceneGraph 3D rendering engine design and practice [M]. Beijing: Tsinghua University Press, 2009 [10] 陈继选, 王毅刚. 基于OSG的GLSL着色器编辑环境[J]. 计算机系统应用, 2011, 20(3):153-156Chen Jixuan, Wang Yigang. GLSL shader editing environment based on OSG[J]. Computer Systems & Applications, 2011, 20(3): 153-156 [11] 张建柱, 李有宽. 大气湍流对部分相干平顶高斯光束的影响[J]. 强激光与粒子束, 2005, 17(2):197-202Zhang Jianzhu, Li Youkuan. Atmospheric turbulence effects on partially coherent flat-topped Gaussian beam[J]. High Power Laser and Particle Beams, 2005, 17(2): 197-202 [12] 刘程浩, 李智, 徐灿, 等. 针对空间目标常用材质菲涅耳反射现象的改进Phong模型[J]. 激光与光电子学进展, 2017, 54:102901Liu Chenghao, Li Zhi, Xu Can, et al. A modified Phong model for Fresnel reflection phenomenon of commonly used materials for space targets[J]. Laser & Optoelectronics Progress, 2017, 54: 102901 [13] 田琪琛, 李智, 徐灿, 等. 基于实验测量与OCS仿真计算的卫星光学散射特性对比验证[J]. 光子学报, 2018, 47:0129004Tian Qichen, Li Zhi, Xu Can, et al. Comparison and verification of satellite optical scattering characteristics based on experimental measurements and OCS simulation[J]. Acta Photonica Sinica, 2018, 47: 0129004 -