﻿ Grabcut算法在无人机影像船舶目标识别的应用
 舰船科学技术  2022, Vol. 44 Issue (20): 165-168    DOI: 10.3404/j.issn.1672-7649.2022.20.034 PDF
Grabcut算法在无人机影像船舶目标识别的应用

Application of grabcut algorithm to ship target recognition in UAV image
SU Li-ping
Dongchang College, Liaocheng University, Liaocheng 252000, China
Abstract: In recent years, the sea detection and reconnaissance technology based on UAV has achieved rapid development. The recognition of ship targets at sea using UAV has become a hot research work, and the target recognition based on image is also one of the key and difficult points. Traditional image segmentation includes edge detection, clustering segmentation, etc. This paper combines Grabcut algorithm and convolutional neural network technology to develop a new ship impact target recognition technology, which improves the accuracy of target recognition on the basis of improving the efficiency of image target recognition, and has important practical application value.
Key words: Grabcut algorithm     UAV     target recognition     image segmentation
0 引　言

1 基于聚类分析的船舶目标识别的图像分割技术

 图 1 基于聚类算法的图像分割技术 Fig. 1 Image segmentation technology based on clustering algorithm

 $X = (x_1,{x_2},...,{x_m}) \text{。}$

 $K = \sum\limits_{i = 1}^p {\sum\limits_{j = 1}^m {{{\left[ {{\delta _m}} \right]}^l}{{\left| {{x_i} - {p_0}} \right|}^2}} } \text{，}$

 ${c_{ij}} = \dfrac{1}{{\displaystyle\sum\limits_{i = 1}^m {{{\left[ {{\delta _m}} \right]}^m}} }}\displaystyle\sum\limits_{i = 1}^m {{\delta _m}^l{x_i}} \text{。}$

 ${A_i}_j = \dfrac{{\displaystyle\sum\limits_{i = 1}^m {{\delta _m}^l{{\left( {{x_i} - {c_i}_j} \right)}^{\rm{T}}}} }}{{\displaystyle\sum\limits_{i = 1}^m {{{\left[ {{\delta _m}} \right]}^m}} }} \text{。}$

2 Grabcut算法在无人机影像船舶目标识别的应用研究 2.1 无人机影像的Grabcut图像背景模型选择

 $\begin{split} & H = \left\{ {\begin{array}{*{20}{l}} {{0^\circ }}&{\max = \min }，\\ {{{60}^\circ } \times \dfrac{{{g} - {b}}}{{\max - \min }} + {0^\circ }}&{\max = r{\text{ and }}g \geqslant {\text{b}}} ，\\ {{{60}^\circ } \times \dfrac{{{{g}} - {{b}}}}{{\max - \min }} + {{360}^\circ }}&{\max = r\;{{ {\rm{and}}\; g}} < b} ，\\ {{{60}^\circ } \times \dfrac{{{{b}} - {{r}}}}{{\max - {\text{min}}}} + {{120}^\circ }}&{\max = {{g}}}，\\ {{{60}^\circ } \times \dfrac{{{{r}} - {{g}}}}{{\max - {\text{min}}}} + {{240}^\circ }}&{\max = {{b}}} 。\end{array}} \right.\\ & {{S}} = \left\{ \begin{array}{*{20}{l}} 0& \max = 0，\\ \dfrac{{\max - \min }}{{\max }}& {\text{max}} > 0。\end{array} \right.\\ & { V} = \max 。\end{split} \text{}$

 图 2 海面背景模型的选择流程 Fig. 2 Selection process of sea surface background model

2.2 无人机影像的Grabcut图像动态模板匹配

 图 3 动态模板匹配的原理示意图 Fig. 3 Schematic diagram of dynamic template matching

 $SSD(i,j) = {\rm{max}}\left( {\sum\limits_{x = 1}^m {\sum\limits_{y = 1}^n {{{\left[ {{S_{ij}}(x,y) - {T_{ij}}(x',y')} \right]}^2}} } } \right) \text{。}$

 $\begin{gathered} \sigma (x,y) = \sum\limits_{} {{{\left[ {S\left( {{x^{}},y} \right) - T\left( {{x^\prime },{y^\prime }} \right)} \right]}^2}} ，\\ \delta (x,y) = \frac{{\sum\limits_{}^{} {} {{\left[ {{\text{S}}\left( {x,{y^{}}} \right) - T\left( {{x^\prime },{y^\prime }} \right)} \right]}^2}}}{{\sqrt {\left( {\sum\limits_{}^{} {} S{{\left( {{x^{}},y} \right)}^2} \cdot \sum\limits_{}^{} {} T{{\left( {{x^\prime },{y^\prime }} \right)}^2}} \right)} }} 。\\ \end{gathered}$

2.3 基于深度学习和Grabcut算法的无人机影像船舶目标识别

 图 4 深度学习和Grabcut算法的船舶目标识别原理 Fig. 4 Principle of ship target recognition combining depth learning and grabcut algorithm

 $d = \sqrt {\sum\limits_{i = 1}^m {{x_i}\left( t \right) - {S_i}{{\left( t \right)}^3}} } \text{，}$

 {\delta _{ij}}\left( {t + 1} \right) = \left\{ {\begin{aligned} &{{\delta _i}\left( t \right) + f\left( t \right)\left[ {{x_i}\left( t \right) - {\delta _i}\left( t \right)} \right]\;i \in {S_i}\left( t \right)} ，\\ &{{\delta _i}\left( t \right)\;\;\;\;i \notin {S_i}\left( t \right)} 。\end{aligned}} \right.

 图 5 卷积运算示意图 Fig. 5 Schematic diagram of convolution operation

 图 6 港口位置无人机影像的船舶目标识别示意图 Fig. 6 Schematic diagram of ship target recognition based on UAV image at a port
3 结　语

 [1] 吴立珍, 李宏男. 无人机小样本条件下遮挡和混淆目标识别方法[J]. 国防科技大学学报, 2022, 44(4): 13-21. WU Li-zhen, LI Hong-nan. Recognition method of occluded and confused targets under small sample conditions of UAV[J]. Journal of National University of Defense Technology, 2022, 44(4): 13-21. DOI:10.11887/j.cn.202204002 [2] 董少敏, 马永政. 无人机红外遥感影像人体目标识别方法研究[J]. 经纬天地, 2022(3): 35-38. DONG Shao-min, MA Yong-zheng. Research on human target recognition from UAV infrared remote sensing image [J]. Jingwei Tiandi, 2022 (3): 35-38 [3] 周永超, 陈小平. 基于YOLOv3的无人机目标识别与双目测距应用研究[J]. 单片机与嵌入式系统应用, 2022, 22(2): 64-67. ZHOU Yong-chao, CHEN Xiao-ping. Research on the application of UAV target recognition and binocular ranging Based on YOLOv3[J]. Single Chip Microcomputer and Embedded System Application, 2022, 22(2): 64-67. [4] 杨永铮, 邓梓轩. 基于无人机的目标识别和追踪系统设计[J]. 机电产品开发与创新, 2022, 35(1): 25-27. YANG Yong-zheng, Deng Zi-xuan. Target recognition and tracking system design based on UAV[J]. Electromechanical Product Development and Innovation, 2022, 35(1): 25-27. DOI:10.3969/j.issn.1002-6673.2022.01.007