CN110097558B - SAR image coastline detection method - Google Patents

SAR image coastline detection method Download PDF

Info

Publication number
CN110097558B
CN110097558B CN201910319784.7A CN201910319784A CN110097558B CN 110097558 B CN110097558 B CN 110097558B CN 201910319784 A CN201910319784 A CN 201910319784A CN 110097558 B CN110097558 B CN 110097558B
Authority
CN
China
Prior art keywords
pixel
area
region
merging
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201910319784.7A
Other languages
Chinese (zh)
Other versions
CN110097558A (en
Inventor
史晓非
刘玲
朱程
王飞龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dalian Maritime University
Original Assignee
Dalian Maritime University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dalian Maritime University filed Critical Dalian Maritime University
Priority to CN201910319784.7A priority Critical patent/CN110097558B/en
Publication of CN110097558A publication Critical patent/CN110097558A/en
Application granted granted Critical
Publication of CN110097558B publication Critical patent/CN110097558B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing
    • G06T2207/10044Radar image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation
    • G06T2207/30184Infrastructure

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a mean shift SAR image coastline detection method based on restart factors and minimum feature products, which comprises the following steps: and acquiring an SAR image, carrying out restart factor mean shift-based filtering on the SAR image, and carrying out minimum feature product area-based merging on the filtered image. The technical scheme of the invention solves the technical problems of low segmentation performance and poor segmentation precision of the segmentation algorithm in the prior art, and realizes high-precision segmentation of the coastline image by adopting the technical scheme based on restart factor mean shift filtering and minimum feature product area combination.

Description

SAR image coastline detection method
Technical Field
The invention relates to the technical field of coastline detection, in particular to a coastline detection method of a mean shift SAR image based on a restart factor and a minimum feature product.
Background
The coastline detection is a special segmentation algorithm, and the mean shift algorithm in a plurality of segmentation algorithms is widely applied to image segmentation due to the unsupervised characteristic, but rarely used in sea and land segmentation. The core of the mean shift algorithm is to search for the mode points belonging to the same class according to kernel density estimation, and classify the pixels passing through the searched path into a class, namely, the points which are the same as the class center are classified into a class. In this process, no assumptions need to be made about the image, such as the number of classes or the initial position of the center point for each class. Therefore, the mean shift algorithm is widely applied to image segmentation.
The mean shift algorithm may perform a segmentation process on the optical and SAR images. Chinese patent 201410273800.0 divides the remote sensing image into several sub-regions, then uses the mean shift algorithm to divide, finally uses the k-adjacent method to classify, which is good for realizing the rapidity, but in the process of dividing and dividing, because the information between blocks is not considered, it is easy to be influenced by noise and divided by mistake. In the chinese patent 201611016281.5, a mean shift algorithm is used for preprocessing, and regions with small differences in images are merged to obtain uniform and consistent image regions, but in regions with insignificant boundaries, when preprocessing is performed on mean shift, a small misclassified region is easily obtained to affect the subsequent segmentation accuracy. And detecting the coastline of the SAR image by using the mean shift in the combined airspace-mean shift algorithm, and segmenting sea and land. In a strong contrast area, the combined airspace-mean shift algorithm can well divide sea and land, but in a weak edge area, a sharp corner area and other areas, the wrong division can be caused due to small pixel difference. In chinese patent 201710434179.5, mean shift is used to determine the segmentation class number and the cluster center of an image, while the spectral bandwidth in the mean shift algorithm is adapted. However, the adaptive spectral bandwidth considers the bandwidth value of the central point, the influence on the peripheral pixels in the local window is consistent, and the weight of the peripheral pixels on the central point is influenced by the bandwidth value during filtering, so that an over-smoothing phenomenon is caused.
In conventional mean shift algorithms, the spectral bandwidth h is exceeded if the difference between the pixel values isrAnd if the average value is small, the mean shift algorithm can be used as a low-pass filter of a space domain. Near the edges, the pixel values differ significantly, when the spectral bandwidth h is exceededrThen the value of the spectral kernel will tend to 0 and thus contribute little to the filtering. If the current center point is located near the weak edge or near the sharp corner, then the pixel values near the inner edge of the local window have smaller pixel value difference, and the weight of the neighborhood pixels to the center point of the local window is larger, so that the weight of the neighborhood pixels to the center point of the local window is increasedThe edge region is smoothed, resulting in edge blurring. The center pixel is smoothed after filtering, so that an over-segmentation phenomenon is generated during merging. In the merging stage, the space distance is smaller than hsSpectral distance less than hrThe pixels in the area are combined, and the area with the number of pixels smaller than M in the area is combined into the nearest similar area. For the image with obvious contrast, the segmentation effect can be well obtained, but for the regions with small contrast, weak edges and the like, non-class pixels can be combined into a class by directly carrying out fusion combination, so that the segmentation performance is reduced.
Disclosure of Invention
According to the technical problems of low segmentation performance and poor segmentation precision of the conventional segmentation algorithm, the coastline detection method of the mean shift SAR image based on the restart factor and the minimum feature product is provided, and the technical scheme of combining the restart factor-based mean shift filtering with the minimum feature product-based region merging is adopted to realize high-precision segmentation of the coastline image.
The technical means adopted by the invention are as follows:
a mean shift SAR image coastline detection method based on restart factors and minimum feature products is characterized by mainly comprising the following steps:
step S1, step S1, reading original SAR image I, wherein x is input image pixel, xiN is a neighboring pixel of x, yjJ 1,2, successive positions of the mean shift vector point, given an initial point x, let y1=x;
Step S2, according to the formula
Figure GDA0003504168540000021
Calculating the mean value in the local window of the current point, where c (y)j) To restart the probability function, hrSpectral bandwidth, hsIs the airspace bandwidth;
step S3, according to the formula
Figure GDA0003504168540000031
Calculating an improved mean shift vector, wherein n is the total pixel number in the current local window;
step S4, setting convergence threshold epsilon, if m (y)j)<E, let the filtered image z equal (x)i,s,yj+1,r) Where s is the spatial component of the vector and r is the spectral component of the vector, continue to calculate the next point, otherwise let y bej=yj+1And j equals j +1, executing step S2 until a complete image is calculated, outputting a filtered image z;
step S5, merging the filtered images obtained in step S4 into a small blocks of a regions by using a conventional mean shift algorithm to obtain an initial segmentation map, giving a region number statistical variable q, giving an iteration number statistical variable h, and giving an initialization h equal to 0;
step S6, extracting an initial region gm,m∈[1,q]Let initial m equal to 1, according to the formula
Figure GDA0003504168540000032
Calculating the current area gmAnd its neighborhood candidate region gnOf a similarity value of, wherein, FmIs the current area gmCharacteristic of coefficient of variation of (F)nIs a neighborhood candidate region gnCharacteristic of coefficient of variation of MmIs the current area gmM(s)>Pixel count of 1 to total pixel ratio, MnIs a neighborhood candidate region gnM(s)>The pixel of which is 1 accounts for the total pixel ratio, and
Figure GDA0003504168540000033
χ is M(s) in the region>Pixel point of 1, | χ | represents M(s)>The sum of the number of 1 pixel points, m(s) is the pixel value of the corresponding position, N is the total number of pixels in the region where the pixel is located, and | N | represents the total number of pixels;
step S7, according to the formula
fmax(gm,gn)=max{f(gm,gn,k),{gn,k}}
Calculating the maximum similarity value to obtain the maximum similar area of the current area and putting the current area and the obtained maximum similar area into a corresponding similar area matrix X, wherein gn,kIs shown in the area gmA total of k neighborhood candidate regions gn
Step S8 is repeated to execute step S6 and step S7 until m equals q, the regions having the same label are merged, and h equals h +1 and q equals the number of regions merged. If q is larger than or equal to h, removing the maximum area label, and continuing to step S6, otherwise, completing the combination and outputting the result.
Further, the method further comprises:
s9, judging whether the noise area, the island, the inland lake and other areas are combined, specifically comprising the following steps:
selecting a sliding window with the size of 3x3, detecting pixels in each area, and if 7 or more neighborhood pixels are different from the central pixel value, merging the pixels into the area with the largest number of surrounding neighborhood pixels, otherwise, merging the pixels;
and judging whether the merged binary images have small annular areas or not, if so, calculating the area pixel mean value of the binary images and the surrounding areas in the original image, if so, determining the binary images as islands without merging, otherwise, determining the binary images as inland lakes and merging the inland lakes into the surrounding areas.
The invention also provides a coastline detection system of the mean shift SAR image based on the restart factor and the minimum feature product, which comprises the following steps:
the extraction unit is used for acquiring an SAR image;
the filtering unit is used for carrying out restart factor-based mean shift filtering on the SAR image, and specifically comprises the following steps:
1) according to the formula
Figure GDA0003504168540000041
ComputingMean value within the current point local window, where c (y)j) To restart the probability function, hrSpectral bandwidth, hsIs the airspace bandwidth;
2) according to the formula
Figure GDA0003504168540000042
Calculating an improved mean shift vector, wherein n is the total pixel number in the current local window;
3) setting a convergence threshold ε if m (y)j)<E, let the filtered image z equal (x)i,s,yj+1,r) Where s is the spatial component of the vector and r is the spectral component of the vector, continue to calculate the next point, otherwise let y bej=yj+1And j equals j +1, executing step 1) until a complete image is calculated, and outputting a filtering image z;
a merging unit for merging the regions based on the minimum feature product of the filtered images, specifically including
1) Combining the filtered images into a small a blocks of regions by using a traditional mean shift algorithm to obtain an initial segmentation image, giving a region quantity statistical variable q, giving an iteration number statistical variable h as a, and giving an initialization h as 0;
2) extracting an initial region gm,m∈[1,q]Let initial m equal to 1, according to the formula
Figure GDA0003504168540000051
Calculating the current area gmAnd its neighborhood candidate region gnOf a similarity value of, wherein, FmIs the current area gmCharacteristic of coefficient of variation of (A), FnIs a neighborhood candidate region gnCharacteristic of coefficient of variation of MmIs the current area gmM(s)>Pixel count of 1 to total pixel ratio, MnIs a neighborhood candidate region gnM(s)>The pixel of which is 1 accounts for the total pixel ratio, and
Figure GDA0003504168540000052
χ is M(s) in the region>Pixel point of 1, | χ | represents M(s)>1, m(s) is the corresponding position pixel value, N is the total pixel number in the region where the corresponding position pixel value is located, and | N | represents the total pixel number sum;
3) according to the formula
fmax(gm,gn)=max{f(gm,gn,k),{gn,k}}
Calculating the maximum similarity value to obtain the maximum similar area of the current area and putting the current area and the obtained maximum similar area into a corresponding similar area matrix X, wherein gn,kIs shown in the area gmA total of k neighborhood candidate regions gn
4) And repeatedly executing the step 3) until m is equal to q, combining the regions with the same label, and enabling h to be equal to h +1 and q to be equal to the number of the regions after combination. If q is larger than or equal to h, removing the maximum area label, and continuing to step S6, otherwise, completing the combination and outputting the result.
The invention also provides a storage medium comprising a stored program, wherein the program executes the detection method.
The invention also provides a processor for running a program, wherein the program executes the detection method.
Compared with the prior art, the invention has the following advantages:
the method for detecting the coastline of the mean shift SAR image based on the restart factor and the minimum feature product effectively solves the problems that the filtering stage is insensitive and the subsequent merging and segmentation process is influenced under the condition that the contrast between sea and land is low in the traditional mean shift algorithm. The invention considers the influence of the last iteration result and can better maintain the edge characteristic. Meanwhile, the merging algorithm provided by the invention can find out the most similar area and merge, thereby further improving the classification performance.
Based on the reason, the method can be widely popularized in the fields of synthetic images, real SAR image segmentation and the like.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of the algorithm of the present invention.
FIGS. 2a-2d illustrate experimental artwork used in accordance with embodiments of the present invention.
FIGS. 3a-3d are graphs showing the results of the combined spatial domain-spectral mean shift method according to the present invention.
Fig. 4a-4d are graphs showing the results of the Gamma model level set algorithm used in the embodiment of the present invention.
Fig. 5a-5d are graphs of the results of an improved algorithm using the present invention according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
In conventional mean shift algorithms, the spectral bandwidth h is exceeded if the difference between the pixel values isrAnd if the average value is small, the mean shift algorithm can be used as a low-pass filter of a space domain. Near the edges, the pixel values differ significantly, when the spectral bandwidth h is exceededrThen the value of the spectral kernel will tend to 0 and thus contribute little to the filtering. If the current center point is located near the weak edge or near the sharp corner, then the pixel values near the edge in the local window have a larger weight to the center point of the local window due to the smaller difference between the pixel values, which increases the smoothness of the edge area and results in edge blurring. The subsequent filtering smoothes the center pixel, thus creating an over-segmentation phenomenon when merging. In the merging stage, the space distance is smaller than hsSpectral distance less than hrThe pixels in the area are merged, and the area with the number of pixels smaller than M in the area is merged into the nearest similar area. For an image with obvious contrast, a good segmentation effect can be obtained, but for regions with low contrast, weak edges and the like, direct fusion and combination may combine non-class pixels into a class, thereby reducing the segmentation performance.
In view of the above background, as shown in fig. 1, the present invention provides a coastline detection method for a mean-shift SAR image based on a restart factor and a minimum feature product, which mainly includes the following steps:
step S1, step S1, reading original SAR image I, wherein x is input image pixel, xiN is a neighboring pixel of x, yjJ 1,2, successive positions of the mean shift vector point, given an initial point x, let y1=x。
Step S2, according to the formula
Figure GDA0003504168540000071
Calculating the mean value in the local window of the current point, where c (y)j) To restart the probability function, hrSpectral bandwidth, hsIs the spatial domain bandwidth.
In the restart type random walk algorithm, a restart factor c is a fixed constant, and a satisfactory segmentation result can be obtained only by setting a proper restart probability for different images. The applicant introduces this idea into the mean shift, which is updated with each iteration to find the probability density estimate extreme points when filtering. If a restart factor is added in each iteration process, weight calculation is carried out according to the probability of (1-c) times, and the probability of c times stays in the process without carrying out weight calculation, so that the influence degree of surrounding neighborhood points and the current central point on the next mean value drift point is controlled. Here, the probability c describes the degree of similarity between the current iteration point and the calculated mean value thereof, the greater the c is, the more dissimilar the iteration point is, and the c-fold probability is used for not participating in the calculation near the edge, so that the edge can be better maintained, and the smoothness brought by filtering is reduced. However, if the restart factor c is a fixed constant, different images need to be manually set with different restart factors c, and on the other hand, if the restart factor c is fixed, the similarity degrees are the same, but in a local window with a complex pixel type, the influence of the restart factor on the central point is unique if the restart factor c is fixed, which is not favorable for filtering calculation near the edge. Thus in this application we assume that the restart factor c is about the center point yjThe function of (2) has different c values for different pixel points. Since the information in the local window is the key of the mean shift algorithm, we use the mean and variance in the local window to characterize the restart factor, so as to better embody the local similarity, and hopefully reduce the edge, especially weak edge smoothing. The following formula is preferably adopted in this embodiment
Figure GDA0003504168540000081
Computing a restart probability function, var (y)j) Is the variance, σ, of the center point within the local window of the current iterationjIs the local in-window standard deviation, mujIs the mean value within the local window and,
Figure GDA0003504168540000082
in order to be a gradient of the magnetic field,
Figure GDA0003504168540000083
is a modulus of the gradient, represents the magnitude of the rate of change, and
Figure GDA0003504168540000091
where the gradient operation is for the center point position yjAnd gradient solving of the coefficients of variation for their horizontal and vertical positions, var (z)j) The prior variance is obtained by a minimum mean square error estimation method:
Figure GDA0003504168540000092
ηνfor N-view SAR images, as a function of the standard deviation of multiplicative noise and view
Figure GDA0003504168540000093
Figure GDA0003504168540000094
Is the mean value in the local window of the current iteration point.
In the local window, when both uniform and non-uniform regions (including edge regions) are included, the difference in pixel value between pixels on the edge side is small, and the difference in pixel value between pixels on both sides of the edge is large. CV reflects the degree of pixel nonuniformity in the area, in which the value of CV is smaller than the standard deviation σ of specklenCV ≧ σ in the nonuniform regionn. When the gradient of the coefficient of variation is calculated, in the uniform region, the value range of the gradient is small because the difference of the coefficient of variation is small, and in the vicinity of the edge, the difference of the coefficient of variation is large, and the gradient value is larger than that of the uniform region. var (z)j) Representing a priori variance, in a uniform region var (z)j)≈0, near the strong edge, var (z)j)≈var(yj). When the center point is in the weak edge region, the pixel is affected by the two-sided black and gray pixel values. Because of the fact that
Figure GDA0003504168540000095
And
Figure GDA0003504168540000096
while constraining the restart factor c, over the entire local window, due to the non-uniformity of the pixels within the window, the a priori variance var (z)j) Is closer to var (y) than to 0j) And in the uneven area because CV ≧ σnGradient of coefficient of variation
Figure GDA0003504168540000097
The value is large, so c (y) is at this timej) Large, it can better describe whether the current point is near the weak edge. Likewise, in the vicinity of the pointed region,
Figure GDA0003504168540000098
and
Figure GDA0003504168540000099
are larger than in the uniform region, so the factor c (y) is restartedj) And the size is large, so that whether the current point is near the sharp corner or not can be better described.
The restart factor is affected by the prior variance, the local window mean, the variance, and the gradient of the coefficient of variation, taking into account the pixel of the center point and the pixels within its local search window. When the central point is in different regions, there are different restart factor functions, when the central point is in uniform region, c (y)j) Smaller, and near the edge, c (y)j) The current iteration point is very large and approaches to 1, and whether the current iteration point is located at the edge or not can be judged more accurately.
Step S3, according to the formula
Figure GDA0003504168540000101
And calculating an improved mean shift vector, wherein n is the total pixel number in the current local window.
As can be seen from the above equation, the larger the restart factor c, the smaller the overall value of m, and when m is smaller than a given threshold value epsilon, the filtering stops. When in the edge region, c (y)j) Approaching 1, where m ≈ 0, since the filtering hardly plays a role, and easily satisfies a condition smaller than a given threshold epsilon to reduce the smoothness of the edge point. In the uniform region, c (y)j) Approaching 0, the mean shift vector at this time is approximately equal to the conventional mean shift vector, and filtering can be performed.
Step S4, setting convergence threshold epsilon, if m (y)j)<E, let the filtered image z equal (x)i,s,yj+1,r) Where s is the spatial component of the vector and r is the spectral component of the vector, continue to calculate the next point, otherwise let y bej=yj+1And j equals j +1, executing step S2 until a complete image is calculated, outputting a filtered image z;
in the traditional mean shift algorithm segmentation process, the space distance is smaller than hsSpectral distance less than hrThe pixels in the area are combined, and the area with the number of pixels smaller than M in the area is combined into the nearest similar area. For the image with obvious contrast, the segmentation effect can be well obtained, but for the regions with small contrast, weak edges and the like, non-class pixels can be combined into a class by directly carrying out fusion combination, so that the segmentation performance is reduced. In the invention, the most similar region combination is found out by solving the ratio of the central region to the neighborhood variation coefficient and the edge point weight of the convergence map. When the most similar region is searched, in order to prevent the comparison of similarity influenced by overlarge ratio, the minimum feature ratio of the surrounding neighborhood region and the region is calculated and solved, and the feature ratios of all the calculated regions are sequenced, wherein the region with the maximum feature ratio is the most similar region. In step S4, a convergence map M may be obtained by counting the convergence times of each pixel: the convergence map represents the frequency at which the mean shift converges towards each pixel. A large number of mean-shift filtered pixels are near (but not on) the edges) Convergence, on the contrary few pixels converge to a uniform area, while at edge points few filtered pixels converge.
Step S5, merging the filtered images obtained in step S4 into a small blocks of a regions by using a conventional mean shift algorithm to obtain an initial segmentation map, giving a region number statistical variable q, giving an iteration number statistical variable h, and giving an initialization h equal to 0;
step S6, extracting an initial region gm,m∈[1,q]Let initial m equal to 1, according to the formula
Figure GDA0003504168540000111
Calculating the current area gmAnd its neighborhood candidate region gnOf a similarity value of, wherein, FmIs the current area gmCharacteristic of coefficient of variation of (A), FnIs a neighborhood candidate region gnCharacteristic of coefficient of variation of MmIs the current area gmM(s)>Pixel count of 1 to total pixel ratio, MnIs a neighborhood candidate region gnM(s)>The pixel of which is 1 accounts for the total pixel ratio, and
Figure GDA0003504168540000112
χ is M(s) in the region>Pixel point of 1, | χ | represents M(s)>The sum of the number of 1 pixel points, m(s) is the corresponding position pixel value, N is the total number of pixels in the region where the pixel is located, and | N | represents the total number of pixels.
The above formula indicates that when two adjacent image blocks are compared in terms of features, if the two image blocks are similar areas (are of one type), F isiAnd FjIn a similar manner to the above-described embodiments,
Figure GDA0003504168540000113
approaching 1, whereas when not similar, FiAnd FjThe difference is large, and the ratio of the two is minimum to obtain a value less than 1. In the same way, the method for preparing the composite material,
Figure GDA0003504168540000114
the more similar the value approaches 1/2, the less 1/2 when dissimilar results, the M term denominator plus 1 in the formula because in the homogeneous region M(s)>The number of 1 pixels may be 0, and in order to prevent the denominator from being 0, 1 is added, so that the similarity comparison is not affected. Because the land area has a plurality of uneven areas, the difference between the calculated variation coefficient characteristic and the convergence map characteristic is small and can be merged, and the difference between the calculated variation coefficient characteristic and the convergence map characteristic is larger than the difference between land and between sea and sea near the edge and cannot be merged, so that land and sea can be distinguished.
Step S7, according to the formula
fmax(gm,gn)=max{f(gm,gn,k),{gn,k}}
Calculating the maximum similarity value to obtain the maximum similar area of the current area, and putting the current area and the obtained maximum similar area into a corresponding similar area matrix X (i.e. putting the label value corresponding to each area into the similar area matrix X), wherein gn,kIs shown in the area gmA total of k neighborhood candidate regions gn
The above equation shows that by calculating the central region xiThe region most similar to the central region is selected as the feature ratio to the surrounding neighboring regions. With xiFor the central region, find the largest f of all regions in the neighborhoodmax(xi,xj) And recording into an n X2X matrix with XiThe area x most similar to the first columnjIn the second column. Thus for each region, a most similar region is obtained and placed in the resulting X matrix.
Figure GDA0003504168540000121
Each row in the X matrix indicates that the two regions are similar regions.
If the regions in the first row appear in the next several rows, it is indicated that the several rows of regions are the same type of region, i.e. can be merged into one type.
Figure GDA0003504168540000122
As shown above, X1In (3), if the elements in the first row are present in the second row and the fifth row, the first, second and fifth rows are in the same category, i.e. the 1,2 and 5 regions are in the same category. And 2 and 3 of the second row are also of the same type, so 1,2, 3, 5 are of the same type. The elements in the second row are again present in the third row, then 1,2, 3, 4, 5 are the same type of region, and so on. In the same way at X2In the formula, 1,2 and 3 are members of the same type, and 4, 5 and 7 are members of the same type.
Step S8 is repeated to execute step S6 and step S7, and until m equals q, the regions having the same label are merged, and h equals h +1, and q equals the number of regions merged. If q is larger than or equal to h, removing the maximum area label, and continuing to step S6, otherwise, completing the combination and outputting the result.
Further, the method further comprises:
s9, judging whether the noise area, the island, the inland lake and other areas are combined or not, and specifically comprising the following steps:
selecting a sliding window with the size of 3x3, detecting pixels in each area, and if 7 or more neighborhood pixels are different from the central pixel value, merging the pixels into the area with the largest number of surrounding neighborhood pixels, otherwise, merging the pixels;
and judging whether the merged binary images have small annular areas or not, if so, calculating the area pixel mean value of the binary images and the surrounding areas in the original image, if so, determining the binary images as islands without merging, otherwise, determining the binary images as inland lakes and merging the inland lakes into the surrounding areas.
The technical solution of the present invention is further illustrated by the following specific comparative examples:
the experimental chart is Envisat-ASAR, and a combined space domain-spectrum mean shift method and a Gamma distribution level set-based method are selected as comparison algorithms. The parameters of the method are set as follows: local window is 5 x 5, space domain bandwidth hsSet to 8, spectral bandwidth hrsSet to 5, spectral bandwidth hrThe threshold epsilon is set to 30 and 0.5.
Fig. 2a to 2d show experimental original graphs, fig. 3a to 3d show results of the joint spatial domain-spectral mean shift method, fig. 4a to 4d show results of the Gamma model level set algorithm, and fig. 5a to 5d show results of the improved algorithm of the present invention.
The experimental result shows that the level set algorithm based on Gamma distribution is more accurate in the whole coastline detection effect, but the coastline cannot be well detected by the level set algorithm when weak edges are contained and sea-land boundaries are not obvious. Because the level set algorithm carries out curve evolution by solving the minimum value of the energy functional to finally obtain the segmentation result, and the energy functional is constrained by the regular constraint term, the regular constraint term can keep the smoothness of the contour and remove a small isolated region. In fig. 4c, when the level set algorithm detects an inward-concave coastline, because the sea-land difference is small, under the constraint of the regular constraint term of the level set, after the minimum value of the energy functional is solved, the contour cannot extend well to the weak edge. In fig. 4d, the land pixel value of the upper part of the graph is low and is close to the sea, and the lower part of the graph also has islands, so that when the level set algorithm detects that the regular constraint term is increased, the sharp corner of the upper part can be detected, and the weak edge of the middle part can be detected erroneously. Conversely, if the regular constraint term is adjusted to be small, a region where the inland pixel value is low may be mistakenly divided into seas. The combined space-spectrum mean shift algorithm is based on the traditional mean shift algorithm and adopts the nearest neighbor algorithm for combination. When the mean shift filtering stage appears in a region with weak edges and no obvious sea-land boundaries, the region is limited by spatial domain and spectral bandwidth, and if the weight difference of the pixel mean values in a local window is small, the pixel mean values are considered to be in the same class, so that noise is suppressed, and wrong division is generated. In the merging process, a nearest neighbor algorithm is used, a region with a high proportion is searched in the surrounding neighborhood and is considered as a class for merging, the weak edge region has small difference with sea pixels, and the weak edge region and the sea are considered as a class when the region with the high proportion in the neighborhood is searched, so that the merging result is influenced, and the coastline detection has deviation. The mean shift algorithm provided by the invention has the advantages that in the filtering stage, due to the influence of the restart factor, although the pixel mean difference in the local window is small, under the influence of the pixel of the previous iteration, the probability of over-smoothing is reduced, the edge can be better kept, the most similar areas in the surrounding neighborhood are searched for combination according to different characteristics in each small area during combination, the combination result is restricted by the influence of the time-varying coefficient characteristics and the convergence iteration edge graph in the most similar areas, and the coastline can be more accurately detected.
For the Envisat-1-ASAR image, the D, FPR, RMSE pairs of the algorithm are as shown in table 4:
as can be seen from the values of the indexes in Table 4, the performance of the combined space domain-spectrum mean shift algorithm is obviously inferior to that of the other two algorithms. Because the algorithm uses the traditional mean shift algorithm and the traditional adjacent combination algorithm, the influence of the pixel on the filtering is not considered, and the deviation occurs on the filtering, the noise removal and the combination. The Gamma-based level set algorithm is influenced by the minimization of the energy functional, different parameters are needed for different images, and when the weak edge contains regions such as islands, the level set algorithm cannot well detect the coastline accurately according to the parameters. The algorithm improves the traditional mean shift algorithm, so that the influence of the last iteration point on the current iteration point is considered in the filtering process, and the edge area is well improved. The merging algorithm is based on the mean shift algorithm convergence iterative graph and the variation coefficient provided by the invention, the regions are merged to search the most similar region, the sea-land merging error is avoided, and the weak edge region and the sea in the uniform region have difference in the convergence iterative graph, so that the weak edge region and the sea can be distinguished. The algorithm herein is preferred over the other two algorithms.
Table 4 coastline extraction evaluation for three algorithms
Figure GDA0003504168540000151
The invention also provides a coastline detection system of the mean shift SAR image based on the restart factor and the minimum feature product, which comprises the following steps:
the extraction unit is used for acquiring an SAR image;
the filtering unit is used for carrying out restart factor-based mean shift filtering on the SAR image, and specifically comprises the following steps:
1) according to the formula
Figure GDA0003504168540000152
Calculating the mean value in the local window of the current point, where c (y)j) To restart the probability function, hrSpectral bandwidth, hsIs the airspace bandwidth;
2) according to the formula
Figure GDA0003504168540000161
Calculating an improved mean shift vector, wherein n is the total pixel number in the current local window;
3) set the convergence threshold ε, if m (y)j)<E, let the filtered image z equal (x)i,s,yj+1,r) Where s is the spatial component of the vector and r is the spectral component of the vector, continue to calculate the next point, otherwise let y bej=yj+1And j equals j +1, executing step 1) until a complete image is calculated, and outputting a filtering image z;
a merging unit for merging the regions based on the minimum feature product of the filtered images, specifically including
1) Merging the filtered images obtained in the step S4 into a small blocks of a regions by using a conventional mean shift algorithm to obtain an initial segmentation map, giving a statistical variable q of the number of the regions, giving a statistical variable h of an iteration number, and giving an initialization h of 0;
2) extracting an initial region gm,m∈[1,q]Let initial m equal to 1, according to the formulaFormula (II)
Figure GDA0003504168540000162
Calculating the current area gmAnd its neighborhood candidate region gnOf a similarity value of, wherein, FmIs the current area gmCharacteristic of coefficient of variation of (A), FnIs a neighborhood candidate region gnCharacteristic of coefficient of variation of (A), MmIs the current area gmM(s)>Pixel count of 1 to total pixel ratio, MnIs a neighborhood candidate region gnM(s)>The pixel of which is 1 accounts for the total pixel ratio, and
Figure GDA0003504168540000163
χ is M(s) in the region>Pixel point of 1, | χ | represents M(s)>The sum of the number of 1 pixel points, m(s) is the pixel value of the corresponding position, N is the total number of pixels in the region where the pixel is located, and | N | represents the total number of pixels;
3) according to the formula
fmax(gm,gn)=max{f(gm,gn,k),{gn,k}}
Calculating the maximum similarity value to obtain the maximum similar area of the current area and putting the current area and the obtained maximum similar area into a corresponding similar area matrix X, wherein gn,kIs shown in the area gmA total of k neighborhood candidate regions gn
4) And repeatedly executing the step 3) until m is equal to q, combining the regions with the same label, and enabling h to be equal to h +1 and q to be equal to the number of the regions after combination. If q is larger than or equal to h, removing the maximum area label, and continuing to step S6, otherwise, completing the combination and outputting the result.
The invention also provides a storage medium comprising a stored program, wherein the program executes the detection method.
The invention also provides a processor for running a program, wherein the program executes the detection method.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (5)

