﻿ 基于图像处理技术的船舶航行环境可视化研究
 舰船科学技术  2023, Vol. 45 Issue (13): 150-153    DOI: 10.3404/j.issn.1672-7649.2023.13.030 PDF

Research on visualization of ship navigation environment based on image processing technology
YIN Qing-fei
Guilin University of Aerospace Technology, Guilin 541004, China
Abstract: In order to avoid the risk of ship navigation, the visualization method of ship navigation environment based on image processing technology is studied. After the laser point cloud image of the ship and its sailing environment is captured by lidar and camera, the image is preprocessed by Kd-Tree algorithm. Based on the preprocessed laser point cloud image of the ship and its sailing environment, the 3D model of the ship and the mathematical model of the ship sailing are established by using virtual reality technology in the image processing technology. The ship navigation parameters are obtained by using the ship navigation mathematical model, and the ship navigation environment is established by drawing the sea surface and building the wave model. Then, based on the ship navigation parameters and wave parameters, the ship navigation environment is visualized by virtual reality software based on the ship three-dimensional model. The experimental results show that this method has a good ability of ship laser point cloud image preprocessing, the construction of ship three-dimensional model is more realistic, and can effectively realize the visualization of ship sailing environment.
Key words: image processing technology     virtual reality technology     laser point cloud     ship model
0 引　言

1 船舶航行环境可视化 1.1 基于图像处理技术的船舶三维模型构建 1.1.1 激光点云图像预处理

1）利用Kd-Tree算法建立船舶和其航行环境激光点云的拓扑关系图。

2）在船舶和其航行环境激光点云的拓扑关系图内选择任意点 pi，以该点为中心进行k近邻查询获取点pi周围邻域N(pi)。

3）计算任意点pi与邻域N(pi)内任一点pj的距离d，表达公式如下：

 $d = \frac{{\displaystyle\sum\limits_{{p_j} \in N({p_i})} {\left\| {{p_i} - {p_j}} \right\|} }}{k} \text{。}$ (1)

4）利用式(1)计算任意点pi与邻域N(pi)内所有点距离后，计算所有距离均值并建立该均值高斯分布，并依据该均值高斯分布的平均值和标准方差确定船舶和其航行环境激光点云阈值范围。

5）判断船舶和其航行环境激光点云是否满足阈值条件，将不满足阈值条件的点云删除。

1.1.2 虚拟船舶三维模型生成

2）DWG格式文件优化

3）HSF格式优化

1.2 船舶航行数学模型构建

 $R = rV_s^Z \text{。}$ (2)

 ${R_s} = 1000{P_e}/{V_s} \text{，}$ (3)

 $R' = {g_1}{g_d}{g_w}{R_s} + {R_t} \text{。}$ (4)

 ${k_w}m\frac{{{\rm d}{V_s}}}{{{\rm d}t}} = \upsilon P - R' \text{。}$ (5)

1.3 基于图像处理技术的船舶航行环境生成

 ${S_i} = \frac{{{D_i} \times P \times 2{\text{π}} + t \times {V_i} \times 2{\text{π}} }}{{{L_i}}} \text{。}$ (6)

 $H(x,z,t) = \sum\limits_{i = 1}^5 {{Q_i}{{(\sin ({S_i})/2 + 0.5)}^{{K_i}}}} \text{。}$ (7)

X0=(x0, y0)表示海浪水平位置坐标，海浪高度初始值由z0表示，海浪质点经过一段时间运动后，其位置表达式如下：

 $\left\{ \begin{gathered} x = {x_0} + Q\sin (k{x_0} - \psi t) \text{，} \\ z = {z_0} + Q\cos (k{x_0} - \psi t) \text{。} \\ \end{gathered} \right.$ (8)

 $\left\{ \begin{gathered} x = {x_0} + \sum\limits_{i = 1}^n {{Q_i}\cos {\theta _i}\sin \left[ \begin{gathered} {k_i}({x_0}\cos {\psi _i} + {y_0}{\sin _i}) - \\ {\psi _i}t - {\varphi _i} \\ \end{gathered} \right]} \text{，} \\ y = {y_0} + \sum\limits_{i = 1}^n {{Q_i}\sin {\theta _i}\sin \left[ \begin{gathered} {k_i}({x_0}\cos {\psi _i} + {y_0}\sin {\psi _i}) - \\ {\psi _i}t - {\varphi _i} \\ \end{gathered} \right]} \text{，} \\ z = {z_0} - \sum\limits_{i = 1}^n {{Q_i}\cos \left[ \begin{gathered} {k_i}({x_0}\cos {\psi _i} + {y_0}\sin {\psi _i}) - \\ {\psi _i}t - {\varphi _i} \\ \end{gathered} \right]} \text{。} \end{gathered} \right.$ (9)

2 结果与分析

 图 1 激光点云预处理结果 Fig. 1 Laser point cloud preprocessing results

 图 2 船舶三维模型 Fig. 2 3D Model of Ship

 图 3 海面航行环境构建效果 Fig. 3 Construction effect of sea navigation environment

 图 4 船舶航行环境可视化界面 Fig. 4 Visualization Interface for Ship Navigation Environment
3 结　语

 [1] 陈诚, 李寿千, 王新, 等. 河道安全巡检中的船舶可视化监测方法[J]. 水利水电科技进展, 2020, 40(6): 66-70. CHEN Cheng, LI Shouqian, WANG Xin, et al. Visual monitoring method for ships in safety inspection of rivers[J]. Advances in Science and Technology of Water Resources, 2020, 40(6): 66-70. [2] 王式耀, 侯岳, 王康勃, 等. 基于抗沉干预行为的舰艇进水过程建模与仿真[J]. 中国舰船研究, 2022, 17(6): 174-181. WANG Shiyao, HOU Yue, WANG Kangbo, et al. Time domain modeling and simulation of warship flooding process based on counter-flooding activities[J]. Chinese Journal of Ship Research, 2022, 17(6): 174-181. [3] 梁云涛, 莫剑飞, 戴鹏睿. 水下航行体航行数据可视化回放技术研究[J]. 舰船电子工程, 2022, 17(6): 174-181. LIANG Yuntao, MO Jianfei, DAI Pengrui. Research on visualization and playback technology of underwater vehicle navigation data[J]. Ship Electronic Engineerin, 2022, 17(6): 174-181. [4] 黄凡. 可视化水下航行体控制系统数学仿真软件设计[J]. 数字海洋与水下攻防, 2020, 3(4): 355-362. HUANG Fan. Design of visual mathematical simulation software for underwater vehicle control system[J]. Digital Ocean & Underwater Warfare, 2020, 3(4): 355-362. [5] 李树兵, 黄永军, 段晶, 等. 船舶航行安全信息可视化关键技术研究[J]. 海洋测绘, 2020, 40(5): 73–77. LI Shubing, HUANG Yongjun, DUAN Jing, et al. Research on key technologies of visualization of navigation safety information [J]. Hydrographic Surveying and Charting , 2 020, 40(5): 73–77. [6] 吴敏, 陈曦, 杨凯迪, 等. 基于图像拼接技术的大视场流体可视化纹影系统[J]. 中国工程机械学报, 2022, 20(5): 412-417. WU Min, CHEN Xi, YANG Kaidi, et al. Large field fluid visualization schlieren system based on image mosaic technology[J]. Chinese Journal of Construction Machinery, 2022, 20(5): 412-417.