An oil film detection method and system based on feature enhancement and hybrid optimization
By extracting multidimensional feature vectors and combining beaver behavior optimization and simulated annealing algorithms for hybrid optimization, the problems of accuracy and real-time performance in oil film detection under complex sea conditions are solved, and efficient oil film region segmentation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN INST OF GUANGDONG OCEAN UNIV
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-09
Smart Images

Figure CN121811087B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and specifically to an oil film detection method and system based on feature enhancement and hybrid optimization. Background Technology
[0002] Oil spills at sea pose a significant threat to the marine environment and severely endanger maritime navigation safety. Therefore, rapid, accurate, and wide-area real-time monitoring of oil slicks on the sea surface is crucial for timely emergency response, controlling pollution spread, and protecting the marine environment and navigation safety. Shipborne navigation radar, a widely deployed active microwave sensor on various types of vessels, offers significant advantages such as all-weather, all-time operation, low cost, wide coverage, and high spatiotemporal resolution. Its physical basis for detecting oil slicks lies in the damping effect of the oil film on microscale fluctuations on the sea surface. On oil-free sea surfaces, capillary waves and short gravity waves (centimeter to decimeter scale) generated by sea breezes strongly scatter radar waves, forming strong sea clutter echoes. However, when an oil film is present, the oil increases the surface tension of the seawater and inhibits the generation and development of these small-scale fluctuations, resulting in a reduction in the effective roughness of the sea surface, thereby significantly weakening the backscattering intensity of radar waves.
[0003] However, in practical applications, achieving reliable and automated oil slick detection using shipborne radar still faces a series of severe challenges: 1) The problem of feature mixing and false alarm suppression: In radar images, dark areas with low backscattering are not unique to oil slicks. Natural phenomena such as wind shadow areas (windless or lightly windy areas), marine biofilms, large areas of smooth ice surfaces, and the attenuation effect of rainfall can all produce visually very similar low-echo areas; in addition, ocean fronts formed by salinity and temperature gradients can also cause changes in echo intensity. How to accurately identify dark areas caused by accidental oil spills (usually thick oil slicks or oil slicks) from these feature-mixing interferences is the primary challenge in reducing false alarm rates and improving detection specificity. 2) Signal processing challenges in complex sea conditions and noisy environments: Radar images themselves are severely affected by speckle noise (inherent in coherent imaging). More importantly, the ocean background is extremely dynamic and complex: the statistical characteristics of sea clutter change nonlinearly with wind speed, wind direction, and wave state; the tracks and wakes of ships themselves can generate bright or dark band interference; strong reflected echoes from other ships, islands, and offshore facilities may cause saturation or obscuring; atmospheric waveguides, rain, snow, fog, and other meteorological conditions can further attenuate or scatter radar waves, distorting echo intensity. These noises and interferences blur the boundaries of oil slick areas and reduce contrast. Traditional image segmentation algorithms (such as segmentation based on fixed thresholds) are not robust enough in complex and variable sea conditions, and are prone to missed detections or missegmentation.
[0004] In summary, utilizing the widely adopted shipborne radar for marine oil spill monitoring has significant practical value and economic benefits. However, designing a real-time and accurate shipborne radar oil film detection method that can effectively distinguish oil films from other low backscattering regions while suppressing noise interference is worthy of further research. Summary of the Invention
[0005] To solve or alleviate one or more of the above-mentioned technical problems, this invention proposes an oil film detection method and system based on feature enhancement and hybrid optimization.
[0006] According to one aspect of the present invention, an oil film detection method based on feature enhancement and hybrid optimization is proposed, the method comprising:
[0007] S1. Extract multidimensional features from the original radar image data that can characterize the physical scattering properties of the oil film;
[0008] S2. Clustering is performed based on the multidimensional features to obtain the oil film region of interest mask;
[0009] S3. Obtain the optimal segmentation threshold using a hybrid optimization algorithm, and use the optimal segmentation threshold to optimize the segmentation of the oil film region of interest mask to obtain a binary oil film mask, thereby obtaining the oil film detection result; wherein, the hybrid optimization algorithm is a beaver behavior optimization algorithm and a simulated annealing algorithm.
[0010] Further, step S1 includes: dividing the original radar image data into multiple image blocks; for each image block, calculating a multidimensional feature vector, wherein the multidimensional feature vector includes backscattering uniformity index features, gradient direction consistency features, and intensity distribution skewness features; constructing a feature matrix from the multidimensional feature vectors of all image blocks, and standardizing each column of the feature matrix; wherein the calculation formula for the backscattering uniformity index features is:
[0011] ;
[0012] in, The backscattering uniformity index feature of the k-th image patch is represented; These are extremely small positive numbers, used to prevent division by zero; This represents the arithmetic mean of the intensity of all pixels within the k-th image block; This represents the variance of the intensity of all pixels within the k-th image patch;
[0013] The formula for calculating the gradient direction consistency feature is:
[0014] ;
[0015] in, This represents the gradient direction consistency feature of the k-th image patch; and These represent the average vectors of the normalized gradient direction vector fields of the k-th image patch in the horizontal x and vertical y directions, respectively.
[0016] The formula for calculating the intensity distribution skewness characteristics is:
[0017] ;
[0018] in, The intensity distribution skewness characteristic of the k-th image patch is represented; P represents the length of each image patch; and represent the total number of pixels in the k-th image block that are greater than the high-intensity empirical threshold and the total number of pixels that are less than the low-intensity empirical threshold, respectively.
[0019] Further, step S2 includes: performing DBSCAN clustering based on the standardized feature matrix to obtain category labels; for each effective cluster of non-noise points, calculating the mean of all image blocks on the backscattering uniformity index feature; arranging all effective clusters in ascending order according to their corresponding mean; selecting the effective cluster with the smallest mean as the candidate oil film cluster; creating a binarized mask matrix of the same size as the original radar image data, initializing all elements in the binarized mask matrix to 0, and resetting all pixel values of the corresponding candidate oil film cluster in the binarized mask matrix to 1; performing morphological processing on the reset binarized mask matrix to obtain the oil film region of interest mask.
[0020] Further, step S3 includes:
[0021] S31. Initialize all parameters and randomly generate an initial population;
[0022] S32. Iterative optimization to obtain the optimal solution, i.e., the optimal segmentation threshold, wherein each iteration includes:
[0023] For each individual in the population, determine whether the fitness values of other individuals are greater than that of the current individual. If they are greater, proceed with migration to generate a new solution. If this new interpretation If the fitness value of the solution is greater than the fitness value of the current global optimum, then update the global optimum to the new solution. And simultaneously update the fitness value corresponding to the global optimal solution to the new solution. The corresponding fitness value;
[0024] Starting from the current globally optimal solution, execute Each simulated annealing local search involves: generating a new simulated annealing solution based on the current solution through adaptive perturbation. The Metropolis criterion is used to determine whether to accept the new solution. If accepted, the current solution is updated to the newly obtained simulated annealing solution. At the same time, update the current fitness value to the new solution of simulated annealing. The corresponding fitness value;
[0025] implement After each simulated annealing local search, if the current fitness value is greater than the fitness value corresponding to the current global optimum, then the global optimum is updated to the current solution, and its corresponding fitness value is the current fitness value.
[0026] Furthermore, the new solution in step S32 The calculation formula is:
[0027] ;
[0028] In the formula, This represents the initial solution for the i-th individual; This represents the initial solution for the j-th individual; , which represents the migration step size.
[0029] Furthermore, in step S32, a new simulated annealing solution is generated based on the current solution through adaptive perturbation. The formula is:
[0030] ;
[0031] In the formula, Indicates the current solution. For the perturbation step size, , Indicates the range of disturbance. T is the temperature. Indicates uniform distribution. This indicates taking the maximum value.
[0032] Furthermore, the value of temperature T in the simulated annealing local search described in step S32 is determined as follows:
[0033] When the simulated annealing algorithm is in a normal search state where global exploration and local exploitation are balanced:
[0034] ;
[0035] in, The initial temperature; This represents the current iteration number; The attenuation coefficient;
[0036] When the simulated annealing algorithm is in an abnormal state of search stagnation:
[0037] ;
[0038] in, Indicates the current temperature; The coefficient of temperature rise, ;
[0039] When the simulated annealing algorithm is in an abnormal state of oversearch:
[0040] ;
[0041] in, To accelerate the cooling coefficient, .
[0042] Furthermore, the triggering condition for the abnormal state of search stagnation is: the number of iterations in step S32 during multiple iterations of optimization in which no better solution is found is greater than or equal to the stagnation threshold; the triggering condition for the abnormal state of search over-extension is: the acceptance rate of inferior solutions is greater than the acceptance rate threshold; wherein, the acceptance rate of inferior solutions is the number of times the fitness decreases in a simulated annealing local search divided by the total number of simulated annealing local searches.
[0043] Furthermore, the formula for calculating the fitness value in step S32 is as follows:
[0044] ;
[0045] in, , , The pre-defined non-negative weight coefficients satisfy the following conditions: ; Indicates within-class variance:
[0046] ;
[0047] Represents the information entropy term:
[0048] ;
[0049] Indicates the term for regional uniformity:
[0050] ;
[0051] in, represents the mean of the foreground pixel set suspected of being an oil slick and the mean of the background pixel set of the sea surface, respectively; Let V represent the variance of the foreground pixel set suspected to be an oil slick and the variance of the background pixel set of the sea surface, respectively. These represent the proportional weights of the number of foreground pixels to the total number of pixels in the region of interest, and the proportional weights of the number of background pixels to the total number of pixels in the region of interest, respectively.
[0052] According to another aspect of the present invention, an oil film detection system based on feature enhancement and hybrid optimization is proposed, the system being used to execute the oil film detection method based on feature enhancement and hybrid optimization described above; the system includes:
[0053] The feature extraction module is used to extract multidimensional features that characterize the physical scattering properties of the oil film from the raw radar image data;
[0054] The region of interest extraction module is used to perform clustering based on the multidimensional features to obtain an oil film region of interest mask.
[0055] The oil film detection module is used to obtain the optimal segmentation threshold using a hybrid optimization algorithm, and to optimize the segmentation of the oil film region of interest mask using the optimal segmentation threshold to obtain a binary oil film mask, thereby obtaining the oil film detection result; wherein, the hybrid optimization algorithm is a beaver behavior optimization algorithm and a simulated annealing algorithm.
[0056] The beneficial technical effects of this invention are:
[0057] This invention features high robustness and low false alarm rate: by extracting and fusing multi-dimensional features characterizing the physical scattering properties of oil films for unsupervised clustering, it effectively distinguishes easily confused low-scattering regions such as oil films and calm sea surfaces from a mechanistic perspective, significantly improving discrimination ability and anti-interference capability; this invention also boasts high segmentation accuracy and strong adaptability: within a narrowed region of interest, a hybrid optimization algorithm guided by a comprehensive fitness function that fuses multiple indicators adaptively seeks the optimal segmentation threshold, achieving refined segmentation of oil film boundaries; this invention offers high processing efficiency and meets real-time requirements: employing a two-stage architecture of "coarse extraction + fine segmentation," it significantly reduces the amount of data required for fine processing; combining a hybrid optimization strategy of global exploration and local optimization, it converges rapidly, meeting the real-time requirements of shipborne systems; this invention requires no large number of labeled samples: based on unsupervised clustering and optimization, it does not rely on a large amount of labeled data for training, exhibiting strong adaptability to unknown scenarios. Attached Figure Description
[0058] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example, not limitation, in which:
[0059] Figure 1 This is a flowchart of an oil film detection method based on feature enhancement and hybrid optimization according to an embodiment of the present invention;
[0060] Figure 2This is an example of the original radar image in an embodiment of the present invention;
[0061] Figure 3 This is an example of an oil film region of interest mask in an embodiment of the present invention;
[0062] Figure 4 This is an example of a binary mask for oil film in an embodiment of the present invention;
[0063] Figure 5 This is a schematic diagram of the structure of an oil film detection system based on feature enhancement and hybrid optimization according to an embodiment of the present invention. Detailed Implementation
[0064] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0065] This invention aims to overcome the shortcomings of existing technologies and provide a robust, real-time, and accurate method for detecting oil films using shipborne radar. This method can effectively distinguish oil films from other low backscattering regions and suppress noise interference.
[0066] This invention proposes an oil film detection method based on feature enhancement and hybrid optimization, such as... Figure 1 As shown, the method includes:
[0067] S1. Extract multidimensional features from the original radar image data that can characterize the physical scattering properties of the oil film;
[0068] S2. Clustering is performed based on the multidimensional features to obtain the oil film region of interest mask;
[0069] S3. Obtain the optimal segmentation threshold using a hybrid optimization algorithm, and use the optimal segmentation threshold to optimize the segmentation of the oil film region of interest mask to obtain a binary oil film mask, thereby obtaining the oil film detection result; wherein, the hybrid optimization algorithm is a beaver behavior optimization algorithm and a simulated annealing algorithm.
[0070] First, in S1, multidimensional features that characterize the physical scattering properties of the oil film are extracted from the original radar image data. This includes dividing the original radar image data into multiple image blocks, and calculating a multidimensional feature vector for each image block. The multidimensional feature vector includes backscattering uniformity index features, gradient direction consistency features, and intensity distribution skewness features.
[0071] According to an embodiment of the present invention, the core idea of this stage is to extract features that can characterize the unique physical scattering properties of the oil film from radar images, rather than simply relying on grayscale information, so as to lock onto suspicious targets in complex backgrounds.
[0072] Specifically, for an input intensity image of a single frame from the shipborne radar, such as Figure 2 As shown, it is denoted as a matrix. Where H represents the image height (number of pixels) and W represents the image width (number of pixels). Represent the real number space. Divide the image I into N... b There are P×P non-overlapping blocks of size P, where P represents the block size and is an integer (e.g., P=8). This represents the number of complete blocks that the image can hold in the height direction. This indicates the number of complete blocks that the image can fit in the width direction. Let be the total number of image blocks. The k-th image block is denoted as . where k=1,2, …,N b .
[0073] For each image patch Calculate a three-dimensional feature vector .
[0074] 1) Feature 1: Backscattering homogeneity index feature - :
[0075] ;
[0076] in, This is a very small positive number used to prevent division by zero. The larger this value is, the more uniform the backscattering in the region. Representation block The arithmetic mean of the intensities of all pixels; For block The variance of the intensity of all pixels.
[0077] 2) Feature 2: Gradient direction consistency feature - :
[0078] First, compute blocks The gradient matrices in the horizontal x-direction and the vertical y-direction are: and Then, the normalized gradient direction vector fields in the horizontal x-direction and the vertical y-direction are calculated. and :
[0079] ;
[0080] ;
[0081] Among them, elements Indicates position The horizontal gradient at that point ;element Indicates the location The vertical gradient at the given point. Finally, the average vector of the normalized gradient direction vector fields in the horizontal x and vertical y directions is calculated. and And find its modulus as a feature:
[0082] ;
[0083] ;
[0084] 3) Feature 3: Skewness in intensity distribution - :
[0085] First, calculate the high and low thresholds:
[0086]
[0087]
[0088] in, and These represent the high-intensity empirical threshold and the low-intensity empirical threshold based on intra-block statistics, respectively.
[0089] Then, the pixel intensity distribution is statistically analyzed. Let represent the total number of pixels in the k-th image patch that are greater than the high-intensity empirical threshold and the total number of pixels that are less than the low-intensity empirical threshold, respectively.
[0090] ;
[0091] ;
[0092] Finally, calculate the features:
[0093] .
[0094] All extracted feature vectors are used to construct a feature matrix. Perform Z-score normalization on each column of F (i.e., each feature dimension):
[0095] ;
[0096] in, It is the mean of the d-th feature. Let be the standard deviation of the d-th feature. The standardized feature matrix is denoted as . .
[0097] Then, in S2, clustering is performed based on the multidimensional features to obtain the oil film region of interest mask.
[0098] According to an embodiment of the present invention, the standardized feature matrix is... The DBSCAN clustering algorithm is applied. After clustering, the category labels are obtained. L k = -1 indicates a noise point, L k ≥0 indicates a cluster label. For each valid cluster c at a non-noise point, calculate the mean of all its blocks on the backscattering uniformity exponential feature:
[0099] ;
[0100] The effective clusters are sorted in ascending order of their mean (i.e., uniformity from poorest to best); the cluster with the smallest mean (i.e., the least uniform cluster) is selected as the candidate oil film cluster, and its label is denoted as c. oil .
[0101] Create a binary mask matrix of the same size as the original image. ; Initialize all its elements to 0; For all satisfying L k =c oil The block (i.e., all pixels corresponding to the candidate oil film cluster) will All pixel values in the corresponding region are set to 1. Then, for... Morphological processing is performed to obtain the final ROI mask (oil film region of interest mask), such as... Figure 3 As shown.
[0102] Then, in S3, a hybrid optimization algorithm is used to obtain the optimal segmentation threshold, and the optimal segmentation threshold is used to optimize the segmentation of the oil film region of interest mask to obtain the oil film binary mask, thereby obtaining the oil film detection result; wherein, the hybrid optimization algorithm is the beaver behavior optimization algorithm and the simulated annealing algorithm.
[0103] According to an embodiment of the present invention, the goal of this stage is to find the optimal grayscale threshold within the ROI region to achieve accurate separation of the oil film from the background (such as slightly stronger sea clutter) and convert the result into a PPI view.
[0104] First, based on the morphologically processed ROI mask Extract the pixel intensity values of all pixels marked as regions of interest from the original image I to form a set:
[0105] ;
[0106] remember .
[0107] Beaver Behavior Optimizer (BBO) is a metaheuristic optimization algorithm inspired by the intelligent behavior of beaver groups in nature. This algorithm simulates the collective cooperation and information sharing mechanisms of beaver groups in the process of finding and improving habitats, mapping the solution space of the optimization problem to the habitat locations of the beavers, and achieving population evolution through transfer learning among individuals. In its implementation, the algorithm maintains a population consisting of multiple candidate solutions. Each beaver individual represents a potential solution and has a corresponding fitness value. Individuals with lower fitness learn from individuals with higher fitness, updating their own positions through three different transfer strategies: forward learning (fully adopting excellent solutions), backward learning (trying the opposite direction), and maintaining the status quo, thereby efficiently exploring the solution space. The core advantage of BBO lies in its simple yet effective parallel search mechanism, which can quickly converge to promising solution regions in the early stages of optimization. It is particularly suitable for handling complex optimization problems requiring global exploration, such as threshold optimization in oil film detection.
[0108] Simulated Annealing (SA) is a probabilistic optimization algorithm that simulates the annealing process of metal heat treatment. It draws inspiration from the physical phenomenon that particles in solid materials undergo intense thermal motion at high temperatures, gradually becoming more ordered and stable as the temperature decreases. The algorithm manages the balance between exploration and exploitation during the search process by introducing temperature as a key control parameter: at high temperatures, the algorithm accepts inferior solutions with a high probability, exploring a large solution space to avoid getting trapped in local optima; as the temperature gradually decreases according to a specific cooling schedule, the probability of accepting inferior solutions decreases, and the algorithm gradually shifts to finely exploring the neighborhood of high-quality solutions, eventually converging to the global optimum or near-optimal solution. This process is precisely controlled by the Metropolis criterion, which calculates the acceptance probability based on the energy difference (fitness difference) between the current solution and a new solution and the current temperature, achieving a smooth transition from random search to deterministic convergence. SA is renowned for its powerful local search capabilities and unique mechanism for escaping local optima, making it particularly suitable for solving complex optimization problems with multiple local extrema.
[0109] This invention combines the beaver behavior optimization algorithm and the simulated annealing algorithm to form a hybrid optimization algorithm, and improves upon it. The process of obtaining the optimal segmentation threshold using the hybrid optimization algorithm is as follows.
[0110] 1) Initialize all parameters and randomly generate the initial population: Set the population size S. pop Maximum number of iterations I max Initial temperature T0, temperature coefficient SA inner loop count I sa Randomly generate the initial population: ,in , Indicate a uniform distribution; and calculate the initial optimal threshold t. best and its optimal fitness J best .
[0111] 2) Iterative optimization to obtain the optimal solution, i.e., the optimal segmentation threshold. Each iteration includes:
[0112] 21) BBO migration operation (population co-evolution)
[0113] For the i-th individual in the population (threshold t) i ), randomly select an individual (j≠i), if If the condition is met, then migration will proceed. A random migration step size will be generated. The migration then produces a new solution. :
[0114] ;
[0115] In the formula, This represents the initial solution for the i-th individual; This represents the initial solution for the j-th individual;
[0116] Subsequently, the new interpretation Perform boundary constraint processing to ensure it remains within the effective range:
[0117] ;
[0118] If fitness value Then use the new solution. Replace the initial solution .
[0119] During the BBO migration phase, each individual in the population... By learning from better individuals, a new candidate solution is generated. If the new solution is better, then replace the original individual with it. During this process, the globally optimal solution (threshold) is checked and updated synchronously. If this new interpretation If the fitness value of the solution is greater than the fitness value of the current global optimum, then update the global optimum to the new solution. And simultaneously update the fitness value corresponding to the global optimal solution to the new solution. The corresponding fitness value.
[0120] 22) Local refinement of SA (depth search around the optimal solution)
[0121] The current globally optimal solution obtained from the previous stage update Starting from the point, execute The simulated annealing (SA) local search is performed, and the process is continuously updated. The process is as follows:
[0122] Set the current solution = Current fitness J cur =J best J best This represents the fitness value corresponding to the global optimal solution; during the inner loop of SA, the fitness value is determined by the current solution. Based on this, a new solution is generated through adaptive perturbation. The Metropolis criterion is used to determine whether to accept the new solution; if accepted, the current solution is updated. Synchronously update fitness values (The fitness value corresponding to the newly generated solution). After the inner loop of SA ends, if If the current fitness value is greater than the fitness value of the global optimum, then update the global optimum to the current solution, and its corresponding fitness value is the current fitness value. .
[0123] The adaptive perturbation process is as follows:
[0124] Calculate the disturbance range : Where T is the temperature. Generate a new solution. And the new solution will be clamped to: :
[0125] ;
[0126] in, Let SA be the perturbation step size. .
[0127] The Metropolis acceptance criterion is: calculating the change in fitness. : ;like or random number Then accept the new solution: , ;like Then let , .
[0128] The hybrid optimization algorithm combining BBO and SA fully leverages the complementary advantages of both algorithms, forming an efficient global-local collaborative search mechanism. BBO, as the global explorer, utilizes its population-parallel search and information-sharing characteristics to quickly scan the entire solution space, locating promising high-quality solution regions and providing high-quality initial solutions for subsequent refined searches. This effectively overcomes the SA algorithm's sensitivity to initial solutions and its potential inability to find the global optimum in complex solution spaces due to a poor starting point. SA, as the local optimizer, builds upon the high-quality starting point provided by BBO, utilizing its temperature-controlled refined search capabilities and the Metropolis criterion's inferior solution acceptance mechanism to deeply mine the local solution space. This allows it to accurately find the optimal solution while avoiding local optimum traps by accepting moderately inferior solutions. This collaborative architecture achieves a perfect combination of "coarse screening" and "refinement": BBO's fast convergence compensates for SA's shortcomings in global search, while SA's local refinement capabilities compensate for BBO's deficiencies in solution accuracy. In practical applications such as oil film detection threshold optimization, which require balancing search efficiency and accuracy, the BBO-SA hybrid algorithm demonstrates significantly better performance than a single algorithm, ensuring both real-time requirements and high-precision segmentation.
[0129] The fitness function in the hybrid optimization algorithm is designed as follows.
[0130] For candidate thresholds , will set Divided into two subsets: foreground (potential oil film) set: Background (sea surface) collection: First, calculate the mean of the foreground pixel set of suspected oil films. The mean of the set of background pixels of the sea surface Variance of the foreground pixel set suspected of being an oil film The variance of the set of background pixels of the sea surface ; Calculate the weighted proportion of foreground pixels to the total number of pixels in the region of interest. The weight of the proportion of background pixels to the total number of pixels in the region of interest. :
[0131] ;
[0132] Define the comprehensive fitness function for:
[0133] ;
[0134] in, , , The pre-defined non-negative weight coefficients satisfy the following conditions: The distribution of the three sub-functions is as follows:
[0135] Within-class variance:
[0136] ;
[0137] Information entropy term:
[0138] ;
[0139] Regional uniformity term:
[0140] .
[0141] This invention further proposes an improved simulated annealing (SA) dynamic temperature update strategy. Traditional simulated annealing algorithms use a fixed cooling schedule, much like a pre-programmed constant-temperature oven, making it difficult to adapt to the dynamic search requirements of different optimization problems. Therefore, this invention proposes a state-aware adaptive temperature update strategy. The core idea of this strategy is to monitor the algorithm's search state in real time and intelligently switch between three cooling modes, thereby achieving a self-balancing effect between global exploration and local development.
[0142] To dynamically perceive the search state of the algorithm, two key variables are first defined and maintained: 1) Stagnation counter : This value is used to record the number of times the algorithm has failed to find a better solution in consecutive iterations. An increase in this value indicates that the search may have plateaued or reached a local optimum; 2) Inferior solution acceptance counter A count This is used to count the number of poor solutions accepted that lead to a decrease in fitness within the current round of simulated annealing (SA). It directly reflects the activity level of the algorithm in random exploration at the current temperature.
[0143] Based on the above state variables, the strategy dynamically selects and executes one of three temperature update modes:
[0144] 1) Heating Mode (Actively Exiting Local Optimum):
[0145] Triggering condition: When ( For example, the stagnation threshold If this occurs, it indicates that the algorithm may have lingered in the current region for too long, resulting in an abnormal state of search stagnation. Perform heating mode calculations:
[0146] ;
[0147] in, The coefficient of temperature rise, For example, 1.1. Increasing the temperature aims to expand the search step size, helping the algorithm escape potentially localized optima. The stall counter is then immediately reset to zero (S). stag =0).
[0148] 2) Accelerated Cooling Mode (Actively Guided Efficient Convergence):
[0149] Triggering condition: If the heating mode is not triggered, calculate the acceptance rate of the inferior solution in the current SA inner loop. ;when ( For example, the acceptance rate threshold When the value reaches 0, it indicates that the algorithm has performed a relatively sufficient random exploration at the current temperature, but is in an abnormal state of over-search. Execute accelerated cooling mode calculation:
[0150] ;
[0151] in, To accelerate the cooling coefficient, For example, 0.85. Accelerated cooling aims to enable the algorithm to shift from the global exploration phase to the local development phase more quickly, thereby improving convergence efficiency.
[0152] 3) Standard nonlinear cooling mode (maintaining equilibrium search):
[0153] Triggering condition: When neither of the two state-based modes mentioned above is triggered, it indicates that the algorithm is in a stable and healthy search process, i.e., in a balanced search state between global exploration and local development. A designed, gentle nonlinear formula is used for cooling:
[0154] ;
[0155] in, The initial temperature. This represents the current iteration number. This is the attenuation coefficient, for example, 0.99. This mode serves as the default "cruise" state, providing a stable and reliable convergence foundation for the entire adaptive strategy.
[0156] To ensure the accuracy of state monitoring, the strategy updates the two core state variables according to the following rules: After each main iteration (one BBO-SA co-optimization loop), the system checks whether the global optimum has been improved: if the global optimum has not been updated, then... Record this "no progress" iteration; if improvement is achieved, indicating the search is effective, reset. Clear stalled records. Reset at the start of each SA loop. Subsequently, during the execution of this inner loop, whenever the algorithm accepts a less desirable solution with a lower fitness value according to the Metropolis criterion, .
[0157] The improved simulated annealing (SA) dynamic temperature update strategy abandons the fixed cooling schedule in the traditional simulated annealing algorithm. Through the dual feedback mechanism of "stagnation perception → temperature rise jump" and "acceptance rate perception → dynamic cooling", the algorithm can adaptively adjust its search behavior, thereby significantly improving the convergence speed and solution accuracy while ensuring global search capability.
[0158] Using the optimal segmentation threshold The oil film region of interest mask is optimized and segmented to obtain a binary oil film mask. To obtain oil film detection results, such as Figure 4 As shown.
[0159] This invention also proposes an oil film detection system based on feature enhancement and hybrid optimization, which is used to execute the oil film detection method based on feature enhancement and hybrid optimization described in the above embodiments; as follows Figure 5 As shown, the system includes:
[0160] Feature extraction module 510 is used to extract multidimensional features that can characterize the physical scattering properties of oil film from the original radar image data;
[0161] The region of interest extraction module 520 is used to perform clustering based on the multidimensional features to obtain an oil film region of interest mask.
[0162] The oil film detection module 530 is used to obtain the optimal segmentation threshold using a hybrid optimization algorithm, and to optimize the segmentation of the oil film region of interest mask using the optimal segmentation threshold to obtain a binary oil film mask, thereby obtaining the oil film detection result; wherein, the hybrid optimization algorithm is a beaver behavior optimization algorithm and a simulated annealing algorithm.
[0163] The function of the oil film detection system based on feature enhancement and hybrid optimization described in this embodiment of the invention can be explained by the aforementioned oil film detection method based on feature enhancement and hybrid optimization. Therefore, for the parts not described in detail in the system embodiment, please refer to the above method embodiment, and they will not be repeated here.
[0164] While the spirit and principles of the invention have been described with reference to several specific embodiments, it should be understood that the invention is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for ease of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. An oil film detection method based on feature enhancement and hybrid optimization, characterized in that, include: S1. Extracting multidimensional features characterizing the physical scattering properties of the oil film from the original radar image data; including: dividing the original radar image data into multiple image blocks; calculating a multidimensional feature vector for each image block, wherein the multidimensional feature vector includes backscattering uniformity index features, gradient direction consistency features, and intensity distribution skewness features; constructing a feature matrix from the multidimensional feature vectors of all image blocks, and standardizing each column of the feature matrix; wherein the calculation formula for the backscattering uniformity index feature is: ; in, The backscattering uniformity index feature of the k-th image patch is represented; These are extremely small positive numbers, used to prevent division by zero; This represents the arithmetic mean of the intensity of all pixels within the k-th image block; This represents the variance of the intensity of all pixels within the k-th image patch; The formula for calculating the gradient direction consistency feature is: ; in, This represents the gradient direction consistency feature of the k-th image patch; and These represent the average vectors of the normalized gradient direction vector fields of the k-th image patch in the horizontal x and vertical y directions, respectively. The formula for calculating the intensity distribution skewness characteristics is: ; in, The intensity distribution skewness characteristic of the k-th image patch is represented; P represents the length of each image patch; Let represent the total number of pixels in the k-th image patch that are greater than the high-intensity empirical threshold and the total number of pixels that are less than the low-intensity empirical threshold, respectively; where the high-intensity empirical threshold is... and the low intensity empirical threshold The calculation is as follows: ; ; S2. Clustering is performed based on the multidimensional features to obtain the oil film region of interest mask; S3. Obtain the optimal segmentation threshold using a hybrid optimization algorithm, and use the optimal segmentation threshold to optimize the segmentation of the oil film region of interest mask to obtain a binary oil film mask, thereby obtaining the oil film detection result; wherein, the hybrid optimization algorithm is a beaver behavior optimization algorithm and a simulated annealing algorithm.
2. The oil film detection method based on feature enhancement and hybrid optimization according to claim 1, characterized in that, Step S2 includes: performing DBSCAN clustering based on the standardized feature matrix to obtain category labels; for each effective cluster of non-noise points, calculating the mean of all image blocks on the backscattering uniformity index feature; sorting all effective clusters in ascending order according to their corresponding mean; selecting the effective cluster with the smallest mean as the candidate oil film cluster; creating a binarized mask matrix of the same size as the original radar image data, initializing all elements in the binarized mask matrix to 0, and resetting all pixel values of the corresponding candidate oil film cluster in the binarized mask matrix to 1; performing morphological processing on the reset binarized mask matrix to obtain the oil film region of interest mask.
3. The oil film detection method based on feature enhancement and hybrid optimization according to claim 1, characterized in that, Step S3 includes: S31. Initialize all parameters and randomly generate the initial population; S32. Iterative optimization to obtain the optimal solution, i.e., the optimal segmentation threshold, wherein each iteration includes: For each individual in the population, determine whether the fitness values of other individuals are greater than that of the current individual. If they are greater, proceed with migration to generate a new solution. If this new interpretation If the fitness value of the solution is greater than the fitness value of the current global optimum, then update the global optimum to the new solution. And simultaneously update the fitness value corresponding to the global optimal solution to the new solution. The corresponding fitness value; Starting from the current globally optimal solution, execute Each simulated annealing local search involves: generating a new simulated annealing solution based on the current solution through adaptive perturbation. The Metropolis criterion is used to determine whether to accept the new solution. If accepted, the current solution is updated to the newly obtained simulated annealing solution. At the same time, update the current fitness value to the new solution of simulated annealing. The corresponding fitness value; implement After each simulated annealing local search, if the current fitness value is greater than the fitness value corresponding to the current global optimum, then the global optimum is updated to the current solution, and its corresponding fitness value is the current fitness value.
4. The oil film detection method based on feature enhancement and hybrid optimization according to claim 3, characterized in that, New solution in step S32 The calculation formula is: ; In the formula, This represents the initial solution for the i-th individual; This represents the initial solution for the j-th individual; , which represents the migration step size.
5. The oil film detection method based on feature enhancement and hybrid optimization according to claim 3, characterized in that, Step S32 describes generating a new simulated annealing solution based on the current solution through adaptive perturbation. The formula is: ; In the formula, Indicates the current solution. For the perturbation step size, , Indicates the range of the disturbance. T is the temperature. Indicates uniform distribution. This indicates taking the maximum value.
6. The oil film detection method based on feature enhancement and hybrid optimization according to claim 5, characterized in that, The value of temperature T in the simulated annealing local search described in step S32 is determined as follows: When the simulated annealing algorithm is in a normal search state where global exploration and local exploitation are balanced: ; in, The initial temperature; This represents the current iteration number; The attenuation coefficient; When the simulated annealing algorithm is in an abnormal state of search stagnation: ; in, Indicates the current temperature; The coefficient of temperature rise, ; When the simulated annealing algorithm is in an abnormal state of oversearch: ; in, To accelerate the cooling coefficient, .
7. The oil film detection method based on feature enhancement and hybrid optimization according to claim 6, characterized in that, The triggering condition for the abnormal state of search stagnation is: the number of iterations in step S32 during multiple iterations of optimization in which no better solution is found is greater than or equal to the stagnation threshold; the triggering condition for the abnormal state of search over-extension is: the acceptance rate of inferior solutions is greater than the acceptance rate threshold; wherein, the acceptance rate of inferior solutions is the number of times the fitness decreases in a simulated annealing local search divided by the total number of simulated annealing local searches.
8. The oil film detection method based on feature enhancement and hybrid optimization according to claim 3, characterized in that, The formula for calculating the fitness value in step S32 is as follows: ; in, , , The pre-defined non-negative weight coefficients satisfy the following conditions: ; Indicates within-class variance: ; Represents the information entropy term: ; Indicates the term for regional uniformity: ; in, represents the mean of the foreground pixel set suspected of being an oil slick and the mean of the background pixel set of the sea surface, respectively; Let V represent the variance of the foreground pixel set suspected to be an oil slick and the variance of the background pixel set of the sea surface, respectively. These represent the proportional weights of the number of foreground pixels to the total number of pixels in the region of interest, and the proportional weights of the number of background pixels to the total number of pixels in the region of interest, respectively.
9. An oil film detection system based on feature enhancement and hybrid optimization, characterized in that, The system is used to execute the oil film detection method based on feature enhancement and hybrid optimization as described in any one of claims 1-8; the system includes: The feature extraction module is used to extract multidimensional features that characterize the physical scattering properties of the oil film from the raw radar image data; The region of interest extraction module is used to perform clustering based on the multidimensional features to obtain an oil film region of interest mask. The oil film detection module is used to obtain the optimal segmentation threshold using a hybrid optimization algorithm, and to optimize the segmentation of the oil film region of interest mask using the optimal segmentation threshold to obtain a binary oil film mask, thereby obtaining the oil film detection result; wherein, the hybrid optimization algorithm is a beaver behavior optimization algorithm and a simulated annealing algorithm.