Journal of Marine Science and Engineering

Article Shedding Damage Detection of Metal Underwater Pipeline External Anticorrosive Coating by Ultrasonic Imaging Based on HOG + SVM

Xiaobin Hong, Liuwei Huang , Shifeng Gong and Guoquan Xiao *

School of Mechanical & Automotive Engineering, South China University of Technology, Guangzhou 510641, China; [email protected] (X.H.); [email protected] (L.H.); [email protected] (S.G.) * Correspondence: [email protected]

Abstract: Underwater pipelines are the channels for oil transportation in the sea. In the course of pipeline operation, leakage accidents occur from time to time for natural and man-made reasons which result in economic losses and environmental pollution. To avoid economic losses and environ- mental pollution, damage detection of underwater pipelines must be carried out. In this paper, based on the histogram of oriented gradient (HOG) and support vector machine (SVM), a non-contact ultrasonic imaging method is proposed to detect the shedding damage of the metal underwater pipeline external anti- layer. Firstly, the principle of acoustic scattering characteristics for de- tecting the metal underwater pipelines is introduced. Following this, a HOG+SVM image-extracting   algorithm is used to extract the pipeline area from the underwater ultrasonic image. According to the difference of mean gray value in the horizontal direction of the pipeline project area, the shedding Citation: Hong, X.; Huang, L.; Gong, damage parts are identified. Subsequently, taking the metal underwater pipelines with three layers S.; Xiao, G. Shedding Damage of polyethylene outer anti-corrosive coatings as the detection object, an Autonomous Surface Vehicle Detection of Metal Underwater (ASV) for underwater pipelines defect detection is developed to verify the detection effect of the Pipeline External Anticorrosive method. Finally, the underwater ultrasonic image which used to detect the metal underwater pipeline Coating by Ultrasonic Imaging Based shedding damage is obtained by acoustic sensor. The results show that the shedding damage can be on HOG + SVM. J. Mar. Sci. Eng. 2021, 9, 364. https://doi.org/10.3390/ detected by the proposed method. With the increase of shedding damage width, the effect of pipeline jmse9040364 defect location detection is better.

Academic Editors: José A.F.O. Correia Keywords: underwater pipeline; shedding damage; ultrasound imaging; histogram of oriented and Philippe Blondel gradient; support vector machine

