GreyWolfLSM: an accurate oil spill detection method based on level set method from synthetic aperture radar imagery

ABSTRACT Oil spill detection (OSD) in marine areas is an application of synthetic aperture radar (SAR) images to protect aquatic life. In this paper, a new oil spill detection algorithm based on level set method (LSM) is presented. Dark spot detection, feature extraction, and classification are the main steps in the proposed method. In the first step, a new dark spot detection method in SAR images is presented, which introduces a combination of multi-objective grey wolf optimization (MOGWO) and K-means clustering to find the best threshold level for image segmentation. This method overcomes the K-means clustering by choosing optimal number of clusters and centers. In the feature extraction step, a vector consisting of 45 arrays of calculated Legendre moments in the main, gradient and radon transform of the image is used. The oil-suspicious areas are also discriminated by the supported vector machine (SVM) classifier, and their boundaries are applied as an initial contour to a new hierarchical region-based level-set method (HRLSM). Experiments are performed on the images acquired by Envisat, UAVSAR, TerraSAR-X, and Sentinel1 satellites. The results showed the reliability and robustness of the proposed method with high accuracy, even for noisy images with heterogeneous and weak boundaries.


Introduction
Synthetic aperture radar (SAR) sensors have received much attention because of the ability to acquire images at any time of the day or night, operate in all weather conditions, and acquire high-resolution images of large areas (Akbarizadeh, 2012;Girard-Ardhuin et al., 2005). Nevertheless, due to the existence of speckle noise in the SAR images, their segmentation process is still a challenging task (Lee et al., 1994). SAR images also have blurred edges and boundaries, poor contrast, and heterogeneous intensity that affect the image segmentation process (Fan et al., 2015). Regarding the advantages of SAR imaging, they are widely used to detect oil spills in the marine environment. Oil spills have occurred for many reasons such as ship or tanker accidents or the discharge of illegal oily residues into the sea.
In oil-covered regions in large sea areas, the sea capillary and short gravity waves have been attenuated and the received reflection waves are reduced, so the relevant pixels with low energies are observable as dark areas in the images (Solberg et al., 2007;Zhao, Temimi, et al., 2015a;De Araújo Carvalho et al., 2016). Sea surface reflection waves have constructive and destructive interference that appears as speckle noise in SAR images (Girard-Ardhuin et al., 2005;Marghany, 2014). Look-alikes are the other natural phenomena that cause dark regions in the SAR images like low-wind areas, and regions covered by algae (Lupidi et al., 2017;Moroni, Pieri, et al., 2019a;Alpers et al., 2017;Solberg, 2012).
Oil spill detection consists of three main steps: dark spot detection, feature extraction and selection, and classification (Shu et al., 2010;Topouzelis, 2008). The overall accuracy is highly dependent on dark spot detection that is a time-consuming step and has a direct influence on the accuracy of the next two steps. In addition, identifying the suspicious oil areas and distinguishing them from the background is the other significant point, because an undetected dark spot has irreversible effects on the environment if it is an oil spill (Xu et al., 2014). Since the ability to distinguish between oil spills and look-alikes is an important point, a suitable feature vector should be selected and extracted from dark regions to be used as the input vector to the classification step (Mera, Bolon-Canedo, et al., 2017a).
Feature extraction and classification steps are performed on the dark areas when they are detected in the previous stage. It means that, if a dark area is not extracted, the features will not be considered in the next steps. Conversely, if the area is incorrectly subdivided as a dark area, many false alarms will be generated, which increase the workload and introduce distraction in the feature extraction and classification steps. Furthermore, incorrect detection of dark spots may lead to wasted labor, lost time, economic costs, and misleading clean-up crews (Al-Ruzouq et al., 2020;Shu et al., 2010;Topouzelis, 2008).
The rest of the paper is organized as follows. The next part reviews recent studies on oil spill detection. Then, the proposed method is presented which includes dark spot detection, feature extraction and selection, classification, and oil spill boundary determination. The dataset, experimental results, comparisons and discussions, and finally, the conclusions are presented in the next sections.