1. A mean shift SAR image coastline detection method based on restart factors and minimum feature products is characterized by mainly comprising the following steps:
step S1, reading an original SAR image I, wherein x is an input image pixel and xiN is a neighboring pixel of x, y, 1,2jJ 1,2, successive positions of the mean shift vector point, given an initial point x, let y1=x;
Step S2, according to the formula
Figure FDA0003504168530000011
Calculating the mean value in the local window of the current point, where c (y)j) To restart the probability function, hrSpectral bandwidth, hsIs the spatial domain bandwidth, and restarts the probability function c (y)j) Obtained according to the following calculation:
Figure FDA0003504168530000012
wherein, var (y)j) Is the variance, σ, of the center point within the local window of the current iterationjIs the local in-window standard deviation, mujIs the mean value within the local window and,
Figure FDA0003504168530000013
in order to be a gradient of the magnetic field,
Figure FDA0003504168530000014
is a modulus of the gradient, represents the magnitude of the rate of change, and
Figure FDA0003504168530000015
where the gradient operation is for the center point position yjAnd gradient solving of the coefficients of variation for their horizontal and vertical positions, var (z)j) The prior variance is obtained by a minimum mean square error estimation method:
Figure FDA0003504168530000016
ηνfor N-view SAR images, as a function of the standard deviation of multiplicative noise and view
Figure FDA0003504168530000017
Figure FDA0003504168530000021
The average value in the local window of the current iteration point is obtained;
step S3, according to the formula
Figure FDA0003504168530000022
Calculating an improved mean shift vector, wherein n is the total pixel number in the current local window;
step S4, setting convergence threshold epsilon, if m (y)j)<E, let the filtered image z equal (x)i,s,yj+1,r) Where s is the spatial component of the vector and r is the spectral component of the vector, continue to calculate the next point, otherwise let y bej=yj+1And j equals j +1, executing step S2 until a complete image is calculated, outputting a filtered image z;
step S5, merging the filtered images obtained in step S4 into a small blocks of a regions by using a conventional mean shift algorithm to obtain an initial segmentation map, giving a region number statistical variable q, giving an iteration number statistical variable h, and giving an initialization h equal to 0;
step S6, extracting an initial region gm,m∈[1,q]Let initial m equal to 1, according to the formula
Figure FDA0003504168530000023
Calculating the current area gmAnd its neighborhood candidate region gnOf a similarity value of, wherein, FmIs the current area gmCharacteristic of coefficient of variation of (A), FnIs a neighborhood candidate region gnCharacteristic of coefficient of variation of MmIs the current area gmM(s)>Pixel count of 1 to total pixel ratio, MnIs a neighborhood candidate region gnM(s)>The pixel of which is 1 accounts for the total pixel ratio, and
Figure FDA0003504168530000024
χ is M(s) in the region>Pixel point of 1, | χ | represents M(s)>The sum of the number of 1 pixel points, m(s) is the pixel value of the corresponding position, N is the total number of pixels in the region where the pixel is located, and | N | represents the total number of pixels;
step S7, according to the formula
fmax(gm,gn)=max{f(gm,gn,k),{gn,k}}
Calculating the maximum similarity value to obtain the maximum similar area of the current area and putting the current area and the obtained maximum similar area into a corresponding similar area matrix X, wherein gnkIs shown in the area gmA total of k neighborhood candidate regions gn
And step S8, repeatedly executing step S6 and step S7 until m equals q, merging the regions with the same label, making h equal to h +1 and q equal to the number of the merged regions, removing the maximum region label if q is equal to or greater than h, continuing step S6, otherwise, completing merging, and outputting the result.
2. The method of claim 1, further comprising:
s9, judging whether the noise area, the island and the inland lake area are combined or not, and specifically comprising the following steps:
selecting a sliding window with the size of 3x3, detecting pixels in each area, and if 7 or more neighborhood pixels are different from the central pixel value, merging the pixels into the area with the largest number of surrounding neighborhood pixels, otherwise, merging the pixels;
and judging whether the merged binary images have small annular areas or not, if so, calculating the area pixel mean value of the binary images and the surrounding areas in the original image, if so, determining the binary images as islands without merging, otherwise, determining the binary images as inland lakes and merging the inland lakes into the surrounding areas.
3. A coastline detection system based on the method of claim 1, comprising:
the extraction unit is used for acquiring an SAR image;
the filtering unit is used for carrying out restart factor-based mean shift filtering on the SAR image, and specifically comprises the following steps:
1) according to the formula
Figure FDA0003504168530000031
Calculating the mean value in the local window of the current point, where c (y)j) To restart the probability function, hrSpectral bandwidth, hsIs the spatial domain bandwidth, and restarts the probability function c (y)j) Obtained according to the following calculation:
Figure FDA0003504168530000032
wherein, var (y)j) Is the variance, σ, of the center point within the local window of the current iterationjIs the local in-window standard deviation, mujIs the mean value within the local window and,
Figure FDA0003504168530000033
in order to be a gradient of the magnetic field,
Figure FDA0003504168530000034
is a modulus of the gradient, represents the magnitude of the rate of change, and
Figure FDA0003504168530000041
where the gradient operation is for the center point position yjAnd gradient solving of the coefficients of variation for their horizontal and vertical positions, var (z)j) The prior variance is obtained by a minimum mean square error estimation method:
Figure FDA0003504168530000042
ηνfor N-view SAR images, as a function of the standard deviation of multiplicative noise and of the view
Figure FDA0003504168530000043
Figure FDA0003504168530000044
The average value in the local window of the current iteration point is obtained; (ii) a
2) According to the formula
Figure FDA0003504168530000045
Calculating an improved mean shift vector, wherein n is the total pixel number in the current local window;
3) setting a convergence threshold ε if m (y)j)<E, let the filtered image z equal (x)i,s,yj+1,r) Where s is null of the vectorThe inter-component, r is the spectral component of the vector, continue to calculate the next point, otherwise let y bej=yj+1And j equals j +1, executing step 1) until a complete image is calculated, and outputting a filtering image z;
a merging unit for merging the regions based on the minimum feature product of the filtered images, specifically including
1) Combining the filtered images into a small a blocks of regions by using a traditional mean shift algorithm to obtain an initial segmentation graph, giving a region quantity statistical variable q, giving an iteration number statistical variable h, and initializing h to 0;
2) extracting an initial region gmAccording to the formula
Figure FDA0003504168530000046
Calculating the current area gmAnd its neighborhood candidate region gnOf a similarity value of, wherein, FmIs the current area gmCharacteristic of coefficient of variation of (A), FnIs a neighborhood candidate region gnCharacteristic of coefficient of variation of MmIs the current area gmM(s)>Pixel count of 1 to total pixel ratio, MnIs a neighborhood candidate region gnM(s)>The pixel of which is 1 accounts for the total pixel ratio, and
Figure FDA0003504168530000051
χ is M(s) in the region>Pixel point of 1, | χ | represents M(s)>The sum of the number of 1 pixel points, m(s) is the pixel value of the corresponding position, N is the total number of pixels in the region where the pixel is located, and | N | represents the total number of pixels;
3) according to the formula
fmax(gm,gn)=max{f(gm,gn,k),{gn,k}}
Calculating the maximum similarity value to obtain the maximum similar area of the current area and putting the current area and the obtained maximum similar area into a corresponding similar area matrix X, wherein gn,kIs shown in the area gmA total of k neighborhood candidate regions gn
4) And repeatedly executing the step 3), until m is equal to q, merging the regions with the same label, making h equal to h +1 and q equal to the number of the regions after merging, if q is larger than or equal to h, removing the maximum region label, continuing the step S6, otherwise, merging and outputting the result.
4. A storage medium characterized by comprising a stored program, wherein the program executes the detection method of any one of claims 1-2.
5. A processor characterized by being configured to run a program, wherein the program performs the detection method of any one of claims 1-2.
CN201910319784.7A 2019-04-19 2019-04-19 SAR image coastline detection method Expired - Fee Related CN110097558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910319784.7A CN110097558B (en) 2019-04-19 2019-04-19 SAR image coastline detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910319784.7A CN110097558B (en) 2019-04-19 2019-04-19 SAR image coastline detection method

