Semi-Automatic Oil Spill Detection on X-Band Marine Radar Images Using Texture Analysis , Machine Learning , and Adaptive Thresholding

Oil spills bring great damage to the environment and, in particular, to coastal ecosystems. The ability of identifying them accurately is important to prompt oil spill response. We propose a semi-automatic oil spill detection method, where texture analysis, machine learning, and adaptive thresholding are used to process X-band marine radar images. Coordinate transformation and noise reduction are first applied to the sampled radar images, coarse measurements of oil spills are then subjected to texture analysis and machine learning. To identify the loci of oil spills, a texture index calculated by four textural features of a grey level co-occurrence matrix is proposed. Machine learning methods, namely support vector machine, k-nearest neighbor, linear discriminant analysis, and ensemble learning are adopted to extract the coarse oil spill areas indicated by the texture index. Finally, fine measurements can be obtained by using adaptive thresholding on coarsely extracted oil spill areas. Fine measurements are insensitive to the results of coarse measurement. The proposed oil spill detection method was used on radar images that were sampled after an oil spill accident that occurred in the coastal region of Dalian, China on 21 July 2010. Using our processing method, thresholds do not have to be set manually and oil spills can be extracted semi-automatically. The extracted oil spills are accurate and consistent with visual interpretation.


Introduction
Oil spills can result in immediate and long-term environmental damage that can last for decades.In oil spill accidents, crude oil at and beneath the water's surface can quickly spread and reach the coastal region under particular weather and oceanographic conditions [1][2][3][4][5].Therefore, quick and accurate oil spill detection is a critical step for oil spill cleaning.Marine radars are normally installed in vessels for navigation [6].The marine radar images used in this study are convenient and expedient to obtain.In marine radar images, the intensity of the backscattered signal in an oil spill area is weaker than in the neighboring waters, a phenomenon that can be exploited to detect oil spills [7].Although several commercial systems have been developed, such as the oil spill detection (OSD) system of Miros (Norwegian company) [8,9], the SeaDarQ radar system of Nortek Netherlands [10], and the sigma S6 OSD system of Rutter (Canada company) [11], oil spill extraction methods are seldom publicized due to commercial competition.Some scholarly studies have been published on how to use marine radar to detect oil spills in the 1980s [12,13], but the detailed oil spill segmentation method was not yet introduced.Zhu et al. studied how the OSD method [14] can be used to access oil spills information.In their study, multiple radar images were used to map and predict the attenuation of signal intensity in the images, and a manually set global threshold was applied to extract the oil spills.In another study, Liu et al. proposed an adaptive thresholding method [15] to visualize the oil spills on individual sampled radar images.Similarly, a manually set threshold had to be used to select an available area for oil spill segmentation.Xu et al. detected oil spills on radar images by dual thresholds [16], however, the thresholds still have to be manually selected in this research.
In this paper, we propose a semi-automatic oil spill detection method using texture analysis, machine learning, and adaptive thresholding.In our method, manually set thresholds are not required.The process of the proposed method is shown in Figure 1, and the proposed method will be described in Sections 2-4.Section 2 describes how radar images were obtained and preprocessed by erasing co-channel interference, reducing small objects turbulence.Section 3 explores a coarse measurement method.An index calculated by the grey level co-occurrence matrix (GLCM) will be used to indicate areas containing oil spills.Machine learning methods are used to separate the oil spill area.In Section 4, fine measurements of the oil spill area will be obtained by an adaptive thresholding method.In Section 5, extraction results of oil spills based on several radar images are carried out, and the performance of the proposed method is discussed in Section 6.Finally, Section 7 presents the conclusions.

