A coastline detection method in SAR images based on level set

By improving the iterative step length adaptive method of the Chan-Vese model, the calculation speed of the level set algorithm in SAR image coastline detection is improved, and the problem of slow computing speed in the prior art is solved.

CN115239747BActive Publication Date: 2025-09-02JIANGSU UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210413802.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2025-09-02
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

The horizontal set algorithm is slow to calculate in high-resolution SAR image coastline detection, limiting its practicality in engineering applications.

Method used

The Chan-Vese model is improved by adaptively setting the iterative step length to improve the calculation speed of the level set function.

Benefits of technology

The speed of the level set function when detecting SAR coastlines is improved, and the calculation time required to achieve the detection accuracy of the same coastline is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115239747B_ABST
    Figure CN115239747B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of image detection technology and is a SAR image coastline detection method based on level sets. The level set function is initialized as a signed distance function, the grayscale means of the foreground and background are calculated according to the initialized level set function, and each point of the level set function is evolved using the grayscale means of the foreground and background estimated previously. The iterative step size of the level set function in the evolution process is adaptively changed by a step size control function. If the level set function value of the current point is greater than 100 or less than -100, the step size is changed from the original 0.1 to 1, otherwise it remains unchanged. The level set function is then continuously evolved. According to the definition, foreground>0 and background<0, if the grayscale value of the current point is close to the foreground valuation, the value of the level set is correspondingly increased, otherwise it is decreased. The level set function is reinitialized according to the penalty term to make it conform to the signed distance function. Finally, it is checked whether the level set function converges, and if not, it is re-evolved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image detection, and in particular to a SAR image coastline detection method based on level sets. Background Art

[0002] Synthetic Aperture Radar (SAR) is an active microwave imaging radar with all-weather, all-day, high-resolution, and wide coverage characteristics. It is widely used for environmental monitoring, resource surveys, and military reconnaissance. The coastline is the boundary between the ocean and the land, and is affected by factors such as tides and waves, and is constantly changing. Image coastline detection is of great significance in marine applications such as automatic navigation and mapping. The level set algorithm is an edge detection method based on human visual characteristics. Due to its advantages such as good detection results and strong noise resistance, it has attracted much attention in both the research and application of coastline detection methods. However, due to the complex iterative method, the level set algorithm has a relatively slow detection speed when applied to images with higher resolution, limiting its practicality in engineering applications.

[0003] Since the 1980s, numerous methods for coastline detection have been proposed worldwide, including boundary tracing algorithms, Markovian segmentation, the Mumford-Shah function, active contours, level set algorithms, and region growing. The active contour method offers a new approach to image boundary detection, and its principle of controlling the iterative motion of contour lines has been adopted by numerous methods. However, due to its poor noise immunity and difficulty handling contour curve separation or merging, the active contour method cannot be directly applied to coastline detection in SAR images with complex boundary details. Among these algorithms, the level set algorithm inherits the characteristics of the active contour method and is therefore also known as the geometric active contour method. This type of algorithm also requires an initial contour line, but the requirements for its initial contour position are lower than those of the active contour method. The level set algorithm has strong topological adaptability and can automatically separate or merge contour lines. Without additional processing, a simple initial contour can be used to determine the boundaries of objects in the image. The level set method uses global image information to establish an energy function that controls curve motion, eliminating the dependence of curve evolution solely on local image information. Therefore, it has been applied to coastline segmentation in high-resolution SAR imagery, offering the advantages of high detection sensitivity and noise immunity. Because the two-dimensional curve is embedded in the three-dimensional surface, the numerical solution of this method is stable and has a unique solution. However, because the algorithm iterates on the three-dimensional surface, it leads to large computational complexity and slow calculation speed. Summary of the Invention

[0004] The purpose of the present invention is to solve the problem of slow level set calculation speed and provide a SAR image coastline detection method based on level sets.

[0005] The technical solution disclosed in the present invention is to improve the Chan-Vese (CV) model and adopt an iterative step-size adaptive method instead of the traditional fixed threshold method. To a certain extent, it solves the problem that the level set function slows down when approaching the edge, reduces the calculation time required to achieve the same coastline detection accuracy, and improves the detection speed.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A SAR image coastline detection method based on level sets includes the following steps:

[0008] Step 1: Read the image size, nrow is the number of image rows, and ncol is the number of image columns;