Review of recent studies
In recent years, many attempts have been made for accurate oil spill detection in SAR images. To solve the complex problems and to find the optimized parameters in SAR image segmentation, meta-heuristics and optimization algorithms are used in addition to the conventional segmentation methods. Solberg et al. (2007) proposed algorithms for automatic oil spill detection using SAR imagery in three main parts: Dark spot detection, feature extraction from candidate dark spots, and classification of dark spots as oil spills or look-alikes. Liu et al. (2015) presented a variation level set method based on a fuzzy clustering algorithm. In this study, the initial segmentation is performed by a combined thresholding method and fuzzy clustering, and the results are used as a function of the initial level set contour. Finally, the fuzzy clustering model is applied in the level set energy function to perform its evolutionary process.
For automatic detection and tracking of oil spills in SAR images, Karantzalos and Argialas (2008), used a level set method with manually adjustable coefficients and the possibility of deformation tracking. Yu et al. (2017), proposed a combined oil spill detection (OSD) model with an adjustment mechanism called RGEDOM that used region growing, edge detection, and threshold segmentation based on the Otsu method. This segmentation method has high accuracy compared to the same combination method without region growing.
As an efficient dark spot detection algorithm, stochastic fully connected continuous conditional random field (SFCCRF) was proposed to perform soft label inference (Xu et al., 2016). This study, instead of considering the connections of all pixels, determines the connectivity of two pixels stochastically based on their feature and image space proximity. It is an effective method for modelling the large-scale spatial correlation effect and discriminating dark spots from the background with low commissioning and omission error rates. Ganta et al. (2012), presented an adaptive level set model for oil spill detection. In this work, to calculate the signed pressure function, the illumination and reflection parts of SAR images are separated by homomorphic decomposition, and the geodesic active contour model (GAC; Caselles et al., 1997) and the Chan and Vese (C-V) model (Crandall, 2009) are applied. Wu et al. (2017), presented a two-step segmentation method for detecting oil spills. First, the enhanced image is obtained by suppressing backscatter from an image. Then, a variational segmentation is presented in which the energy functional for the enhanced image is constructed in a piecewise constant manner. Lang et al. (2017), introduced a combination of features including grayscale, geometric and textural features. In this work, a histogram stretch transformation, a multi-level thresholding algorithm, and a local binary pattern (LBP) code are used to detect dark spots. The feature combinations had a robust impact on segmentation accuracy and the ability to detect false alarm probability. Raeisi et al. (2018), proposed a dark spot detection algorithm in SAR images using efficient cuckoo search (CS) to optimise the value of the threshold based on Otsu algorithm on the variances; the Zernike moment descriptor has also been used for oil spill classification.
In recent decades, artificial neural networks (ANN) and meta-heuristic methods are employed to solve complex detection problems. These algorithms are widely applicable and used in image segmentation and classification, such as multi-layer perceptron (MLP), radial basis function (RBF), genetic algorithm (GA), artificial bee colony (ABC), and grey wolf optimizer (GWO), etc. These methods are also used for oil spill detection in SAR images especially for discriminating oil spills from look-alikes (Singha et al., 2013;Ma, Liang, et al., 2011a;Marghany, 2016a).
Recently, deep-learning algorithms have been considered as an alternative to classical machine learning methods due to their high accuracy. They are able to solve problems from start to finish with minimal human intervention and provide more accurate results. In a study, a deep convolutional neural Network (DCNN) called OSCNet, was proposed for oil spill detection in SAR imagery. The OSCNet network architecture contained 12 weighted layers as a relatively deep network based on VGG-16 and was trained to detect oil spills through adjusting many parameters on a dataset with more than 20,000 dark areas in SAR images. Since the same dataset was not used, no comparison was made with other deep classifiers using the approach to detect oil spills in SAR imagery. Nieto-Hidalgo et al. (2018), proposed a two-stage CNN method for ship and oil spill detection in airborne radar (SLAR) images. The architecture consists of three pairs of CNNs, each of which is used to detect one of the classes: ship, oil spill, and coast.
In each category, the first CNN is responsible for large-scale detection and the second CNN is responsible for precise localization of the pixels belonging to each class. After classification, very small dark areas were removed using a morphological filter.
It is worth noting that, due to the depth of the network architecture, these networks should have a comprehensive dataset to avoid overfitting. Although machine learning algorithms are usually limited to direct classification of images and there is no support for integrated training frameworks from start to finish, they have several advantages. When the dataset is small, deep learning algorithms do not perform as well and overfitting occurs. Therefore, deep learning algorithms require a large amount of data to act perfectly. In contrast, there are some machine-learning methods, such as active contour and level set methods, that work based on an energy function and have no training process, so overfitting does not occur with them.
This paper presents an effective method for detecting oil spills to protect the marine environment using SAR imagery. The overall steps are as follows: (1)To enhance the original SAR images during the segmentation process and reduce the speckle noise, a preprocessing step is performed using a combination of homomorphic decomposition over the Lee filter method, called HoL.
(2)A semi-automatic dark spot detection system is presented to detect dark areas which has less human interference.
(3)A supervised combination of K-means, MOGWO, histogram analysis, and thresholding is presented to achieve the best performance of segmentation, and obtain optimized number of clusters and the best K-means initialization centers.
(4)Considering the importance of geometric features, and the advantages of orthogonal moments for feature extraction and selection from the dark areas, Legendre moments are selected and used to extract the features of oil spills and look-alikes in SAR images to reduce the dimension of the features vector. Then the classification step is performed using SVM and ANN.
(5) In this paper, an improved segmentation of the region-based level set method (Modava et al., 2019) is applied to detect the oil spill boundaries.