Radar Image Collection
An oil spill accident took place on the shore in Dalian on July 16 2010.A large amount of oil was poured into ocean.The teaching-training ship "YUKUN" owned by Dalian Maritime University was commissioned to measure the oil spills in the coastal area.An X-band marine radar from Sperry Marine (Head Office in London, UK) was installed on "YUKUN", and radar images were used to detect oil spills.The main parameters of X-band marine radar are shown in Table 1. Figure 2a shows the navigation route of the teaching-training ship "YUKUN" on 21 July 2010.Figure 2b shows an example of radar images obtained at the seashore near Dalian Bay at 23:19:32, covering the area shown in red in Figure 2a.The scanning radius of the radar image is 0.75 nautical miles.For more straightforward analysis, the marine radar images were plotted on a Cartesian coordinate system instead of the polar coordinate system.In the Cartesian coordinate, the horizontal axis indicates angles of incidence, the vertical axis distances from the pole, and the brightness the strength of the reflected signal.Figure 3 shows the transformed image of Figure 2b in the Cartesian coordinate and the image size is 512 × 2048.

Denoising
As shown in Figure 3, co-channel interference manifests as bright band effects.An index calculated by convolutional filters [15] was used to detect co-channel interference.The expression of the index is shown as follow: where C(i, j) is the index value, V c is the N by 1 convolutional filter, V r is the 1 by N convolutional filter, and N is the length of the convolutional filter, which is set as an odd number.
Based on the calculated index value, the co-channel interference was detected by Otsu's method [17,18].Then, the identified co-channel interference was erased by a mean filter with a 1 by N matrix [19].The radar image erasing co-channel interference is shown in Figure 4, with two convolutional filters [1, 1, 1, 1, 1, 1, 1] and [1; 1; 1; 1; 1; 1; 1], and mean filter [1/6, 1/6, 1/6, 0, 1/6, 1/6, 1/6].According to the convolutional filter method, only the pixel value at the loci of co-channel interference is modified.Though co-channel interference has been removed, Figure 4 is still littered with bright speckles caused by reflected signals of small objects.These speckles are considered as noise in image processing for oil spill detection.To reduce speckles, the Fields-of-Experts (FoE) model [20] was introduced.In this method, bright speckles are extracted as prior information.To gain information on the speckles, binarization with the threshold calculated by Otsu's method was first used to identify the bright areas, then connected components (objects) of fewer than 200 pixels were extracted as speckles.3 × 3 square patches with 8 filters were adopted to clean up the bright speckles.After introducing the FoE model, the intensity of bright speckles was reduced significantly.A radar image with co-channel interference erased and bright speckles reduced is shown in Figure 5.
Visual interpretation by experts is one of the most common methods for oil spill detection [21].One visual interpretation result in the Cartesian coordinate of Figure 2 is shown in Figure 6.

Texture Analysis
Texture is taken as a repetitive pattern to describe a limited area [22].The GLCM was first introduced to describe statistical features in texture analysis by Haralick [23].The GLCM is determined as a two-dimensional histogram of grey levels for a pair of pixels, which are separated by a fixed spatial relationship.Texture analysis of TerraSAR-X data has been used to enhance the land use/cover (LULC) classification near Pirna, Saxony, Germany [24].GLCM was utilized to detect the landslides on levees based on Synthetic Aperture Radar (SAR) data [25].Besides land applications, GLCM texture analysis was also used for oil spill monitoring from ERS-2 SAR image in the Bohai Sea, China [26].Based on these studies, it can be said that texture analysis is an effective tool for hazard mapping.Therefore, texture analysis using GLCM is introduced to oil spill detection by marine radar imaging.Compared with SAR images, the intensity of reflected signal from sea surface grabbed by X-band marine radar is affected by distance, roughness of sea surface, and incidence [27,28].Hence, texture characteristics of SAR images cannot be applied to X-band marine radar images directly.
Four textural features-energy, entropy, contrast, and correlation-were proved to be independent [29].To decrease the computational complexity of the 4 texture features on marine radar images, the subsampling window was set to 32 × 32 pixels, the off-set step was set to 4 pixels, and the number of gray levels used in GLCM was set to 32.Based on these settings, the pooling images of 4 textural features are shown in Figure 7. Figure 7a shows the entropy.The bright area in the radar image has a small reflection value.Oil spill area is included in the small entropy value area.Figure 7b shows the energy, both oil spill areas and areas farther away in the radar image have weak energy, which is not useful in distinguishing oil spills independently.Figure 7c shows the correlation value, the oil spill area and places farther away have high correlation values, but it is difficult to extract the oil spill area.The textural feature of contrast is shown in Figure 7d.The contrast value in the oil spill area is high, but it cannot provide oil spill extraction information alone.Based on Figure 7, it is impossible to extract the oil spill areas with single texture features.To highlight the region containing oil spills, an index calculated by 4 independent textural features of GLCM is proposed to distinguish oil slicks.In this calculation, we assume that the contribution of each feature is equivalent.Then, the value of each textural feature is normalized from 0 to 1, which is expressed as: where M is the value of textural features on the marine radar image.In the texture analysis shown in Figure 7, the contrast between oil spill area and water area is not significant.A logarithmic operation can be used to carry out the contrast enhancement [30].Therefore, the logarithmic operations are used on the four independent textural features.Finally, according to the performance of each textural feature for oil spill detection, an index I used for oil spill detection by marine radar imaging is calculated as follows: where ENT is entropy, ENE is energy, COR is correlation, and CON is contrast.According to Equation (3), the proposed texture index of Figure 5 is shown in Figure 8.In Figure 8, the color of the area containing oil slicks is warmer than that of other areas.This observation can be used to carry out oil spill segmentation.