Publications (2)

Publication Number Publication Date
CN110097558A CN110097558A (en) 2019-08-06
CN110097558B true CN110097558B (en) 2022-06-07

Family

ID=67445331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910319784.7A Expired - Fee Related CN110097558B (en) 2019-04-19 2019-04-19 SAR image coastline detection method

Country Status (1)

Country Link
CN (1) CN110097558B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5612928A (en) * 1992-05-28 1997-03-18 Northrop Grumman Corporation Method and apparatus for classifying objects in sonar images
CN105261004A (en) * 2015-09-10 2016-01-20 西安电子科技大学 Mean shift and neighborhood information based fuzzy C-mean image segmentation method
CN107301649A (en) * 2017-06-15 2017-10-27 大连海事大学 A kind of region merging technique SAR image coastline Detection Method algorithm based on super-pixel
CN109523576A (en) * 2018-10-19 2019-03-26 中国地质大学(武汉) A kind of Mean Shift filtering method for taking characters of ground object into account

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7680335B2 (en) * 2005-03-25 2010-03-16 Siemens Medical Solutions Usa, Inc. Prior-constrained mean shift analysis
US10032287B2 (en) * 2013-10-30 2018-07-24 Worcester Polytechnic Institute System and method for assessing wound

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5612928A (en) * 1992-05-28 1997-03-18 Northrop Grumman Corporation Method and apparatus for classifying objects in sonar images
CN105261004A (en) * 2015-09-10 2016-01-20 西安电子科技大学 Mean shift and neighborhood information based fuzzy C-mean image segmentation method
CN107301649A (en) * 2017-06-15 2017-10-27 大连海事大学 A kind of region merging technique SAR image coastline Detection Method algorithm based on super-pixel
CN109523576A (en) * 2018-10-19 2019-03-26 中国地质大学(武汉) A kind of Mean Shift filtering method for taking characters of ground object into account

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Interactive Multilabel Image Segmentation via Robust Multilayer Graph Constraints;Tao Wang 等,;《IEEE Transactions on Multimedia》;20161231;第18卷(第12期);第2358-2371页 *
Mean shift: a robust approach toward feature space analysis;D. Comaniciu 等,;《IEEE Transactions on Pattern Analysis and Machine Intelligence》;20020531;第24卷(第5期);第603-619页 *
基于多级协同传播的交互式图像分割;张可为 等,;《计算机工程》;20130228(第2期);第225-228页 *
基于随机游走的图像分割相关算法研究;唐小龙,;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20170215;第2017年卷(第2期);第I138-2860页 *
随机游走图像分割算法的研究;王梅,;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20140315;第2014年卷(第3期);第I138-602页 *