Received: 28 January 2021 Accepted: 25 March 2021 Published: 29 March 2021 1. Introduction With the development of science and technology, the demand for oil and natural gas Publisher’s Note: MDPI stays neutral resources has been increasing. There are abundant oil and gas resources in the . An with regard to jurisdictional claims in underwater metal pipeline is a longstanding transportation tool for exploitation of marine published maps and institutional affil- resources. Because of the harsh marine environment and the difficulty of damage detection, iations. oil leak accidents occur from time to time [1]. If the underwater pipeline leaks, it causes great economic losses and environmental pollution and, therefore, it is of great importance to detect the underwater pipeline damage accurately [2]. The types of underwater metal pipeline damage are mainly divided into pipeline Copyright: © 2021 by the authors. leakage, pipeline corrosion and shedding of the external anticorrosive coating of the Licensee MDPI, Basel, Switzerland. pipeline. There is a progressive relationship between the three pipeline defects. The This article is an open access article pipeline corrosion causes the shedding of external anticorrosive coating. Shedding of distributed under the terms and external anticorrosive coating accelerates the corrosion of the pipeline body, which leads conditions of the Creative Commons to leaks from the pipeline [3]. Many researchers have tried to design reasonable damage- Attribution (CC BY) license (https:// detection methods [4,5]. In view of the difficulty and high cost of underwater metal pipeline creativecommons.org/licenses/by/ 4.0/). damage detection, a variety of detection methods have been proposed by researchers across

J. Mar. Sci. Eng. 2021, 9, 364. https://doi.org/10.3390/jmse9040364 https://www.mdpi.com/journal/jmse J. Mar. Sci. Eng. 2021, 9, 364 2 of 17

the world [6–8]. For inshore underwater pipeline inspection, a testing person usually carries professional instruments for manual inspection. Other detection methods include deformation measurement [9], potential measurement, in the tube [10], [11], image recognition [12], a magnetic flux leakage method and ultrasonic detection [13]. Leakage of underwater metal pipelines cause great losses, which need to be detected and repaired rapidly. Mahmutoglu [14] introduced a method which uses a passive acoustic- based received signal strength difference technique to localize leakages in underwater natural gas pipelines. The leakages can be localized with small position error by depending on receiver number, leak holes diameter and ambient noise. However, the sensors density and the distance between the sensors and the pipeline have a great influence on the results. To improve the positioning accuracy, Huang [15] used the particle swarm optimization algorithm (PSO) tuning of the support vector machine (SVM) to predict the leakage points based on gathered leakage data. The leakage position predicted by the PSO algorithm after optimization of the parameters is more accurate. Wang [16] investigated the feasibility of monitoring the leakage of an oil pipeline by using Brillouin optical time domain reflectom- etry with both laboratory experiments and field tests. Testing results show that a much more sensitive laying style by wrapping up the sensing cable and pipeline with plastic film can detect the leakage. Magnetic flux leakage detection can be inspected both inside and outside the pipeline with high accuracy [17]. However, the longitudinal crack detection of a pipeline is blind zone in this method. Wu [18] proposed a composite magnetic flux leakage method using alternating magnetic field excitation for the detection of cracks. This method can implement synchronous detection in two orthogonal directions to avoid missed detection caused by the crack orientation. However, the magnetic flux leakage method needs high technical requirements. Corrosion of underwater metal pipelines and external anticorrosive coatings are early forms of pipeline damage. Early detection can reduce maintenance costs [19,20]. Real-time condition monitoring of structures in service has also been of concern to researchers [21–23]. To detect small diameter thick wall pipelines, the finite element calculation was carried out by Gloria [24] to optimize the combined structure of the internal corrosion sensor. The experimental results on a prototype showed that the proposed theoretical model is effective. Khan et al. [25] proposed a wavelet-based fusion method to enhance and de- haze the underwater hazy images of corroded pipeline. The main aim was to inspect the underwater pipelines for the corrosion estimation. Yang et al. [26] presented a method for analysis of abnormal events observed by underwater pipelines. A model was estab- lished to analyze the failure probability of corrosion and potential consequences in order to monitor and analyze the corrosion status of pipelines. Xiong [27] used three-dimensional (3D) models constructed from multi-sensor data fusion for underwater pipeline inspec- tion. The status of a pipeline obtained by a 3D model construction is more accurate and reliable. Yazdekhasti [28] presented an approach for leak detection that involves continuous monitoring of the changes in the correlation between surface acceleration measured at discrete locations along the pipeline length. The preliminary results seem promising. Compared with contact detection, non-contact detection has less impact on the structure. Seemakurthy [29] restored the blurring caused by the flow dynamics in underwater photographs by processing underwater photographs. The direct-current (DC) potential gradient measurement method judges the position of the damaged point in the external coating of the pipeline by measuring the potential gradient along the underwater pipeline [30]. The DC potential gradient measurement method is the main method to detect damage defects of the corrosion layer of underwater metal pipelines in China. However, this method has some shortcomings, such as the high price of testing equipment, low detection efficiency and high requirement of professional skills of the technicians. The economy and safety of diver detection are poor, and it is greatly affected by sea conditions and operating depth. Therefore, non-contact non-destructive testing has been paid more attention by researchers. J. Mar. Sci. Eng. 2021, 9, 364 3 of 17

Image recognition, as a non-contact method, has always been concerned by researchers. Tian et al. [31] develop an automated and optimized detection procedure that mimics these operations. The primary goal of the methodology is to reduce the number of images requiring visual evaluation by filtering out images that are overwhelmingly definitive on the existence or absence of a flaw. Fernando [32] describes a method to support the non-destructive testing, especially, in radiographic inspection activities. It aims at detecting welded joints of oil pipelines in radiographs with double wall double image exposure. The proposed approach extracts information from the pipeline region in the radiographic image and then applies deep neural network models to identify which windows correspond to welded joints. Ravanbod [33] trained a generalized regression neural network to determine the dimensions of the corrosions and generate the whole image of both the internal and external walls of the oil pipeline. As an improvement to the detection algorithm, we introduce fuzzy decision-based neural network algorithms for the detection and classi- fication of corrosion. The simulation and experimental results show the effectiveness of the existing methods. However, traditional image recognition requires a high detection environment. Compared to image-based detection approaches, ultrasonic detection has higher penetration [34]. In view of the advantages and disadvantages of detection methods, an ultrasonic imaging detection method based on histogram of oriented gradient (HOG) + SVM for the shedding damage of an underwater metal pipeline’s external anticorrosive coating is presented in this paper. Based on non-contact underwater acoustic imaging technology, the real-time and long-distance on-line detection system is established by using an unmanned ship as a carrier. The remaining part of the paper is organized as follows: Section2 introduces the principle and methodology of damage detection for the underwater pipeline external anti-corrosion layer shedding damage. In Section3, experiments are carried out by the detection system designed in this paper, and the experimental results are discussed. Section4 concludes the whole work.

2. Principle and Methodology In this section, the principle and methodology of underwater pipeline damage detec- tion is introduced. Firstly, the principle of underwater pipeline damage ultrasound imaging detecting is studied. The feasibility of external anticorrosive coatings shedding damage detection by non-contact ultrasonic imaging is demonstrated theoretically. Following this, HOG feature extraction and the SVM algorithm is used to extract underwater metal pipeline area from underwater ultrasonic image. A detection method based on average gray value is proposed to realize the underwater pipeline shedding damage detection.

2.1. Principle of Underwater Ultrasound Imaging Detecting 2.1.1. Principle of Underwater Ultrasound Imaging In this paper, an underwater pipeline laying in shallow water area is taken as the research object, and the theoretical analysis of the metal underwater pipeline shedding damage model are established. The model, as shown in Figure1, is divided into three parts: the external anti-corrosion layer, the pipeline body and the shedding place of the external anti-corrosion layer. The external anti-corrosion layer is three-layer PE material, and the tube body is high-strength steel material. The model has uniform thickness of external anticorrosive coating, smooth surface and uniform thickness of the tube itself. The coupling between the tube and the external anti-corrosive coating is good. J. Mar. Sci. Eng. 2021, 9, 364 4 of 17

J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 4 of 17 J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 4 of 17 External anticorrosive External anticorrosive Shedding of external coating Shedding of external coating anti-corrosion layer Pipeline body anti-corrosion layer Pipeline body

Figure 1. Underwater metal pipeline shedding damage model. Figure 1. UnderwaterUnderwater metal pipeline shedding damage model. To obtain the ultrasonic image of the underwater pipeline, an acoustic sensor is used To obtain the ultrasonic image of the underwater pipeline, an acoustic sensor is used to collect underwater information. The acoustic sensor probe is composed of left and toto collect underwater information. The The acoust acousticic sensor sensor probe probe is is composed of left and right acoustic arrays, which can realize imaging detection on both sides. The acoustic right acoustic arrays, which can realize imagingimaging detectiondetection onon bothboth sides.sides. The acoustic array is composed of point sources arranged in regular order. The transmitted sound array is composed of point sources arranged in regular order. The transmitted sound emit by the array are reflected back when it meets underwater target. The reflected wave emit by the array are reflected reflected back whenwhen it meets underwater target. The reflected reflected echo carries the characteristic information of the underwater target. The acoustic sensor echo carries the characteristic information of the underwater target. The acoustic sensor can obtain a band gray value once a sound wave is emitted and received. After several can obtain a band gray value once a soundsound wavewave isis emittedemitted andand received.received. After several emissions and receptions, the underwater target information image is obtained. The dif- emissions and and receptions, receptions, the the underwater underwater targ targetet information information image image is obtained. is obtained. The Thedif- ferent sound intensity in the underwater target is reflected in the image. Taking the un- ferentdifferent sound sound intensity intensity in the in theunderwater underwater target target is reflected is reflected in the in theimage. image. Taking Taking the un- the derwater metal pipeline model as an example, the principle of ultrasonic imaging detec- derwaterunderwater metal metal pipeline pipeline model model as an as example, an example, the principle the principle of ultrasonic of ultrasonic imaging imaging detec- tion for the underwater metal pipeline with external anticorrosive coating shedding tiondetection for the for underwater the underwater metal metal pipeline pipeline with with external external anticorrosive anticorrosive coating coating shedding damage is shown in Figure 2. damage is shown in Figure 22..

Figure 2. Ultrasonic imaging detection princi principleple in underwater metal pipeline. Figure 2. Ultrasonic imaging detection principle in underwater metal pipeline. From Figure 2 2,, thethe pipelinepipeline bodybody isis exposedexposed inin thethe waterwater whenwhen thethe underwaterunderwater metalmetal pipelineFrom external Figure anticorrosive2, the pipeline coatingbody is sheddingexposed in off. the When water thewhen acoustic the underwater wave meets metal the pipeline external anticorrosive coating shedding off. When the acoustic wave meets the pipelineunderwater external metal anticorrosive pipeline, mirror coating reflection sheddi isng caused. off. When The elasticthe acoustic reflection wave occurs meets when the underwater metal pipeline, mirror reflection is caused. The elastic reflection occurs when underwaterthe external metal anti-corrosion pipeline, mirror layer is reflection intact. Because is caused. of The the differenceelastic reflection of sound occurs intensity when the external anti-corrosion layer is intact. Because of the difference of sound intensity thebetween external the anti-corrosion two echoes, thelayer images is intact. generated Because by of them the difference are different. of sound In conclusion, intensity between the two echoes, the images generated by them are different. In conclusion, ac- betweenaccording the to two the differenceechoes, the of images the gray generated ultrasound by them image, are it different. can effectively In conclusion, distinguish ac- cording to the difference of the gray ultrasound image, it can effectively distinguish cordingwhether to there theis difference shedding damageof the gray in underwater ultrasound metal image, pipelines’ it can ef externalfectively anticorrosive distinguish whether there is shedding damage in underwater metal pipelines’ external anticorrosive whethercoating. Next,there is the shedding difference damage of sound in underwat intensityer between metal pipelines’ the pipeline external defect anticorrosive area and the coating. Next, the difference of sound intensity between the pipeline defect area and the coating.pipeline Next, normal the area difference is analyzed. of sound intensity between the pipeline defect area and the pipeline normal area is analyzed. pipeline normal area is analyzed. 2.1.2. Analysis of Underwater Pipeline Acoustic Scattering Characteristics 2.1.2. Analysis of Underwater Pipeline Acoustic Scattering Characteristics 2.1.2.The Analysis metal of pipeline Underwater studied Pipeline in this paperAcoustic has Scattering three layers Characteristics of PE material, and the inner The metal pipeline studied in this paper has three layers of PE material, and the is highThe strength metal steelpipeline material studied which in isthis commonly paper has used three in underwaterlayers of PE metal material, pipelines. and the To inner is high strength steel material which is commonly used in underwater metal pipe- inneranalyse is high the acoustic strength scattering steel material characteristics, which is commonly the outer part used of in the underwater pipeline is regardedmetal pipe- as lines. To analyse the acoustic scattering characteristics, the outer part of the pipeline is lines. To analyse the acoustic scattering characteristics, the outer part of the pipeline is

J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 5 of 17

regarded as elastic medium and the inner part as rigid medium respectively. According to the theory of , there is a difference between the scattering of elastic and rigid media. Under the same incident sound field, the intensity of acoustic is different between them. The different characteristics of the acoustic scattering field be- J. Mar. Sci. Eng. 2021, 9, 364 tween them provide theoretical basis for ultrasonic imaging detection. Considering5 ofthe 17 convenience of the experimental study, the experimental object in this paper is a finite length underwater metal pipeline. The finite length pipeline is simplified to a cylinder with two different materials inside and outside. The Figure 3 and parameters are as fol- lows.elastic medium and the inner part as rigid medium respectively. According to the theory of underwaterLet the length acoustics, be 2L, therethe diameter is a difference be a, and between the distance the scattering from a point of elastic on the and axis rigid to media. Under the same incident sound field, the intensity of acoustic is different between the center O is t. In space, the distance between a point 𝑂 and the central point O is 𝑑, thethem. distance The different from a point characteristics on the central of the axis acoustic is d, and scattering the vertical field distance between from them the provide central axistheoretical is r. It is basis assumed for ultrasonic that the two imaging ends detection.of the finite Considering cylindrical body the convenience satisfy the simple of the boundaryexperimental conditions, study, the ignoring experimental the effect object of acoustic in this paperscattering is a finiteat the length end position. underwater We assumemetal pipeline. that the Thecylinder finite is lengthslender, pipeline that is isto simplifiedsay, it satisfies to a cylinder𝑎/𝐿 with, ≪1 andtwo the differentcylinder satisfiesmaterials Donnel’s inside and thin outside. shell theory The Figure[35]. 3 and parameters are as follows.

FigureFigure 3. 3. UnderwaterUnderwater metal metal pipe pipe shedding shedding damage damage model. model. Let the length be 2 L, the diameter be a, and the distance from a point on the axis Solving the intensity of sound field in a space position of the fluid outside the cyl- to the center O is t. In space, the distance between a point O0 and the central point O is inder, the sound field is the sum of the incident sound field, the specular reflection sound d , the distance from a point on the central axis is d, and the vertical distance from the field0 and the elastic reflection sound field [36,37]. central axis is r. It is assumed that the two+− endsω of the finite cylindrical body satisfy the pe= ikz()zx kx t kk= cosθ kk= sinθ simpleThe boundary incident conditions,sound field ignoring is i the effect, ofamong acoustic them: scattering z at thei , endx position.i , kcWe= ω assume/ that the cylinder is slender, that is to say, it satisfies a/L  1, and the(, cylinderrzϕ , ) 0 are the number of sound in the fluid. In cylindrical coordinates , satisfies Donnel’s thin shell theory [35]. p the elasticSolving reflected the intensity soundof field sound res field is as in afollows: space position of the fluid outside the cylinder, the sound field is the sum of∞∞ the incident soundL field, the specular reflection sound field kr and the elastic reflectionpinbhkdktLdt=− sound fieldεϕnncos [36,37]. ⋅(1) ( )( ) sin[ ( + )] res n np n p (1) π == i(kzz+kx x−ωt) d The incident sound fieldnp01 is pi = e −L , among them: kz = k cos θi, kx = k sin θi, k = ω/c0 are the number of sound waves in the fluid. In cylindrical coordinates (r, ϕ, z), bnp the elasticAmong reflected them, sound is a field parameterpres is asdetermined follows: by the vibration equation of external anticorrosive coating in underwater metal pipeline. (1) (1) L H h ∞ ∞ Z n n and n arek the externaln anticorrosive (coating1) rin underwater metal pipeline pres = − ∑ ∑ εni cos nϕ · bnp hn (kd)( ) sin[kp(t + L)]dt (1) first kind of cylindricalπ Hankel= = function and the first kindd of spherical Hankel function, n 0 p 1 −L respectively. εAmong them, b is a parameter determinedε by the vibrationε equation of external n is the Neumannnp factor. When n=0, n =1 and n>0, n =2. Then the elastic re- anticorrosive coating in underwater metal pipeline. flection( 1sound) field(1) is obtained. Hn and hn are the external anticorrosive coating in underwater metal pipeline first kind of cylindrical Hankel function and the first kind of spherical Hankel function, respectively. εn is the Neumann factor. When n = 0, εn = 1 and n > 0, εn = 2. Then the elastic reflection sound field is obtained.

ikd ∞ ∞ n e 0 2iρ0ωL k sin θ F(kz L, kp L)F(−k cos θL, kp L) pres = εn( ) cos nϕ (2) d π2k a ∑ ∑ α (1)0 (1)0 0 x n=0 p=1 p αp Hn (αpa)Hn (kxa)Znp J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 6 of 17

∞∞ ekikd0 2iLρω sinθ FkLkLF(, )(cos,− kθ LkL ) p = 0 ε ()n zp p cosnϕ resπααα2(1)'(1)' n (2) dka0 xppnpnxnpnp==01 HaHkaZ() ()

Mirror reflected sound field:

∞ eiikd0 2sinsin[kL (cosθθ− cos ) ]n θ Jka' ( ) J. Mar. Sci. Eng. 2021, 9, 364 p = inxε []cosnϕ 6 of 17 rigπθθ−  n n θ(1)' (3) dk0 (cosiinx cos )n=0 sin Hka ( )

∞ ka ichρ 2 =−knk1 x +2 s = ss Jkanx() (1) ( ) (1) Zn Mirror reflected sound field: = kn!(+ k )! 2 H ()xJxiNx=+⋅ () () T ω Among them: k 0 , nn n, 33 , 0 (1) π ikd0− ∞ n ωρ α cos(vJx )e ( )2 Ji− sin ( x )[k(cos θ − cos θ)L] sin θ J (kxa) f iH0 np() a = nn i n 1 = Nx() p = εn [ s f ] cosf nϕZ n (3) n rig =− n ∑ n =+(1)0 12 + αα(1) ' sin(dvπ ) πk (cosJθ− −()xJxcos θ (1)) ()sinZθnpZZ n n Z n Ha() 0 , innn=0 , i Hn (kxa) , pn p , ωρ α = x iJ0 np() aFxz(,) N∞−1 f2 = x k k a n+2k (1) Zn αα i 1 x s Amongαα' them: Jn(kxa) =0 ∑ (−1) ( + ) ( 2 ) , Hn (x) = Jnα(x) +αi · Nn(x), Zn = pnJ () pa = αα+ k! n k ! i , ki =0 0 ii1 . The initial grazing angle is 0 , , Horizontal distance 2 iρscs h cos(vπ)Jn(x)−J−n(x) n s f1 f2 f1 , Nn(x) = , J−n(x) = (−1) Jn(x), Znp = Z + Zn + Zn , Zn = T33ωxi sin(vπ) n is (1.) iωρ0 Hn (αp a) f2 iωρ0 Jn(αp a) x 0 , Zn = 0 , F(x, z) = . The initial grazing angle is α ,α , (1)There are onlyαp Jnrigid(αp a) boundary conditionsN−1 x at shedding of external anticorrosive0 i αp Hn (αp a) i αα0 ∑ α α coating in the underwater metal pipeline,i= ther0 i iefore,+1 only the mirror reflection sound field Horizontalis considered. distance is xi. There are only rigid boundary conditions at shedding of external anticorrosive coat- ∞ eiikd0 2sinsin[kL (cosθθ− cos ) ]n θ Jka' ( ) ing in the underwaterpp== metal pipeline, therefore,inx only theεϕ mirror[]cos reflection sound n field srigπθθ−  nn θ(1) ' (4) is considered. dk0 (cosiinx cos )n=0 sin Hka ( )

ikd ∞ n 0 where there is noe shedding,0 2i sin[k (therecos θ −arecos bothθ)L] elasticsin soundθ J nfield(kxa) and specular reflection p = p = i ε [ ] cos nϕ (4) s rig d πk (cos θ − cos θ) ∑ n sinn θ (1)0 sound field. 0 i n=0 i Hn (kxa) =+ where there is no shedding, there are both elasticps soundpprig field res and specular reflection sound (5) field. From Formula 5, it can be seenps = thatprig whethe+ pres r there is a defect in the pipeline(5) causing the difference of the reflected sound field strength. The difference of sound field intensity From Formula 5, it can be seen that whether there is a defect in the pipeline causing provides a theoretical basis for calculating whether there are defects in pipelines. the difference of the reflected sound field strength. The difference of sound field intensity provides a theoretical basis for calculating whether there are defects in pipelines. 2.2. Underwater Pipeline Shedding Damage Detection Method 2.2. UnderwaterAfter comparing Pipeline Shedding the difference Damage Detectionof sound Method intensity between pipeline shedding and the Afternormal comparing part, the the detection difference ofmethods sound intensity is introduced between in pipeline this section. shedding In and this the paper, a normaldamage part, detection the detection method methods based is introducedon a HOG in + thisSVM section. target In detection this paper, algorithm a damage is pro- detection method based on a HOG + SVM target detection algorithm is proposed. Firstly, posed. Firstly, the image is divided into the pipeline area and non-pipeline area. Then the the image is divided into the pipeline area and non-pipeline area. Then the HOG feature extractionHOG feature algorithm extraction is used algorithm to extract is underwater used to extract image underwater features. The image SVM algorithm features. is The SVM usedalgorithm to train is the used feature to train data the of underwaterfeature data metal of underwater pipeline, to metal build apipeline, model which to build can a model identifieswhich can pipeline identifies area pipeline and non-pipeline area and area.non-pipeline Finally, we area. input Finally, the test we image input into the the test image modelinto the to model extract theto extract pipeline the area. pipeline The projection area. The area projection of the pipeline area of is extractedthe pipeline from is it, extracted andfrom the it, shedding and the damage shedding position damage is calculated position by is the calculated gray average by value.the gray The average flow of this value. The methodflow of isthis shown method in Figure is shown4. in Figure 4.

FigureFigure 4. 4.Flow Flow of of shedding shedding damage damage detection. detection.

J. Mar. Sci. Eng. 2021, 9, 364 7 of 17 J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 7 of 17

2.2.1. Extracting Pipeline Area from the Underwater Ultrasound Image 2.2.1.After Extracting obtaining Pipeline the Area images from of the the Underwater pipeline Ultrasoundarea and non-pipeline Image area, the HOG al- gorithmAfter is obtaining used to theextract images the of features. the pipeline HOG area is and a description non-pipeline method area, the used HOG for algo- object de- rithmtection is usedin computer to extract thevision features. and HOGpattern is a recognition description method [38,39]. used It is for mainly object detectionused for pedes- in computer vision and pattern recognition [38,39]. It is mainly used for pedestrian de- trian detection in static images and videos [40]. HOG requires the detected object shape tection in static images and videos [40]. HOG requires the detected object shape to be describedto be described by the distribution by the distribution of light intensity of light gradient intensity or edge gradient direction, or andedge the direction, feature is and the constructedfeature is constructed by calculating by and calculating statistically and analysing statistically the image analysing gradient the direction. image gradient HOG direc- algorithmtion. HOG uses algorithm block slider uses to extractblock imageslider features.to extract Block image contains features. cell, which Block contains contains cell, thewhich features contains of the the target. features Its algorithm of the target. flow is Its shown algorithm in Figure flow5. is shown in Figure 5.

Figure 5. 5.Histogram Histogram of of oriented oriented gradient gradient (HOG) (HOG) feature feature extraction extraction algorithm algorithm flow. flow.

After the image information of pipeline area and non-pipeline area is represented by After the image information of pipeline area and non-pipeline area is represented by characteristic matrix, Support vector machine (SVM) is used to build training model. SVM ischaracteristic machine learning matrix, algorithm Support based vector on statistical machine learning (SVM) theory is used and to the build structural training risk model. minimizationSVM is machine principle. learning It has algorithm many unique based advantages on statistical in solving learning small sample,theory and non-linear the structural andrisk high-dimensionalminimization principle. pattern recognition It has many problems. unique The advantages mechanism ofin SVMsolving is to small find a sample, classificationnon-linear and hyperplane high-dimensional with the largest pattern spacing, recognition which not problems. only guarantees The mechanism the accuracy of SVM ofis classification,to find a classification but also has hyperplane the highest reliabilitywith the largest and gives spacing, the classifier which strong not only general- guarantees ization.the accuracy In theory, of classification, SVM can achieve but the also optimal has the classification highest reliability of linear separable and gives samples. the classifier Forstrong the casegeneralization. of non-linear In separability, theory, SVM SVM mapscan achieve the non-linear the optimal separable classification samples from of linear low-dimensional input space to high-dimensional feature space by introducing a kernel separable samples. For the case of non-linear separability, SVM maps the non-linear function, and processes the non-linear separable samples in high-dimensional feature space byseparable using the samples method offrom processing low-dimensional linear separable input samples space [to41 ,high-dimensional42]. feature space by introducingThis paper is aa two-class kernel function, problem. It and aims processes to classify the the pipeline non-linear area and separable non-pipeline samples in area.high-dimensional In this paper, thefeature HOG algorithmspace by isusing used toth extracte method the image of processing features of linear different separable regionssamples and [41,42] label. them. Then SVM is used to train the classification model. The training n data sampleThis paper set (x i,isyi ),ai =two-class 1, 2, ... , l,problem.x ∈ R , y ∈It{ ±aims1}. l isto the classify total number the pipeline of training area and samples.non-pipeline Hyperplane area. In is this(w · paper,x) + b =the0. HOG To classify algorithm all samples is used correctly, to extract the constraintsthe image features [( · ) + ] ≥ = shouldof different be satisfied: regionsyi andw x labeli b them.1, i Then1, 2, SVM . . . , l. is used to train the classification model. The calculable classification interval is 2l||w||. The problem of constructing an optimal The training data sample set (𝑥,𝑦), i=1, 2, …, l, 𝑥∈𝑅 , 𝑦∈±1. l is the1 total2 number of hyperplane is transformed into finding minΦ(w) under constraint: minΦ(w) = 2 ||w|| = training1 0 samples. Hyperplane is (𝑤⋅𝑥) +𝑏=0. To classify all samples correctly, the 2 (w · w). Lagrange function is introduced to solve constrained optimization problems. constraints should be satisfied:𝑦(𝑤⋅𝑥) +𝑏 ≥1,𝑖=1,2,…,𝑙. The calculable classification1 interval is 2𝑙‖𝑤‖. The problem of constructing an op- L(w, b, a) = ||w|| − a(y((w · x) + b) − 1) (6) timal hyperplane is transformed2 into finding minΦ(𝑤) under constraint: 𝑚𝑖𝑛𝛷(𝑤) = ‖𝑤‖ = (𝑤 ⋅𝑤). Lagrange function is introduced to solve constrained optimization In the formula, ai(ai > 0) is Lagrange multiplier. The of constrained optimiza- tionproblems. is determined by the saddle point of Lagrange function. When the partial derivatives of w and b are 0 at saddle point, the problem is turned into a dual problem: 1 𝐿(𝑤, 𝑏,) 𝑎 = ‖𝑤‖ −𝑎𝑦(𝑤⋅𝑥) +𝑏−1 (6) l 2 1 l l maxQ(a) = a − a a y y (x · x ) (7) ∑ j 2 ∑ ∑ i j i j i j In the formula, 𝑎(𝑎 >0) isj= 1Lagrangei=1 j=multiplier.1 The solution of constrained opti- mization is determined by the saddle point of Lagrange function. When the partial de- rivatives of w and b are 0 at saddle point, the problem is turned into a dual problem:

lll =−1 ⋅ maxQa ( ) aj aayyijij ( x i x j ) (7) jij===1112

J. Mar. Sci. Eng. 2021, 9, 364 8 of 17

l ∗ Among them, s.t. ∑ ajyj = 0 j = 1, 2, ... , l, aj > 0. The optimal solution is a = j=1 ∗ ∗ ∗ T ∗ ∗ (a1, a2,..., aj ) . Computing the optimal vector w and optimal partial b .

l l ∗ ∗ ∗ ∗  w = ∑ aj yiyj ; b = yi − ∑ aj aj xi.xj (8) j=1 j=1   ∈ In the formula, the subscript j j aj>0 . Then the optimal classification hyperplane (w∗.x) + b∗ = 0 is obtained. The optimal classification function is as follows:

l ! ∗ ∗ ∗ ∗ n f (x) = sgn{(w · x) + b } = sgn{ ∑ aj yj(xjxi) + b }, x ∈ R (9) j=1

The transformation of x from input space Rn to feature space H is Φ:

T x → Φ(x) = (Φ1(x), Φ2(x),..., Φl(x)) (10)

The optimal classification function can be obtained by replacing the input vector x with the eigenvector Φ(x).

l ! f (x) = sgn(w · Φ(x) + b) = sgn ∑ aiyiΦ(xi)Φ(x) + b (11) i=1

After the classification function is obtained, the test data can be classified. By inputting the underwater ultrasonic image, the pipeline area can be extracted.

2.2.2. Identification Method of Shedding Damage in Metal Underwater Pipeline Following this, the extracted pipeline image area is transformed into a gray value feature matrix. The pipeline area includes a pipeline projection area and a dark area. The principle is shown in Figure2. The dark area cannot reflect whether the pipeline is damaged, so the pipeline projection area needs to be extracted from the pipeline area. The method is as follows. Assuming that the pipeline image is placed vertically, the right area is the projection area. We calculate the mean value of the three columns on the right side of the pipeline area, and then compare each column on the left side with the mean value to determine whether that column is a projection area. If more than half of the characteristic values of a column suddenly change, that is, the characteristic value is less than 70% or more than 130% of the mean value. Than it is considered that the shadow area starts from this column. After the pipeline projection area is extracted, the average gray value is calculated. In this paper, we use the adaptive threshold binarization method to calculate the shedding width. For gray row mean vector f (i), their mean value ave is calculated. Because the defect location value is smaller, the pixel points with gray value less than the mean value are multiplied by a parameter less than 1 (0.8), and the mean value ave is updated. All gray values are compared with ave. If f (i) is greater than the ave, the g(i) assignment 1 and less assignment 0. The position of 0 in g(i) is the defect position. The damage position of the pipeline can be obtained with this method. Note, the parameters in Section 2.2.2 are determined by the training data of underwater pipeline ultrasonic images. The judgment formula of the pixel points is as follows:

 1, i f ( f (i) ≥ ave) g(i) = (12) 0, i f ( f (i) < ave) J. Mar. Sci. Eng. 2021, 9, 364 9 of 17

3. Experiments and Analyses To verify the effectiveness of this method, an experimental platform based on an Autonomous Surface Vehicle (ASV) is designed, and the shedding damage test of three- J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEWlayer polyethylene (PE) pipeline is carried out in an experimental pool. The experimental9 of 17 J. Mar. Sci. Eng. 2021, 9, x FOR PEERplatform REVIEW and experimental process are introduced in this section. 9 of 17 3.1. Experimental Setup 3.1.3.1. ExperimentalExperimental Setup Setup As shown in Figure 6, the ASV include control module, sensor module and wireless AsAs shown shown in in Figure Figure6, the6, the ASV ASV include include control control module, module, sensor sensor module module and wireless and wireless transmission module. And the sensor model is Starfish 450H. The experimental site is a transmissiontransmission module. module. And And the the sensor sensor model model is Starfish is Starfish 450H. 450H. The experimentalThe experimental site is asite 2 is a 2m deep pool. m2m deep deep pool. pool.

Figure 6. Pictures of experimental platform. FigureFigure 6. 6.Pictures Pictures of of experimental experimental platform. platform. The experimental platform is divided into a shore-based system that for hu- TheThe experimental experimental platform platform is dividedis divided into ain shore-basedto a shore-based system system that for that human- for hu- man-computer interaction and an unmanned ship acoustic sensor system for acoustic computerman-computer interaction interaction and an unmannedand an unmanned ship acoustic ship sensor acoustic system sensor for acoustic system emission, for acoustic emission, reception and processing. The ASV transmits real-time data with shore-based receptionemission, and reception processing. and Theprocessing. ASV transmits The ASV real-time transmits data real-time with shore-based data with system shore-based in system in the form of radio frequency. The shore-based part is composed of an upper thesystem form in of the radio form frequency. of radio The frequency. shore-based The partshore-based is composed part ofis ancomposed upper computer of an upper servercomputer and radioserver frequency and radio receiving frequency module. receiving The acoustic module. sensor The systemacoustic of ASVsensor includes system of computer server and radio frequency receiving module. The acoustic sensor system of operationASV includes control operation system and control sensor system system. and The sensor framework system. of the The experimental framework platform of the ex- ASV includes operation control system and sensor system. The framework of the ex- isperimental shown in Figureplatform7. is shown in Figure 7. perimental platform is shown in Figure 7.

Figure 7. Framework of experimental platform. FigureFigure 7. 7.Framework Framework of of experimental experimental platform. platform. ToTo ensureensure the the acoustic acoustic sensor sensor is is unaffected unaffected by by the the ASV ASV propeller propeller noise, noise, the acousticthe acoustic To ensure the acoustic sensor is unaffected by the ASV propeller noise, the acoustic sensor isis installedinstalled 0.50.5 m m away away from from the the propeller. propeller. To To reduce reduce the the interference interference of surface of surface sensor is installed 0.5 m away from the propeller. To reduce the interference of surface water wave,wave, the the probe probe installation installation depth depth should shou beld below be below 0.2 m. The0.2 m. installation The installation schematic sche- water wave, the probe installation depth should be below 0.2 m. The installation sche- diagrammatic diagram of the acousticof the acoustic sensor issensor shown is in shown Figure in8. Figure 8. matic diagram of the acoustic sensor is shown in Figure 8.

Figure 8. Installation diagram of acoustic sensor. Figure 8. Installation diagram of acoustic sensor.

J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 9 of 17

3.1. Experimental Setup As shown in Figure 6, the ASV include control module, sensor module and wireless transmission module. And the sensor model is Starfish 450H. The experimental site is a 2m deep pool.

Figure 6. Pictures of experimental platform.

The experimental platform is divided into a shore-based system that for hu- man-computer interaction and an unmanned ship acoustic sensor system for acoustic emission, reception and processing. The ASV transmits real-time data with shore-based system in the form of radio frequency. The shore-based part is composed of an upper computer server and radio frequency receiving module. The acoustic sensor system of ASV includes operation control system and sensor system. The framework of the ex- perimental platform is shown in Figure 7.

Figure 7. Framework of experimental platform.

To ensure the acoustic sensor is unaffected by the ASV propeller noise, the acoustic sensor is installed 0.5 m away from the propeller. To reduce the interference of surface J. Mar. Sci. Eng. 2021, 9, 364 10 of 17 water wave, the probe installation depth should be below 0.2 m. The installation sche- matic diagram of the acoustic sensor is shown in Figure 8.

J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 10 of 17

In the experiment, an underwater metal pipeline of 1 m length, 133 mm diameter and 3 mm thickness of the external anticorrosive coating is taken as the object. The method presented in this paper is used to detect the pipeline shedding damage. The J. Mar. Sci. Eng. 2021, 9, x FOR PEER REVIEW 10 of 17 underwater metal pipeline with three PE external corrosion protection layers is shown in Figure 8. Installation diagram of acoustic sensor. FigureFigure 8. InstallationIn9. the experiment, diagram of an acoustic underwater sensor. metal pipeline of 1 m length, 133 mm diameter and 3In mm the experiment,thickness of an the underwater external metal anticorro pipelinesive of coating 1 m length, is taken 133 mm as diameterthe object. and The method3 mm thickness presented of thein this external paper anticorrosive is used to coatingdetect isthe taken pipeline as the shedding object. The damage. method The underwaterpresented in metal this paper pipeline is used with to three detect PE the extern pipelineal corrosion shedding protection damage. The layers underwater is shown in Figuremetal pipeline9. with three PE external corrosion protection layers is shown in Figure9.

Figure 9. The picture of underwater metal pipeline.

The reflected sound field is related to the width of pipeline shedding damage ac- cording to the analysis of acoustic scattering characteristics. Therefore, the experiments areFigureFigure carried 9. 9. The Theout picture with 10 ofof underwater underwatermm, 20 mm metal metal and pipeline. pipeline. 30 mm of the shedding width in the underwater metal pipeline external anticorrosive coating. The experimental content is introduced in The reflected sound field is related to the width of pipeline shedding damage according the nextThe section. reflected sound field is related to the width of pipeline shedding damage ac- cordingto the analysis to the ofanalysis acoustic of scattering acoustic characteristics.scattering characteristics. Therefore, the Therefore, experiments the are experiments carried areout carried with 10 out mm, with 20 mm 10 andmm, 30 20 mm mm of and the shedding 30 mm of width the shedding in the underwater width in metal the underwater pipeline 3.2.external Experimental anticorrosive Process coating. The experimental content is introduced in the next section. metal pipeline external anticorrosive coating. The experimental content is introduced in Firstly, the pipeline data and detection location information are taken into the anal- the3.2. next Experimental section. Process ysis formula in Section 2. The difference between the defect pipeline area and the normal pipelineFirstly, area are the pipelineanalyzed data before and detection the experime locationnt. information Then we analyze are taken the into difference the analysis of dif- 3.2.formula Experimental in Section Process2. The difference between the defect pipeline area and the normal ferent defect and different incidence angle. We determine the angle of the sensor to the pipelineFirstly, area the are pipeline analyzed data before and thedetection experiment. location Then information we analyze are thetaken difference into the ofanal- pipeline.ysisdifferent formula The defect difference in Section and different of2. Thedifferent incidencedifference pipe angle. betwdiameen Weeters the determine is defect shown pipeline the in angle Figure area of the10. and sensorIt the can normal be to seen frompipelinethe the pipeline. figure area Theare that analyzed difference there are before of obvious different the experime diff pipeerences diametersnt. Thenbetween is we shown analyze the innormal Figure the difference area10. It and can of bethe dif- de- fectiveferentseen area. from defect the and figure different that there incidence are obvious angle. differences We determine between the the angle normal of the area sensor and theto the pipeline.defective The area. difference of different pipe diameters is shown in Figure 10. It can be seen from the figure that there are obvious differences between the normal area and the de- fective area.

FigureFigure 10. 10. AcousticAcoustic intensity intensity curve curve of underwaterunderwater metal metal pipeline. pipeline. Figure 10 shows that the sound intensity increases with the increase of abscissa ka (k is Figure 10 shows that the sound intensity increases with the increase of abscissa ka (k Figureconstant, 10. Acoustica is cylindrical intensity pipe curve radius) of underwater at the same metal incident pipeline. angle and reflection direction. At is constant,the same kaa isvalue, cylindrical the sound pipe intensity radius) of at the the intact same underwater incident metalangle pipeline and reflection is greater direc- tion. AtFigure the same 10 shows ka value, that the soundsound intensityintensity increases of the intact with underwaterthe increase metalof abscissa pipeline ka (k is greateris constant, than that a is sheddingcylindrical of pipe the radius)external at anticorrosive the same incident coating. angle When and thereflection radius direc- of the pipelinetion. At is the determined, same ka value, the thesize sound of the intensity shedding of thedamage intact underwaterand the incident metal pipelineangle is isaf- fectedgreater by thanthe sound that shedding intensity. of The the externalshedding anticorrosive damage size coating. means Whenthe width the radiusalong theof the axis of pipelinethe pipeline. is determined, The influence the size of pipelineof the shedding shedding damage damage and width the incidentand sound angle wave is af- in- tensityfected angle by the on sound the sound intensity. intensity The shedding are calculated. damage The size results means are the shown width inalong Figure the axis11. of the pipeline. The influence of pipeline shedding damage width and sound wave in- tensity angle on the sound intensity are calculated. The results are shown in Figure 11.

J. Mar. Sci. Eng. 2021, 9, 364 11 of 17

than that shedding of the external anticorrosive coating. When the radius of the pipeline is determined, the size of the shedding damage and the incident angle is affected by the sound intensity. The shedding damage size means the width along the axis of the pipeline. J. Mar. Sci.J. Mar. Eng. Sci. 2021 Eng., 9 2021, x FOR, 9, x PEERFOR PEER REVIEW TheREVIEW influence of pipeline shedding damage width and sound wave intensity angle on11 of the 1117 of 17 sound intensity are calculated. The results are shown in Figure 11.

SheddingShedding 30mm 30mm Shedding 20mm Shedding 20mm Shedding 10mm Shedding 10mm Sound intensity/dB Sound Sound intensity/dB Sound

Angle of incidence /rad

Angle of incidence /rad Figure 11. Sound intensity of rigid finite-length cylinder with shedding damage. Figure 11. Sound intensity of rigid finite-length cylinder with shedding damage. Figure 11.From Sound Figure intensity 11, the of rigidsound finite-len intensitygth is cylinder increased with with shedding the increase damage. of the shedding damageFrom width. Figure It 11can, the be soundseen from intensity the fig isure increased that there with is thea maximum increase ofsound the shedding intensity damagevalueFrom at width.Figure 90°, which It11, can themeans be seensound the from intensitymaximum the figure isintensity that incr thereeased of is a thewith maximum acoustic the increase soundtarget intensity in of the the case valueshedding of damageatbackscattering. 90◦ ,width. which meansIt Tocan increase thebe maximumseen the from difference intensity the fig ofureof the soundthat acoustic there intensity target is a inmaximumbetween the case different of sound backscatter- intensitystate valueing.pipelines at To 90°, increase in which the theexperiment, means difference the the ofmaximum inciden sound intensityt angle intensity of between the acousticof the different acoustic sensor state is targetπ pipelines, and inthe the inreflec- thecase of ◦ backscattering.experiment,tion angle is the 90°.To incident increase angle the of difference the acoustic of sensor sound is π ,intensity and the reflection between angle different is 90 . state pipelinesAfterAfter in the determiningdetermining experiment, thethe experimentaltheexperimental incident parameters,angleparamete of thers, thethe acoustic experimentexperiment sensor isis carriediscarried π, and out.out. the TheThe reflec- tionacousticacoustic angle is sensorsensor 90°. emitsemits aa sectorsector beambeam atat fixedfixed frequencyfrequency ofof 450450 kk Hz.Hz. TheThe fan-shapedfan-shaped beambeam has a vertical opening angle of 60◦ and a horizontal opening angle of 1.8◦. The ASV scans hasAfter a vertical determining opening theangle experimental of 60° and a horizontal paramete openingrs, the experiment angle of 1.8°. is The carried ASV scans out. The underwaterunderwater atat aa fixedfixed speedspeed ofof 0.50.5 m/s.m/s. The operationaloperational process ofof thethe fieldfield experimentexperiment isis acoustic sensor emits a sector beam at fixed frequency of 450 k Hz. The fan-shaped beam shownshown inin FigureFigure 1212.. has a vertical opening angle of 60° and a horizontal opening angle of 1.8°. The ASV scans underwater at a fixed speed of 0.5 m/s. The operational process of the field experiment is shown in Figure 12.

FigureFigure 12.12. SchematicSchematic diagramdiagram ofof thethe experimentalexperimental process.process.

AccordingAccording toto thethe underwaterunderwater imagingimaging test,test, thethe acousticacoustic sensorsensor hashas thethe clearestclearest imageimage at the horizontal distance of 3 m from the measured target. Therefore, the metal underwater at the horizontal distance of 3 m from the measured target. Therefore, the metal under- water pipeline is placed at the horizontal distance of the ASV at 3 m in this experiment. FigureThe 12. direction Schematic of thediagram ASV isof parallelthe experimental to the axis process. of the underwater metal pipeline. At the same time, the ASV’s direction is perpendicular to the shore and the ASV keeps moving atAccording a uniform speed.to the underwaterThe underwater imaging pipelines test, with the acousticthree different sensor shedding has the widthsclearest are image at thetested horizontal 20 times distance respectively. of 3 Them from underwater the measured ultrasound target. images Therefore, are obtained the metal through under- water pipeline is placed at the horizontal distance of the ASV at 3 m in this experiment. The direction of the ASV is parallel to the axis of the underwater metal pipeline. At the same time, the ASV’s direction is perpendicular to the shore and the ASV keeps moving at a uniform speed. The underwater pipelines with three different shedding widths are

tested 20 times respectively. The underwater ultrasound images are obtained through

J. Mar. Sci. Eng. 2021, 9, 364 12 of 17

pipeline is placed at the horizontal distance of the ASV at 3 m in this experiment. The direction of the ASV is parallel to the axis of the underwater metal pipeline. At the same J.J. Mar. Mar. Sci. Sci. Eng. Eng. 2021 2021, ,9 9, ,x x FOR FOR PEER PEER REVIEW REVIEW 1212 of of 17 17 time, the ASV’s direction is perpendicular to the shore and the ASV keeps moving at theathe uniform experiment’s experiment’s speed. platform. platform. The underwater This This is is used pipelinesused to to identify identify with three the the location differentlocation and sheddingand width width widths of of the the areunder- under- watertestedwater metal 20metal times pipeline pipeline respectively. external external The antico antico underwaterrrosiverrosive ultrasoundcoating coating shedding shedding images damage. aredamage. obtained through the experiment’s platform. This is used to identify the location and width of the underwater 4.metal4. Experimental Experimental pipeline external Results Results anticorrosive and and Discussion Discussion coating shedding damage. 4. ExperimentalAfterAfter the the experiment, experiment, Results and 60(20 60(20 Discussion × × three three kinds kinds shedding shedding damage) damage) images images were were obtained. obtained. They were used to train the SVM model and test damage identification. Firstly, 10 images TheyAfter were the used experiment, to train the 60(20 SVM× modelthree kinds and test shedding damage damage) identification. images were Firstly, obtained. 10 images were randomly selected from each kind of defect, which meant a total 30 images to train Theywere wererandomly used toselected train the from SVM each model kind and of test defect, damage which identification. meant a total Firstly, 30 images 10 images to train SVMwereSVM models. randomlymodels. To To selected introduce introduce from the the each image image kind data data of defect, proc processingessing which process, process, meant a one totalone picture picture 30 images was was to randomly randomly train selectedSVMselected models. asas anan To example.example. introduce The theThe image originaloriginal data ultrasonicultrasonic processing imageimage process, collectedcollected one picture inin the wasthe experimentexperiment randomly isis shownselectedshown in in as the the an left example.left side side of Theof Figure Figure original 13. 13. ultrasonic To To hi highlightghlight image the the collected pipeline pipeline in position, theposition, experiment the the gray gray is shown enhance- enhance- mentinment the method method left side was was of Figureused used to13to process .process To highlight the the image, image, the pipelineand and the the position,result result is is shown theshown gray in in enhancement the the right right side side of of FiguremethodFigure 13. 13. was used to process the image, and the result is shown in the right side of Figure 13.

Figure 13. Using image gray enhancement algorithm to process the original image. FigureFigure 13.13.Using Using image image gray gray enhancement enhancement algorithm algorith tom processto process the the original original image. image.

AfterAfterAfter processing processing images,images, images, we we we selected selected selected the the the pipeline pipeline pipeline area area area artificially. artificially. artificially. Because Because Because the the sizethe size ofsize of of thethethe pipeline, pipeline,pipeline, distance distance betweenbetween between pipeline pipeline pipeline and and and sensor sensor sensor are are are the the the same same same in allin in all images,all images, images, the the pixelthe pixel pixel pointspointspoints occupied occupied byby by thethe the pipelinepipeline pipeline area area area were were were equal. equa equa Inl.l. In theIn the the image, image, image, the the the pipeline pipeline pipeline area area area occupies occupies occupies thethethe positionposition ofof of 180 180 180× × 65× 6565 pixel pixelpixel points, points,points, which whichwhich is the isispipeline thethe pipelinepipeline area sample. areaarea sample.sample. Next, four Next,Next, different four four dif-dif- ferentpositionsferent positions positions were randomly were were randomly randomly selected selected selected as non-pipeline as as non-pipeline non-pipeline sample. assample. sample. shown as as in shown shown Figure in 14in .Figure Figure After 14. 14. all the images were processed in this way, 30 samples of pipeline area and 120 samples of AfterAfter allall thethe imagesimages werewere processedprocessed inin thisthis way,way, 3030 samplessamples ofof pipelinepipeline areaarea andand 120120 non-pipeline area were obtained. They were used to train SVM model. samplessamples of of non-pipeline non-pipeline area area were were obtained. obtained. They They were were used used to to train train SVM SVM model. model.

Figure 14. Divided ultrasonic image into two kind samples: pipeline area and non-pipeline area. FigureFigure 14. 14. Divided Divided ultrasonic ultrasonic image image into into two two kind kind sa samples:mples: pipeline pipeline area area and and non-pipeline non-pipeline area. area. Next, the HOG was used to extract the feature vector. The parameters of the HOG are Next, the HOG was used to extract the feature vector. The parameters of the HOG shownNext, in Table the 1HOG. Among was them, used smallto extract cells leadthe feature to large vector. amount The of calculation parameters and of largethe HOG arecellsare shown shown lead to in ain roughTable Table model.1. 1. Among Among Because them, them, the small structuresmall cells cells in lead thislead paperto to large large is simple,amount amount we of of chose calculation calculation cell size and and largeoflarge 8 × cells cells8. NumBins lead lead to to a indicatesa rough rough model. model. the magnitude Because Because ofthe the the structure structure gradient in valuein this this inpaper paper 9 directions. is is simple, simple, we we chose chose cellcell size size of of 8 8 × × 8. 8. NumBins NumBins indicates indicates the the magnitude magnitude of of the the gradient gradient value value in in 9 9 directions. directions.

TableTable 1. 1. Characteristic Characteristic paramete parametersrs of of HOG HOG algorithm. algorithm.

ParametersParameters ValueValue CellCell size size 88 × × 8 8 BlockBlock size size 22 × × 2 2 NumBinsNumBins 99

J. Mar. Sci. Eng. 2021, 9, 364 13 of 17

Table 1. Characteristic parameters of HOG algorithm.

Parameters Value Cell size 8 × 8 Block size 2 × 2 NumBins 9 J.J. Mar.Mar. Sci.Sci. Eng.Eng. 2021,, 9,, xx FORFOR PEERPEER REVIEWREVIEW 13 of 17

TheThe representationrepresentation ofof thethe HOGHOG algorithmalgorithm eigenvalueseigenvalues isis shownshown inin FigureFigure 15 15..

FigureFigure 15.15. FeatureFeature extractionextraction usingusing histogramhistogram ofof orientedoriented gradientgradient (HOG)(HOG) algorithm.algorithm.

AfterAfter thethe imageimage informationinformation isis transformedtransformed intointo aa featurefeature vector,vector, itit cancan bebe inputinput intointo SVMSVM modelmodel forfor training.training. Next,Next, wewe usedused itit asas aa testtest model.model. WeWe extractedextracted thethe pipelinepipeline areaarea ofof thethe testtest image.image. BeforeBefore thethe testtest imageimage waswas inputinput intointo thethe model,model, wewe firstfirst dividedivide thethe testtest imageimageimage intointointo severalseveralseveral samplessamplessamples accordingaccordingaccording tototo thethethe size sisize ofof the the pipeline pipeline area area (180 (180× × 65),65), andand thethe specificspecific divisiondivision method is shown shown in in Figure Figure 16.16 .First, First, the the upper upper left left corner corner of of the the image image is issample sample 1, 1,then then moved moved 5 pixels 5 pixels to tothe the right right as assample sample 2 and 2 and so so on, on, until until the the box box moves moves to tothe the upper upper right right corner corner and and now now it it is is sample sample nn,, ,thenthen then movesmoves moves fivefive five pixelspixels downdowndown asasas samplesamplesample nn+1,+ 1, then then moves moves left left until until the the box box covers covers the the test test image. image.

FigureFigure 16.16. DivideDivide thethe testtest imageimage intointo severalseveral areas.areas.

AfterAfter thethe sample sample is is divided divided and and input input into into the the model, model, the pipelinethe pipeline area canarea be can obtained, be ob- astained, shown as inshown Figure in 17 Figurea. Next, 17a. according Next, accordin to theg gray to the value gray of value the pipeline of the pipeline projection projec- area andtion thearea pipeline and theshadow pipeline area, shadow the pipelinearea, theprojection pipeline projection area is extracted area is extracted from the pipelinefrom the area.pipeline This area. paper This uses paper the numerical uses the differencenumerical method,difference which method, is introduced which is in introduced Section 2.2.2 in, toSection extracted 2.2.2, the to pipelineextracted projection the pipeline area, projection as shown inarea, Figure as shown 17b. To in identify Figure the17b. shedding To iden- damage,tify the shedding the feature damage, matrix the extracted feature from matrix the extracted pipeline projectfrom the gray pipeline images project is used gray to calculateimagesimages isis the usedused average toto calculatecalculate gray value. thethe averageaverage The line graygray average value.value. gray TheThe value lineline damageaverageaverage identificationgraygray valuevalue damagedamage curve identificationidentification curvecurve isis shownshown inin FigureFigure 17c.17c. TheThe damagedamage locationlocation cancan bebe calculatedcalculated byby thethe method introduced in Section 2.2.2.

J. Mar. Sci. Eng. 2021, 9, 364 14 of 17

is shown in Figure 17c. The damage location can be calculated by the method introduced in Section 2.2.2. J. J.Mar.J. Mar. Mar. Sci. Sci. Sci. Eng. Eng. Eng. 2021 2021 2021, 9, ,,9 x9, ,xFOR x FOR FOR PEER PEER PEER REVIEW REVIEW REVIEW 1414 14of of of17 17 17

FigureFigureFigureFigure 17. 17. 17.17. (a ( )(a( aPipeline)) Pipeline Pipeline area; area; area; (b ( )b( bpipeline) )pipeline pipeline project project project project area; area; area; area; (c ( )c( (cthe)c ))the the the average average average average gray gray gray gray value value value value shedding shedding shedding shedding damage damage damage damage recognitionrecognitionrecognitionrecognition curve. curve. curve.curve.

ThisThisThisThis pipeline pipeline pipeline of of of 1 1m1 1 m m mhas hashas has 180 180180 180 pixel pixelpixel pixel points pointspoints points in in intotal, in total,total, total, which whichwhich which means meansmeans means a apixela pixelpixel a pixel point pointpoint point is is is5.6 5.65.6 is mm.mm.5.6mm. mm.As AsAs shown shown Asshown shown in in inFigure Figure inFigure Figure 17, 17,17, the17 thethe, thefinal finalfinal final defect defectdefect defect identification identificationidentification identification position positionposition position accounts accountsaccounts accounts for forfor 2 2 2pixel2 pixel pixelpixel points.points.points.points. The The TheThe recognition recognitionrecognition accuracy accuracyaccuracy accuracy of of of ofthis this thisthis pipeline pipelinepipeline defect defectdefect widthwidth widthwidth isis is37.3%. is37.3%. 37.3%.37.3%. Next, Next, Next,Next, the the thethe detection detec- detec-detec- tiontiondifferencestion differences differences differences between between between between different different different different defect defect defect defect widths widt widt widt werehshshs were compared.were were compared. compared. compared. As shown As As As shown shown inshown Figure in in inFigure Figure18 Figure, images 18, 18, 18, imagesimagesofimages three of of of differentthree three three different different different shedding shedding shedding shedding damage damage damage damage wererandomly were were were randomly randomly randomly selected. selected. selected. selected.

Figure 18. Defect image pipeline area extraction results. FigureFigureFigure 18. 18. 18. Defect DefectDefect image image image pipe pipe pipelinelineline area area area extrac extrac extractiontiontion results. results. results.

AsAsAsAs shown shown shown in inin inFigure Figure FigureFigure 18,18 18,18,, they theythey cancan cancan allall allall extract extract extractextract the the thethe pipeline pipeline pipelinepipeline area. area. area.area. Then, Then, Then,Then, we we identified wewe identified identifiedidentified their theirtheirdamagetheir damage damage damage location. location. location. location. The The resultsThe The results results results are are shown are are shown shown shown in Figure in in inFigure Figure Figure 19. 19. 19. 19.

SheddingSheddingShedding width width width 10mm 10mm 10mm SheddingSheddingShedding width width width 20mm 20mm 20mm SheddingSheddingShedding width width width 30mm 30mm 30mm

Figure 19. Picture of defect location recognition. FigureFigureFigure 19. 19. 19. Picture Picture Picture of of ofdefect defect defect location location location recognition. recognition. recognition. The red points in Figure 19 are the pixel points calculated as shedding damage. TheThe red red points points in inFigure Figure 19 19 are are the the pixe pixel pointsl points calculated calculated as as shedding shedding damage. damage. AccordingThe red to thepoints pixel in pointsFigure occupied 19 are the by thepixe pipelinel pointsin calculated the gray scaleas shedding image, the damage. widths AccordingAccordingAccording to to tothe thethe pixel pixelpixel points pointspoints occupied occupiedoccupied by byby the thethe pipeline pipelinepipeline in in inthe thethe gray graygray scale scalescale image, image,image, the thethe widthswidthswidths of of ofdefects defectsdefects identified identifiedidentified of of of10 1010 mm, mm,mm, 20 2020 mm mmmm and andand 30 3030 mm mmmm shedding sheddingshedding damage damagedamage are areare calcu- calcu-calcu- latedlatedlated to to tobe bebe 11.2 11.211.2 mm. mm.mm. However, However,However, when whenwhen the thethe shedding sheddingshedding width widthwidth is is is20 2020 mm, mm,mm, we wewe mistakenly mistakenlymistakenly checkedcheckedchecked other other other normal normal normal positions positions positions as as as defects. defects. defects. Then Then Then we we we put put put 30 30 30 test test test images images images into into into the the the model model model for for for testing,testing,testing, and and and the the the results results results are are are shown shown shown in in inTable Table Table 2. 2. 2.

J. Mar. Sci. Eng. 2021, 9, 364 15 of 17

of defects identified of 10 mm, 20 mm and 30 mm shedding damage are calculated to be 11.2 mm. However, when the shedding width is 20 mm, we mistakenly checked other normal positions as defects. Then we put 30 test images into the model for testing, and the results are shown in Table2.

Table 2. Comparison recognition results of different defects.

Category Shedding width 10 mm Shedding width 20 mm Shedding width 30 mm Pipeline area extraction accuracy 100% 100% 100% Defect location identification accuracy 80% 80% 90% Defect width recognition accuracy 64.3% 43.7% 41.2%

As shown in Table2, all the pipeline areas are accurately extracted in test images. In this paper, if the damage location can be detected, we think the detection accuracy is accurate. The results show that the detection accuracy is 80% when the shedding width is 10 mm and 20 mm. When the defect width is 30 mm, the detection accuracy is 90%. The detection accuracy of all defect width is less than 65%.

5. Conclusions In this paper, a method based on HOG+SVM for ultrasonic imaging detection of an external anticorrosive coating in an underwater metal pipeline was proposed. The non-contact underwater acoustic imaging method was used to detect the damage in the underwater metal pipeline. An Autonomous Surface Vehicle (ASV) was used as carrying tool to realize unmanned real-time remote online detection. Firstly, the acoustic scatter- ing characteristics analysis model was established, and the factors affecting the acoustic scattering characteristics analyzed. The feasibility of non-contact ultrasonic imaging for the detection of the outer anti-corrosion layer was proved from the theoretical. After that, the target detection algorithm of HOG+SVM was introduced. Finally, an experimental platform based on the ASV researched by the team was built, and the real-time trans- mission of reflected data was realized by wireless communication. Taking the pipeline with three PE outer anti-corrosion coatings as the object, the experiment was carried out in an experimental pool. Underwater pipelines with 10 mm, 20 mm and 30 mm outer anti-corrosion layer shedding damage defects were tested, respectively. The identification curve of shedding damage detection was made, and the location of shedding damage was realized. The results show that the method can extract the pipeline area from the ultrasonic image accurately. For detecting the damaged position of the pipeline, the detection accu- racy is higher when the width is larger. For the detection of defect width, the results are less than 65%. The inaccurate identification of damage width is mainly due to the insufficient resolution of detection equipment. In summary, the method in this paper can be used for distinguishing the shedding damage of underwater pipeline external anticorrosive coating. By this method, the damage location can be accurately identified, and the defect size can even be quantified. However, the current experimental conditions are ideal, and the influence of underwater fluctua- tions, pipeline surface attachments and other real detection factors will be considered in future research.

Author Contributions: G.X. and X.H. provided ideas of the paper. X.H. provided fund support. G.X. designed the experiment, L.H. and S.G. performed the experiment. L.H. processed the data, L.H. and S.G. wrote the paper, G.X. and X.H. revised the paper. All authors have read and agreed to the published version of the manuscript. Funding: This work was supported by the Guangdong Province Science and Technology project under grant No. 2018B010109004 and 2018B010109005, Guangzhou Science and Technology project under grant No.201704020052,201802020021 and 201802020009, Guangdong Marine Economy Promo- tion projects Fund under grant No. GDoE[2019]A13. J. Mar. Sci. Eng. 2021, 9, 364 16 of 17

Institutional Review Board Statement: Not applicable. Informed Consent Statement: Informed consent was obtained from all subjects involved in the study. Data Availability Statement: The data presented in this study are available on request from the corresponding author. The data are not publicly available. Conflicts of Interest: The authors declare this paper has no conflict of interest.

References 1. Oleksiy, L.; Evgeny, B.; Oleksii, V. Prediction of reliability of the corroded pipeline considering the randomness of corrosion damage and its stochastic growth. Eng. Fail. Anal. 2016, 66, 60–71. 2. Jinlong, W.; Renyang, H.; Haibin, Z.; Han, G.; Qingwei, W. State-of-the-art Advancement and Development Direction of Submarine Pipeline Inspection Technology. Pet. Mach. 2016, 44, 112–118. 3. Zheng, Z.; Ou, G.; Ye, H.; Tan, J.; Jin, H. Analysis on the under deposit corrosion of air cooler tubes: Thermodynamic, numerical and experimental study. Eng. Fail. Analysis. 2017, 79, 726–736. [CrossRef] 4. Yigit, M.; Kadir, T. A passive acoustic based system to locate leak hole in underwater natural gas pipelines. Digit. Signal Process. 2018, 76, 59–65. 5. Long, M. Numerical Simulation and Experimental Research on Mangentostrictive Guided Wave Testing on Marine Riser; Lanzhou University of Technology: Lanzhou, China, 2013. 6. Wenjin, L. Design and Implementation of Leakage Detection Method for Underwater Pipeline Based on Forward Looking Sonar; Harbin Engineering University: Haerbing, China, 2017. 7. Pronina, Y.G. Estimation of the life of an elastic tube under the action of a longitudinal and under uniform surface corrosion conditions. Russ. Metall. 2010, 2010, 361–364. [CrossRef] 8. Han, L.; Wang, Q.; Fan, X.; Gu, X. Underwater Gas Pipeline Leakage Diagnostic Method by Distributed Optical Fiber Sensor Based on SPE. Laser Optoelectron. Prog. 2016, 53, 052801. 9. Mahbub, I.; Pullano, S.A.; Wang, H.; Islam, S.K.; Fiorillo, A.S.; To, G.; Mahfouz, M.R. A Low-Power Wireless Piezoelectric Sensor-Based Monitoring System Realized in CMOS Process. IEEE Sens. J. 2017, 17, 1858–1864. [CrossRef] 10. Zhang, D.; Zhang, Z.; Liu, Y.; Du, G. Piezoelectric impedance-based quantitative study on oil and gas pipeline crack damage. Eng. Mech. 2016, 33, 232–237. 11. Qi, Y.; Jianfeng, Y.; Wenbin, L.; Chen, L.; Zhang, Y. Application of Current Method in Multifrequency Tube in Detection of Buried Pipeline. Chem. Mach. 2017, 44, 502–506. 12. Ojeda, V.A.; Lázaro, L.; Benito, J.J.; Bastidas, J.M. Assessment of by close interval survey incorporating the instant off potential method. Br. Corros. J. 2016, 51, 241–247. [CrossRef] 13. Zhang, W.; Zhou, T.; Peng, D.; Shen, J. Underwater pipeline leakage detection via multibeam sonar imagery. J. Acoust. Soc. Am. 2017, 141, 3917. [CrossRef] 14. Yigit, M.; Kadir, T. Received signal strength difference based leakage localization for the underwater natural gas pipelines. Appl. Acoust. 2019, 153, 1419. 15. Huang, Y.; Wang, Q.; Shi, L.; Yang, Q. Underwater gas pipeline leakage source localization by distributed fiber-optic sensing based on particle swarm optimization tuning of the support vector machine. Appl. Opt. 2016, 55, 242. [CrossRef] 16. Wang, F.; Sun, Z.; Zhu, F.; Zhu, C.; Pan, Y.; Dong, J.; Zhang, X.; Gao, L. Research on the leakage monitoring of oil pipeline using BOTDR. Chem. Eng. Mach. 2017, 44, 502–506+596. [CrossRef] 17. Qu, Y.; Zhang, H.; Zhao, R. Research on the Method of Predicting Corrosion width of Cables Based on the Spontaneous Magnetic Flux Leakage. Materials 2019, 13, 2154. [CrossRef][PubMed] 18. Wu, D.; Liu, Z.; Wang, X.; Su, L. Composite magnetic flux leakage detection method for pipelines using alternating magnetic field excitation. NDT E Int. 2017, 91, 148–155. [CrossRef] 19. Vanaei, H.R.; Eslami, A.; Egbewande, A. A review on pipeline corrosion, in-line inspection (ILI), and corrosion growth rate models. Int. J. Press. Vessel. Pip. 2016, 149, 43–54. [CrossRef] 20. Antonio, R.; Noe, A.R.; Sergio, T. Design and Validation of an Articulated Sensor Carrier to Improve the Automatic Pipeline Inspection. Sensors 2019, 6, 1394. 21. Zhang, B.; Zhang, S.; Li, W. Bearing performance degradation assessment using long short-term memory recurrent network. Comput. Ind. 2019, 106, 14–19. [CrossRef] 22. Peng, L.; Huang, L.; Peng, J. Sensor Distribution Optimization for Structural Impact Monitoring Based on NSGA-II and Wavelet Decomposition. Sensors 2018, 18, 4264. 23. Hong, X.; Liu, Y.; Liufu, Y.; Lin, P. Debonding Detection in Hidden Frame Supported Glass Curtain Walls Using the Nonlinear Ultrasonic Modulation Method with Piezoceramic Transducers. Sensors 2018, 18, 2094. [CrossRef] 24. Gloria, N.; Areiza, M.; Miranda, I.; Rebello, J. Development of a magnetic sensor for detection and sizing of internal pipeline corrosion defects. NDT E Int. 2009, 42, 669–677. [CrossRef] 25. Khan, A.; Meriaudeau, F.; Ali, S.S.A.; Malik, A.S. Underwater image enhancement and dehazing using wavelet based fusion for pipeline corrosion inspection. In Proceedings of the International Conference on Intelligent and Advanced Systems, Kuala Lumpur, Malaysia, 19 January 2017; pp. 15–17. [CrossRef] J. Mar. Sci. Eng. 2021, 9, 364 17 of 17

26. Yang, Y.; Khan, F.; Thodi, P.; Abbassi, R. Corrosion induced failure analysis of pipelines. Reliab. Eng. Syst. Saf. 2017, 159, 214–222. [CrossRef] 27. Xiong, C.; Li, Z.; Sun, X. An Effective Method for Submarine Pipeline Inspection Using Three-Dimensional (3D) Models Constructed from Multisensor Data Fusion. J. Coast. Res. 2017, 34, 1009–1019. [CrossRef] 28. Yazdekhasti, S.; Piratla, K.R.; Atamturktur, S.; Khan, A.A. Novel vibration-based technique for detecting water pipeline leakage. Struct. Infrastruct. Eng. 2016, 1–12. [CrossRef] 29. Seemakurthy, K.; Rajagopalan, A.N. Change detection in underwater imagery. J. Opt. Soc. Am. Opt. Image Sci. Vis. 2016, 33, 301. [CrossRef][PubMed] 30. Song, H.J.; Song, J.; Ren, P. Underwater Pipeline Oil Spill Detection Based on Structure of Root and Branch Cells. J. Mar. Sci. Eng. 2020, 8, 1016. [CrossRef] 31. Tian, Y.; Maitra, R.; Meeker, W.Q.; Holland, S.D. A Statistical Framework for Improved Automatic Flaw Detection in Nondestruc- tive Evaluation Images. Technometrics 2017, 59, 15. [CrossRef] 32. Fernando, M.S.; Myriam, R.D.; Ricardo, D.S. Deep neural networks based approach for welded joint detection of oil pipelines in radiographic images with Double Wall Double Image exposure. NDT E Int. 2019, 105, 46–55. 33. Ravanbod, H. Application of neuro-fuzzy techniques in oil pipeline ultrasonic . NDTE Int. 2005, 38, 643–653. [CrossRef] 34. Dai, G.; Chen, T.; Xue, J.; Yao, P. New type of ultrasonic high-definition micro-scanning imaging nondestructive testing system. Appl. Res. Comput. 2008, 6, 1901–1903+1907. 35. Waterman, P.C. New formulation of acoustic scattering. J. Acoust. Soc. Am. 1969, 45, 1417–1429. [CrossRef] 36. Hawkes, M.; Nehorai, A. Wideband source localization using a distributed acoustic vector-sensor array. IEEE Trans. Signal Process. 2003, 51, 1479–1491. [CrossRef] 37. Alexander, G.; Nico, D.; Xiaoai, G.; Meier, M.; Nirschl, H. Probing the absolute scattering intensity by means of a laboratory-based small-angle X-ray scattering camera using an imaging plate detector. J. Appl. Crystallogr. 2016, 49, 15–23. 38. Hongpu, F.; Beiji, Z. Histogram of Oriented Gradient and Its Extension. Comput. Eng. 2013, 39, 212–217. 39. Tian, S.; Bhattacharya, U.; Lu, S.; Su, B.; Wang, Q.; Wei, X.; Lu, Y.; Tan, C.L. Multilingual Scene Character Recognition with Co-occurrence of Histogram of Oriented Gradients. Pattern Recognit. 2016, 51, 125–134. [CrossRef] 40. Vokhmintcev, A.V.; Sochenkov, I.V.; Kuznetsov, V.V.; Tikhonkikh, D.V. Face recognition based on a matching algorithm with recursive calculation of oriented gradient histograms. Dokl. Math. 2016, 93, 37–41. [CrossRef] 41. Pandarakone, S.E.; Mizuno, Y.; Nakamura, H. Distinct Fault Analysis of Induction Motor Bearing Using Frequency Spectrum Determination and Support Vector Machine. IEEE Trans. Ind. Appl. 2017, 53, 3049–3056. [CrossRef] 42. Lin, W.; Tu, C.; Yang, R.; Tsai, M. Particle swarm optimisation aided least-square support vector machine for load forecast with spikes. IET Gener. Transm. Distrib. 2016, 10, 1145–1153. [CrossRef]