Classification by Machine Learning Algorithm
After processing using the proposed texture index, the marine radar image can be divided into two categories-one is the area containing oil spill and the other is the area without oil spill.To separate the area containing oil spill, machine learning is introduced.In this process, we do not need to test multiple thresholds to pick the best one for oil spill segmentation.In machine learning, several methods can be used for classification, and the following methods will be discussed in this section: Support Vector Machine (SVM), k-Nearest Neighbor (k-NN), Linear Discriminant Analysis (LDA) and Ensemble Learning (EL).

SVM
SVM has been successfully used for classification [31][32][33] and pattern recognition [34].To separate two classes by SVM, the goal is to find the hyperplane that maximizes the minimum distance between any data point.Suppose there is a training dataset containing l points {x i , y i } l i , with the input data x i ∈ R n and the corresponding data y i ∈ {−1, +1} as two classes.In feature space, SVM models can be expressed as: where ω is a weight vector of the same dimension as the feature space, ϕ(•) is the nonlinear mapping to map the input vector into a so-called higher dimensional feature space, and b is the bias.The expression used for classification using the kernel trick is: where α i are support vectors, and K x i , x j = ϕ(x i ) T ϕ x j is the kernel trick.Several types of kernels, such as linear, polynomial, splines, radius-based function, and multi-layer perceptrons, can be used within the SVM.

k-NN
The k-NN algorithm is one of the most commonly used classifiers [35,36].Suppose datasets (X 1 , Y 1 ), (X 2 , Y 2 ), (X 3 , Y 3 ), . . .are independent and identically distributed pairs taking values in R d .A classifier C is a Borel measurable function from R d to {1, 2}, with the interpretation that the point • is an arbitrary norm on R d .We define the k-NN classifier to be where I is the group indicator vector.
In the k-NN method, each sample belonging to the test dataset is classified according to the closest k samples belonging to the training dataset.Among the class numbers obtained from k samples, the class having the maximum number is determined as the class of the sample [36].The distances between the test samples and the training samples can be calculated as Euclidean, Manhattan, and Hamming.

LDA
LDA is a normally used method for classification [37][38][39].Suppose a set of N samples {x 1 , x 2 , . . ., x N } are in an n-dimensional space, and the samples belong to m classes {C 1 , C 2 , . . ., C m }.The between-class scatter S b and within-class scatter S w are defined as: where µ is the total sample mean vector, µ i is the mean sample of class C i , and N i is the number of samples in class C i .
LDA finds a projection matrix A by maximizing the following objective function: According to Equation ( 9), LDA seeks directions on which data points of different classes are far from each other while requiring data points of the same class to be close to each other.