Proposed method
This paper presents a new effective and simple SAR image segmentation method based on the level set method with application to oil spill detection. The overall steps of the proposed method are shown in Figure 1. As shown in this figure, t the proposed method has three main parts consisting of five steps. The first step is the image pre-processing by applying HoL filter for reducing the speckle noise. Then, in the second step, to detect the dark areas in SAR images, a semi-automatic segmentation method is presented based on the K-means clustering method optimized by GWO (Mirjalili et al., 2014;Song et al.,  2015). The third step consists of a new application of Legendre moments to extract the effective features and to distinguish oil spills from look-alikes in SAR images. A SVM classifier is used to pre-classification of oil spills and look-alikes in forth step. Finally, in the last step, a two-step LSM is performed to identify the exact boundaries of oil spills.
The oil spill detection process is performed as follows in this paper.

Dark spot detection
The most critical step is the detection of suspected oil spill areas, which can be identified as dark areas in SAR images. This step is very important because its results directly affect the performance of the next two steps and ultimately the final decision. In the proposed semi-automatic method, the improved method of K-means clustering helps to accurately detect the dark spots in the SAR images. The overall scheme of the proposed dark spot detection method is shown in Figure 2.
As can be seen in this figure, a pre-processing step is necessary due to the speckle noise in SAR images. Speckle, which occurs as grainy noise in SAR images, is due to the interference of waves reflected from many electromagnetic scatterers. Speckle in SAR images complicates the image classification problem by reducing the effectiveness of image segmentation and classification. To attenuate the harmful effects of speckle, several methods have been developed to suppress it. The Lee filter suppresses speckle noise well in homogeneous areas, and the enhanced filter performs well in both homogeneous and heterogeneous regions. However, it does not effectively preserve image edges and details while reducing SAR image noise (Hu et al., 2012;Lee et al., 1994;Raeisi et al., 2018). To overcome the above challenge, this paper presents a combination of a homomorphic decomposition filter over a Lee filter, called HoL. The homomorphic filter is usually used to reduce the irregular illumination and improve the image quality. It belongs to the frequency domain processing using the frequency transfer function.
As shown in Figure 2, the next step is to improve K-means clustering and detect the dark areas. K-means has three main known hypotheses, which if violated, it fails. It is also restricted to determine the number of classes from the beginning, and its results are sensitive to initialization. The improved K-means clustering is achieved using the MOGWO to find the best initial centers of classes and overcome the mentioned challenges of the traditional K-means algorithm. A simple flowchart for illustrating the dark spot detection schematic is shown in Figure 3. As can be seen in Figure 3, the optimal number of classes is predicted considering a back propagation network. Then, a multi-objective optimization (MOGWO) method is used to obtain the best class centers of the K-means algorithm to avoid falling into the local minimum. Actually, a supervised selection of grey wolves and cluster numbers, based on the recursive architecture network is performed.
It is worth noting that, grey wolf optimization (GWO), is a meta-heuristic method to find the best solution in complex problems, and can be used in various applications, such as training algorithms for networks, parameter estimation, etc (El-Gaafary et al., 2015;Negi et al., 2021). This model is inspired by the hunting process for grey wolves as shown in Figure 4. The MOGWO is an improved GWO for the search space with multiple objects to store and reach the optimal solutions (Mirjalili, Saremi, et al., 2016a;Mirjalili, 2015).
The network parameters are determined based on the root mean square error (RMSE) and the accuracy values between the output images and their ground truth.
The acceptable margin values of RMSE and accuracy are 0.05 and 90%, respectively. These two parameters are calculated until the lowest RMSE and the highest accuracy values are achieved from 10 iterations for each respective image. The best parameter values are set in the dark spot detection model, and the model is run for other images. Finally, an adaptive threshold segmentation is performed to detect the dark areas.