[0009] Step 2: Create a two-dimensional grid using the x-coordinates defined by the image column matrix and the y-coordinates defined by the row matrix.

[0010] Step 3: Set the initial evolution curve to a circle with a center of (ncol / 2, nrow / 2) and a radius of 20;

[0011] Step 4: Initialize the level set as the signed distance function;

[0012] Step 5: Mirror edge extension;

[0013] Step 6: Define and calculate the smooth Dirac function;

[0014] Step 7: Calculate the curvature K of the evolution curve;

[0015] Step 8: Define the Heaviside function and regularize the Heaviside function;

[0016] Step 9: Calculate the optimal foreground and background grayscale mean. If the grayscale value of the current point is close to the foreground value, the level set value of the point will increase accordingly, otherwise it will decrease.

[0017] Step 10: Set a step size control function to adaptively set the iteration step size of the level set method so that the iteration step size of the level set function increases within a certain range. When the level set function value is greater than 100 or less than -100, the iteration step size is changed from the initial 0.1 to 1, and vice versa.

[0018] Step 11: Set a level set evolution equation and use it to evolve the evolution curve. If convergence fails, recalculate the evolution equation and re-evolve according to the above steps until the curve converges.

[0019] Step 12: Remove the edges extended by the mirror in step 5 to restore the image to its original size.

[0020] The present invention is further improved, the step size control function set in step 10 is as follows:

[0021]

[0022] Where a is the initial iteration step, which is set to 0.1 here, and b = 100.

[0023] Beneficial effects of the present invention: The step size control function proposed in the present invention is adaptive, and the level set calculation speed decreases near the edge. This function can improve the level set calculation speed near the edge, thereby improving the level set calculation speed to a certain extent; by processing the image through the iterative step size adaptive method, the speed of the level set function in SAR coastline extraction is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 Flow chart of the method of the present invention.

[0025] Figure 2 is the original SAR image.

[0026] Figure 3 This is the result of coastline detection processing on SAR images by the present invention. DETAILED DESCRIPTION

[0027] In order to deepen the understanding of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The embodiments are only used to explain the present invention and do not limit the scope of protection of the present invention.

[0028] Example: Figure 1 As shown in FIG, a SAR image coastline detection method based on level set includes the following steps:

[0029] Step 1: Read the image size, nrow is the number of image rows, and ncol is the number of image columns;

[0030] Step 2: Create a two-dimensional grid using the x-coordinates defined by the image column matrix and the y-coordinates defined by the row matrix.

[0031] Step 3: Set the initial evolution curve to a circle with a center of (ncol / 2, nrow / 2) and a radius of 20;

[0032] Step 4: Initialize the level set to the signed distance function, and calculate the distance from each point in the image to the circle using the formula to obtain the initialized level set. The formula for calculating the signed distance is:

[0033]

[0034] Where: φ(x,y) is the level set function, X is the abscissa of each point in the image, Y is the ordinate of each point in the image, r is the radius of the initial evolution curve 20, jc is the abscissa of the center of the initial evolution curve, and ic is the ordinate of the center of the initial evolution curve;

[0035] Step 5: Mirror Edge Extension: To avoid edge effects on the image boundaries during convolution, where part of the convolution sum is outside the image, a mirror edge extension is performed on the image. This is done by creating an all-zero matrix with 2 added to each row and column based on the image size. The original image is placed in the center of the all-zero matrix, and the image edges are mirrored.

[0036] Step 6: Calculate the smooth Dirac function, the calculation formula is:

[0037]

[0038] Where: ε is set to a constant of 1, φ is the level set;

[0039] Step 7: Calculate the curvature K of the evolution curve using the following formula:

[0040]

[0041] Where: is the gradient of the level set;

[0042] Step 8: Regularize the Heaviside function. The calculation formula is:

[0043]

[0044] Where: ε is set to a constant of 1, φ is the level set;

[0045] Step 9: Calculate the optimal foreground and background grayscale mean. If the grayscale value of the current point is close to the foreground value, the level set value of the point will increase accordingly, otherwise it will decrease. The calculation formula is:

[0046]

[0047]

[0048] Where C1 is the foreground mean, C2 is the background mean, and Ω is R 2 A bounded open subset of For the boundary, For a given image;

[0049] Step 10: Set a step size control function to adaptively set the iteration step size of the level set method so that the iteration step size of the level set function increases within a certain range. When the level set function value is greater than 100 or less than -100, the iteration step size is changed from the initial 0.1 to 1, and vice versa. The function is as follows:

[0050]

[0051] Where a is the initial iteration step, which is set to 0.1 here, b = 100, and φ is the level set;

[0052] Step 11: Set a level set evolution equation and use it to evolve the evolution curve. If convergence fails, recalculate the evolution equation and re-evolve according to the above steps until the curve converges. The function is as follows:

[0053]

[0054] In the formula, υ=0, μ≥0, λ1=1, λ2=1, is the level set gradient;

[0055] Step 12: Remove the edges extended by the mirror in step 5 to restore the image to its original size.

[0056] The effects of the present invention are further described below in conjunction with experiments:

[0057] Table 1 Analysis of the computational complexity of the common CV model and the method of the present invention

[0058]

[0059] It can be clearly seen from Table 1 that the algorithm proposed in this paper significantly improves the speed of coastline extraction from SAR images.

[0060] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the foregoing embodiments. The foregoing embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A coastline detection method for SAR images based on level sets, characterized in that: The steps include: Step 1: Read the image size, set nrow to the number of image rows, and ncol to the number of image columns; Step 2: Create a two-dimensional grid using the x-coordinates defined by the image column matrix and the y-coordinates defined by the row matrix. Step 3: Set the initial evolution curve to a circle with a center of (ncol / 2, nrow / 2) and a radius of 20; Step 4: Initialize the level set as the signed distance function; Step 5: Mirror edge extension; Step 6: Calculate the smooth Dirac function; Step 7: Calculate the curvature K of the evolution curve; Step 8: Regularize the Heaviside function; Step 9: Calculate the optimal foreground and background grayscale mean. If the grayscale value of the current point is close to the foreground value, the level set value of the point will increase accordingly, otherwise it will decrease. Step 10: Set a step size control function to adaptively set the iteration step size of the level set method so that the iteration step size of the level set function increases within a certain range. When the level set function value is greater than 100 or less than -100, the iteration step size is changed from the initial 0.1 to 1, and vice versa. Step 11: Set a level set evolution equation and use it to evolve the evolution curve. If convergence fails, recalculate the evolution equation and re-evolve according to the above steps until the curve converges. Step 12: Remove the edges extended by the mirror image in step 5 to restore the image to its original size; In step 4, the distance from each point in the image to the circle is calculated by the formula to obtain the initialized level set. The formula for calculating the signed distance is: Where: φ(x,y) is the level set function, X is the abscissa of each point in the image, Y is the ordinate of each point in the image, r is the radius of the initial evolution curve 20, jc is the abscissa of the center of the initial evolution curve, and ic is the ordinate of the center of the initial evolution curve; In step 5, a zero matrix is ​​created based on the image size, with 2 added to each row and column, the original image is placed in the center of the zero matrix, and the edges of the image are mirrored and extended; The smooth Dirac function is calculated in step 6, and the calculation formula is: Where: ε is set to a constant of 1, φ is the level set; The curvature K of the evolution curve is calculated in step 7 using the following formula: Where: is the gradient of the level set; The step 8 regularizes the Heaviside function, and the calculation formula is: Where: ε is set to a constant of 1, φ is the level set; Step 9 calculates the optimal foreground and background grayscale mean. If the grayscale value of the current point is close to the foreground value, the level set value of the point increases accordingly, otherwise it decreases. The calculation formula is: Where C1 is the foreground mean, C2 is the background mean, and Ω is R 2 A bounded open subset of For the boundary, For a given image; In step 10, a step size control function is set to adaptively set the iteration step size of the level set method so that the iteration step size of the level set function increases within a certain range. When the level set function value is greater than 100 or less than -100, the iteration step size is changed from the initial 0.1 to 1, and vice versa. The function is as follows: Where a is the initial iteration step, which is set to 0.1 here, b = 100, and φ is the level set; The step 11 sets a level set evolution equation, which is used to evolve the evolution curve. If convergence fails, the evolution equation is recalculated and the evolution is repeated according to the above steps until the curve converges. The function is as follows: In the formula, υ=0, μ≥0, λ1=1, λ2=1, is the level set gradient.

Citation Information

Patent Citations

  • Level set image segmentation method based on self-adaptive parameter

    CN104166991A

  • Ultrasonic Phased Array NDT Image Segmentation Based on Watershed and CV Model

    CN108648199A