Ensemble Learning (EL)
EL is an effective method to enhance classification performance and accuracy in the remote sensing community [40][41][42].The EL method is a paradigm of machine learning, and it focuses on using multiple learners to solve a problem.In the EL method, instead of finding the best individual learner to solve the problem, better performance can be reached by combining multiple weak learners' outputs.An EL system is constructed by two key components-a specific strategy to build an ensemble using diverse classifiers, and a rule to combine multiple outputs.Diversity of multiple classes is the foundation for constructing an effective EL system.The normally used method supports different training sets produced by a resampling technique, such as Boosting and Bagging.

Oil Spill Detection on the Texture Analyzed Image
To carry out machine learning methods, training data is first needed to gauge the parameters in different machine learning methods.Then, classification is carried out by the trained model of machine learning methods.On the image of proposed texture index, the selected data for training is shown in Figure 9.The data in the blue polygons are used as oil spills, and the data in the green polygons are taken as water.In the SVM method, the type of kernel is polynomial with the degree as 3.In the k-NN method, the value of k is 10 and the Euclidean distance is used.In the EL method, the LogitBoost method is adopted, after which decision tree learner is used.Parameters used in the LDA method are deduced by training data.Based on training information and set parameters, the oil spill detection carried out by SVM, k-NN, LDA, and EL are shown in Figure 10.In Figure 10, white areas are oil spills and black areas are water.The oil spill areas in Figure 10a,b are roughly the same as the dark red areas in Figure 8. Figure 10d indicates the oil spill areas containing many small speckle noises.The classification results of oil spill areas in Figure 10c are the most different from the visual interpretation results in Figure 8, including a large number of water areas.
In machine learning, the image of texture index is pooled by texture analysis.Therefore, the detected region of oil spills on the image of texture index should be restored to the original size.The restored areas containing oil spills extracted by 4 machine learning methods are shown in Figure 11.As shown in Figure 11, oil spill areas detected by textural analysis and machine learning contain lots of water area.Hence, fine measurements of oil spills are required.

Fine Measurements
As mentioned before, the intensity of the reflected signal from the sea surface is affected by distance, roughness of sea surface, and incidence, oil spills cannot be extracted accurately with a one-fit-all threshold.Adaptive thresholding methods [43][44][45][46][47] are normally used in image processing for segmentation.To obtain accurate oil spill information based on selected regions by textural analysis and machine learning, the adaptive thresholding method proposed by Bradley et al. [48] was used.
In the adaptive thresholding method, an average of 32 by 32 pixels around the current pixel was calculated.If the gray value of current pixel was η% less than the average, the current pixel, which would be otherwise taken as water area, was determined as oil spill area.
The oil spills extracted by the adaptive thresholding method have common areas with the result of visual interpretation.The higher the proportion of the common area to the total area detected by thresholding method (γ a ) is, the greater the correct rate of the adaptive thresholding method will be.The larger the proportion of the common area to the total area of visual interpretation results (γ v ) is, the more comprehensive the recognition by the adaptive thresholding method will be.Oil spill extraction by adaptive thresholding method varies by different values of η.Therefore, a value of η% resulting in both a high γ a and a high γ v is needed.Table 2 shows the values of γ a and γ v by the adaptive thresholding method using different values of η.As can be seen from Table 2, when η% < 35%, γ a is less than 0.7; when η% > 35%, γ v is less than 0.7; only when η% = 35%, γ a is larger than 80% and γ v is around 80%.Hence, η = 35 was used in the adaptive thresholding method.
The spilled oil floating on the water appears as continuous zones.If detected oil spill areas were small and not continuous, they were determined as incorrect extraction and removed as noise.On the voyage, ship wake disturbs sea surface considerably, resulting in dark area in radar images.Therefore, areas containing the ship wake cannot be distinguished from oil spills area on the marine radar image.In our research, the areas containing the ship wake were excluded in oil spill detection.This area was set from 30 • portside to 30 • starboard in the stern.Finally, the fine measurements of oil spills in the Cartesian coordinate are shown in Figure 12, and the detected oil spills plotted on the original radar image are shown in Figure 13.