Feature extraction and selection
The extraction of effective features is the other important step in oil spill detection process. In the oil spill detection application, several features can be extracted from the images; for example, texture, physical, geometric, and even polarimetric features are usually extracted and selected to be used as classification input (Mera et al., 2017;Singha et al., 2016). In the oil spill detection application, some features have received less attention. Orthogonal moments are an important group of these features, which belong to the shape descriptor features with a small dimension of vectors to classify the shapes. They are based on the mathematical framework for both continuous and discrete parameters and have higher efficiency compared with non-orthogonal moments in image processing applications. The advantages of these features are robustness against noise, translation, scaling, and rotational invariance with minimal information redundancy (Corteel et al., 2016;Mukundan, Ong, Lee, 2001). Zernike moment and Legendre moment descriptors are two types of the orthogonal moments that are used in image analysis (Yap et al.,;Raeisi et al., 2018). In this work, Legendre moment (LM) is selected as the main feature type. The optimized number of LM orders is 10, and the feature vector is created in 45 rows that span into three parts. All parts include 15 elements obtained by applying LM on the main image, the gradient of the image, and the Radon transformation of the image. This vector is employed as input for the classification step.
In this paper, as can be seen in Figure 5, a number of geometric and textural features are extracted from dark patches. The output results of each feature individually, and also in a compact vector of them is investigated and considering the maximum similarity the best group is selected. The two criteria parameters are calculated for the selection process as follows:  Pr ecision ¼ where, TP, FN, and FP mean True-positive, Falsenegative, and False-positive respectively.

