Oil film segmentation method based on GCN-IGJO
By introducing the GCN-IGJO method and optimizing the threshold search process, the problem of insufficient segmentation accuracy and robustness of traditional oil film segmentation methods under complex sea conditions is solved, and accurate identification of oil film regions is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-18
- Publication Date
- 2026-06-12
AI Technical Summary
Traditional oil film segmentation methods lack sufficient segmentation accuracy and robustness under complex sea conditions, making it difficult to accurately identify oil film areas.
We employ a GCN-IGJO-based oil film segmentation method, which improves threshold search efficiency and robustness by designing a time-varying low-threshold reward function and a dynamic energy decay strategy, combined with a male/female golden jackal collaborative guidance mechanism, optimizing inter-class variance and class balance constraints.
It significantly improves segmentation accuracy and feature representation capabilities, enhances the method's robustness to complex sea conditions and noise interference, and enables more accurate identification of oil slick areas.
Smart Images

Figure CN122200029A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing and target extraction technology, and in particular to an oil film segmentation method based on GCN-IGJO. Background Technology
[0002] Achieving rapid and accurate identification of oil slicks from marine oil spills is of significant research value and application importance for improving emergency response capabilities and controlling pollution damage. Traditional oil slick segmentation methods often face challenges in processing radar images under complex sea conditions, particularly in terms of feature extraction sufficiency and adaptive optimization of segmentation thresholds, potentially leading to insufficient segmentation accuracy and weak robustness. To address these issues, this paper proposes an oil slick segmentation method based on graph convolutional networks and improved Golden Jackal Optimization (GCN-IGJO), which can more accurately and robustly search for the optimal segmentation threshold, ultimately achieving precise identification of oil slick regions. Summary of the Invention
[0003] To address this, the present invention provides an oil film segmentation method based on GCN-IGJO. This method significantly improves the threshold search efficiency and robustness by designing a time-varying low-threshold reward function and a dynamic energy decay strategy, combined with a male / female golden jackal collaborative guidance mechanism, optimizing inter-class variance and class balance constraints.
[0004] To achieve the above objectives, the present invention provides an oil film segmentation method based on GCN-IGJO, comprising: Step S1: Acquire the original radar image and preprocess the original radar image to generate a preprocessed image; Step S2: Construct a sparse adjacency matrix for the preprocessed image. ; Step S3, construct the degree matrix The sparse adjacency matrix Normalization generates a normalized adjacency matrix For the normalized adjacency matrix Perform graph convolution operations and output the node feature matrix; Step S4: Using the node feature matrix of each pixel output by the graph convolutional network as input, clustering is performed using the K-means algorithm. The K-means algorithm divides the node feature matrix into 3 clusters and assigns a cluster label to each vector, outputting the segmentation result. Morphological post-processing is performed using binarization and filtering methods. The cluster with the lowest gray value is selected as the target region. Image holes in the target region are filled, and area opening is performed. Connected regions with areas smaller than a preset area value are removed, achieving preliminary region of interest extraction. The image of the preliminary region of interest is then cropped, retaining the ROI image within a preset pixel distance. The segmentation result for In the formula: The number of clusters, For the first Class center, For pixels The graph convolution features; Step S5: Classify the ROI image to identify oil film regions. Use the IGJO algorithm for threshold classification, extract preliminary oil film regions based on the lowest threshold, and perform noise removal and hole filling on the preliminary oil film regions to obtain a complete oil film extraction image. Complete oil film extraction results R ( i )for In the formula: It is the grayscale value of a single pixel. T 1 represents the smaller optimal threshold calculated iteratively by the IGJO algorithm.
[0005] Further, step S1 includes: Step S101: Set the azimuth angle as the abscissa of the Cartesian coordinate system, and set the detection distance as the ordinate of the Cartesian coordinate system. Step S102: Transform the polar coordinate system of the original radar image into a Cartesian coordinate system to generate a coordinate image; Step S103: Scale the coordinate image using a preset scaling factor to generate a preprocessed image.
[0006] Further, step S2 includes: Step S201: Construct a three-dimensional feature vector based on each pixel in the preprocessed image, denoted as the center pixel. Select all the center pixels. Constructing the characteristic matrix ,Right now ,in, It is the grayscale value of a single pixel before normalization. , They are pixels The row and column coordinates; Step S202, using each pixel respectively Center pixel Take the center pixel Adjacent local Pixels are used as neighborhoods to determine the area excluding the center pixel. The 24 neighboring pixels outside are neighboring pixels. center pixel With each neighboring pixel Feature space Euclidean distance Calculated using the following formula: , in, It is the grayscale value of a single pixel before normalization. , They are pixels The row and column coordinates; Step S203: Use a Gaussian kernel function to convert the Euclidean distance into similarity weights. , Calculated using the following formula: in, Let be the Gaussian kernel bandwidth parameter, and exp(▪) be the natural exponential function. For the number of pixels, It is the set of adjacent pixels; Step S204, in each pixel Within the neighborhood of each pixel, select the distance from each pixel. smallest A set of adjacent pixels is denoted as the set of adjacent pixels. The adjacency matrix elements that meet the nearest neighbor pixel condition are... The set is defined as a sparse adjacency matrix. sparse adjacency matrix Calculated using the following formula: , in, It is a pixel The adjacency matrix element, which is related to They are completely symmetric and together form a real symmetric matrix. , It is the distance in pixels. smallest The set of neighboring pixels of a pixel, where N is the total number of pixels in the image.
[0007] Further, step S3 includes: Step S301, Degree Matrix Through formula The structure is constructed, where `diag(▪)` is a diagonalization operation used to transform a vector into a diagonal matrix, and N is the total number of pixels in the image. To maintain numerical stability, a constant is taken as... , It is the identity matrix; Step S302, Degree Matrix The sparse adjacency matrix Normalization generates a normalized adjacency matrix ; in , Normalized adjacency matrix Calculated using the following formula: , Step S303, confirm For the first Layer node feature matrix, where, For the first The feature dimension of the layer, where N is the total number of pixels in the image. The number of layers in a graph convolutional network. No. The layer node feature matrix is calculated using the following formula: , in, Let be the residual connectivity coefficient, and take . , For learnable weights, where the input layer Only the first column is used as the normalized grayscale value, and the rest of the columns are 0; Step S304: After several graph convolution operations with a preset output dimension, the ReLU activation function is used to achieve high-order feature separation. , in, x It is the feature value of each pixel obtained after performing graph convolution operation.
[0008] Further, step S5 includes: Step S501, define the set of non-background pixels ,set up Select the optimal threshold vector based on the number of non-background pixels. ,in , and These are different thresholds for classifying the extracted ROI image, for any pixel value. The fitness function is designed, and statistics for each category are defined, including the number of pixels per category. Category weight Category Mean Compared with the population mean : , , , , The `class` function is used to classify each pixel, assigning the p-th pixel to the k-th class. Step S502: The standard Otsu inter-class variance algorithm is used as the basis for the fitness function, combined with the set balance penalty term. As an inter-class variance coefficient to prevent extreme splits during Otsu's algorithm iteration: , in, It is the inter-class variance, reflecting the differences between different classes. , in, This is a newly defined function used as coefficients to correct the overall tendency to maximize inter-class variance, thereby improving the segmentation performance of small targets. It is a natural exponential function. and These are respectively determined by the threshold and The weights of the regions with the lowest and second lowest gray values after segmentation.
[0009] A time-varying low-threshold reward function is added to the fitness function, and a reward term positively correlated with the number of iterations is introduced into the standard Otsu inter-class variance objective, guiding the algorithm to continuously move towards a solution space with a lower threshold. , Here, t represents the time-varying reward coefficient, where t is the current iteration number. To define the maximum number of iterations: , , The final formula for the overall fitness function is as follows: ; Step S503: Using the IGJO algorithm, a low-threshold biased initialization strategy is adopted to change the original algorithm's uniform random initialization method in the solution space. 70% of the population individuals are focused on searching in the low grayscale range, while the remaining 30% are searched across the entire range. Algorithm parameters are then set, with the population size set to... Set the lower bound of the search space. With the upper realm : , , in, , The initialization strategy is for the first... pixels, threshold vector is It initializes with a 70% probability in the low grayscale range and a 30% probability in the full range. To select probabilities during the initialization phase in the low grayscale range. To select probabilities during the full-range initialization phase, as shown in the formula: , For each pixel The threshold values First, escape energy. With low threshold bias factor Computation serves as the basis for separating iterative strategies: , , , The iterative process is divided into an exploration phase, a development phase, and a late-stage forced development phase. In the exploration phase, a low-threshold biased symmetric Levy flight strategy is used to ensure the diversity of random jumps and the directionality of target region convergence during global exploration. Exploration phase, i.e. With probability Perform low-threshold exploration; otherwise, perform standard exploration. Choose probabilities for the exploration phase. , , in, and These represent the threshold values for simulated male and female golden jackals. To escape energy, t is the number of iterations. The probability of male and female selection during the exploration phase. For the exploration phase, random numbers, It is a low threshold bias factor. It follows a normal distribution between (0,1). , ,in for The standard deviation of the normal distribution it follows The step size that influences the generation of the Levy distribution is taken as an empirical value of 1.5. Development phase, i.e. With probability Perform low-threshold development; otherwise, perform standard development. For the development phase probability, , ,in, and These represent the threshold values for simulated male and female golden jackals. To escape energy, t is the number of iterations. The probability of male and female selection during the development phase. Random numbers for the development phase. It is a low threshold bias factor. It follows a normal distribution between (0,1). Later forced exploration phase The later-stage forced exploration mechanism injects randomness when the algorithm stalls, executing with a 20% probability on a global scale. , in, This is the temporary trial solution generated after the perturbation. This is the current optimal solution. To force random numbers during the exploration phase, To enforce the selection of probabilities during the exploration phase, this refers to a 20% probability of applying this formula for perturbation. It follows a normal distribution between (0,1). If at this time ,but , Apply boundary constraints and sorting constraints to the threshold values to ensure that the thresholds fall within the specified upper and lower bounds and ensure that... , , , Where max is the maximum value, min is the minimum value, L is the lower bound of the algorithm, U is the upper bound of the algorithm, sort is the function to sort the thresholds, and the relationship between T1 and T2 is specified. Step S504: Calculate the optimal threshold iteratively using the IGJO algorithm. The initial oil film region is extracted based on the lowest threshold, and noise removal and hole filling are performed on the initial oil film region to obtain a complete oil film extraction map.
[0010] Compared with existing technologies, the advantages of this invention are: high segmentation accuracy and strong feature representation capability. This method innovatively introduces a graph convolutional network, treating image pixels as graph nodes. By aggregating the grayscale and spatial neighborhood information of pixels, the original single grayscale value is transformed into a high-order 16-dimensional semantic feature vector. This more profoundly represents the categorical essence of pixels than traditional methods that directly use the original pixel values or manually separate features, laying a solid feature foundation for subsequent accurate segmentation, thereby significantly improving the ability to identify oil films, especially weak signal oil films, under complex sea conditions.
[0011] The threshold optimization is highly targeted, with good adaptability and robustness. Taking into account the prior knowledge that oil film regions generally have low grayscale values, this paper makes key improvements to the Golden Jackal optimization algorithm. By designing a comprehensive fitness function that integrates standard Otsu inter-class variance, a balanced penalty term, and a time-varying low-threshold reward, and employing a low-threshold biased initialization strategy, a dynamic energy decay mechanism, and a phased iterative strategy, the optimization process is effectively guided to search the solution space that conforms to the physical characteristics of the oil film. This significantly improves the speed and accuracy of the algorithm's convergence to the optimal threshold, while enhancing the method's robustness to different imaging conditions and noise interference, avoiding the extreme or unrealistic segmentation results that traditional threshold segmentation methods are prone to produce.
[0012] The method features an integrated workflow and superior overall performance. It constructs a complete workflow from image preprocessing and feature learning to optimized segmentation. GCN and K-means work together to extract regions of interest (ROIs), anchoring a precise search range for subsequent optimization; the improved GJO achieves pixel-level fine-grained classification based on ROIs. The "feature learning + optimized segmentation" framework fully leverages the advantages of unsupervised feature extraction and intelligent optimization algorithms, enabling the method to ensure high accuracy while possessing good generalization ability and practicality, effectively serving the practical application needs of marine oil spill emergency monitoring. Attached Figure Description
[0013] Figure 1 This is a flowchart of the oil film segmentation method based on GCN-IGJO according to an embodiment of the present invention; Figure 2 The image is the original radar image from an embodiment of the present invention. Figure 3 This is a data preprocessing scheme according to an embodiment of the present invention; Figure 4 The image is a preprocessed image from an embodiment of the present invention. Figure 5 This is a feature enhancement step based on GCN in an embodiment of the present invention; Figure 6 The K-means clustering results are from an embodiment of the present invention. Figure 7 This is a diagram showing the initial ROI extraction results of an embodiment of the present invention; Figure 8 This is a flowchart of the IGJO implementation of an embodiment of the present invention; Figure 9 This is an initial extraction diagram of the oil film target according to an embodiment of the present invention; Figure 10 This is a final extraction diagram of the oil film target in an embodiment of the present invention. Detailed Implementation
[0014] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0015] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0016] Please see Figures 1 to 10 The figures shown are, respectively, a flowchart of the oil film segmentation method based on GCN-IGJO according to an embodiment of the present invention; the original radar image according to an embodiment of the present invention; the data preprocessing scheme according to an embodiment of the present invention; the image after data preprocessing according to an embodiment of the present invention; the feature enhancement steps based on GCN according to an embodiment of the present invention; the K-means clustering result according to an embodiment of the present invention; the initial ROI extraction result image according to an embodiment of the present invention; the IGJO flowchart according to an embodiment of the present invention; the initial oil film target extraction image according to an embodiment of the present invention; and the final oil film target extraction image according to an embodiment of the present invention.
[0017] The oil film segmentation method based on GCN-IGJO in this embodiment of the invention includes: Step S1, acquire the original radar image and process the original radar image ( Figure 2 Preprocessing ( Figure 3 Generate preprocessed images ( Figure 4 ); Step S2: Construct a sparse adjacency matrix for the preprocessed image. ( Figure 5 ); Step S3, construct the degree matrix Sparse adjacency matrix Normalization generates a normalized adjacency matrix For the normalized adjacency matrix Perform graph convolution operations and output the node feature matrix; Step S4: Using the node feature matrix of each pixel output by the graph convolutional network as input, clustering is performed using the K-means algorithm. Figure 6 The K-means algorithm divides the node feature matrix into three clusters and assigns a cluster label to each vector, outputting the segmentation result. Morphological post-processing is performed using binarization and filtering methods. One class is selected as the target region, image holes in the target region are filled, and area opening is performed. Connected regions with areas smaller than a preset area value are removed, achieving preliminary region of interest extraction. Figure 7 ), and crop the image of the initial region of interest, retaining the ROI image within a preset pixel distance, Segmentation results for In the formula: The number of clusters, For the first Class center, For pixels The graph convolution features; Step S5: Classify the ROI image to identify oil film regions using the IGJO algorithm ( Figure 8 Threshold classification is performed, and the initial oil film region is extracted based on the lowest threshold. Figure 9 Noise removal and void filling are performed on the initial oil film area to obtain a complete oil film extraction image. Figure 10 ), Complete oil film extraction results R ( i )for In the formula: It is the grayscale value of a single pixel. T 1 represents the smaller optimal threshold calculated iteratively by the IGJO algorithm.
[0018] Specifically, step S1 includes: Step S101: Set the azimuth angle as the abscissa of the Cartesian coordinate system and set the detection distance as the ordinate of the Cartesian coordinate system. Step S102: Transform the polar coordinate system of the original radar image into a Cartesian coordinate system to generate a coordinate image; Step S103: Scale the coordinate image using a preset scaling factor to generate a preprocessed image.
[0019] Specifically, firstly, a Cartesian coordinate system transformation is performed based on the polar coordinate system of the original radar image to make it more suitable for computer languages, improve computational efficiency, and enhance image details. Simultaneously, a standardized two-dimensional input is provided for subsequent steps using the horizontal axis formed by the azimuth angle and the vertical axis formed by the detection distance. Then, to control computational complexity, the image is scaled, keeping the total number of pixels below 50,000. Considering the memory size of the operating environment, this experiment sets the scaling factor s=0.5.
[0020] Specifically, step S2 includes: Step S201: Construct a three-dimensional feature vector based on each pixel in the preprocessed image, denoted as the center pixel. Select all center pixels Constructing the characteristic matrix ,Right now ,in, It is the grayscale value of a single pixel before normalization. , They are pixels The row and column coordinates; Step S202, using each pixel respectively Center pixel Take the center pixel Adjacent local Pixels are used as neighborhoods to determine the area excluding the center pixel. The 24 neighboring pixels outside are neighboring pixels. center pixel With each neighboring pixel Euclidean distance in feature space Calculated using the following formula: , in, It is the grayscale value of a single pixel before normalization. , They are pixels The row and column coordinates; Step S203: Use a Gaussian kernel function to convert the Euclidean distance into similarity weights. , Calculated using the following formula: in, For the Gaussian kernel bandwidth parameter, this study takes... To achieve a compromise, the Gaussian kernel function is neither overly sensitive nor overly smooth; exp(▪) is the natural exponential function. , For the number of pixels, It is the set of adjacent pixels; Step S204, in each pixel Within the neighborhood of each pixel, select the distance from each pixel. smallest A set of adjacent pixels is denoted as the set of adjacent pixels. The adjacency matrix elements that meet the nearest neighbor pixel condition are... The set is defined as a sparse adjacency matrix. sparse adjacency matrix Calculated using the following formula: , in, It is a pixel The adjacency matrix element, which is related to They are completely symmetric and together form a real symmetric matrix. , It is the distance in pixels. smallest The set of neighboring pixels of a pixel, where N is the total number of pixels in the image.
[0021] Specifically, in order to save memory space and optimize runtime efficiency, based on the complexity requirements of graph convolutional networks, a sparse adjacency matrix needs to be constructed on the preprocessed original image before performing graph convolutional network operations, so as to provide a suitable graph structure for graph convolution.
[0022] Specifically, in this invention, taking This means that only the one nearest neighbor pixel of each pixel is retained, making the pixel features more accurate and reducing the amount of computation.
[0023] Specifically, step S3 includes: Step S301, Degree Matrix Through formula The structure is constructed, where `diag(▪)` is a diagonalization operation used to transform a vector into a diagonal matrix, and N is the total number of pixels in the image. To maintain numerical stability, a constant is taken as... , It is the identity matrix; Step S302, Degree Matrix Sparse adjacency matrix Normalization generates a normalized adjacency matrix ; in , Normalized adjacency matrix Calculated using the following formula: , Step S303, confirm For the first Layer node feature matrix, where, For the first The feature dimension of the layer, where N is the total number of pixels in the image. The number of layers in a graph convolutional network. No. The layer node feature matrix is calculated using the following formula: , in, Let be the residual connectivity coefficient, and take . , For learnable weights, where the input layer Only the first column is used as the normalized grayscale value, and the rest of the columns are 0; Specifically, performing graph convolution operations, The residual connectivity coefficient is a value selected based on a priori comprehensive consideration of fully preserving oil film characteristics and maintaining model stability. These are learnable weights. Input layer Only the first column is used as the normalized grayscale value, while the remaining columns are 0. After two layers of graph convolution with an output dimension of 16, the ReLU activation function is used to achieve high-order feature separation. The final output matrix... .
[0024] Step S304: After several graph convolution operations with a preset output dimension, the ReLU activation function is used to achieve high-order feature separation. , in, x It is the feature value of each pixel obtained after performing graph convolution operation.
[0025] Specifically, in step S4, the pixel feature vectors output by the graph convolutional network are used as input, and the K-means algorithm is used for clustering. The K-means algorithm divides the feature vectors into 3 clusters, assigns a cluster label to each vector, and outputs the segmentation result. : In the formula: The number of clusters, For the first Class center, For pixels The graph convolution features; Then, binarization and filtering methods were used for morphological post-processing. One category was selected as a candidate target region, image holes were filled, and area opening operations were performed to remove connected regions with an area less than 50, thus achieving preliminary extraction of the Region of Interest (ROI). Since the wave reflection echoes received by the radar image are only visible at close range, the ROI image was cropped to retain only the image within a 342-pixel range for easier subsequent processing.
[0026] Specifically, the goal of the improved GJO algorithm is to more accurately find two thresholds after generating the ROI image to classify the image into three categories: strong signal, weak signal, and background, thereby achieving accurate identification of oil film regions. The core of this stage is to propose an improved GJO optimization algorithm to solve the threshold classification problem.
[0027] Specifically, step S5 includes: Step S501, define the set of non-background pixels ,set up Select the optimal threshold vector based on the number of non-background pixels. ,in , and These are different thresholds for classifying the extracted ROI image, for any pixel value. The fitness function is designed, and statistics for each category are defined, including the number of pixels per category. Category weight Category Mean Compared with the population mean : , , , , The `class` function is used to classify each pixel, assigning the p-th pixel to the k-th class. Step S502: The standard Otsu inter-class variance algorithm is used as the basis for the fitness function, combined with the set balance penalty term. As an inter-class variance coefficient to prevent extreme splits during Otsu's algorithm iteration: , in, It is the inter-class variance, reflecting the differences between different classes. , in, This is a newly defined function used as coefficients to correct the overall tendency to maximize inter-class variance, thereby improving the segmentation performance of small targets. It is a natural exponential function. and These are respectively determined by the threshold and The weights of the regions with the lowest and second lowest gray values after segmentation.
[0028] A time-varying low-threshold reward function is added to the fitness function, and a reward term positively correlated with the number of iterations is introduced into the standard Otsu inter-class variance objective to guide the algorithm to continuously move towards a solution space with a lower threshold. , Here, t represents the time-varying reward coefficient, where t is the current iteration number. To define the maximum number of iterations: , , The final formula for the overall fitness function is as follows: ; Step S503: Using the IGJO algorithm, a low-threshold biased initialization strategy is adopted to change the original algorithm's uniform random initialization method in the solution space. 70% of the population individuals are focused on searching in the low grayscale range, while the remaining 30% are searched across the entire range. Algorithm parameters are then set, with the population size set to... Set the lower bound of the search space. With the upper realm : , , in, , The initialization strategy is for the first... pixels, threshold vector is It initializes with a 70% probability in the low grayscale range and a 30% probability in the full range. To select probabilities during the initialization phase in the low grayscale range. To select probabilities during the full-range initialization phase, as shown in the formula: , For each pixel The threshold values First, escape energy. With low threshold bias factor Computation serves as the basis for separating iterative strategies: , , , The iterative process is divided into an exploration phase, a development phase, and a late-stage forced development phase. In the exploration phase, a low-threshold biased symmetric Levy flight strategy is used to ensure the diversity of random jumps and the directionality of target region convergence during global exploration. Exploration phase, i.e. With probability Perform low-threshold exploration; otherwise, perform standard exploration. Choose probabilities for the exploration phase. , , in, and These represent the threshold values (optimal and suboptimal solutions) for simulated male and female golden jackals, respectively. To escape energy, t is the number of iterations. The probability of male and female selection during the exploration phase. For the exploration phase, random numbers, It is a low threshold bias factor. It follows a normal distribution between (0,1). , ,in for The standard deviation of the normal distribution it follows The step size that influences the generation of the Levy distribution is taken as an empirical value of 1.5. Development phase, i.e. With probability Perform low-threshold development; otherwise, perform standard development. For the development phase probability, , ,in, and These represent the threshold values for simulated male and female golden jackals. To escape energy, t is the number of iterations. The probability of male and female selection during the development phase. Random numbers for the development phase. It is a low threshold bias factor. It follows a normal distribution between (0,1). Later forced exploration phase The later-stage forced exploration mechanism injects randomness when the algorithm stalls, executing with a 20% probability on a global scale. ,in, This is the temporary trial solution generated after the perturbation. This is the current optimal solution. To force random numbers during the exploration phase, To enforce the selection of probabilities during the exploration phase, this refers to a 20% probability of applying this formula for perturbation. It follows a normal distribution between (0,1). If at this time ,but , Apply boundary constraints and sorting constraints to the threshold values to ensure that the thresholds fall within the specified upper and lower bounds and ensure that... , , Where max is the maximum value, min is the minimum value, L is the lower bound of the algorithm, U is the upper bound of the algorithm, sort is the function to sort the thresholds, and the relationship between T1 and T2 is specified. Step S504: Calculate the optimal threshold iteratively using the IGJO algorithm. Based on the minimum threshold, the initial oil film area is extracted, and noise removal and hole filling are performed on the initial oil film area to obtain a complete oil film extraction map. Complete oil film extraction results R ( i )for In the formula: It is the grayscale value of a single pixel. T 1 represents the smaller optimal threshold calculated iteratively by the IGJO algorithm.
[0029] This invention employs a method with high segmentation accuracy and strong feature representation capabilities. It innovatively introduces a graph convolutional network, treating image pixels as graph nodes. By aggregating pixel grayscale and spatial neighborhood information, the original single grayscale value is transformed into a high-order 16-dimensional semantic feature vector. This method more profoundly represents the categorical essence of pixels than traditional methods that directly use original pixel values or manually separate features, laying a solid feature foundation for subsequent accurate segmentation. This significantly improves the ability to identify oil slicks, especially weak signal oil slicks, under complex sea conditions.
[0030] The threshold optimization is highly targeted, with good adaptability and robustness. Taking into account the prior knowledge that oil film regions generally have low grayscale values, this paper makes key improvements to the Golden Jackal optimization algorithm. By designing a comprehensive fitness function that integrates standard Otsu inter-class variance, a balanced penalty term, and a time-varying low-threshold reward, and employing a low-threshold biased initialization strategy, a dynamic energy decay mechanism, and a phased iterative strategy, the optimization process is effectively guided to search the solution space that conforms to the physical characteristics of the oil film. This significantly improves the speed and accuracy of the algorithm's convergence to the optimal threshold, while enhancing the method's robustness to different imaging conditions and noise interference, avoiding the extreme or unrealistic segmentation results that traditional threshold segmentation methods are prone to produce.
[0031] The method features an integrated workflow and superior overall performance. It constructs a complete workflow from image preprocessing and feature learning to optimized segmentation. GCN and K-means work together to extract regions of interest (ROIs), anchoring a precise search range for subsequent optimization; the improved GJO achieves pixel-level fine-grained classification based on ROIs. The "feature learning + optimized segmentation" framework fully leverages the advantages of unsupervised feature extraction and intelligent optimization algorithms, enabling the method to ensure high accuracy while possessing good generalization ability and practicality, effectively serving the practical application needs of marine oil spill emergency monitoring.
[0032] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0033] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for oil film segmentation based on GCN-IGJO, characterized in that, include: Step S1: Acquire the original radar image and preprocess the original radar image to generate a preprocessed image; Step S2: Construct a sparse adjacency matrix for the preprocessed image. ; Step S3, construct the degree matrix The sparse adjacency matrix Normalization generates a normalized adjacency matrix For the normalized adjacency matrix Perform graph convolution operations and output the node feature matrix; Step S4: Using the node feature matrix of each pixel output by the graph convolutional network as input, clustering is performed using the K-means algorithm. The K-means algorithm divides the node feature matrix into 3 clusters and assigns a cluster label to each vector, outputting the segmentation result. Morphological post-processing is performed using binarization and filtering methods. The cluster with the lowest gray value is selected as the target region. Image holes in the target region are filled, and area opening is performed. Connected regions with areas smaller than a preset area value are removed, achieving preliminary region of interest extraction. The image of the preliminary region of interest is then cropped, retaining the ROI image within a preset pixel distance. The segmentation result for In the formula: The number of clusters, For the first Class center, For pixels The graph convolution features; Step S5: Classify the ROI image to identify oil film regions. Use the IGJO algorithm for threshold classification, extract preliminary oil film regions based on the lowest threshold, and perform noise removal and hole filling on the preliminary oil film regions to obtain a complete oil film extraction image. Complete oil film extraction results R ( i )for In the formula: It is the grayscale value of a single pixel. T 1 represents the smaller optimal threshold calculated iteratively by the IGJO algorithm.
2. The oil film segmentation method based on GCN-IGJO according to claim 1, characterized in that, Step S1 includes: Step S101: Set the azimuth angle as the abscissa of the Cartesian coordinate system, and set the detection distance as the ordinate of the Cartesian coordinate system. Step S102: Transform the polar coordinate system of the original radar image into a Cartesian coordinate system to generate a coordinate image; Step S103: Scale the coordinate image using a preset scaling factor to generate a preprocessed image.
3. The oil film segmentation method based on GCN-IGJO according to claim 2, characterized in that, Step S2 includes: Step S201: Construct a three-dimensional feature vector based on each pixel in the preprocessed image, denoted as the center pixel. Select all the center pixels. Constructing the characteristic matrix ,Right now ,in, It is the grayscale value of a single pixel before normalization. , They are pixels The row and column coordinates; Step S202, using each pixel respectively Center pixel Take the center pixel Adjacent local Pixels are used as neighborhoods to determine the area excluding the center pixel. The 24 neighboring pixels outside are neighboring pixels. center pixel With each neighboring pixel Euclidean distance in feature space Calculated using the following formula: , in, It is the grayscale value of a single pixel before normalization. , They are pixels The row and column coordinates; Step S203: Use a Gaussian kernel function to convert the Euclidean distance into similarity weights. , Calculated using the following formula: in, Let be the Gaussian kernel bandwidth parameter, and exp(▪) be the natural exponential function. For the number of pixels, It is the set of adjacent pixels; Step S204, in each pixel Within the neighborhood of each pixel, select the distance from each pixel. smallest A set of adjacent pixels is denoted as the set of adjacent pixels. The adjacency matrix elements that meet the nearest neighbor pixel condition are... The set is defined as a sparse adjacency matrix. sparse adjacency matrix Calculated using the following formula: , in, It is a pixel The adjacency matrix element, which is related to They are completely symmetric and together form a real symmetric matrix. , It is the distance in pixels. smallest The set of neighboring pixels of a pixel, where N is the total number of pixels in the image.
4. The oil film segmentation method based on GCN-IGJO according to claim 3, characterized in that, Step S3 includes: Step S301, Degree Matrix Through formula The structure is constructed, where `diag(▪)` is a diagonalization operation used to transform a vector into a diagonal matrix, and N is the total number of pixels in the image. To maintain numerical stability, a constant is taken as... , It is the identity matrix; Step S302, Degree Matrix The sparse adjacency matrix Normalization generates a normalized adjacency matrix ; in , Normalized adjacency matrix Calculated using the following formula: , Step S303, confirm For the first Layer node feature matrix, where, For the first The feature dimension of the layer, where N is the total number of pixels in the image. The number of layers in a graph convolutional network. No. The layer node feature matrix is calculated using the following formula: , in, Let be the residual connectivity coefficient, and take . , For learnable weights, where the input layer Only the first column is used as the normalized grayscale value, and the rest of the columns are 0; Step S304: After several graph convolution operations with a preset output dimension, the ReLU activation function is used to achieve high-order feature separation. , in, x It is the feature value of each pixel obtained after performing graph convolution operation.
5. The oil film segmentation method based on GCN-IGJO according to claim 4, characterized in that, Step S5 includes: Step S501, define the set of non-background pixels ,set up Select the optimal threshold vector based on the number of non-background pixels. ,in , and These are different thresholds for classifying the extracted ROI image, for any pixel value. The fitness function is designed, and statistics for each category are defined, including the number of pixels per category. Category weight Category Mean Compared with the population mean : , , , , The `class` function is used to classify each pixel, assigning the p-th pixel to the k-th class. Step S502: The standard Otsu inter-class variance algorithm is used as the basis for the fitness function, combined with the set balance penalty term. As an inter-class variance coefficient to prevent extreme splits during Otsu's algorithm iteration: , in, It is the inter-class variance, reflecting the differences between different classes. , in, This is a newly defined function used as coefficients to correct the overall tendency to maximize inter-class variance, thereby improving the segmentation performance of small targets. It is a natural exponential function. and These are respectively determined by the threshold and The weights of the regions with the lowest and second lowest gray values after segmentation; A time-varying low-threshold reward function is added to the fitness function, and a reward term positively correlated with the number of iterations is introduced into the standard Otsu inter-class variance objective, guiding the algorithm to continuously move towards a solution space with a lower threshold. , Here, t represents the time-varying reward coefficient, where t is the current iteration number. To define the maximum number of iterations: , , The final formula for the overall fitness function is as follows: ; Step S503: Using the IGJO algorithm, a low-threshold biased initialization strategy is adopted to change the original algorithm's uniform random initialization method in the solution space. 70% of the population individuals are focused on searching in the low grayscale range, while the remaining 30% are searched across the entire range. Algorithm parameters are then set, with the population size set to... Set the lower bound of the search space. With the upper realm : , , in, , The initialization strategy is for the first... pixels, threshold vector is It initializes with a 70% probability in the low grayscale range and a 30% probability in the full range. To select probabilities during the initialization phase in the low grayscale range. To select probabilities during the full-range initialization phase, as shown in the formula: , For each pixel The threshold values First, escape the energy. With low threshold bias factor Computation serves as the basis for separating iterative strategies: , , , The iterative process is divided into an exploration phase, a development phase, and a late-stage forced development phase. In the exploration phase, a low-threshold biased symmetric Levy flight strategy is used to ensure the diversity of random jumps and the directionality of target region convergence during global exploration. Exploration phase, i.e. With probability Perform low-threshold exploration; otherwise, perform standard exploration. Choose probabilities for the exploration phase. , , in, and These represent the threshold values for simulated male and female golden jackals. To escape energy, t is the number of iterations. The probability of male and female selection during the exploration phase. For the exploration phase, random numbers, It is a low threshold bias factor. It follows a normal distribution between (0,1). , ,in for The standard deviation of the normal distribution it follows The step size that influences the generation of the Levy distribution is taken as an empirical value of 1.
5. Development phase, i.e. With probability Perform low-threshold development; otherwise, perform standard development. For the development phase probability, , ,in, and These represent the threshold values for simulated male and female golden jackals. To escape energy, t is the number of iterations. The probability of male and female selection during the development phase. Random numbers for the development phase. It is a low threshold bias factor. It follows a normal distribution between (0,1). Later forced exploration phase The later-stage forced exploration mechanism injects randomness when the algorithm stalls, executing with a 20% probability on a global scale. , in, This is the temporary trial solution generated after the perturbation. This is the current optimal solution. To force random numbers during the exploration phase, To enforce the selection of probabilities during the exploration phase, this refers to a 20% probability of applying this formula for perturbation. It follows a normal distribution between (0,1). If at this time ,but , Apply boundary constraints and sorting constraints to the threshold values to ensure that the thresholds fall within the specified upper and lower bounds and ensure that... , , , Where max is the maximum value, min is the minimum value, L is the lower bound of the algorithm, U is the upper bound of the algorithm, sort is the function to sort the thresholds, and the relationship between T1 and T2 is specified. Step S504: Calculate the optimal threshold iteratively using the IGJO algorithm. The initial oil film region is extracted based on the lowest threshold, and noise removal and hole filling are performed on the initial oil film region to obtain a complete oil film extraction map.