Results
In the actual measurement of oil spills by marine radar images, interferences, such as wind turbulence and swells, appear as dark areas.To exclude these interferences, a ship-borne thermal infrared sensor produced by Zhejiang Dali Technology Co. Ltd (Hangzhou, Zhejiang, China) was used, as shown in Figure 14a.Wind turbulence and swells do not generate temperature differences but oil spills do.According to the thermal infrared image captured at 23:19, 21 July 2010 on "YUKUN" in Figure 14b, the region captured by radar images contains spilled oil instead of interferences.To evaluate the performance of oil spill detection based on the proposed method of texture analysis, machine learning, and adaptive thresholding, another two randomly selected marine radar images were processed to detect oil spills, shown in Figure 15.The radar images erasing co-channel interference and reducing the small speckles of Figure 15 in the Cartesian coordinate are shown in Figure 16. Figure 16 shows that the processed images are cleaner than original sampled radar images.The low noise images are helpful for oil spill detection by textural analysis.The visual interpretation results of Figure 15 are shown in Figure 17.The calculated value of texture index for oil spill detection based on Figure 16 is shown in Figure 18, which indicates the oil spill areas as deep red color.On the image of proposed texture index, several areas were selected for machine learning training and they are also plotted on Figure 18.The final oil spill detection results using four machine learning methods are shown in Figure 19.The oil spill detection work was carried out on a personal computer and the basic configurations are shown in Table 3.Using this computer, the processing time of the classification using four machine learning methods are shown in Table 4.         15a using LDA, (f) Figure 15b using LDA, (g) Figure 15a using EL, and (h) Figure 15b using EL.

Discussion
The sampled radar image in Figure 2 is processed and shown in Sections 2-4 in detail.As shown in Figure 11, the coarse measurement of oil spills using the four machine learning methods contains many water areas, and the extracted areas between the four machine learning methods are not same.As shown by the fine measurement results in Figure 13, all extracted oil spill areas based on coarse measurement are congruent with visual interpretation, and the fine extracted oil spill areas between four machine learning methods have little difference.Figure 19a,c,e,g are oil spill detection results of the radar image in Figure 15a using SVM, k-NN, LDA, and EL, respectively.Figure 19a,c,e,g shows that the oil spill detection results using textural analysis, machine learning, and adaptive thresholding methods are comparable to the visual interpretation shown in Figure 17a.Compared with the oil spill detection results between Figure 19a,c,e,g, it is difficult to identify the visual difference between the four machine learning methods used.The oil spill extraction results of Figure 15b are shown in Figure 19b,d,f,h.It also shows that the extracted oil spill areas in Figure 19b,d,f,h are consistent with the visual interpretation shown in Figure 17b, and there are few differences in the final results between the four machine learning methods.Table 4 shows that the processing time of EL is significantly longer than the other three methods, and the LDA needs the shortest processing time of the four methods.
In the oil spill detection methods proposed by Zhu et al. [14] and Xu et al. [16], a threshold was needed for each radar image, which was manually selected.In the proposed method, no manually selected threshold is needed.Comparing Figure 13 with Figure 11, the fine measurement by adaptive thresholding is insensitive to the coarse measurement results by texture analysis and machine learning, which means that the manually selected training areas for machine learning are insensitive to the final oil spill extracted results.Therefore, the proposed method is robust.
The value γ a in the three radar images is shown in Table 5.Table 5 indicates that over 80% of the extracted oil spill areas by the proposed method are the same as the visual interpretation results.Although the extracted oil spill areas by the proposed method are close to the visual interpretations, some narrow oil bands are not considered.