Classification
In the classification step, the detected dark spots are classified into oil spills and look-alikes based on the extracted features. As shown in Figure 6, to achieve an appropriate classification, this study uses a new classification method based on an SVM and level-set segmentation.
Level set methods (LSMs) are designed for such problems that have topological changes, dependence on curvature, formation of singularities and other host elements that occur in interface diffusion methods (Ganta et al., 2012;Wu et al., 2017).
By assuming "C" as a curve in the two-dimensional Ω domain, the curve energy equation should be minimized. To do so, the Euler-Lagrange equation is applied, and the equilibrium of forces is represented by the partial differential equation derived by the equation as follows: where, @C @t ¼ 0, and by assuming C ¼ x : uðxÞ ¼ 0 f g; ðx 2 R 2 Þ, and u is the level-set function, the curvature is obtained by assuming ñðxÞ is the normal vector in Eq. 5 as below where, κ is the curvature and Ñ is the gradient operator. The active contour model (ACM) is one of the most popular region-based LSMs that is based on an energy minimization problem. The energy function and its minimization formulation are shown in equations (6) and (7) where, μ and ν ≥ 0, λ1 and λ2 > 0 are coefficients, c1 and c2 are average intensity values of inside and outside the region, and δ(u) and κ (u) are calculated as follows: Also, the average intensity values of inside and outside the region are calculated using the following equations: where, H(u) is a Heaviside function as below: Contour initialization is the principal step in LSMs that can be set manually or automatically (Liu et al., 2015;Wu et al., 2017). Inappropriate selection of the initial contour can lead to incorrect segmentation or loss of time, especially in noisy SAR images; so to guarantee the accuracy of segmentation, a suitable initialization is required, especially for the application of OSD. Oil spill regions in the marine environment always have complex shapes, and as a primary step of the level-set algorithms, the initial contour should be selected for each image. In this paper, to reduce the runtime and the calculation rate, the initial contour is determined considering the results of the SVM classification. In this way, a hierarchical region-based LSM function (HRB-LSM; Modava et al., 2019) is used, which has a two-step procedure. First, the LSM is evolved based on global information about the region and then, a local region-based LSM is employed to improve accuracy. The global region-based LSM can cover the entire oil spill field, and the local regionbased is applied to access the small boundary of oil spills.
Here, I is the image in domain Ω and uðp; tÞ is the level-set function, where pðx; yÞ signifies the pixel location, t is the time, and c is the zero level-set. The suitable SPF for the first step is defined as below:

SPFðIðxÞÞ ¼
IðxÞ À ððc Gin þ c Gout Þ=2Þ maxð IðxÞ À ððc Gin þ c Gout Þ=2Þ j jÞ where, c Gin and c Gout are the mean values of the global intensities inside and outside areas of the contour which are calculated with the same equations of (14) and (15) Note that HðuÞ has the same Heaviside function as in Eq. (12), and the total boundary of oil spills is achieved by solving the following equation: where, μ is a positive coefficient.
In the second step of the LSM, a local correction level-set is considered to improve the results of the global segmentation stage. Therefore, to continue the process, the relations are performed on a w × w window as the local area around each point of the curve, as follows: where c Lin and c Lout are the mean values of the local intensities inside and outside areas of the contour, and the SPF function of the local step is obtained as follows: The level-set function evolution is obtained by solving equation (20) as below: where λ and α are positive coefficients and κ is a curvature term obtained from (5). To achieve the correct regions of oil spills with high accuracy, a large window is initially selected to define the overall areas followed by a small window to find the details of the boundaries. Using this two-step hierarchical LSM, higher accuracy of classification is achieved with reduced computational costs.
In order to evaluate the proposed method, the following criterion parameters are calculated by Recall RMSE ¼ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffiffi 1 m � n X m row¼1 X n col¼1 ðI pmð row;colÞ À I mtð row;colÞ Þ 2 s (25) where TP, FP, TN, and FN are defined as Truepositive, False-positive, True-negative, and Falsenegative number of pixels, P acc is the accuracy, and P d is the probability of detection, m and n are the number of rows and columns of the image, as well as I pm and I mt are the output image of the proposed model and manually traced of the original image respectively.
On the other hand: where, Om is omission, In is the inclusion, P f is the probability of false alarm, and DSA means dark spot accuracy (Genovez et al., 2017).

