Background
Synthetic Aperture Radar (SAR) in microwave remote sensing is an active microwave detector, and imaging is performed by synthesizing a larger equivalent antenna Aperture through a smaller-sized real antenna Aperture by using a synthetic Aperture principle, a signal processing method and a pulse compression technology. Compared with optical imaging, the synthetic aperture radar has the advantages of all-weather imaging and the like, so that the SAR image plays an important role in the fields of strategic target identification and detection, disaster control, state and soil resource monitoring, sea area use management, map mapping, ship target identification and the like. In recent years, SAR images gradually attract attention in the field of sea area management, one of the main problems is the problem of coastline detection, and the coastline is continuously changed due to long-time accumulation of river sediment, sea reclamation and other reasons, so that the change of the coastline is effectively monitored, and the method has certain practical significance in dynamic monitoring of sea area use.
So far, the coastline detection method has been greatly developed. Common methods for coastline detection include a super-pixel segmentation method based on graph theory, a super-pixel formation method based on gradient rise, a triple Markov random field, and a method most suitable for processing SAR image classification and segmentation in the existing Markov random field, and the advantages of the method are mainly embodied in that the introduction of an auxiliary field can convert a global non-stationary SAR image into some local stationary images, and then the local stationary images are processed. However, the method is mainly considered based on the pixel angle, so that the method is easily influenced by speckle noise, time complexity is high, less texture information can be utilized, initialization of the auxiliary field is realized through a threshold value, large errors can be caused to a segmentation result if the auxiliary field is not accurate enough, meanwhile, the potential energy function only considers the relation between the label value of the central pixel and the neighborhood pixels and the auxiliary field value, and ignores the similarity between the neighborhood pixels and the central pixel and the relative position relation between the central pixel and the neighborhood pixels.
Disclosure of Invention
The invention aims at the problem, provides a Gamma distribution superpixel-based method and a superpixel TMF-based SAR image coastline detection method, and is characterized by comprising the following steps:
S1: reading an image I, and inputting a seed point number k;
S2: according to the input seed pointDetermining the position of the seed point and the size of a search area around each seed point by the number k and the size of the image;
S3: selecting a neighborhood window of 5 pixels multiplied by 5 pixels around each seed point, calculating the mean value in each point sub local window in the neighborhood window as the characteristic of the current point, determining a point set C which is similar to the seed point texture characteristic in the local window through a clustering method for the characteristic, and calculating the similar point set C:
wherein, (x, y) represents the coordinates of the pixel points in the local window, I (x, y) represents the pixel values of the pixel points in the local window, W represents the local window, N represents the pixel in C, and mu
s(x, y) represents the mean value within a local window of pixels at (x, y) locations,
represents μ of each point in C
sMean, σ denotes the variance of the mean within the local window;
S4: traversing the image according to step S3Calculating the feature of each neighborhood point, and calculating d according to the formulai,jFinally by comparison di,jForming a super pixel;
d isi,j
Wherein, muiRepresents the mean value, μ, of the seed point ijMeans, σ, representing neighborhood point jiRepresenting the variance, σ, of the mean of i within a local windowjVariance representing mean of j within local window
Wherein xiLine coordinate, y, representing seed point iiColumn coordinate, x, representing seed point ijLine coordinate, y, representing neighborhood point jjColumn coordinates representing neighborhood point j
Wherein m represents dci,jAnd dsi,jA weight coefficient therebetween;
the distance S between the adjacent seed points
Wherein N represents the total number of image pixels, and k represents the number of seed points;
S5: updating the positions of the seed points to be the mean value of all the point positions contained in each type of super pixels;
S6: repeating step S3-S5Stopping repeating until the boundary of the super pixel is not changed any more, and outputting a super pixel image;
S7: inputting the superpixel image, initially clustering the superpixels into 2 classes by using a kmeans method, and taking the clustering result as an initial marking field XspAnd calculating potential energy Wsp(Xsp,Usp);
S8: updating the marker field XspAnd auxiliary field UspAnd updating the parameter set theta by an ICM method and an SG method:
S9: repeating step S7-S8Until the mark field is no longer changed, outputtingAnd (5) going out of the seashore to obtain a result.
Further, step S3The clustering method of (1): selecting any two points in the neighborhood as seed points A and B, calculating the absolute value of the difference value of the characteristics from each point to the two points A and B in a local window, and when the absolute value of the difference value between the point A and the point B is smaller than the absolute value of the difference value between the point A and the point B, enabling the current point to belong to the same class as the point A; when the absolute value of the difference between the point A and the point B is larger than that of the difference between the point A and the point B, two types with larger contrast are formed.
Further, the potential energy Wsp(Xsp,Usp):
Wherein x issLabels, x, representing the central superpixel stLabel, C, representing a neighborhood superpixel tspRepresenting a set of superpixel potential masses, fcosCosine value, W, representing the angle between two vectorsedge(xs,xt) And representing the weight value of the neighborhood superpixel t, wherein the expression is as follows:
wherein L iss,tRepresenting the length, L, of the common boundary between the central superpixel s and the neighborhood superpixel tsRepresenting the perimeter of the central superpixel s.
wherein, XspMarker field, U, representing a superpixelspAuxiliary fields, W, representing super-pixelssp(Xxp,Usp) Representing potential energy function, SP representing set of superpixels, L representing view of SAR image, IspRepresenting the value of a superpixel, i.e. the mean, mu, of all pixel values in a superpixeliRepresenting the mean of the i-th class superpixels.
Further, the SG method parameter updating formula is:
where q denotes the number of iterations, A is the number of constant control iterations, x
0And u
0Values, x, representing the initial tag value and the auxiliary field
q+1And u
q+1Represents the label value and auxiliary field value obtained from the (q + 1) th iteration, p represents the p-th parameter in the parameter set, W
fWhat is shown is a function of the potential energy,
the estimated value of the q-th order parameter is shown.
The invention has the advantages that: the invention provides a brand-new TMF method in the SAR image coastline detection method, which can well solve the problem of relative position relation between a central pixel and a neighborhood pixel, and needs to introduce a superpixel method for solving the former problem. The super-pixel method provided by the invention is used for solving the problem, and finally the super-pixel-based TMF method is provided by combining the advantages of the two methods.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the following describes the technical solutions of the embodiments of the present invention clearly and completely with reference to the accompanying drawings in the embodiments of the present invention:
as shown in fig. 1, a method for detecting a coastline of an SAR image based on a Gamma distribution superpixel method and a superpixel TMF includes the following steps: s1: reading an image I, and inputting a seed point number k;
S2: determining the position of the seed point and the size of a search area around each seed point according to the input number k of the seed points and the size of the image;
S3: selecting a neighborhood window of 5 pixels multiplied by 5 pixels around each seed point, calculating the mean value in each point sub local window in the neighborhood window as the characteristic of the current point, determining a point set C which is similar to the seed point texture characteristic in the local window through a clustering method for the characteristic, and calculating the similar point set C:
wherein (A), (B), (C), (D), (C), (x, y) represents the coordinates of the pixel points in the local window, I (x, y) represents the pixel values of the pixel points in the local window, W represents the local window, N represents the pixel in C, mu
s(x, y) represents the mean value within a local window of pixels at (x, y) locations,
represents μ of each point in C
sMean, σ denotes the variance of the mean within the local window;
S4: traversing the image according to step S3Calculating the feature of each neighborhood point, and calculating d according to the formulai,jComparison of di,jForming a super pixel; in the present embodiment, it is preferred that,
wherein, muiRepresents the mean value, μ, of the seed point ijMeans, σ, representing neighborhood point jiRepresenting the variance, σ, of the mean of i within a local windowjVariance representing mean of j within local window
Wherein xiLine coordinate, y, representing seed point iiColumn coordinate, x, representing seed point ijLine coordinate, y, representing neighborhood point jjColumn coordinates representing neighborhood point j
Wherein m represents dci,jAnd dsi,jThe weight coefficient between the weight of the first and second groups,
in the present embodiment, S
S5: updating the positions of the seed points to be the mean value of all the point positions contained in each type of super pixels;
S6: repeating step S3-S5Stopping repeating until the boundary of the super pixel is not changed any more, and outputting a super pixel image;
S7: inputting a superpixel image, initially clustering the superpixels into 2 classes by using a kmeans method, and taking the clustering result as an initial marking field XspAnd calculating potential energy Wsp(Xsp,Usp);
S8: updating the marker field XspAnd auxiliary field UspAnd updating the parameter set theta by an ICM method and an SG method:
S9: repeating step S7-S8And outputting the result of the coastline until the marking field is not changed any more.
As a preferred embodiment, step S3The medium clustering method comprises the following steps: selecting any two points in the neighborhood as seed points A and B, calculating the absolute value of the difference value of the characteristics from each point to the two points A and B in a local window, and when the absolute value of the difference value between the point A and the point B is smaller than the absolute value of the difference value between the point A and the point B, enabling the current point to belong to the same class as the point A; when the absolute value of the difference between the point A and the point B is larger than that of the difference between the point A and the point B, two types with larger contrast are formed. It is understood that in other embodiments, step S3The method of calculating the local window may be determined according to actual requirements and actual accuracy requirements.
In the present embodiment, potential energy Wsp(Xsp,Usp):
Wherein x issLabels, x, representing the central superpixel stLabel, C, representing a neighborhood superpixel tspRepresenting a set of superpixel potential masses, fcosCosine value, W, representing the angle between two vectorsedge(xs,xt) Represents a neighborhoodThe weight of the domain superpixel t is expressed as follows:
wherein L iss,tRepresenting the length, L, of the common boundary between the central superpixel s and the neighborhood superpixel tsRepresenting the perimeter of the central superpixel s.
In the present embodiment, it is preferred that,
and
wherein, XspMarker field, U, representing a superpixelspAuxiliary fields, W, representing super-pixelssp(Xxp,Usp) Representing potential energy function, SP representing set of superpixels, L representing view of SAR image, IspRepresenting the value of a superpixel, i.e. the mean, mu, of all pixel values in a superpixeliRepresenting the mean of the i-th class superpixels.
In this embodiment, the SG method parameter update formula is:
where q denotes the number of iterations, A is the number of constant control iterations, x
0And u
0Values, x, representing the initial tag value and the auxiliary field
q+1And u
q+1Representing the tag value and the value of the auxiliary field obtained from the (q + 1) th iteration,p denotes the p-th parameter in the parameter set, W
fWhat is shown is a function of the potential energy,
the estimated value of the q-th order parameter is shown.
Parameter setting in the examples:
seed numbers of Envasat images are respectively set to be 250, 250, 300 and 250, seed numbers k of Radarsat images are respectively set to be 250, 250, 300 and 300, and seed numbers k of Terra images are respectively set to be 100. The weight coefficient between and is 0.5, and the local window size is 5 maximum iterations. The initial value of (1) is 0.6, the value of (0.6), the iteration number of the outer iteration is 10, the iteration number of the inner iteration is 10, and the threshold value for judging no change is 0.0001.
The parameters for the comparative test GMRF were set as follows: the number of iterations of the conditional iteration mode is 5 and the size of the filter window is. Comparative experiments the parameters for the superpixel-based TMF were set as follows: the seed numbers of the Envisat images are 250, 250, 300 and 250, the seed numbers k of the Radarsat images are 250, 250, 300 and 300, and the seed number of the Terra image is 100. dcAnd dsThe weight coefficient m between is 0.5, the local window size is 3 pixels × 3 pixels, and the maximum number of iterations is 5. Alpha is alphaxIs 1, alphauaHas a value of 0.6, alphaubThe value of (a) is 0.6, the number of iterations of the outer iteration is 10, the number of iterations of the inner iteration is 10, and the threshold value for judging that no change occurs is 0.0001.
Example (b):
the comparison of the performance of the method mainly adopts root mean square error RMSE and QA (average accuracy) as precision analysis indexes, firstly RMSE comparison is carried out, and the calculation formula is as follows:
where RMSE represents the average error between hand-drawn coastline and various methods of coastline extraction, x1kRepresenting coasts drawn by artificial handAnd extracting the pixel value of the k-th position pixel in the binary image of the line extraction result. x is the number of2kThe pixel value of the k-th position pixel in the binary image representing the coastline extraction result obtained by the theoretical model, and N represents the number of image pixels. Smaller values of RMSE indicate closer to the true coastline, higher accuracy.
Performance comparisons were performed for Envisat, Terra, and Radarsat images, respectively. The experimental images are Envisat, Terra and Radarsat images, the contrast performance is on the premise that all methods can effectively detect the coastline, and when the coastline cannot be effectively detected by the methods, the accuracy is expressed in a positive and infinite manner and does not participate in contrast analysis. The RMSE pair for the method is shown in table 1 for the Envisat image.
Size of
|
GMRF
|
Super pixel TMF
|
The patented method
|
323×371
|
+∞
|
+∞
|
0.0758
|
374×365
|
+∞
|
0.0697
|
0.0658
|
324×238
|
0.0988
|
0.0982
|
0.0967
|
206×235
|
0.0994
|
0.1006
|
0.0580 |
From the data in the table, it can be seen that, for an image GMRF method and a conventional superpixel TMF method which have high noise intensity and poor uniformity, the seashore line cannot be correctly identified, the GMRF method cannot solve the image of a region having similar sea texture characteristics in land, and the conventional superpixel TMF method has a defect in edge fitting degree. For the three methods of detecting the coastline well by the image with more uniform sea surface, the RMSE value of the method is smaller than that of the other methods, and the method is slightly higher than that of the comparison method. The RMSE pair for the method is shown in table 2 for the Terra images.
Size of
|
GMRF
|
Super pixel TMF
|
The patented method
|
115×71
|
0.1207
|
0.1044
|
0.0946
|
51×80
|
+∞
|
0.1291
|
0.1328
|
126×126
|
+∞
|
0.1185
|
0.1094
|
134×212
|
0.1226
|
0.0929
|
0.0906 |
From the above experimental results, it can be seen that the three methods can be used for processing the image with relatively simple texture and relatively uniform sea surface, but the method is still superior to the contrast method for the image with low contrast. The RMSE pair for the method is shown in table 3 for the Radarsat image.
From the above table, it can be seen that the calculation accuracy of the method is better than that of the two comparison methods, and the detection result is better than that of the pixel-based method due to the fact that the super-pixel contains more information than the pixel, and meanwhile, the method has the problem of low edge fitting degree in the traditional super-pixel method, so that the performance of the method is better than that of the traditional super-pixel TMF method. Table 4 shows the Envisat image contrast.
The performance index of QA for the Terra image is shown in table 5.
The performance index for QA for the Radarsat image is shown in table 6.
Where + ∞indicatesthat the image cannot be efficiently identified using the model. Wherein a smaller value of RMSE indicates a smaller difference between the detected coastline and the actual coastline, and a closer proximity between the identified coastline and the actual coastline. QA represents the percentage of correctly recognized pixels in the entire image, and a larger value indicates that the more correctly recognized pixels, the more accurate the coastline obtained by segmentation. According to the detection results of SAR images formed by three satellites of Envisat, Terra and Radarsat, the detection accuracy of most images is superior to that of a comparison method.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.