Conclusions
In this paper, we proposed an oil spill detection method using texture analysis, machine learning, and adaptive thresholding based on marine radar images.First, preprocessing of radar images was carried out by coordinate transforming and denoising.Then coarse detection of oil spills was executed using texture analysis and machine learning.In texture analysis, a texture index of oil spills calculated by energy, entropy, correlation, and contrast was proposed to indicate the location of oil spills.Four machine learning methods-support vector machine, k-nearest neighbor, linear discriminant analysis, and ensemble learning-were used to classify oil spills on radar images coarsely.In these four methods, ensemble learning would need the longest time, while linear discriminant analysis was the fastest.Finally, fine measurements were carried out using the adaptive thresholding method.
The proposed method was used on the radar images sampled in an oil spill accident in Dalian on 21 July 2010.According to the proposed method, manually set thresholds were not required, oil spill detection was achieved semi-automatically by selecting training data on the image of the proposed texture index.The selected training data affected oil spill detection by machine learning in coarse measurement.However, the fine measurement is insensitive to the results of coarse measurement.Therefore, the proposed semi-automatic oil spill detection method is robust.Over 80% of the extracted oil spill areas by the proposed method are the same as the visual interpretation results, thus it is an effective method to be applied for oil spill detection in emergency accidents.Compared with visual interpretation results, the proposed method had to exclude some narrow oil bands.Future work should increase the narrow oil band extraction capacity.

Figure 1 .
Figure 1.Flow chart of marine radar image processing for oil spill detection.

Figure 3 .
Figure 3. Converted radar image in the Cartesian coordinate.

Figure 4 .
Figure 4. Radar image with co-channel interference removed.

Figure 5 .
Figure 5. Radar image with co-channel interference erased and bright speckles reduced.

Figure 6 .
Figure 6.One visual interpretation results of oil spills (shown in red) in the Cartesian coordinate of radar image sampled at 23:19:32, 21 July 2010.

Figure 7 .
Figure 7. Textural features of grey level co-occurrence matrix (GLCM) on the marine radar images: (a) Entropy, which indicates oil spills in small value; (b) energy, which indicates oil spills and far distance areas in small value; (c) correlation, which indicates oil spills and certain areas farther away in high value; (d) contrast, which indicates oil spills and areas farther away in high value.

Figure 8 .
Figure 8. Texture index for oil spill detection on the marine radar image, which indicates oil spills in the dark red area.

Figure 9 .
Figure 9. Selected training data for 4 machine learning methods, where green polygons are training data of water and blue polygons are training data of oil spills.

Figure 10 .
Figure 10.Oil spill segmentation based on the image of proposed texture index by 4 machine learning methods: (a) Support Vector Machine (SVM), which indicates oil spills roughly the same as the visual interpretation in Figure 8; (b) k-Nearest Neighbor (k-NN), which indicates oil spills roughly the same as the visual interpretation in Figure 8; (c) Linear Discriminant Analysis (LDA), which indicates oil spills containing many water areas; and (d) Ensemble Learning (EL), which indicates oil spills with many noisy speckles.

Figure 11 .
Figure 11.Selected areas containing oil spills and the surrounding water on the marine radar image in its original size by 4 machine learning methods: (a) SVM, (b) k-NN, (c) LDA, (d) EL.

Figure 12 .
Figure 12.Fine measurement results of oil spills (shown in white) based on coarse extracted areas by 4 machine learning methods in the Cartesian coordinate: (a) SVM, (b) k-NN, (c) LDA, (d) EL.

Figure 13 .
Figure 13.Fine measurements of oil spills (shown in red) marked on the marine radar image in the polar coordinate based on coarse extracted areas by 4 machine learning methods: (a) SVM, (b) k-NN, (c) LDA, (d) EL.

Figure 14 .
Figure 14.An oil spill image monitored by thermal infrared sensor: (a) Thermal infrared sensor used in this study, (b) an image captured by thermal infrared sensor.

Figure 17 .
Figure 17.The visual interpretation results of oil spills (shown in red) in two radar images: (a) Figure 15a and (b) Figure 15b.

Figure 18 .
Figure 18.Texture index image of: (a) Figure 16a and (b) Figure 16b.The green polygons are training data of water, and the blue polygons are training data of oil spills.

Table 1 .
Main parameters of X-band marine radar.

Table 2 .
The value of γ a and γ v using different values of η in the adaptive thresholding method.

Table 3 .
The basic configurations of the personal computer used for oil spill detection.

Table 4 .
Calculation time of four machine learning methods on three marine radar images.

Table 5 .
The value <γ a in the three radar images.