Dataset
In this study, about 317 oil spills and 420 look-alikes were cropped among 125 SAR images considered to evaluate the proposed method with the different conditions of resolution, homogeneity, and boundaries quality as shown in Table 1. As can be seen in Table. 1, these datasets contained several images taken by the Envisat, ERS-1/2, RADARSAT-1, TerraSAR-X, Sentinel-1, and UAVSAR satellites. 1 The Envisat SAR data were acquired by advanced synthetic aperture radar in C-band, wide swath mode based on the ScanSAR technique using five sub-swaths with 150 m spatial resolution, and VV polarization. The ERS-1/2 SAR data were acquired with a C-band and with VV polarization and 25 m resolution. The RADARSAT-1 satellite was used in oil spills ScanSAR Narrow Beam images with a swath width of 300 km and spatial resolution of 50 m in C-band and HH polarization, and TerraSAR-X SAR data were acquired in Stripmap and ScanSAR mode with a resolution of 5 m to 20 m and HH polarization mode and X-band. The Sentinel-1 mission represents a completely new approach to SAR mission design by ESA in direct response to the operational needs for SAR data expressed under the EU-ESA GMES (Global Monitoring for Environment and Security) program. The mission ensures continuity of C-band SAR data to applications and builds on ESA's heritage and experience with the ERS and Envisat SAR instruments, notably in maintaining key instrument characteristics such as stability and accurate well-calibrated data products. The UAVSAR collects L-band synthetic aperture radar data with a range bandwidth of 80 MHz (2-m range resolution) and its data is acquired as fully polarimetric data.

Experimental results and discussion
In this section, the results of applying the proposed method to SAR images are presented. The numerical results of this method are also compared with some of the previously published state-of-the-art methods. It is worth noting that, for the comparison of different methods, the use of a common reference dataset is of particular importance. This is because when we compare the steps of different methods, despite identical images, in some cases we do not encounter the same results because the standard ground truth images, which are usually created by human intervention or monitoring, do not have complete overlap. Since there is no comprehensive and specific database for the identification of oil spills, such differences are inevitable. Under these conditions, the main criterion in deciding on the values of the parameters obtained in each method is that the difference and superiority of the various models is possible by comparison. 2

