A method and system for detecting oil film by marine radar based on fusion of HOG feature and GLCM feature
By fusing HOG and GLCM characteristics in marine radar oil film detection, combined with factor analysis and particle swarm optimization algorithm, the problems of low efficiency and low accuracy of existing detection methods are solved, and efficient and accurate oil spill detection and oil film extraction are achieved. .
Patent Information
- Application Number
- CN202410523703.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-04-28
AI Technical Summary
The existing navigation radar oil film detection methods have low detection efficiency and low detection accuracy, which cannot meet the needs of real-time oil spill tracking.
Using a method based on fusion of HOG features and GLCM features, the navigation radar image data is obtained for preprocessing and cutting, the direction gradient histogram and grayscale symbiosis matrix features are extracted, and the feature fusion is performed by factor analysis method, and the classifier and improved particles are used. Group optimization algorithm performs oil spill detection and oil film extraction.
It improves the efficiency and accuracy of oil spill detection, can effectively extract the effective areas of oil spill detection and divide the real oil film and suspected oil film, providing data reference for the assessment of oil spill disaster losses.
Smart Images

Figure CN118506178B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for detecting oil film by a marine radar based on the fusion of HOG features and GLCM features. Background Art
[0002] With the continuous growth of human economic activities, marine oil spill accidents occur frequently, causing long-term destructive effects on the environment, ecosystems and human health. Satellite-borne and airborne oil spill detection technologies have developed very maturely. However, these two methods cannot fully meet the requirements of real-time tracking of oil spills. Marine radar oil spill detection technology aims to provide effective detection data in emergency response to oil spills. This began in the 1960s. Since then, with the continuous advancement of marine radar technology, the detection distance and accuracy have been significantly improved. At present, the mainstream marine radar oil spill detection methods include adaptive threshold method, active contour model (ACM), texture feature classification and deep learning method. Among them, the effective segmentation of adaptive threshold depends on the good results of noise suppression, grayscale adjustment and local contrast enhancement; the ACM technology of marine radar oil film detection is constantly developing, but this method still requires a reasonable zero level set to achieve the desired effect; the combination of texture features and classification methods for marine radar oil spill detection is mostly used in the screening of effective areas for effective oil spill detection. Summary of the invention
[0003] To this end, the present invention proposes a marine radar oil film detection method and system based on the fusion of HOG features and GLCM features, so as to solve the problems of low detection efficiency and low detection accuracy of existing detection methods.
[0004] According to one aspect of the present invention, a method for detecting oil film by marine radar based on the fusion of HOG features and GLCM features is proposed. The method comprises:
[0005] Step 1: Obtain marine radar image data;
[0006] Step 2: preprocessing the marine radar image data to obtain a preprocessed image;
[0007] Step 3: Cut the preprocessed image to obtain multiple sub-images;
[0008] Step 4: extract the directional gradient histogram of each sub-image, and perform feature dimensionality reduction on the obtained multiple directional gradient histograms;
[0009] Step 5: extract multiple features from the gray level co-occurrence matrix of each sub-image;
[0010] Step 6: Using the factor analysis method, multiple directional gradient histograms after dimensionality reduction are fused with multiple features in the gray-level co-occurrence matrix to obtain fused features;
[0011] Step 7: Input the fused features into the pre-trained classifier for classification to obtain the effective area for oil spill detection;
[0012] Step 8: Use the improved particle swarm optimization algorithm based on simulated annealing algorithm to segment the effective area of oil spill detection and obtain the oil film extraction result.
[0013] Furthermore, the extraction of the directional gradient histogram of each sub-image includes: normalizing each sub-image; dividing each sub-image into a plurality of cells, then dividing the gradient direction of each cell into a plurality of directional blocks, and calculating the gradient of each pixel; counting the directional gradient histogram of each cell, and then obtaining the directional gradient histogram of each sub-image.
[0014] Furthermore, the step of performing feature dimension reduction on the obtained multiple directional gradient histograms includes:
[0015] Calculate the variance σ of each cell in each sub-image i , and use the following formula to calculate the weight coefficient W of each cell i :
[0016]
[0017] Where m represents the number of cells in each sub-image;
[0018] The directional gradient histogram of each cell in each sub-image is combined with the weight coefficient W i Fusion is performed to obtain a low-dimensional new feature v ij ':
[0019]
[0020] Among them, v ij Represents the histogram gradient of the jth direction of the i-th cell.
[0021] Furthermore, the plurality of features extracted from the gray-level co-occurrence matrix of each sub-image include energy, contrast, inverse moment, entropy, and autocorrelation.
[0022] Furthermore, the factor analysis method is used to fuse the multiple directional gradient histograms after dimensionality reduction with the multiple features in the gray level co-occurrence matrix, and the process includes:
[0023] Standardize each of the multiple features in the multiple directional gradient histograms and the gray-level co-occurrence matrix after dimensionality reduction, and calculate the correlation coefficient matrix after the standardization;
[0024] 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;
[0025] Calculate and obtain factor score coefficients based on the correlation coefficient matrix and the factor loading matrix;
[0026] According to the factor score coefficients, the multiple directional gradient histograms after dimensionality reduction and the multiple features in the gray level co-occurrence matrix are fused into three features.
[0027] Furthermore, the pre-trained classifier is a classifier based on a random forest algorithm.
[0028] Furthermore, the improved particle swarm optimization algorithm based on simulated annealing algorithm is used to segment the effective area for oil spill detection to obtain the oil film extraction result, including:
[0029] Set the initial temperature, annealing constant, total number of simulated annealing iterations, and maximum number of iterations according to the initial state of the population particles;
[0030] The population particles update their velocity and position in each iteration; calculate the current position x i The fitness value f(x i ); if f(x i )<f(P best.i ), then set the optimal position P of the i-th particle best.i =x i , and compared f(P best.i ) and f(G best.i ), G best.i represents the optimal position of the population, if f(P best.i )<f(G best.i ), then G best.i =P best.i ;
[0031] If f(x i )>f(P best.i ), then the simulated annealing acceptance probability pi is used to perform the Meltrov criterion judgment. If the probability pi is greater than a random number in the interval [0, 1], the state P is still accepted. best.i =x i ; If not, re-update the speed and position;
[0032] Check whether the maximum number of iterations has been reached. If so, G best.i is the global optimal segmentation threshold; if it is not reached, the annealing function formula is used to update the temperature T i , and continue to iterate;
[0033] The real oil film and the suspected oil film are segmented based on the obtained global optimal segmentation threshold to obtain the oil film extraction result.
[0034] Furthermore, the calculation formula of the simulated annealing acceptance probability pi is:
[0035]
[0036] In the formula, E i represents the energy of the current state i; E g Represents the internal energy of the current population at the optimal point;
[0037] The annealing function formula is:
[0038] T i =T i-1 *0.95 k
[0039] Where, T i Indicates the temperature corresponding to the current state; T i-1 Represents the temperature corresponding to the previous state; k is equal to the total number of simulated annealing iterations minus the number of iterations.
[0040] According to another aspect of the present invention, a marine radar oil film detection system based on the fusion of HOG features and GLCM features is proposed, the system comprising:
[0041] An image acquisition module, configured to acquire marine radar image data, and preprocess the marine radar image data to acquire a preprocessed image;
[0042] An image segmentation module, configured to segment the preprocessed image to obtain a plurality of sub-images;
[0043] A HOG feature extraction module, configured to extract a directional gradient histogram of each sub-image and perform feature dimension reduction on the obtained multiple directional gradient histograms;
[0044] a GLCM feature extraction module configured to extract a plurality of features in a gray level co-occurrence matrix of each sub-image;
[0045] A feature fusion module is configured to use a factor analysis method to fuse multiple directional gradient histograms after dimensionality reduction with multiple features in a gray-level co-occurrence matrix to obtain fused features;
[0046] 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;
[0047] The oil film extraction module is configured to segment the effective area for oil spill detection by using an improved particle swarm optimization algorithm based on a simulated annealing algorithm to obtain an oil film extraction result.
[0048] Furthermore, the extracting of the directional gradient histogram of each sub-image in the HOG feature extraction module includes: normalizing each sub-image; dividing each sub-image into a plurality of cells, and then dividing the gradient direction of each cell into a plurality of directional blocks, and calculating the gradient of each pixel; counting the directional gradient histogram of each cell, and then obtaining the directional gradient histogram of each sub-image; and performing feature dimensionality reduction on the obtained plurality of directional gradient histograms includes:
[0049] Calculate the variance σ of each cell in each sub-image i , and use the following formula to calculate the weight coefficient W of each cell i :
[0050]
[0051] Where m represents the number of cells in each sub-image;
[0052] The directional gradient histogram of each cell in each sub-image is combined with the weight coefficient W i Fusion is performed to obtain a low-dimensional new feature v ij ':
[0053]
[0054] Among them, v ij Represents the histogram gradient of the jth direction of the i-th cell.
[0055] The beneficial technical effects of the present invention are:
[0056] The present invention proposes a marine radar oil film detection method and system based on the fusion of HOG features and GLCM features. Firstly, the marine radar image data is preprocessed, and the preprocessed image is cut to obtain a plurality of sub-images; then, the directional gradient histogram of each sub-image is extracted, and the feature dimension reduction is performed on the obtained multiple directional gradient histograms; multiple features in the gray level co-occurrence matrix of each sub-image are extracted; then, the multiple directional gradient histograms after dimension reduction are fused with the multiple features in the gray level co-occurrence matrix by a factor analysis method to obtain fused features; then, the fused features are input into a pre-trained classifier for classification to obtain an effective area for oil spill detection; finally, the effective area for oil spill detection is segmented by an improved particle swarm optimization algorithm based on a simulated annealing algorithm to obtain an oil film extraction result. Among them, the HOG operator improved based on variance weighting can effectively reduce the dimension of features and improve the classification efficiency of the effective detection area of oil spills; the factor analysis method is used to fuse the HOG features with the GLCM features, effectively retaining the slice shape features and texture features, and improving the classification effect of the effective detection area of oil spills; using the particle swarm algorithm improved based on simulated annealing, the adaptive double threshold is iteratively optimized and calculated to effectively segment the real oil film and the suspected oil film, which can provide data reference for the disaster loss assessment of oil spill accidents and also provide a new means for marine radar oil spill detection technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] 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:
[0058] Figure 1 It is a flow chart of a method for detecting oil film by marine radar based on the fusion of HOG features and GLCM features described in an embodiment of the present invention.
[0059] Figure 2 2 is an example diagram of preprocessing results in an embodiment of the present invention.
[0060] Figure 3 It is an example diagram of a sub-image in an embodiment of the present invention.
[0061] Figure 4 It is an example of HOG feature in the embodiment of the present invention.
[0062] Figure 5 It is an example of HOG features after dimensionality reduction in an embodiment of the present invention.
[0063] Figure 6 This is an example diagram of the effective area for oil spill detection extracted by classification in an embodiment of the present invention.
[0064] Figure 7It is a flow chart of obtaining the segmentation threshold between real oil spill and suspected oil spill by using a particle swarm optimization algorithm based on a simulated annealing algorithm in an embodiment of the present invention.
[0065] Figure 8 2 is an example diagram of the oil film extraction result in the embodiment of the present invention.
[0066] Fig. 9 It is a structural schematic diagram of a marine radar oil film detection system based on the fusion of HOG features and GLCM features described in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] 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.
[0068] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, equipment, 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 limitation, and any naming is only for distinction and does not have any limiting meaning.
[0069] The present invention proposes a method and system for detecting oil film by marine radar based on the fusion of HOG features and GLCM features, that is, a method for extracting effective areas for oil spill detection by marine radar based on an improved HOG feature descriptor is proposed to solve the practical demand for correctly extracting effective areas for offshore oil spill detection in the field of oil spill detection by marine radar images; at the same time, real oil film targets and suspected oil film targets are segmented based on a particle swarm optimization algorithm.
[0070] The first embodiment of the present invention proposes a method for detecting oil film by marine radar based on the fusion of HOG features and GLCM features. Figure 1 As shown, the method includes:
[0071] Step 1: Obtain marine radar image data;
[0072] Step 2: preprocessing the marine radar image data to obtain a preprocessed image;
[0073] Step 3: Cut the preprocessed image to obtain multiple sub-images;
[0074] Step 4: extract the directional gradient histogram of each sub-image, and perform feature dimensionality reduction on the obtained multiple directional gradient histograms;
[0075] Step 5: extract multiple features of the gray level co-occurrence matrix of each sub-image;
[0076] Step 6: Using the factor analysis method, multiple directional gradient histograms after dimensionality reduction are fused with multiple features in the gray-level co-occurrence matrix to obtain fused features;
[0077] Step 7: Input the fused features into the pre-trained classifier for classification to obtain the effective area for oil spill detection;
[0078] Step 8: Use the improved particle swarm optimization algorithm based on simulated annealing algorithm to segment the effective area of oil spill detection and obtain the oil film extraction result.
[0079] The method starts with step 1. First, in step 1, an original marine radar image is obtained; then, in step 2, the marine radar image data is preprocessed to obtain a preprocessed image; then, in step 3, the preprocessed image is cut to obtain a plurality of sub-images.
[0080] According to an embodiment of the present invention, first, the original image of the marine radar is obtained; after the image is obtained, the image can be preprocessed as follows: coordinate transformation, noise reduction filtering, 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 sub-images of 32×32 pixels, as shown in Figure 3 shown.
[0081] Then, step 4 is executed. In step 4, the directional gradient histogram of each sub-image is extracted, and the feature dimension reduction is performed on the obtained multiple directional gradient histograms; wherein, extracting the directional gradient histogram of each sub-image includes: normalizing each sub-image; dividing each sub-image into multiple cells, and then dividing the gradient direction of each cell into multiple direction blocks, and calculating the gradient of each pixel; counting the directional gradient histogram of each cell, and then obtaining the directional gradient histogram of each sub-image.
[0082] According to an embodiment of the present invention, the Histogram of Oriented Gradient (HOG) is a description operator of shape edge features that can detect objects in an image. The specific implementation of the HOG feature extraction algorithm includes:
[0083] 1) Grayscale and normalize the image. Since the original image of the marine radar is a single-band grayscale image, the marine radar image can be directly normalized. In this embodiment, the Gamma correction method is used to normalize the marine radar preprocessing.
[0084] 2) Calculate the gradient of each pixel in the image. The gradient size G x The calculation formula of (x, y) and direction θ(x, y) is as follows:
[0085]
[0086]
[0087] Among them, G x (x,y) represents the horizontal gradient, G y (x,y) represents the vertical gradient.
[0088] 3) Count the gradient direction histogram of each cell. In this embodiment, the slice is divided into 4 cells, and the gradient direction of each cell is evenly divided into 9 direction blocks (360° in total). In this way, each cell generates 9 features h i , 4 cells generate a total of 36 features, such as Figure 4 shown.
[0089] 4) Since each slice generates 36 features, the feature dimension is relatively high. In this embodiment, it is proposed to use variance weights to improve HOG features to achieve the effect of feature dimensionality reduction. First, the variance σ of each cell is calculated. i , and then use the following formula to calculate the weight coefficient W of each cell i :
[0090]
[0091] Here, m represents the number of cells, and in this embodiment, m=4.
[0092] Then, the feature v of each cell in each direction of each slice is ij and weight coefficient W i Fusion is performed to obtain low-dimensional features v ij ':
[0093]
[0094] Among them, v ij Represents the histogram gradient of the i-th cell in the j-th direction. The extracted improved HOG features are as follows: Figure 5 shown.
[0095] Then, step five is performed, in which a plurality of features in the gray level co-occurrence matrix of each sub-image are extracted.
[0096] According to an embodiment of the present invention, six features are extracted from the gray level co-occurrence matrix (GLCM) of each slice: energy, contrast, inverse moment, entropy, and autocorrelation.
[0097] Then, step six is executed. In step six, a factor analysis method is used to fuse the multiple directional gradient histograms after dimensionality reduction with the multiple features in the gray-level co-occurrence matrix to obtain the fused features.
[0098] According to an embodiment of the present invention, the fusion process includes: combining the multiple directional gradient histograms after dimension reduction with each feature v of the multiple features in the gray level co-occurrence matrix ij 'Perform standardization and calculate the multiple features v ij 'Correlation coefficient matrix composed of each feature v ij 'It is expressed as the sum of the linear function of the common factors and the special factors, and the maximum likelihood estimation method is used to calculate each feature v ij 'The corresponding factor loading matrix; the factor score coefficients are calculated based on the correlation coefficient matrix and the factor loading matrix; according to the factor score coefficients, the multiple directional gradient histograms after dimensionality reduction and the multiple features in the gray level co-occurrence matrix are merged into three features. The details are as follows.
[0099] First, the multiple directional gradient histograms after dimension reduction are compared with each feature v in the multiple features in the gray level co-occurrence matrix ij ′ is standardized and multiple features v are calculated ij The correlation coefficient matrix composed of ′ specifically includes:
[0100] 1) Each eigenvalue v ij The standardization formula is:
[0101]
[0102] In the formula, represents the average value of the i-th feature of the data set, S i Represents the variance of the i-th eigenvalue in the data set.
[0103] 2) Calculate the correlation coefficient matrix R of the sample = (r ij ) p×p , r ii =r ij =1, r ij =r ji , r ij is the correlation coefficient between the i-th feature and the j-th feature, P represents the total number of features, 1≤i≤P, 1≤j≤P.
[0104] Then, each feature v ij′ is expressed as the sum of the linear function of the common factors and the special factors:
[0105] v ij ′=α i1 F1+α i2 F2+…+α in F n +ε i (6)
[0106] Where F1, F2, …, F n represents the common factor, n is the number of common factors, ε i represents a special factor; α in represents factor loading, which indicates the loading of the ith feature on the nth common factor;
[0107] Then, the factor loading matrix is extracted using the maximum likelihood estimation method:
[0108] Let X1, X2, ..., X n is a normal sample set N p For a random sample in (μ, ∑) (p is the characteristic number, ∑ represents the covariance matrix), if the common factor F and the special factor ε obey the normal distribution, then:
[0109] ∑=AA′+∑ ε (7)
[0110]
[0111] As can be seen from the above function, the value of A varies. To fix the value of A, a uniqueness condition can be added:
[0112]
[0113] Where Λ is a diagonal matrix, the maximum likelihood estimate can be obtained by maximization method and Since the only condition is imposed, is a diagonal matrix, and the likelihood function reaches its maximum.
[0114] The unique A is determined, and the corresponding common factor variance is:
[0115]
[0116] 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.
[0117] The contribution of the jth factor to the total variance is:
[0118]
[0119] In the formula It is called variance contribution and measures the relative importance of the jth factor.
[0120] According to the elementary load matrix, calculate the contribution rate of each common factor and select q main factors. Rotate the extracted factor load matrix to obtain the matrix:
[0121]
[0122] in, is the first q columns of A, T is an orthogonal matrix, and the factor model is constructed:
[0123]
[0124] The factor scores are calculated by regression estimation method and comprehensive evaluation is performed. The factor score is the most important result of factor analysis. When the factor loading is determined, the specific value (factor score) of each factor on each sample is calculated to replace the original variable, so as to achieve the effect of dimensionality reduction. That is, based on the correlation coefficient matrix and the factor loading matrix, the regression estimation method is used to find the coefficient of a single factor score:
[0125]
[0126] remember:
[0127]
[0128]
[0129] Then we have:
[0130]
[0131] in, are the correlation coefficient matrix of the original variables, the coefficient of the j-th factor score function, and the j-th column of the loading matrix. In matrix form, we have:
[0132]
[0133] Finally, the multiple directional gradient histograms after dimensionality reduction and the multiple features in the gray-level co-occurrence matrix are fused into three features according to the factor score coefficients:
[0134]
[0135] Then, step seven is executed. In step seven, the fused features are input into a pre-trained classifier for classification to obtain the effective area for oil spill detection.
[0136] According to an embodiment of the present invention, a classifier based on a random forest algorithm is used to classify the three fused new features and extract the effective area for oil spill detection, such as Figure 6 shown.
[0137] Then, step eight is executed. In step eight, the effective area for oil spill detection is segmented by using an improved particle swarm optimization algorithm based on simulated annealing algorithm to obtain an oil film extraction result.
[0138] According to an embodiment of the present invention, the classical particle swarm algorithm includes:
[0139] Initialize n random particles to represent candidate solutions (in this embodiment, the number of particles n is set to 90), and the particles update their speed and position using the following formula:
[0140] v i (k+1)=ωv i (k)+c1r1(P best.i (k)-x i (k))+c2r2(G best -x i (k))
[0141] x i (k+1)=x i (k)+v i (k+1)
[0142] Wherein, ω is the inertia weight coefficient (ω is 1.1 in this embodiment); c1 and c2 represent the weight of pushing the particle to the optimal position of the individual and the weight of pushing the particle to the optimal position of the group respectively (c1 and c2 are both 1.49 in this embodiment); v i (k) and x i (k) represent the velocity and position of the i-th particle at the k-th iteration; r1 and r2 are random numbers in [0, 1]; P best.i is the optimal position of the i-th particle; G best If any dimension of the particle position exceeds the upper bound Upbound and the lower bound Lowbound, it will be directly assigned to Upbound or Lowbound (in this embodiment, Upbound is 1 and Lowbound is 0).
[0143] The principle of the classic simulated annealing algorithm is: assuming that the initial state of the object sets an initial temperature T0, given a state i, the energy of the state is E i , the energy E of the new state j that changes iteratively j If E i >E j, the new state is accepted as the current state; otherwise, the state is determined to be accepted with a certain probability. Its acceptance probability p i The expression is as follows:
[0144]
[0145] Among them, E g represents the internal energy of the current population at the optimal point; T i Indicates the current temperature. When the energy of the new state is less than the energy of the current state, the new solution is accepted. When the energy of the new state is greater than or equal to the energy of the current state, the solution is accepted with a certain probability p. i Accept the new solution and make E g =E i .
[0146] Therefore, the present invention adopts an improved particle swarm optimization algorithm based on simulated annealing algorithm to obtain the segmentation threshold of real oil spill and suspected oil spill, such as Figure 7 As shown, specifically including:
[0147] 1) According to the initial state of the particles in the population, an initial temperature T0 (T0 is set to 100 in this embodiment) and an annealing constant λ (λ is 0.95^100-0.95 in this embodiment) are set. 100 ), the total number of simulated annealing iterations J (in this embodiment, I is set to 100), and the number of iterations is j. The temperature T of the annealing function is used i for:
[0148] T i =T i-1 *0.95 k
[0149] Among them, k=Jj.
[0150] Simulated annealing acceptance probability p i for:
[0151]
[0152] 2) Particle i calculates the update speed v through the formula in the particle swarm i and position x i .
[0153] 3) According to the fitness function, calculate the current position x i The fitness f(xi); the fitness function is:
[0154]
[0155]
[0156] Among them, d ik is the current position xi The distance to the classification threshold array g, g k is the k-th classification threshold, and m is the number of classifications.
[0157] 4) If f(x i )<f(P best.i ), then set P best.i =x i ; If f(x i )>f(P best.i ), using the above simulated annealing acceptance probability p i Perform the Meltrov-Metropolis criterion judgment, probability p i If the random number is greater than the interval [0, 1], the state P is still accepted. best.i =x i ; If not, re-update the speed v i and position x i .
[0158] 5) If P best.i Accepts the new value x i , that is, P best.i =x i , then according to the fitness function, compare f(P best.i ) and f(G best.i ), if f(P best.i )<f(G best.i ), then G best.i =P best.i ;
[0159] 6) Test G best.i Whether the termination condition (maximum number of iterations) is met, if the condition is met, obtain G best.i is the segmentation threshold of the particle swarm optimization algorithm; if it is not satisfied, the annealing function is used to update the temperature T i , and then continue back to step 2) for iteration.
[0160] Finally, the real oil film and the suspected oil film are segmented based on the obtained global optimal segmentation threshold to obtain the oil film extraction result, such as Figure 8 shown.
[0161] The HOG operator based on variance weighting improvement proposed in the embodiment of the present invention can effectively reduce the dimension of features and improve the classification efficiency of the effective detection area of oil spills; the factor analysis method is used to fuse the HOG features with the GLCM features, effectively retain the slice shape features and texture features, and improve the classification effect of the effective detection area of oil spills; the particle swarm algorithm based on simulated annealing is used to iteratively optimize and calculate the adaptive dual threshold value, and the real oil film and the suspected oil film are respectively segmented, which can provide effective data reference for the disaster loss assessment of oil spill accidents.
[0162] Another embodiment of the present invention provides a marine radar oil film detection system based on the fusion of HOG features and GLCM features, such as Fig. 9 As shown, the system includes:
[0163] An image acquisition module 910 is configured to acquire marine radar image data and preprocess the marine radar image data to acquire a preprocessed image;
[0164] An image segmentation module 920 is configured to segment the preprocessed image to obtain a plurality of sub-images;
[0165] A HOG feature extraction module 930 is configured to extract a directional gradient histogram of each sub-image and perform feature dimension reduction on the obtained multiple directional gradient histograms;
[0166] a GLCM feature extraction module 940 configured to extract a plurality of features in the gray level co-occurrence matrix of each sub-image;
[0167] A feature fusion module 950 is configured to use a factor analysis method to fuse the multiple directional gradient histograms after dimension reduction with the multiple features in the gray level co-occurrence matrix to obtain fused features;
[0168] A classification module 960, which is configured to input the fused features into a pre-trained classifier for classification to obtain an effective area for oil spill detection;
[0169] The oil film extraction module 970 is configured to segment the effective area for oil spill detection by using an improved particle swarm optimization algorithm based on a simulated annealing algorithm to obtain an oil film extraction result.
[0170] In this embodiment, optionally, the extracting of the directional gradient histogram of each sub-image in the HOG feature extraction module 930 includes: normalizing each sub-image; dividing each sub-image into a plurality of cells, and then dividing the gradient direction of each cell into a plurality of directional blocks, and calculating the gradient of each pixel; counting the directional gradient histogram of each cell, and then obtaining the directional gradient histogram of each sub-image; and performing feature dimensionality reduction on the obtained plurality of directional gradient histograms includes:
[0171] Calculate the variance σ of each cell in each sub-image i , and use the following formula to calculate the weight coefficient W of each cell i :
[0172]
[0173] Where m represents the number of cells in each sub-image;
[0174] The directional gradient histogram of each cell in each sub-image is combined with the weight coefficient W i Fusion is performed to obtain a low-dimensional new feature v ij ':
[0175]
[0176] Among them, v ij Represents the histogram gradient of the jth direction of the i-th cell.
[0177] In this embodiment, optionally, the feature fusion module 950 adopts a factor analysis method to fuse the multiple directional gradient histograms after dimensionality reduction with the multiple features in the gray-level co-occurrence matrix, and obtains the fused features, including: normalizing the multiple directional gradient histograms after dimensionality reduction and each of the multiple features in the gray-level co-occurrence matrix, and calculating the correlation coefficient matrix after 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 loading matrix corresponding to each feature; calculating the factor score coefficient based on the correlation coefficient matrix and the factor loading matrix; and fusing the multiple directional gradient histograms after dimensionality reduction and the multiple features in the gray-level co-occurrence matrix into three features according to the factor score coefficient.
[0178] In this embodiment, optionally, the oil film extraction module 970 uses an improved particle swarm optimization algorithm based on a simulated annealing algorithm to segment the effective area for oil spill detection, and obtains the oil film extraction result, including:
[0179] Set the initial temperature, annealing constant, total number of simulated annealing iterations, and maximum number of iterations according to the initial state of the population particles;
[0180] The population particles update their velocity and position in each iteration; calculate the current position x i The fitness value f(x i ); if f(x i )<f(P best.i ), then set the optimal position P of the i-th particle best.i =x i , and compared f(P best.i ) and f(G best.i ), G best.i represents the optimal position of the population, if f(P best.i )<f(G best.i ), then G best.i =P best.i ;
[0181] If f(x i )>f(P best.i), then the simulated annealing acceptance probability pi is used to perform the Meltrov criterion judgment. If the probability pi is greater than a random number in the interval [0, 1], the state P is still accepted. best.i =x i ; If not, re-update the speed and position;
[0182] Check whether the maximum number of iterations has been reached. If so, G best.i is the global optimal segmentation threshold; if it is not reached, the annealing function formula is used to update the temperature T i , and continue to iterate;
[0183] The real oil film and the suspected oil film are segmented based on the obtained global optimal segmentation threshold to obtain the oil film extraction result.
[0184] The function of the marine radar oil film detection system based on the fusion of HOG features and GLCM features described in this embodiment can be explained by the aforementioned marine radar oil film detection method based on the fusion of HOG features and GLCM features. For the parts not described in detail in this embodiment, please refer to the above method embodiments.
[0185] 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.
[0186] 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.
[0187] 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 the fusion of HOG feature and GLCM feature, characterized in that: include: Acquire marine radar image data; Preprocessing the marine radar image data to obtain a preprocessed image; Cut the preprocessed image to obtain multiple sub-images; Extract the directional gradient histogram of each sub-image, and perform feature dimensionality reduction on the obtained multiple directional gradient histograms; including: normalize each sub-image; divide each sub-image into multiple cells, and then divide the gradient direction of each cell into multiple directional blocks, and calculate the gradient of each pixel; count the directional gradient histogram of each cell, and then obtain the directional gradient histogram of each sub-image; calculate the variance σ of each cell in each sub-image i , and use the following formula to calculate the weight coefficient W of each cell i : Where m represents the number of cells in each sub-image; The directional gradient histogram of each cell in each sub-image is combined with the weight coefficient W i Fusion is performed to obtain a low-dimensional new feature v ij ': Among them, v ij Represents the histogram gradient of the jth direction of the i-th cell; Extract multiple features from the gray-level co-occurrence matrix of each sub-image; The factor analysis method is used to fuse multiple directional gradient histograms after dimensionality reduction with multiple features in the gray-level co-occurrence matrix to obtain the fused features; The fused features are input into the pre-trained classifier for classification to obtain the effective area for oil spill detection; The improved particle swarm optimization algorithm based on simulated annealing 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 the fusion of HOG feature and GLCM feature according to claim 1, characterized in that: The multiple features extracted from the gray level co-occurrence matrix of each sub-image include energy, contrast, inverse difference moment, entropy, and autocorrelation.
3. The method for detecting oil film by marine radar based on the fusion of HOG feature and GLCM feature according to claim 1, characterized in that: The process of fusing the multiple directional gradient histograms after dimensionality reduction with the multiple features in the gray-level co-occurrence matrix by using the factor analysis method includes: Standardize each of the multiple features in the multiple directional gradient histograms and the gray-level co-occurrence matrix after dimensionality reduction, and calculate the correlation coefficient matrix after the standardization; 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; Calculate and obtain factor score coefficients based on the correlation coefficient matrix and the factor loading matrix; According to the factor score coefficients, the multiple directional gradient histograms after dimensionality reduction and the multiple features in the gray level co-occurrence matrix are fused into three features.
4. The method for detecting oil film by marine radar based on the fusion of HOG feature and GLCM feature according to claim 1, characterized in that: The pre-trained classifier is a classifier based on a random forest algorithm.
5. The method for detecting oil film by marine radar based on the fusion of HOG feature and GLCM feature according to claim 1, characterized in that: The improved particle swarm optimization algorithm based on simulated annealing algorithm is used to segment the effective area of oil spill detection and obtain the oil film extraction result, which includes: Set the initial temperature, annealing constant, total number of simulated annealing iterations, and maximum number of iterations according to the initial state of the population particles; The population particles update their velocity and position in each iteration; calculate the current position x i The fitness value f(x i ); if f(x i )<f(P best.i ), then set the optimal position P of the i-th particle best.i =x i , and compared f(P best.i ) and f(G best.i ), G best.i represents the optimal position of the population, if f(P best.i ) <f(G best.i ), then G best.i =P best.i ; If f(x i )>f(P best.i ), then the simulated annealing acceptance probability pi is used to perform the Meltrov criterion judgment. If the probability pi is greater than the random number in the interval [0,1], the state P is still accepted. best.i =x i ; If not, re-update the speed and position; Check whether the maximum number of iterations has been reached. If so, G best.i is the global optimal segmentation threshold; if it is not reached, the annealing function formula is used to update the temperature T i , and continue to iterate; The real oil film and the suspected oil film are segmented based on the obtained global optimal segmentation threshold to obtain the oil film extraction result.
6. The method for detecting oil film by marine radar based on the fusion of HOG feature and GLCM feature according to claim 5, characterized in that: The calculation formula of the simulated annealing acceptance probability pi is: In the formula, E i represents the energy of the current state i; E g Represents the internal energy of the current population at the optimal point; The annealing function formula is: T i =T i-1 *0.95 k Where, T i Indicates the temperature corresponding to the current state; T i-1 Represents the temperature corresponding to the previous state; k is equal to the total number of simulated annealing iterations minus the number of iterations.
7. A marine radar oil film detection system based on the fusion of HOG features and GLCM features, characterized in that: include: An image acquisition module, configured to acquire marine radar image data, and preprocess the marine radar image data to acquire a preprocessed image; An image segmentation module, configured to segment the preprocessed image to obtain a plurality of sub-images; The HOG feature extraction module is configured to extract the directional gradient histogram of each sub-image and perform feature dimensionality reduction on the obtained multiple directional gradient histograms; including: normalizing each sub-image; dividing each sub-image into multiple cells, and then dividing the gradient direction of each cell into multiple direction blocks, and calculating the gradient of each pixel; counting the directional gradient histogram of each cell, and then obtaining the directional gradient histogram of each sub-image; the feature dimensionality reduction of the obtained multiple directional gradient histograms includes: Calculate the variance σ of each cell in each sub-image i , and use the following formula to calculate the weight coefficient W of each cell i : Where m represents the number of cells in each sub-image; The directional gradient histogram of each cell in each sub-image is combined with the weight coefficient W i Fusion is performed to obtain a low-dimensional new feature v ij ': Among them, v ij Represents the histogram gradient of the jth direction of the i-th cell; a GLCM feature extraction module configured to extract a plurality of features in a gray level co-occurrence matrix of each sub-image; A feature fusion module is configured to use a factor analysis method to fuse multiple directional gradient histograms after dimensionality reduction with multiple features in a gray-level co-occurrence matrix to obtain fused features; 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 by using an improved particle swarm optimization algorithm based on a simulated annealing algorithm to obtain an oil film extraction result.
Citation Information
Patent Citations
Disease prediction system based on block chain and medical image
CN114820550A
Shipborne microwave radar image oil spill detection method and system based on BP neural network
CN115661649A