Also Published As

Publication number Publication date
CN110097558A (en) 2019-08-06

Similar Documents

Publication Publication Date Title
CN108416789A (en) Method for detecting image edge and system
US7450762B2 (en) Method and arrangement for determining an object contour
CN104217422B (en) A kind of sonar image detection method of adaptive narrow-band level set
CN109978848B (en) Method for detecting hard exudation in fundus image based on multi-light-source color constancy model
CN109035196B (en) Saliency-based image local blur detection method
Zhang et al. Level set evolution driven by optimized area energy term for image segmentation
Gomes et al. Stochastic shadow detection using a hypergraph partitioning approach
CN107742113A (en) One kind is based on the posterior SAR image complex target detection method of destination number
CN115797872A (en) Machine vision-based packaging defect identification method, system, equipment and medium
CN111815660B (en) Method and device for detecting edges of goods in dangerous chemical warehouse and terminal equipment
WO2014066218A2 (en) Cast recognition method and device, and urine analyzer
CN110211106B (en) Mean shift SAR image coastline detection method based on segmented Sigmoid bandwidth
More et al. A review on document image binarization technique for degraded document images
CN110097558B (en) SAR image coastline detection method
Devikar et al. Segmentation of images using histogram based FCM clustering algorithm and spatial probability
Upadhyay et al. Fast segmentation methods for medical images
Prantikuzzaman et al. Local Dispersion Optimized LoG and Image Fitting for Intensity Inhomogeneous Image Segmentation
Li et al. A two-stage image segmentation model for multi-channel images
Fu et al. Adaptive Multi-Level Region Merging for Salient Object Detection.
Aslam et al. A review on various clustering approaches for image segmentation
Rocha et al. A robust extension of the mean shift algorithm using optimum path forest
Wang A new approach for robust segmentation of the noisy or textured images
Wang et al. Man-made object detection based on fractal theory and active contour model
Phophalia et al. Object boundary detection using rough set theory
Sahin et al. Automatic multi-scale segmentation of high spatial resolution satellite images using watersheds

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220607

CF01 Termination of patent right due to non-payment of annual fee