Results of dark spot detection
The first step of the process is dark spot detection and one of its subsets is pre-processing to obtain enhanced images. The robustness of the Lee filter compared to the other common smoothing filters when applied to the same noisy image is shown in Figure 7.
As can be seen in Figure 7 (e) and (f), noise reduction is better performed by the Lee filter. The results of the pre-processing step, where the HoL filter is applied to the other images, are shown in Figure 8. In this figure, the first row shows the original images, and the second row shows the output results of HoL filter at D0 = 60.
Since there is no specific ground truth for the evaluation criterion in the oil spill detection studies, manual traces (MT) are created for each image. For example, 4 original images can be seen in the first row in Figure 9. Their manually traced and the dark spot detection results are also shown in the second and third rows, respectively. The execution time of dark spot detection, the number of clusters, and grey wolves computed in this method are also shown in Table 2. As shown in Table 2, the cluster nombers, the Grey wolf nombers, RMSE, Accuracy, Perimeter, Area, P/a, C, and Time are the parametrs measured for different dark spots.
From Table 2, for image (a), the number of clusters and grey wolves are 6 and 20, respectively, and the RMSE and accuracy are calculated at 0.16 and 92.2762%, respectively. In fact, in the algorithm for determining the optimal number of grey wolves and clusters, a random set of images is used to train the network, that is about 20% of the total images. This is supervised network, and the ground truth is prepared for the images in this set. The network is trained until the accuracy and RMSE values calculated for the test data reach values above 0.95 and below 0.05, respectively. After performing a recursive architecture to achieve the optimal number of variable parameters considering the set bounds, the optimal number of clusters and grey wolves are set to 9 and 25, respectively, and then, the proposed method is executed based on these parameters. The calculated accuracy and error for each image in Table 2 are obtained in the validation mode of the network.
The results of applying the dark spot detection step and calculating such parameters as perimeter, area, perimeter/area and shape complexity (C) of the images shown in Figure 9 are also presented in Table 2. Note that, taking into account the resolution of each image and the number of pixels that count as perimeter and area, the value of these parameters can be calculated; therefore, the exact values of parameters and areas presented in Table 2 are in meters and square meters, respectively. The value of C is also calculated by Eq. (30) as: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi π � area p Þ In the feature selection process, several groups of features are selected. As an example, three types of features consisting of {Invariant moments, Zernike moments, and Legendre moments} are considered as separate input vectors for the classifier. The results, presented in Table. 3, show that the Legendre moments achieved the best precision. According to the results obtained in Table 3, the Legendre moments are selected for feature extraction; thus, the feature vector is constructed in three parts using the Legendre moments from the main, gradient, and Radon transforms of the images, and it is used as input to the classifiers. SVM and ANN classifiers are trained with the extracted features, and a classifier capable of detecting oil spills in new images is developed. In summery, when an unknown image enters the network, first, its dark areas are detected. Second, the desired features are extracted from the detected dark patches, and third, each pixel is marked as oil (green areas) or look-alike (red areas). The results of the SVM classification based on the extracted features are shown in Figure 10. As can be seen in Figure 10, both images containing oil spills are labelled with acceptable accuracy.
In order to quantitatively evaluate the proposed method, the obtained results can be compared with the results of other methods that are published in 2017 by Genovez et al., and Lang et al. (Genovez et al., 2017;Lang et al., 2017). Considering the first comparison in Table 4, the parameters such as Inclusion, Omission     (29) are calculated respectively, as evaluation parameters mentioned by Genovez et al. (2017).
The images shown in Table 4 are selected from 12 SAR images acquired by RADARSAT-1 and RADARSAT-2 (C-band) in ScanSAR-Wide (SCW) and ScanSAR-Narrow (SCN) beam modes, combining different spatial resolutions, swaths, incidence angles, polarizations, and number of looks. DSA, In, and Om are calculated through the results of SVM, threshold method, and Focal Point presented by Genovez et al. (2017). In the 4th row of each section, the results of the proposed algorithm are shown in Table 4.
As can be seen in Table 4, the DSA value of the first image is 0.82 for proposed algorithm, which is higher than other methods, and shows the robustness of the preposed method. Its results also have sufficient and acceptable values of Inclusion and Omission compared to others.
Moreover, the proposed method is compared with the results of the classical methods by Lang et al. (2017). In this way, the quantitative comparison with three approaches consisting of Lang's method (LM), SINGHA and SVM is presented in Table 5 by calculating the parameters shown in equations (22), (24) and (28).
As can be seen in Table 5, the P acc of the proposed method for the data from Mexico is 91.25%, which is slightly better than the accuracy of the other methods. Considering the balance between the P d and P f , LM achieves a probability of detection of 81.34% and a probability of false alarm of up to 29.60%; these parameters for SINGHA are 80.72% and 32.14%, respectively, and about 70.85% and 21.62%,   respectively, for SVM. Finally, the relative results of the proposed method achieves a probability of detection up to 80.94%; but at the cost of 29.61% false alarm.
As well as, for the prestige data, in terms of P d and P f , the proposed method outperformed SVM, SINGHA, and LM with the highest probability of detection (83.54%), highest overall accuracy (98.10%), and the lowest probability of false alarm (15.96%).
For further evaluation, the proposed method is compared with another dark spot detection method presented in Raeisi et al. (2018). For this purpose, PSNR is calculated as follows: where, PSNR is the peak signal-to-noise ratio and MSE is mean square error that is shown in Table 6.
As can be seen in Table 6, PSNR and MSE are the evaluation criteria calculated by Raeisi et al. (2018), and the proposed method. The desirable values of the PSNR and MSE are the higher and lower obtained values, respectively, so the proposed method is more appropriate with a higher PSNR and lower MSE, and have a short execution time of about 40 seconds.

