A method and system for detecting oil film by marine radar based on feature fusion and genetic algorithm
By using feature fusion and genetic algorithm methods in the detection of marine radar oil films, the problems of low efficiency and low accuracy of existing detection methods are solved, and more efficient oil spill detection and oil film segmentation are achieved, providing important data support.
Patent Information
- Application Number
- CN202411853717.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-12-16
AI Technical Summary
The existing detection methods are inefficient and accurate when detecting marine oil spills, making it difficult to effectively monitor and divide the oil film.
The navigation radar oil film detection method based on feature fusion and genetic algorithm is adopted. By obtaining navigation radar image data for preprocessing and cutting, Tamura texture features are extracted, and the feature fusion is fused using factor analysis method. The fused feature is input to the classifier for classification, and the effective area of oil spill detection is segmented in combination with the improved genetic algorithm to obtain the oil film extraction results.
Improves the performance of oil spill detection, enables more accurate monitoring and segmentation of oil films, and provides important data to support the cleaning and damage assessment of offshore oil spill events.
Smart Images

Figure CN119313888B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of marine disaster prevention and reduction, and in particular to a method and system for detecting oil film by a marine radar based on feature fusion and genetic algorithm. Background Art
[0002] Shipping is an important driving force for global trade and economic development, carrying more than 80% of the world's trade volume. With the full development of economic globalization, the status of the shipping industry has become increasingly prominent. It not only promotes the circulation of global goods and services, but also plays a key role in the stability and efficiency of the global supply chain. Accidents during maritime transportation, such as ship collisions, groundings, operational errors, aging of the hull or extreme weather conditions, may cause oil or petroleum products to leak into the sea. Such accidents not only seriously threaten the health of marine ecosystems, reduce biodiversity, destroy fishery resources, pose a threat to human health, and have a negative impact on the economy of coastal cities, but also bring long-term environmental problems. Therefore, it is particularly important to conduct in-depth research on the prevention and mitigation technology of marine oil spill disasters.
[0003] Oil spill monitoring technology is essential for timely cleaning up oil pollution and accurately assessing ecological and environmental damage. It includes dynamic monitoring of oil spills, tracking of oil film drift and diffusion, monitoring of oil spill weathering, and assessment of the impact on the ecosystem. These studies not only deepen the understanding of the potential consequences of oil spills, but also have important practical value for formulating preventive measures and optimizing emergency response strategies. In addition, oil spill monitoring technology can also provide important scientific basis and legal reference for the International Maritime Organization (IMO) to formulate relevant conventions and regulations. Summary of the invention
[0004] In view of the above problems, the present invention proposes a method and system for marine radar oil film detection based on feature fusion and genetic algorithm to solve the problems of low detection efficiency and low detection accuracy of existing detection methods.
[0005] According to one aspect of the present invention, a method for detecting oil film by marine radar based on feature fusion and genetic algorithm is proposed, the method comprising the following steps:
[0006] Acquire marine radar image data;
[0007] Preprocessing the marine radar image data to obtain a preprocessed image;
[0008] Cut the preprocessed image to obtain multiple slice images;
[0009] Extract the Tamura texture features of each slice image;
[0010] The factor analysis method is used to fuse the Tamura texture features of each slice image to obtain the fused features;
[0011] The fused features are input into the pre-trained classifier for classification to obtain the effective area for oil spill detection;
[0012] The improved genetic algorithm is used to segment the effective area of oil spill detection and obtain the oil film extraction results.
[0013] In one possible implementation manner, the Tamura texture features include a roughness feature, a contrast feature, a directionality feature, and a linearity feature.
[0014] In one possible implementation, the roughness characteristic The calculation formula is:
[0015] ;
[0016] In the formula, M Indicates the number of pixels in the height direction of the image, N Indicates the number of pixels in the width direction of the image; S best ( i , j ) = 2 l , l Represents pixel (i, j) The size corresponding to the maximum value of the average intensity difference between non-overlapping adjacent windows in the horizontal and vertical directions.
[0017] In one possible implementation, the contrast feature The calculation formula is:
[0018] ;
[0019] In the formula, represents standard deviation; Represents the fourth-order moment of the slice image; , n represents the side length of the slice image, Represents pixel (i, j) The pixel value corresponding to the position, Represents the grayscale median of the slice image.
[0020] In one possible implementation, the directional feature The calculation formula is:
[0021] ;
[0022] In the formula, nis the number of quantized intervals of the direction angle, p Represents a histogram The pth quantization interval index number; Represents a histogram The quantization interval index number corresponding to the maximum value; Represents a histogram The quantization interval index number corresponding to the second largest value in; , Indicates the number of edge pixels when the gradient change in the pth quantization interval of the direction angle is greater than the gradient vector mode threshold. Represents the corresponding direction angle θ The total number of edge pixels on .
[0023] In one possible implementation, the linearity feature calculation process includes: calculating the interquartile range values of linearity in eight directions, namely, top, bottom, left, right, and four diagonals, and sorting the interquartile range values of linearity in the eight directions from small to large. is the second smallest directional linearity value, is the sixth smallest directional linearity value; the linearity characteristic Calculated according to the following formula:
[0024] ;
[0025] The linearity value in each direction is calculated according to the following formula:
[0026] ;
[0027] In the formula, m Indicates the number of gray levels; i and j is the co-occurrence matrix The row and column indices of ; n Indicates the number of directional intervals of equal width.
[0028] In one possible implementation, the factor analysis method is used to fuse the Tamura texture features of each slice image, and the fused features include:
[0029] Standardize multiple features of the Tamura texture features of each slice image, and calculate the correlation coefficient matrix after the standardization;
[0030] Each feature is expressed as the sum of the linear function of the common factor and the special factor, and the factor loading matrix corresponding to each feature is calculated using the maximum likelihood estimation method;
[0031] Calculate and obtain factor score coefficients based on the correlation coefficient matrix and the factor loading matrix;
[0032] According to the factor score coefficient, multiple features of the Tamura texture feature of each slice image are fused into one feature, and the new fused feature It is expressed as:
[0033] ;
[0034] In the formula, , , , is the fusion coefficient; Represents roughness characteristics; Represents contrast characteristics; Indicates directional characteristics; Represents linearity characteristics.
[0035] In one possible implementation manner, the pre-trained classifier is a classifier based on a fuzzy C-means algorithm.
[0036] In one possible implementation, the objective function in the improved genetic algorithm is:
[0037] ;
[0038] In the formula, T represents the initial threshold for image segmentation, Represents the maximum inter-class variance between the target and the background; K is(2, P 0), P 0 represents the initial population size.
[0039] According to another aspect of the present invention, a marine radar oil film detection system based on feature fusion and genetic algorithm is proposed, the system comprising:
[0040] An image preprocessing module, configured to obtain marine radar image data; preprocess the marine radar image data to obtain a preprocessed image;
[0041] An image cutting module is configured to cut the preprocessed image to obtain a plurality of slice images;
[0042] A texture feature extraction module configured to extract Tamura texture features of each slice image;
[0043] A feature fusion module is configured to fuse the Tamura texture features of each slice image using a factor analysis method to obtain fused features;
[0044] A classification module, which is configured to input the fused features into a pre-trained classifier for classification to obtain an effective area for oil spill detection;
[0045] The oil film extraction module is configured to segment the effective area for oil spill detection using an improved genetic algorithm to obtain oil film extraction results.
[0046] The beneficial technical effects of the present invention are:
[0047] The present invention proposes a method and system for detecting oil film by marine radar based on feature fusion and genetic algorithm, the method comprising: cutting the preprocessed image to obtain multiple slice images; extracting the Tamura texture features of each slice image; using the factor analysis method to fuse the Tamura texture features of each slice image to obtain the fused features; inputting the fused features into a pre-trained classifier for classification to obtain the effective area for oil spill detection; using the improved genetic algorithm to segment the effective area for oil spill detection to obtain the oil film extraction result. The present invention combines texture feature fusion with machine learning optimization technology, wherein four indicators of the Tamura texture features of each slice image are extracted, and the Tamura features are fused by the factor analysis method to reduce the feature dimension; the fuzzy C-means (FCM) algorithm is used to extract relevant wave information from the marine radar data; and the improved genetic algorithm is used to achieve accurate segmentation of the oil film. Experiments show that the final detection performance of the present invention is good, and it can provide important data support for the pollution cleanup and damage assessment of marine oil spill incidents. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0049] Figure 1 It is a flow chart of a method for detecting oil film by marine radar based on feature fusion and genetic algorithm as described in an embodiment of the present invention.
[0050] Figure 2 2 is an example diagram of the preprocessing result in the embodiment of the present invention.
[0051] Figure 3 It is an example diagram of a sub-image in an embodiment of the present invention.
[0052] Figure 4 It is a Tamura texture feature map in an embodiment of the present invention; wherein the first row of maps corresponds to roughness; the second row of maps corresponds to contrast; the third row of maps corresponds to directionality; and the fourth row of maps corresponds to linearity.
[0053] Figure 5 It is the fused feature map in the embodiment of the present invention.
[0054] Figure 6 It is a map of effective oil spill detection areas obtained by classification in an embodiment of the present invention.
[0055] Figure 7 This is an example diagram of other fitness functions in the embodiments of the present invention detecting a large number of false positive spot targets in a Cartesian coordinate system.
[0056] Figure 8 This is an example diagram of other fitness functions in the embodiments of the present invention detecting a large number of false positive targets with spots in a polar coordinate system.
[0057] Fig. 9 3 is a comparison chart of segmentation performance corresponding to different K parameter settings in the fitness function of the genetic algorithm in an embodiment of the present invention; wherein, the first row of left figures corresponds to K = 10 (P0 / 3); the first row of right figures corresponds to K = 20 (2P0 / 3); the second row of left figures corresponds to K = 25 (5 P0 / 6); the second row of right figures corresponds to K = 30 (P0). DETAILED DESCRIPTION
[0058] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0059] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, apparatus, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software. In this article, it is to be understood that any number of elements in the drawings is for illustration and not for limitation, and any naming is only for distinction and does not have any limiting meaning.
[0060] The present invention proposes a method and system for detecting oil film by marine radar based on feature fusion and genetic algorithm, which combines texture feature fusion with machine learning optimization technology. Specifically, it includes: using factor analysis to fuse Tamura features to reduce feature dimensions; using fuzzy C-means (FCM) algorithm to extract relevant wave information from marine radar data; and using improved genetic algorithm to achieve accurate segmentation of oil film.
[0061] The embodiment of the present invention proposes a method for detecting oil film by marine radar based on feature fusion and genetic algorithm. Figure 1 As shown, the method comprises the following steps:
[0062] S1. Acquire marine radar image data;
[0063] S2, preprocessing the marine radar image data to obtain a preprocessed image;
[0064] S3, cutting the preprocessed image to obtain multiple slice images;
[0065] S4, extracting the Tamura texture features of each slice image;
[0066] S5, using a factor analysis method to fuse the Tamura texture features of each slice image to obtain fused features;
[0067] S6, inputting the fused features into a pre-trained classifier for classification to obtain an effective area for oil spill detection;
[0068] S7. Use the improved genetic algorithm to segment the effective area for oil spill detection and obtain the oil film extraction result.
[0069] The method starts from S1. In S1, marine radar image data is obtained; then in S2, the marine radar image data is preprocessed; and then in S3, the preprocessed image is cut to obtain a plurality of slice images.
[0070] According to an embodiment of the present invention, first, the original image data of the marine radar is obtained; after the image is obtained, the image can be preprocessed as follows: coordinate transformation, noise reduction filtering, noise suppression, grayscale correction, contrast enhancement, etc., to obtain an image of 512×2048 pixels containing the oil spill sample, such as Figure 2 Then, the image obtained above is evenly cut into 1024 slice images of 32×32 pixels, as shown in Figure 3 shown.
[0071] Then S4 is executed, in which the Tamura texture features of each slice image are extracted.
[0072] According to an embodiment of the present invention, the Tamura feature is a visual feature used for image texture analysis, which includes six main components: coarseness, contrast, directionality, linelikeness, regularity, and roughness. The embodiment of the present invention uses the first four components of the Tamura feature, namely, roughness feature, contrast feature, directionality feature, and linearity feature, and improves its calculation method.
[0073] The improved calculation method includes:
[0074] a. Roughness characteristics F crs : Used to quantify the fineness or coarseness of the texture in an image, which can be determined by calculating the difference in grayscale intensity between adjacent pixels within the image.
[0075] First, calculate the average grayscale value of each pixel in the image:
[0076] (1)
[0077] in, Indicates the pixel coordinates ( i , j ) at the pixel gray value; C k ( x , y ) means ( i , j ) is the average gray value of the pixels in a specific window centered at ; l The range is 0 to 5, where l Set the size of the active window to 2 l ×2 l Pixel.
[0078] Subsequently, for each pixel, the average intensity difference of non-overlapping adjacent windows is calculated independently in the horizontal and vertical directions:
[0079] (2)
[0080] The roughness characteristics F crs Determined as:
[0081] (3)
[0082] In the formula, M Indicates the number of pixels in the height direction of the image, N Indicates the number of pixels in the width direction of the image;S best ( i , j ) = 2 l , l Represents pixel (i, j) The average intensity difference between non-overlapping adjacent windows in the horizontal and vertical directions E ( x , y )'s maximum value; that is, when E ( x , y ) is maximized, the optimal size of the window is obtained, denoted as S best ( i , j ) = 2 l .
[0083] b. Contrast characteristics F con : It is used to characterize the grayscale difference between the brightest and darkest parts of an image. The clearer the image, the greater the contrast. Its original calculation formula is:
[0084] (4)
[0085] (5)
[0086] in, represents the grayscale mean of the image, represents the fourth-order moment, Represents standard deviation.
[0087] In order to reduce the impact of outliers and better reflect the degree of data dispersion, the embodiment of the present invention will Replaced with the image grayscale median ,but:
[0088] (6)
[0089] c. Directional characteristics F dir : Used to describe the shape and arrangement of pixels in an image along a specific direction. When the shape of the image is more irregular and the distribution of light and dark areas is wider, the directionality is greater. It can be determined by calculating the gradient vector.
[0090] First, the image is convolved using the following operators to obtain the horizontal gradient change Δ H and vertical gradient change Δ V :
[0091] (7)
[0092] Then, the gradient change at each pixel is and direction angle θ It can be expressed as:
[0093] (8)
[0094] (9)
[0095] Then, the direction histogram of the constructed vector is calculated :
[0096] (10)
[0097] in, n is the number of quantization intervals of the direction angle (in the embodiment of the present invention n =16); Represents the gradient change in the pth quantization interval of the direction angle | |Greater than the gradient vector mode threshold t The number of edge pixels when Represents the corresponding direction angle θ The total number of edge pixels on ; t is the threshold value of the gradient vector mode , the embodiment of the present invention takes t =12.
[0098] In the prior art, most of the directions corresponding to the intervals with the largest gradient peak intensity are selected as the main directions, that is, there is only one directional peak. When , the two peaks with the largest gradient intensity are selected to calculate the directionality value of the image slice.
[0099] Directional characteristics F dir It can be expressed as:
[0100] (11)
[0101] In the formula, p Represents a histogram The pth quantization interval index number; Represents a histogram The quantization interval index number corresponding to the maximum value; Represents a histogram The quantization interval index number corresponding to the second largest value in .
[0102] d. Linearity characteristics F lin: Used to quantify the degree of deviation in the distance between pixels. The greater the distance between pixels in the image, the higher the linearity.
[0103] In the prior art, in order to improve the calculation efficiency, the maximum linearity value in 8 directions is generally taken. is the image linearity F lin :
[0104]
[0105] Or it can be the mean or extreme value method of linearity values in 8 directions.
[0106] Linearity value The calculation process is as follows: For each co-occurrence matrix in a specific direction (up, down, left, right and four diagonals, a total of 8 directions) P a Both m × m The matrix, for each P a , linearity value F k It can be expressed as:
[0107] (12)
[0108] In the formula, m is the number of gray levels (in the embodiment of the present invention m =16); i and j is the co-occurrence matrix P a The row and column indices of ; n Indicates the number of equal-width direction intervals (in the embodiment of the present invention n =16).
[0109] In order to improve the difference of Tamura linearity characteristics between slices, the embodiment of the present invention proposes to calculate the interquartile range value of the linearity values in 8 directions as the linearity value of the slice, and sort the interquartile range values of the linearity values in 8 directions from small to large. is the second smallest directional linearity value, is the sixth smallest directional linearity value, then the linearity characteristic F lin It is expressed as:
[0110]
[0111] The original maximum value method, extreme value method and mean method are easily affected by extreme values. The embodiment of the present invention adopts the interquartile range value to obtain more accurate linearity characteristics. Figure 4The extracted Tamura texture features are shown.
[0112] Then, S5 is executed. In S5, the Tamura texture features of each slice image are fused by using a factor analysis method to obtain fused features. Specifically, the steps include: standardizing multiple features of the Tamura texture features of each slice image, and calculating a correlation coefficient matrix after standardization; expressing each feature as a sum of a linear function of a common factor and a special factor, and using a maximum likelihood estimation method to calculate a factor loading matrix corresponding to each feature; calculating factor score coefficients based on the correlation coefficient matrix and the factor loading matrix; and fusing multiple features of the Tamura texture features of each slice image into one feature according to the factor score coefficients. The new fused feature It is expressed as:
[0113]
[0114] In the formula, , , , is the fusion coefficient; Represents roughness characteristics; Represents contrast characteristics; Indicates directional characteristics; Represents linearity characteristics.
[0115] According to an embodiment of the present invention, a factor analysis method is used to fuse Tamura features to generate new features, wherein the estimation method of the factor loading matrix adopts the maximum likelihood estimation method, and the factor score evaluation adopts the regression estimation method.
[0116] Each feature in the dataset v i ( i =1,2,…, p ) (In the embodiment of the present invention p =4) can be expressed as the sum of the linear function of the common factor and the special factor, that is
[0117] (13)
[0118] in, F 1, F 2, …, F n is a common factor, n is the number of common factors, ε i called special factors. v It can be expressed as:
[0119] v = AF + ε (14)
[0120] Right now:
[0121] (15)
[0122] Matrices in the model A is called the factor loading matrix, a ij is called the factor “loading” and is i The feature in j If the load on the factor v i See n A point in dimensional space, then a ij Indicates that it is on the coordinate axis Fj The specific steps of factor analysis include:
[0123] a. Data correlation test, including KMO (Kaiser Meyer Olkin) test and Bartlett sphericity test; KMO test is to compare the relative size of the simple correlation coefficient and partial correlation coefficient between the original variables. The calculation formula of KMO value is:
[0124] (16)
[0125] In the formula, represents the simple correlation coefficient; represents the partial correlation coefficient. Obviously, when When KMO ;when When KMO 0, the value of KMO is between 0 and 1.
[0126] In the embodiment of the present invention, when the value of the KMO test is greater than 0.50 and the significance p value of the Bartlett test is less than 0.05, it is determined that the data set is suitable for using the maximum likelihood estimation feature dimensionality reduction.
[0127] b. Standardize the eigenvalues of the data set:
[0128] The variables in factor analysis are p Each eigenvalue x i The standardization formula is:
[0129] (17)
[0130] In the formula, xi Represents the characteristic value of a feature in the data set. represents the average value of this feature in the dataset, s Represents the variance of the feature value in the data set.
[0131] c. Calculate the correlation matrix of the sample R= ( r ij ) p×p :
[0132] (18)
[0133] In the formula, =1,2…, p;r i =1, r ij = r ji , r ij It is i The indicator and j The correlation coefficient of the indicators.
[0134] d. Extract factor loading matrix (maximum likelihood estimation method)
[0135] set up is a normal sample set A random sample from p is the characteristic number, represents the covariance matrix), if the common factors F With special factors If it obeys normal distribution, then:
[0136]
[0137] (19)
[0138] From the above functional formula, we can see that A The value of is variable, and is fixed A You can add a uniqueness condition to the value of:
[0139] (20)
[0140] in Λ Is a diagonal matrix, and the maximum likelihood estimate can be obtained by maximizing the matrix and . Since the unique condition is imposed, is a diagonal matrix, and the likelihood function reaches its maximum.
[0141] Determined the onlyA , the corresponding common factor variance:
[0142] (twenty one)
[0143] In the formula It is called commonality, which reflects the factor projection effect. The closer the result value is to 1, the better the result of mapping from the original variable space to the common factor space.
[0144] The contribution of the jth factor to the total variance is:
[0145] (twenty two)
[0146] In the formula It is called variance contribution and measures the relative importance of the jth factor.
[0147] e.Select q ( q ≤ p ) main factors, and perform factor rotation:
[0148] According to the elementary load matrix, calculate the contribution rate of each common factor and select q The extracted factor loading matrix is rotated to obtain the matrix:
[0149] (twenty three)
[0150] in, for A Before q List, T Is an orthogonal matrix, then construct the factor model:
[0151] (twenty four)
[0152] f. Calculate factor scores and complete feature fusion:
[0153] Factor scores are the most important results of factor analysis. Once the factor loading is determined, the specific values (factor scores) of each factor on each sample are calculated to replace the original variables, thereby achieving the effect of dimensionality reduction.
[0154] Use regression method to find the score function of a single factor:
[0155] (25)
[0156] remember:
[0157] (26)
[0158] (26)
[0159] Then we have:
[0160] (27)
[0161] in, , , are the correlation coefficient matrices of the original variables, j The coefficients of the factor score function, the loading matrix j Columns. In matrix form, we have:
[0162] (28)
[0163] Using the factor score coefficients of the regression method, a new feature is generated:
[0164]
[0165] In the formula, , , , is the fusion coefficient; Represents roughness characteristics; Represents contrast characteristics; Indicates directional characteristics; Represents linearity characteristics.
[0166] Through the above process, the dimension reduction of Tamura features is achieved using the factor analysis method that combines the MLE method with the regression estimation. As an example, the KMO test value is "0.55". The significance of the Bartlett test is less than "0.01". According to the factor score of the regression estimation method, the new fusion feature F Reg for:
[0167] (29)
[0168] Figure 5 The fused feature maps are shown.
[0169] Then, S6 is executed. In S6, the fused features are input into a pre-trained classifier for classification to obtain an effective area for oil spill detection.
[0170] According to an embodiment of the present invention, a classifier based on a fuzzy C-means (FCM) algorithm is used to extract the effective wave monitoring area.
[0171] FCM is used to classify image slices to extract the areas where ocean waves are present. As an example, a larger fuzzy partition matrix index is selected. mThe value “3.0” is used to enhance the fuzziness of the clustering results; the maximum number of iterations is set to “100”; and the convergence condition threshold (i.e., the minimum improvement in the objective function value between two consecutive iterations) is set to “1e-5”. Figure 6 The effective area for oil spill detection obtained by classification is shown.
[0172] Then, S7 is executed. In S7, the effective area for oil spill detection is segmented using an improved genetic algorithm to obtain an oil film extraction result.
[0173] According to an embodiment of the present invention, a genetic algorithm (GA) is a heuristic search and optimization technique inspired by the basic principles of natural evolution and genetics. The algorithm simulates the biological evolution process to systematically improve and optimize the solution to a specific problem. The principle of GA is as follows:
[0174] a. Initialization: First randomly generate M individuals, called the initial population P 0. Each individual represents a candidate solution to a problem.
[0175] b. Health assessment: using predefined objective functions or evaluation functions fit () Evaluates the health of each individual in the population. The fitness score measures the effectiveness of an individual in solving a problem. The higher the score, the closer it is to the optimal solution.
[0176] c. Selection: Use the selection operator A subset is selected from the current population based on the fitness scores of the individuals. This selection tends to favor individuals with higher fitness scores, allowing them to contribute more to the next generation.
[0177] d. Genetic manipulation: Genetic mechanisms inspired by nature, genetic manipulation of selected parents to create new offspring. This includes two steps, crossover and mutation; among them, crossover: select two selected parent individuals, through the crossover probability P c Randomly exchange their genetic information fragments and generate two offspring individuals. Crossover simulates gene exchange and combination, introducing diversity into the population. Mutation: By using the mutation probability P m Modify the value of the gene and randomly change the genetic information of the next generation of individuals. Mutation ensures that the population maintains a certain diversity and adaptability.
[0178] e. Generation of a new population: The generated offspring individuals are combined with the parent individuals to form a new population for the next iteration. This new population is usually composed of individuals that are genetically closer to the optimal solution.
[0179] f. Termination condition: The process of fitness evaluation, selection, crossover, mutation, and new population generation is repeated until the termination criteria are met, such as reaching the maximum number of iterations, finding a satisfactory solution, or exceeding the specified running time.
[0180] g. Output: Output the individual with the highest fitness score from the final population as the optimal or near-optimal solution to the problem.
[0181] By utilizing the principles of natural evolution and genetics, genetic algorithms gradually improve the fitness values of individuals in a population and effectively explore the search space for the optimal solution, making them a powerful tool for solving complex optimization problems.
[0182] The present invention uses a genetic algorithm to segment the effective area of oil spill detection to obtain the final oil film target. The objective function is:
[0183] (30)
[0184] in, T is the initial threshold for image segmentation, is the maximum inter-class variance between the target and the background, K is(2, P In the embodiment of the present invention, K Set to P 0 / 2.
[0185] In this embodiment, preferably, the following dynamic crossover probability update strategy is adopted for crossover, that is, the crossover probability Pc It is dynamically adjusted:
[0186] After each iteration of the selection step, the fitness standard deviation σ of all individuals is calculated, and the crossover probability is calculated using the fitness standard deviation σ Pc Update:
[0187] (31)
[0188] In the formula, represents the updated crossover probability, represents the crossover probability before updating; c is the adjustment factor (a decimal between 0 and 1), and are the maximum and minimum values of the preset fitness standard deviation respectively.
[0189] The advantage of this dynamic adjustment method is that when the standard deviation is large, it means that the individual differences in the population are large. At this time, a high crossover probability can be maintained to promote the generation of new individuals; when the standard deviation is small, it means that the individual differences in the population are small. At this time, the crossover probability can be reduced to avoid excessive destruction of the existing excellent genetic structure.
[0190] As an example, the segmentation threshold determined by the genetic algorithm is "66"; P 0 is set to "30"; the maximum number of iterations is set to "100", P c Set to "0.7"; P m Set to 0.1.
[0191] The technical effect of the present invention is further verified through experiments.
[0192] First, the oil film detection performance of genetic algorithms based on different fitness functions is compared. The oil film detection performance of genetic algorithms with three different fitness function calculation methods is compared: the method proposed by the present invention (referred to as method 1), Otsu's method (referred to as method 2), and the square root of Otsu's method (referred to as method 3). The overall performance is shown in Table 1.
[0193] Table 1
[0194]
[0195] It can be seen from Table 1 that the method proposed in the present invention obtains the highest optimal fitness value, followed by method 3. In terms of the oil film segmentation threshold, the segmentation thresholds calculated by methods 2 and 3 are similar. The method proposed in the present invention obtains a lower segmentation threshold. Accordingly, methods 2 and 3 detect a large number of pixels in the initial oil film detection, while the method proposed in the present invention segmented the least number of pixels. Since methods 2 and 3 obtain similar segmentation thresholds, only the segmentation results of method 2 are used to continue discussing the performance of oil film detection. Compared with the method proposed in the present invention, the preliminary segmentation results of method 2 identify more and larger blocky oil film targets, such as Figure 7 Therefore, in the subsequent good results of oil film detection, the false positive oil film targets in the area without sea wave echo are still not removed, as shown in Figure 8 As shown in the figure, by comparison, the method of the present invention performs better in oil film target detection.
[0196] Then, based on the different fitness functions in the genetic algorithm K The performance is compared by setting the parameters. In the fitness function proposed by the genetic algorithm used in the present invention, K The parameter value range is set between 2 and P 0. Different KThe parameter values lead to different segmentation thresholds of the oil film target, as shown in Table 2.
[0197] Table 2
[0198]
[0199] It can be seen from Table 2 that as the K parameter value increases, the optimal fitness value continues to rise, while the segmentation threshold of oil film target detection gradually decreases. K When the parameter value is set to "5", the threshold obtained is the same as that of method 3. K Four values of "10", "20", "25" and "30" were selected from the parameter values to further discuss the segmentation performance comparison. Fig. 9 When the K parameter value is set to "10", the detection results have similar false positive targets as methods 2 and 3, as shown in Fig. 9 As shown in the first figure of the first row, when the K parameter value is set to "20", "25" or "30", the oil film target is missing in the detection result, such as Fig. 9 As shown in other figures. In order to achieve a reasonable oil film detection effect, K can be set to P 0 / 2.
[0200] Another embodiment of the present invention provides a marine radar oil film detection system based on feature fusion and genetic algorithm, the system comprising:
[0201] An image preprocessing module, configured to obtain marine radar image data; preprocess the marine radar image data to obtain a preprocessed image;
[0202] An image cutting module is configured to cut the preprocessed image to obtain a plurality of slice images;
[0203] A texture feature extraction module configured to extract Tamura texture features of each slice image;
[0204] A feature fusion module is configured to fuse the Tamura texture features of each slice image using a factor analysis method to obtain fused features;
[0205] A classification module, which is configured to input the fused features into a pre-trained classifier for classification to obtain an effective area for oil spill detection;
[0206] The oil film extraction module is configured to segment the effective area for oil spill detection using an improved genetic algorithm to obtain oil film extraction results.
[0207] The function of the marine radar oil film detection system based on feature fusion and genetic algorithm described in this embodiment can be explained by the aforementioned marine radar oil film detection method based on feature fusion and genetic algorithm. For the parts not described in detail in this embodiment, please refer to the above method embodiments.
[0208] It should be noted that, although several units, modules or submodules are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided into being embodied by multiple modules.
[0209] In addition, although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0210] Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
Claims
1. A method for detecting oil film by marine radar based on feature fusion and genetic algorithm, characterized in that: The following steps are involved: Acquire marine radar image data; Preprocessing the marine radar image data to obtain a preprocessed image; Cut the preprocessed image to obtain multiple slice images; Extract the Tamura texture features of each slice image; the Tamura texture features include roughness features, contrast features, directional features, and linearity features; the roughness features The calculation formula is: ; In the formula, M Indicates the number of pixels in the height direction of the image, N Indicates the number of pixels in the width direction of the image; S best ( i , j ) =2 l , l Represents pixel (i, j) The size corresponding to the maximum value of the average intensity difference between non-overlapping adjacent windows in the horizontal and vertical directions; The contrast characteristics The calculation formula is: ; In the formula, represents standard deviation; Represents the fourth-order moment of the slice image; , n represents the side length of the slice image, Represents a pixel ( i,j ) position corresponding to the pixel value, Represents the grayscale median of the slice image; The directional characteristics The calculation formula is: ; In the formula, n is the number of quantized intervals of the direction angle, p Represents a histogram The pth quantization interval index number; Represents a histogram The quantization interval index number corresponding to the maximum value; Represents a histogram The quantization interval index number corresponding to the second largest value in; , Indicates the number of edge pixels when the gradient change in the pth quantization interval of the direction angle is greater than the gradient vector mode threshold. Represents the corresponding direction angle θ The total number of edge pixels on ; The calculation process of the linearity feature includes: calculating the interquartile range values of the linearity in eight directions, namely, top, bottom, left, right and four diagonals, and sorting the interquartile range values of the linearity in the eight directions from small to large. is the second smallest directional linearity value, is the sixth smallest directional linearity value; the linearity characteristic Calculated according to the following formula: ; The linearity value in each direction is calculated according to the following formula: ; In the formula, m Indicates the number of gray levels; i and j is the co-occurrence matrix The row and column indices of ; n Indicates the number of directional intervals of equal width; The method adopts the factor analysis method to fuse the Tamura texture features of each slice image to obtain the fused features; the method includes: standardizing multiple features of the Tamura texture features of each slice image and calculating the correlation coefficient matrix after the standardization; expressing each feature as the sum of the linear function of the common factor and the special factor, and using the maximum likelihood estimation method to calculate the factor loading matrix corresponding to each feature; calculating the factor score coefficient based on the correlation coefficient matrix and the factor loading matrix; fusing multiple features of the Tamura texture features of each slice image into one feature according to the factor score coefficient, and the new fused feature It is expressed as: ; In the formula, , , , is the fusion coefficient; Represents roughness characteristics; Represents contrast characteristics; Indicates directional characteristics; Indicates linearity characteristics; The fused features are input into the pre-trained classifier for classification to obtain the effective area for oil spill detection; The improved genetic algorithm is used to segment the effective area of oil spill detection and obtain the oil film extraction results.
2. The method for detecting oil film by marine radar based on feature fusion and genetic algorithm according to claim 1, characterized in that: The pre-trained classifier is a classifier based on the fuzzy C-means algorithm.
3. The method for detecting oil film by marine radar based on feature fusion and genetic algorithm according to claim 1, characterized in that: The objective function in the improved genetic algorithm is: ; In the formula, T represents the initial threshold for image segmentation, Represents the maximum inter-class variance between the target and the background; K is(2, P 0), P 0 represents the initial population size.
4. A marine radar oil film detection system based on feature fusion and genetic algorithm, characterized in that: include: An image preprocessing module configured to acquire marine radar image data; Preprocessing the marine radar image data to obtain a preprocessed image; An image cutting module is configured to cut the preprocessed image to obtain a plurality of slice images; A texture feature extraction module is configured to extract Tamura texture features of each slice image; the Tamura texture features include roughness features, contrast features, directional features, and linearity features; the roughness features The calculation formula is: ; In the formula, M Indicates the number of pixels in the height direction of the image, N Indicates the number of pixels in the width direction of the image; S best ( i , j ) =2 l , l Represents pixel (i, j) The size corresponding to the maximum value of the average intensity difference between non-overlapping adjacent windows in the horizontal and vertical directions; The contrast characteristics The calculation formula is: ; In the formula, represents standard deviation; Represents the fourth-order moment of the slice image; , n represents the side length of the slice image, Represents a pixel ( i,j ) position corresponding to the pixel value, Represents the grayscale median of the slice image; The directional characteristics The calculation formula is: ; In the formula, n is the number of quantized intervals of the direction angle, p Represents a histogram The pth quantization interval index number; Represents a histogram The quantization interval index number corresponding to the maximum value; Represents a histogram The quantization interval index number corresponding to the second largest value in; , Indicates the number of edge pixels when the gradient change in the pth quantization interval of the direction angle is greater than the gradient vector mode threshold. Represents the corresponding direction angle θ The total number of edge pixels on ; The calculation process of the linearity feature includes: calculating the interquartile range values of the linearity in eight directions, namely, top, bottom, left, right and four diagonals, and sorting the interquartile range values of the linearity in the eight directions from small to large. is the second smallest directional linearity value, is the sixth smallest directional linearity value; the linearity characteristic Calculated according to the following formula: ; The linearity value in each direction is calculated according to the following formula: ; In the formula, m Indicates the number of gray levels; i and j is the co-occurrence matrix The row and column indices of ; n Indicates the number of directional intervals of equal width; The feature fusion module is configured to use a factor analysis method to fuse the Tamura texture features of each slice image to obtain the fused features; including: standardizing multiple features of the Tamura texture features of each slice image, and calculating the correlation coefficient matrix after the standardization; expressing each feature as the sum of a linear function of a common factor and a special factor, and using the maximum likelihood estimation method to calculate the factor load matrix corresponding to each feature; calculating the factor score coefficient based on the correlation coefficient matrix and the factor load matrix; fusing multiple features of the Tamura texture features of each slice image into one feature according to the factor score coefficient, and the new fused feature It is expressed as: ; In the formula, , , , is the fusion coefficient; Represents roughness characteristics; Represents contrast characteristics; Indicates directional characteristics; Indicates linearity characteristics; A classification module, which is configured to input the fused features into a pre-trained classifier for classification to obtain an effective area for oil spill detection; The oil film extraction module is configured to segment the effective area for oil spill detection using an improved genetic algorithm to obtain oil film extraction results.
Citation Information
Patent Citations
Method and system for identifying marine oil spill object by marine radar
CN101915910A
SAR image oil spill detection method based on image significance analysis
CN111860534A