Results of classification
In our proposed method, the classification results of the pre-segmentation of oil spills are used as the results of the first step. Using the morphological operators on the results of the pre-segmentation, and the initial contours for the LSM are defined, and they are displayed in the first column of Figure 11. The results of the LSM are also displayed in the second column of Figure 11.  To visually evaluate and compare the effect of the initial contours on SAR image segmentation, the algorithm presented is also compared with the results of another LSM presented by Zhang et al. (2010), with two simple types of initial contours on the same images, using the same parameters and 750 iterations. As shown in Figure 12, the first row shows the considered initial contour of Zhang et al. (2010) and the proposed methods on the images, and the second row show the level-set evolution. As can be seen in this figure, the initial contour is an effective parameter for determining the boundaries of oil spills, especially for a few iterations. 3

Polarimetric SAR images
The scattering matrix "S" is measured by the fully polarimetric SAR (Angelliaume et al., 2018;Migliaccio et al., 2015), which determines the conversion of the incident electric field to the scattered field at the monitored location. The relationship between the incident wave and the scattered wave is expressed by the following equation: where, j is the imaginary unit, k is the number of electromagnetic waves, r is the distance from the SAR antenna to the center of the image scene, and Es and Ei are the complex Jones vectors describing the scattered and incident fields, respectively. S is a complex 2 × 2 matrix, which, if the linear {h; v} basis is assumed and reciprocity holds, is given by whose taking into account pq 2 h; v f g, each Spq is a complex element and is referred to as scattering amplitudes.
The (3 × 3) coherence [T3] matrix is constructed from a three-part unitary destination vector as in Equ. (34). Target vector obtained by the projection of a Sinclair matrix onto a stripped down and modified Pauli spin matrix set.
To evaluate our method on a polarimetric SAR images, a full polarimetric image acquired by UAVSAR in 06/22/10, is used and shown in Figure 13. A (3 × 3) coherence [T3] matrix is an incoherent polarimetric expression that refers to the second order statistical representation of the scattering matrix elements. This matrix is Hermitian semidefinite positive. In this way, the proposed method is applied on [T3] array to predict the oil spills and look-alikes. As can be seen in this figure, using the arrays of T3 matrix as the images shown in the second column, the dark spot areas extracted in the third column, and the segmented regions as oil (green parts) and look-alike (red parts) are illustrated in the fourth column. It is shown that our method can obtained good results even for quad polarisation SAR images.
Finally, our method is evaluated with high dimensional and resolution images with gigantic oil slick like Deep water horizonal oil spill. As shown in Figure 14, our method is able to identify such oil spills very well.

Conclusion
The detection of oil spills in marine areas is critical to protect the lives of aquatics and to save the environment from destruction. It involves the three steps of dark spot detection, feature extraction, and classification. This paper presented a new method for segmenting oil spills by demonstrating a combined dark spot detection method, an extracted Legendre moment feature as a new applicable feature in oil spill detection, and an improved classification based on SVM and level set methods. For this purpose, a new combination method is proposed consisting of a GWO, k-mean clustering, histogram, threshold segmentation, and morphological operations to perform dark spot detection as well as the definition of a suitable initial contour as the first point of level-set segmentation with the reduction of human intervention. The presented pre-segmentation can lead to reach high accuracy and expedition of level-set evolution in fewer repetitions. In other words, an automatic contour initialization in level-set segmentation method with application in oil spill detection in SAR images is presented. Experiments are carried out on several SAR and PolSAR images captured by Envisat AirSAR and TerraSAR-X, Sentinel1, and UAVSAR and the results have shown the reliability of this method to images. The mean accuracy and mean MSE of the experimental images are obtained at about 96.88% and 0.027 respectively. Results showed that the robustness and effectiveness of the proposed method in SAR image segmentation are obtained with high accuracy, less repetition, and less computational volume in comparison with other methods. Regarding the progress and usage of deep learning in the field of segmentation, feature extraction, and classification, future work will consider the use of deep learning methods with applications in oil spill detection.