Offshore oil leakage target processing method, electronic equipment and storage medium
The offshore oil leakage image processing is carried out through the frequency domain of the sub-channel, combined with adaptive filtering and parallel expansion and fusion of RGB color components, and combined with the self-coding-LSTM neural network to predict the oil spill boundary pixel coordinates and speed, solving the problems of large calculation amount, numerous parameters and poor real-time performance in the existing technology, and achieving more accurate and efficient oil spill diffusion prediction.
Patent Information
- Application Number
- CN202510106521.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art has problems such as large calculation volume, numerous parameters and poor real-time performance in the image processing and prediction of offshore oil leakage. Especially when dealing with oil spill diffusion under the influence of wind and waves, the model has high complexity and low accuracy.
Image enhancement is performed by channel frequency domain combined with adaptive filtering, image segmentation is performed by combining RGB color components parallel expansion and fusion, and timing sequence data of boundary pixel coordinates and velocity is obtained through frequency domain motion feature extraction, and input it into the self-encoding-LSTM neural network for prediction.
It improves the robustness and computing efficiency of image processing, can more accurately predict the pixel coordinates and velocity of oil spill boundary, and enhances the ability to predict the diffusion trend of offshore oil leakage.
Smart Images

Figure CN119625538A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for processing an offshore oil leakage target, electronic equipment and a storage medium, and belongs to the technical field of image processing. Background Art
[0002] The environmental pollution problems that may be caused by offshore oil drilling platforms during oil production and tanker transportation are receiving increasing attention. In particular, offshore oil spills, after being dispersed by wind and waves, have the characteristics of irregular shape, uncertain diffusion area, and great influence of wind and waves, which makes it more complicated to accurately detect the location of the leaked crude oil and predict the diffusion trend.
[0003] In the existing technology, in the image enhancement, segmentation processing and data acquisition stages, the image processing methods based on deep learning have problems such as large amount of calculation, many parameters, and poor real-time performance. At the same time, since the oil spill diffusion target is significantly affected by wind and waves, the neural network algorithm needs to perform a large amount of hyperparameter tuning during the training process, which further reduces the efficiency of obtaining the oil spill boundary coordinates and velocity data. After obtaining the time series of the oil spill boundary pixel coordinates and velocity, the oil spill diffusion prediction stage is entered. The traditional pure data-driven neural network prediction scheme has the problems of high model complexity, large number of parameters, and low accuracy.
[0004] Therefore, there is an urgent need for an image processing and prediction method that conforms to the actual laws of oil spills, in order to predict changes in the alarm situation and buy more time for emergency response. Summary of the invention
[0005] Purpose: In order to overcome the deficiencies in the prior art, the present invention provides a method for processing an offshore oil leak target, an electronic device and a storage medium.
[0006] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is:
[0007] In the first aspect, a method for handling an offshore oil spill target specifically includes:
[0008] Step 1: Perform image enhancement processing of the acquired remote sensing image of the offshore oil leak target by using a channel-by-channel frequency domain joint adaptive filtering to obtain a processed remote sensing image.
[0009] Step 2: Perform image segmentation by parallel expansion and fusion of RGB color components on the processed remote sensing image to obtain edge pixels of the oil spill area.
[0010] Step 3: Based on the edge pixel coordinate set of the oil spill area, the velocity solution of frequency domain motion feature extraction is performed to obtain the time series data of boundary pixel point coordinates and velocity.
[0011] Step 4: Input the time series data of boundary pixel coordinates and speed into the autoencoder-LSTM neural network to obtain the predicted pixel coordinates and speed of the oil spill boundary at the future moment.
[0012] As a preferred solution, the step 1 specifically includes:
[0013] Step 1.1: Obtain color remote sensing images of offshore oil spill targets , for color remote sensing images Each channel is transformed in the frequency domain to obtain the frequency domain image of each channel .
[0014] Step 1.2: Frequency domain images of each channel Filter to obtain the frequency enhanced spectrum of each channel .
[0015] Step 1.3: Spectrum diagram after frequency enhancement of each channel Perform inverse frequency domain transform to obtain the frequency domain processed image of each channel .
[0016] Step 1.4: Use the boundary feature adaptive filtering algorithm to process the image after frequency domain processing of each channel Filtering is performed to obtain the images of each channel after spatial domain adaptive filtering. .
[0017] Step 1.5: Process the image in the spatial domain of each channel Perform weighted fusion to obtain the processed enhanced image .
[0018] As a preferred solution, the step 2 specifically includes:
[0019] Step 2.1: Enhanced image after processing Select a set of seed points in each channel image.
[0020] Step 2.2: Concentrate the seed points of each channel and perform regional growth according to the growth rule to obtain the growth result image of each channel.
[0021] Step 2.3: Merge the growth result images of each channel to obtain the binary images of the segmented oil spill area and background area.
[0022] Step 2.4: Use the 8-neighborhood connection method to check the neighborhood of each pixel in the oil spill area, obtain the edge pixels of the oil spill area, and form the edge pixels into an edge coordinate set .
[0023] As a preferred solution, the step 3 specifically includes:
[0024] Step 3.1: Get k images of size The edge pixels of the image containing the oil spill area are used to construct the edge pixel coordinate set of the oil spill area. .
[0025] Step 3.2: An edge pixel in the frame is taken as the target point, and the coordinates of the target point are Project it onto the x-axis. Sum the grayscale of each row of pixels of the target point in the projected image, and the sum is e x p [ j 2 π a 1 x Δ t ] .
[0026] in, e x p [ ] is the natural exponential function, is an imaginary unit, is the circumference of a circle, is a positive integer, is the x-axis coordinate value of the target point, is the time interval between frames.
[0027] Step 3.3: In the frame, the target point changes from the initial position Move to a new location Repeat step 3.2 to get the sum e x p [ j 2 π a 1 ( x + 1 ) Δ t ] .
[0028] Step 3.4: If the target point continues to move in the x-axis direction at a constant speed. At any integer time frame 𝑡, the position of the target point will be Repeat step 3.2 to get the sum e x p [ j 2 π a 1 ( x + t ) Δ t ] .in, .
[0029] Step 3.5: Use Euler's formula to sum e x p [ j 2 π a 1 ( x + t ) Δ t ] Decompose into cosine function and sine function.
[0030] Step 3.6: Set the size of k frames to The oil spill area images are composed of a sequence. At any integer time 𝑡, the sequence is projected onto the x-axis and the sum of the weighted projections is calculated. .
[0031] Step 3.7: Sum of weighted projections The sine function is used to transform the frequency domain and obtain the sum of weighted projections The peak value of the spectrum .
[0032] Step 3.8: Get the peak value of the spectrum Parameters in , according to the parameters and parameters And parameters and parameters , calculate the speed of the target point along the x-axis .
[0033] Step 3.9: Repeat steps 3.2 to 3.8 to calculate the velocity of the target point along the y-axis. .
[0034] Step 3.10: The speed of the target point along the x-axis and y-axis obtained in the same time frame , And the coordinates of the target point Merge into time series data of boundary pixel coordinates and speed .
[0035] As a preferred solution, the autoencoder-LSTM neural network includes an encoder, an LSTM intermediate layer, and a decoder.
[0036] The encoder includes: a first fully connected layer, a first ReLU activation layer, a second fully connected layer, a second ReLU activation layer, and a third fully connected layer, which are connected in sequence.
[0037] Among them, the first fully connected layer has an input dimension of 5 and an output dimension of 128.
[0038] The second fully connected layer has an input dimension of 128 and an output dimension of 64.
[0039] The third fully connected layer has an input dimension of 64 and an output dimension of 32.
[0040] The LSTM intermediate layer includes: a plurality of LSTM units connected in sequence.
[0041] Among them, the loss function of the LSTM intermediate layer is The expression is as follows:
[0042]
[0043] in, represents the predicted value of the x-coordinate of the i-th iteration, represents the actual value of the x-coordinate of the i-th iteration, represents the predicted value of the y coordinate of the i-th iteration, represents the actual value of the y coordinate of the i-th iteration, represents the predicted value of the x-direction velocity at the i-th iteration, represents the actual value of the x-direction velocity at the i-th iteration, represents the predicted value of the y-direction velocity at the i-th iteration, represents the actual value of the y-direction velocity at the i-th iteration, represents the number of iterations, D is the diffusion coefficient, C is the oil spill concentration, and are the weight coefficients of the prediction error term and the physical model constraint term respectively.
[0044] The encoder includes: a fourth fully connected layer, a third ReLU activation layer, a fifth fully connected layer, a fourth ReLU activation layer, and a sixth fully connected layer which are connected in sequence.
[0045] Among them: the fourth fully connected layer has an input dimension of 20 and an output dimension of 64.
[0046] The fifth fully connected layer has an input dimension of 64 and an output dimension of 128.
[0047] The sixth fully connected layer has an input dimension of 128 and an output dimension of 5.
[0048] As a preferred solution, the frequency spectrum of each channel after frequency enhancement is The expression is as follows:
[0049]
[0050] in, represents the frequency domain joint filter.
[0051] Frequency Domain Joint Filter The expression is as follows:
[0052]
[0053] in, represents a multi-scale Gaussian bandpass filter, represents a directional filter.
[0054] Among them, the multi-scale Gaussian bandpass filter The expression is as follows:
[0055]
[0056] in, represents the natural exponential function, The frequency components of the image in the frequency domain are located in the horizontal and vertical coordinates of the two-dimensional coordinate system. Indicates the target frequency center value, Represents standard deviation.
[0057] Directional filter The expression is as follows:
[0058]
[0059] in, , used to indicate the direction angle of the current frequency component, Indicates the main direction angle set according to the fluctuation trend of the waves in the image.
[0060] As a preferred solution, the method for obtaining the seed point set in each channel image is as follows:
[0061] Calculate the main tone gray value of the high percentile value of the color histogram of each channel image respectively, and let the R channel color difference threshold be , the color difference threshold of the G channel is The color difference threshold of the B channel is .
[0062] The gray value of the pixel in each channel image is greater than the corresponding threshold , Threshold , Threshold The pixel points are used as the R channel seed point set , G channel seed point set and B channel seed point set .
[0063] The growth rules specifically include:
[0064] Check each seed point to see if the pixels in the 8-neighborhood satisfy the predicate logic. .
[0065] If the condition is met, the seed point is added to the queue and marked as processed. If the condition is not met, the seed point is added to the queue and marked as not processed.
[0066] Perform region growth on seed points that meet the conditions in each channel to generate three channel result images , , :
[0067]
[0068] in, It is one of the R, G, and B channels, 1 is the oil spill area, and 0 is the background area.
[0069] When the seed point set is empty, region growing ends.
[0070] Among them, predicate logic , specifically including:
[0071]
[0072] in, The gray value of the current pixel. is the gray value of the seed point. value, you can dynamically adjust the looseness of the growth. To meet the conditions, To not meet the conditions.
[0073] The method for obtaining edge pixels of the oil spill area is specifically as follows:
[0074] Select any pixel in the oil spill area and determine whether the pixels in the up, down, left, right and four diagonal directions of the pixel are 0. If any pixel in the eight directions is 0, the selected pixel in the oil spill area is an edge pixel.
[0075] Traverse all pixels in the oil spill area and add the coordinates of all edge pixels that meet the conditions to the edge coordinate set .
[0076] As a preferred solution, the speed of the target point along the x-axis The size expression is as follows:
[0077] .
[0078] The speed of the target point along the x-axis The direction acquisition method is as follows:
[0079] Calculation parameters ,parameter .
[0080] Among them, the parameters The expression is as follows:
[0081] S 1 x = d 2 R e [ g x ( t , a 1 ) ] d t 2 | t = n
[0082] in, R e [ ] For the practical department, To find the differential.
[0083] S 2 x = d 2 I m [ g x ( t , a 1 ) ] d t 2 | t = n
[0084] in, I m [ ] To find the imaginary part, To find the differential.
[0085] In time n:
[0086] When the parameter With parameters The signs are the same, then the velocity of the target point along the x-axis The direction is the positive direction.
[0087] When the parameter With parameters If the signs are different, then the velocity of the target point along the x-axis The direction is negative.
[0088] When the parameter With parameters is 0, the speed of the target point along the x-axis The direction refers to the next time point The direction of the target point.
[0089] The speed of the target point along the y axis The size expression is as follows:
[0090] .
[0091] in, The peak value of the spectrum Medium Parameters , The peak value of the spectrum Medium Parameters .
[0092] Among them, the speed of the target point along the y axis The direction acquisition method is as follows:
[0093] Calculation parameters ,parameter .
[0094] Among them, the parameters The expression is as follows:
[0095] S 1 y = d 2 R e [ g y ( t , a 2 ) ] dt 2 | t = n
[0096] in, R e [ ] For the practical department, To find the differential, It is the sum of the weighted projections of the sequence onto the y-axis.
[0097] S 2 y = d 2 I m [ g y ( t , a 2 ) ] dt 2 | t = n
[0098] in, I m [ ] To find the imaginary part, To find the differential.
[0099] In time n:
[0100] When the parameter With parameters The signs are the same, then the speed of the target point along the y-axis The direction is the positive direction.
[0101] When the parameter With parameters If the signs are different, the speed of the target point along the y-axis The direction is negative.
[0102] When the parameter With parameters is 0, the speed of the target point along the y axis The direction refers to the next time point The direction of the target point.
[0103] In a second aspect, a computer-readable storage medium stores a computer program, which, when executed by a processor, implements a method for handling an offshore oil spill target as described in any one of the first aspects.
[0104] According to a third aspect, a computer device includes:
[0105] Memory, used to store instructions.
[0106] The processor is used to execute the instructions so that the computer device performs the operations of the method for handling offshore oil leakage targets as described in any one of the first aspects.
[0107] Beneficial effects: The present invention provides a method for processing offshore oil leakage targets, an electronic device and a storage medium. The method of the present invention inputs a remote sensing image in the continuous time domain and can ultimately predict and output the pixel coordinates and velocity sequence of the oil spill boundary at a future moment. When processing images, it can better cope with outliers caused by image noise and wind and waves, has higher robustness, and can save computing resources to provide support for the subsequent diffusion prediction stage. After the pixel coordinates and velocity data are input into the autoencoder-LSTM neural network for information extraction and compression, the time series prediction is successfully completed in combination with the physical model and law of oil spill diffusion. Data dimensionality reduction is achieved through autoencoding, reducing the complexity of the model. The added physical constraints also make the LSTM time series prediction more in line with the physical diffusion law of oil spills in the actual marine environment, improving the accuracy and reliability of the prediction.
[0108] The present invention can meet the high real-time requirements of oil spill treatment and ensure that a quick response can be made after an oil spill occurs. BRIEF DESCRIPTION OF THE DRAWINGS
[0109] Figure 1 The figure is a flow chart of the method for treating an offshore oil spill target according to the present invention.
[0110] Figure 2 This is a schematic diagram of image comparison before and after remote sensing image filtering processing, where: Figure 2The middle figure (a) is a schematic diagram of the original remote sensing image before filtering. Figure 2 The middle figure (b) is a schematic diagram of the image after filtering.
[0111] Figure 3 This is a schematic diagram of the frequency domain motion characteristics analysis of the oil spill target at a certain moment, where: Figure 3 The middle picture (a) is a frame of the remote sensing image sequence. Figure 3 The middle figure (b) is a grayscale 3D visualization diagram of figure (a).
[0112] Figure 4 This is a schematic diagram of the spectrum obtained by the frequency domain transformation formula, where: Figure 4 The middle figure (a) is the peak value of the spectrum Schematic diagram of the spectrum, Figure 4 The middle figure (b) is the peak value of the spectrum Schematic diagram of the spectrum.
[0113] Figure 5 Schematic diagram of the autoencoder-LSTM neural network structure.
[0114] Figure 6 It is a comparison chart of simulation results of the present invention and the prior art on the prediction of pixel coordinates of oil spill boundaries. DETAILED DESCRIPTION
[0115] The following is a clear and complete description of the technical solutions in the examples of the present invention in conjunction with the accompanying drawings in the examples of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the protection scope of the present invention.
[0116] The present invention will be further described below in conjunction with specific embodiments.
[0117] Embodiment 1:
[0118] This embodiment introduces a method for processing an offshore oil spill target. Figure 1 As shown, the specific steps include:
[0119] like Figure 2 As shown, step 1: performing image enhancement processing of the acquired remote sensing image of the offshore oil leakage target by using a channel-by-channel frequency domain joint adaptive filtering to obtain a processed remote sensing image.
[0120] Furthermore, the step 1 specifically includes:
[0121] Step 1.1: Obtain color remote sensing images of offshore oil spill targets , for color remote sensing images Each channel is transformed in the frequency domain to obtain the frequency domain image of each channel .
[0122] In the spatial domain, the pixels of an image are located in a two-dimensional coordinate system. Corresponding to the position of rows and columns. In the frequency domain, the spectrum of an image represents the two-dimensional spatial distribution of frequency components, with coordinates Corresponding to the frequency in the horizontal and vertical directions. A color image contains three channels: R, G, and B, which are recorded as For each channel Perform Fourier transform to obtain frequency domain image :
[0123]
[0124] in: Represents the color remote sensing image in each channel The pixel value of . M and 𝑁 represent the width and height of the image respectively. represents the Fourier transform, Represents the horizontal and vertical coordinates of the pixels of the image in the spatial domain in the two-dimensional coordinate system. The frequency components of the image in the frequency domain are located in the horizontal and vertical coordinates of the two-dimensional coordinate system. represents a natural constant, represents the imaginary unit, Represents pi.
[0125] Step 1.2: Frequency domain images of each channel Filter to obtain the frequency enhanced spectrum of each channel .
[0126] Among them, the frequency enhanced spectrum of each channel The expression is as follows:
[0127]
[0128] in, represents the frequency domain joint filter.
[0129] Frequency Domain Joint Filter The expression is as follows:
[0130]
[0131] in, represents a multi-scale Gaussian bandpass filter, represents a directional filter.
[0132] Among them, the multi-scale Gaussian bandpass filter The expression is as follows:
[0133]
[0134] in, represents the natural exponential function, Indicates the target frequency center value, which is used to control the scale of edge detail enhancement. Represents the standard deviation and is used to determine the frequency bandwidth. The smaller the value, the steeper the Gaussian function curve and the narrower the bandwidth of the filter, which will only allow Very close frequencies are passed, while other frequencies are suppressed. The larger the value is, the flatter the Gaussian function curve is, and the wider the bandwidth of the filter is, the wider the frequency range will be allowed to pass. The value of can control the filter's enhancement effect on edge details of different scales. Values enhance high-frequency details (such as sharp edges), while larger Higher values will smooth the image and reduce high frequency noise.
[0135] Directional filter The expression is as follows:
[0136]
[0137] in, , used to indicate the direction angle of the current frequency component, Indicates the main direction angle set according to the fluctuation trend of the waves in the image.
[0138] Step 1.3: Spectrum diagram after frequency enhancement of each channel Perform inverse frequency domain transform to obtain the frequency domain processed image of each channel .
[0139] Among them, the image after frequency domain processing of each channel The expression is as follows:
[0140]
[0141] in, represents the inverse Fourier transform, C is one of the R, G, and B channels, .
[0142] Step 1.4: Use the boundary feature adaptive filtering algorithm to process the image after frequency domain processing of each channel Filtering is performed to obtain the images of each channel after spatial domain adaptive filtering. .
[0143] The algorithm dynamically adjusts the window size, selectively performs sharpening, and significantly improves the quality of boundary details by enhancing boundary gradients during sharpening. In the spatial domain, it mainly processes the noise in the interface between the oil spill and the seawater in the image.
[0144] The boundary feature adaptive filtering algorithm specifically includes:
[0145] Define the statistics of the local window S, including: maximum value , minimum , median , Center value .
[0146] Determine whether there is noise in the current pixel: , .like and , then the median Reliable, use the current local window, otherwise increase the current local window size and recalculate until the noise removal condition is met or the maximum window value is reached .
[0147] in, Indicates the current local window size, Indicates the upper limit of the local window, which is used in the adaptive filtering process.
[0148] Filter the image in the current local window to obtain the image after filtering in each channel .
[0149] Among them, the image processed by spatial domain adaptive filtering of each channel The expression is as follows:
[0150]
[0151] in: is the Laplacian operator of the image, which is used to enhance local boundary features. It is the sharpening weight, which is used to control the strength of boundary enhancement. In boundary sharpening, the high-frequency enhancement weight is increased. To significantly improve the gradient features of the boundary.
[0152] Step 1.5: Process the image in the spatial domain of each channel Perform weighted fusion to obtain the processed enhanced image .
[0153] Among them, the enhanced image after processing The expression is as follows:
[0154]
[0155] in, Represent the weights of the R, G, and B channels respectively, which are set according to the contribution of the channels to the target oil spill information, among which the channels with higher oil spill contrast significance are given greater weights. , , Represent the images after time domain processing of R, G, and B channels respectively.
[0156] like Figure 2 Middle picture (a), Figure 2 As shown in the middle figure (b), through the frequency domain filtering of the channels and the adaptive processing in the spatial domain, the characteristics of the oil spill area and the boundary can be taken into account, which plays a significant role in noise suppression and detail enhancement:
[0157] 1. Multi-channel filtering: In addition to random noise in oil spill remote sensing images, wind and wave fluctuations in the actual sea environment will significantly affect the texture characteristics and reflectivity of the oil, resulting in interference from wave texture noise. Traditional single-channel frequency domain filtering may lose important features of the oil spill area while removing noise. Therefore, this solution performs frequency domain filtering on the R, G, and B channels of the image respectively, and combines the independent information of each channel to effectively filter out noise interference such as wave texture, while retaining the core features of the oil spill area, improving the overall image quality and detail clarity.
[0158] 2. Directional enhancement: The diffusion pattern of the oil spill area is closely related to the directionality of wind and waves, and its shape often drifts with the waves and has complex directional characteristics. When processing these images, simple filtering methods may blur the boundaries of the oil spill or process noise in different directions unevenly. Therefore, this scheme introduces a directional filter to enhance the texture in a specific direction in the oil spill area, while suppressing noise interference in non-target directions, thereby effectively highlighting the boundaries and motion characteristics of the oil spill area.
[0159] 3. Adaptive filtering: Impulse noise and non-impulse noise often exist in oil spill remote sensing images. Traditional filtering methods often treat the noise of the entire image equally, which can easily lead to incomplete or excessive noise removal in some areas, affecting the boundary clarity and detail performance of the oil spill area. This method uses an adaptive filtering strategy, combined with the reflectivity of the oil spill layer and the particularity of the oil spill boundary, to dynamically adjust the filter intensity and filter window size, accurately identify the oil spill boundary, effectively smooth the noise, reduce the refinement or coarsening distortion of the object boundary, and retain the key feature details of the image.
[0160] Step 2: Perform image segmentation by parallel expansion and fusion of RGB color components on the processed remote sensing image to obtain edge pixels of the oil spill area.
[0161] Furthermore, the step 2 specifically includes the following steps:
[0162] Step 2.1: Enhanced image after processing Select a set of seed points in each channel image.
[0163] Among them, the method for obtaining the seed point set in each channel image is as follows:
[0164] Calculate the main tone gray value of the high percentile value of the color histogram of each channel image respectively, and let the R channel color difference threshold be , the color difference threshold of the G channel is The color difference threshold of the B channel is .
[0165] The gray value of the pixel in each channel image is greater than the corresponding threshold , Threshold , Threshold The pixel points are used as the R channel seed point set , G channel seed point set and B channel seed point set .
[0166] Wherein, the high percentile value is set to 99.9%.
[0167] Step 2.2: Concentrate the seed points of each channel and perform regional growth according to the growth rule to obtain the growth result image of each channel.
[0168] The growth rules specifically include:
[0169] Check each seed point to see if the pixels in the 8-neighborhood satisfy the predicate logic. .
[0170] If the condition is met, the seed point is added to the queue and marked as processed. If the condition is not met, the seed point is added to the queue and marked as not processed.
[0171] Perform region growth on seed points that meet the conditions in each channel to generate three channel result images , , :
[0172]
[0173] in, It is one of the R, G, and B channels, 1 is the oil spill area, and 0 is the background area.
[0174] When the seed point set is empty, region growing ends.
[0175] Among them, predicate logic , specifically including:
[0176]
[0177] in, The gray value of the current pixel. is the gray value of the seed point. value, you can dynamically adjust the looseness of the growth. To meet the conditions, To not meet the conditions.
[0178] Step 2.3: Merge the growth result images of each channel to obtain the binary images of the segmented oil spill area and background area.
[0179] Among them, the growth result image expression after each channel is merged is as follows:
[0180]
[0181] In the formula, is the merged growth result image, To take the union, when one channel is 1, the merged growth result image is 1. Indicates that the pixel belongs to the oil spill area. Indicates that the pixel belongs to the background area.
[0182] Step 2.4: Use the 8-neighborhood connection method to check the neighborhood of each pixel in the oil spill area, obtain the edge pixels of the oil spill area, and form the edge pixels into an edge coordinate set .
[0183] Among them, the edge pixel acquisition method of the oil spill area is as follows:
[0184] Select any pixel in the oil spill area and determine whether the pixels in the up, down, left, right and four diagonal directions of the pixel are 0. If any pixel in the eight directions is 0, the selected pixel in the oil spill area is an edge pixel.
[0185] Traverse all pixels in the oil spill area and add the coordinates of all edge pixels that meet the conditions to the edge coordinate set .
[0186] Image segmentation for parallel expansion and fusion of RGB color components: Traditional algorithms such as region growing are usually applied to grayscale images or single-channel images. In this scheme, considering the different reflectivity of oil-water mixtures of different thicknesses and concentrations, if only a single-channel analysis is performed, the real oil spill area may be missed due to the deficiency of a certain channel. In addition, due to the reflective characteristics of the oil film on the sea surface in actual scene applications, it greatly interferes with the detection of the edge of the oil spill. The oil spill area may have very obvious features in a certain channel (such as the reflection of the oil film may enhance the R channel), but it may be weak in other channels. The segmentation algorithm of a single channel cannot accurately determine the edge of the oil spill. This method comprehensively measures the color differences of the three RGB channels, and after taking the union, it can maximize the retention of the oil spill area identified in each channel, and tolerate the loss of local areas caused by channel differences or noise. Thereby improving the sensitivity of image segmentation.
[0187] Step 3: Based on the edge pixel coordinate set of the oil spill area, the velocity solution of frequency domain motion feature extraction is performed to obtain the time series data of boundary pixel point coordinates and velocity. .
[0188] Further, the step 3 specifically includes:
[0189] Step 3.1: Get k images of size Oil spill area images (continuous The edge pixels of the oil spill area are obtained by shooting at a constant speed and constructing the edge pixel coordinate set of the oil spill area. .
[0190] Among them, the edge pixel coordinate set of the oil spill area The expression is as follows:
[0191]
[0192] in, represents the time frame, Indicates The coordinates of the oil spill area in the frame are edge pixels.
[0193] Step 3.2: An edge pixel in the frame is taken as the target point, and the coordinates of the target point are Project it onto the x-axis. Sum the grayscale of each row of pixels of the target point in the projected image, and the sum is e x p [ j 2 π a 1 x Δ t ] .
[0194] in, e x p [ ] is the natural exponential function, is an imaginary unit, is the circumference of a circle, is a positive integer, is the x-axis coordinate value of the target point, is the time interval between frames.
[0195] Sum e x p [ j 2 π a 1 x Δ t ] The result is obtained by accumulating the pixel grayscale values of each column of the target point in the image, where is a positive integer representing an integer multiple of the frequency, and is the time interval between frames. This sum actually represents the cumulative change of the pixel gray value per unit time in the x-axis direction, thus reflecting the movement of the target in the x-axis direction.
[0196] Step 3.3: In the frame, the target point changes from the initial position Move to a new location That is, it moves 1 pixel along the x-axis. Repeat step 3.2 to get the sum value e x p [ j 2 π a 1 ( x + 1 ) Δ t ] .
[0197] Step 3.4: If the target point continues to move in the x-axis direction at a constant speed. At any integer time frame 𝑡, the position of the target point will be Repeat step 3.2 to get the sum e x p [ j 2 π a 1 ( x + t ) Δ t ] .
[0198] in, . And value e x p [ j 2 π a 1 ( x + t ) Δ t ] Represents the complex exponential function after the target point moves 𝑡 pixels in the x-axis direction.
[0199] Step 3.5: Use Euler's formula to sum e x p [ j 2 π a 1 ( x + t ) Δ t ] Decompose into cosine function and sine function.
[0200] The decomposition formula is as follows:
[0201] e j 2 π a 1 ( x + t ) Δ t = c o s [ 2 π a 1 ( x + t ) Δ t ] + j s i n [ 2 π a 1 ( x + t ) Δ t ]
[0202] in, .
[0203] Through this decomposition, the frequency components of the target motion can be more easily identified and analyzed in the frequency domain.
[0204] Step 3.6: Set the above k images to The oil spill area images are composed of a sequence. At any integer time 𝑡, the sequence is projected onto the x-axis and the sum of the weighted projections is calculated. .
[0205] Among them, the sum of weighted projections The expression is as follows:
[0206] g x ( t , a 1 ) = ∑ x = 1 M ∑ y = 1 N f ( x , y , t ) ( c o s [ 2 π a 1 ( x + t ) Δ t ] + j s i n [ 2 π a 1 ( x + t ) Δ t ] )
[0207] Step 3.7: Sum of weighted projections The sine function is used to transform the frequency domain and obtain the sum of weighted projections The peak value of the spectrum .
[0208] The peak value of the spectrum The expression is as follows:
[0209]
[0210] Step 3.8: Get the peak value of the spectrum Parameters in , according to the parameters and parameters And parameters and parameters , calculate the speed of the target point along the x-axis .
[0211] Among them, the speed of the target point along the x-axis The size expression is as follows:
[0212] .
[0213] The target point moves along the x-axis between frames. pixels, the frequency of the sine wave is This frequency is directly related to the speed of the target, because the frequency is the number of times a periodic event occurs per unit time, which is the number of pixels the target moves. By measuring the peak position in the spectrum, the speed component of the target in the x-axis direction can be determined. , the unit of speed is number of pixels / total frame time.
[0214] Among them, the speed of the target point along the x-axis The direction acquisition method is as follows:
[0215] Calculation parameters ,parameter .
[0216] Among them, the parameters The expression is as follows:
[0217] S 1 x = d 2 R e [ g x ( t , a 1 ) ] d t 2 | t = n
[0218] in, R e [ ] For the practical department, To find the differential.
[0219] S 2 x = d 2 I m [ g x ( t , a 1 ) ] d t 2 | t = n
[0220] in, I m [ ] To find the imaginary part, To find the differential.
[0221] In time n:
[0222] When the parameter With parameters The signs are the same, then the velocity of the target point along the x-axis The direction is the positive direction.
[0223] When the parameter With parameters If the signs are different, then the velocity of the target point along the x-axis The direction is negative.
[0224] When the parameter With parameters is 0, the speed of the target point along the x-axis The direction refers to the next time point The direction of the target point.
[0225] The relationship between frequency and speed is: The target moves along the x-axis between frames. pixels, the frequency of the sine wave will be This frequency is directly related to the speed of the target, because the frequency is the number of times a periodic event occurs per unit time, which is the number of pixels the target moves. By measuring the peak position in the spectrum, the speed component of the target in the x-axis direction can be determined. .
[0226] Step 3.9: Repeat steps 3.2 to 3.8 to calculate the velocity of the target point along the y-axis. .
[0227] Among them, the sum of weighted projections The expression is as follows:
[0228] g y ( t , a 2 ) = ∑ x = 1 M ∑ y = 1 N f ( x , y , t ) ( c o s [ 2 π a 2 ( y + t ) Δ t ] + j s i n [ 2 π a 2 ( y + t ) Δ t ] ) Spectrum peak The expression is as follows:
[0229]
[0230] Among them, the speed of the target point along the y axis The size expression is as follows:
[0231] .
[0232] Among them, the speed of the target point along the y axis The direction acquisition method is as follows:
[0233] Calculation parameters ,parameter .
[0234] Among them, the parameters The expression is as follows:
[0235] S 1 y = d 2 R e [ g y ( t , a 2 ) ] dt 2 | t = n
[0236] in, R e [ ] For the practical department, To find the differential.
[0237] S 2 y = d 2 I m [ g y ( t , a 2 ) ] dt 2 | t = n
[0238] in, I m [ ] To find the imaginary part, To find the differential.
[0239] In time n:
[0240] When the parameter With parameters The signs are the same, then the speed of the target point along the y-axis The direction is the positive direction.
[0241] When the parameter With parameters If the signs are different, the speed of the target point along the y-axis The direction is negative.
[0242] When the parameter With parameters is 0, the speed of the target point along the y axis The direction refers to the next time point The direction of the target point.
[0243] The velocity component in the y-axis direction is obtained .
[0244] Step 3.10: The speed of the target point along the x-axis and y-axis obtained in the same time frame , And the coordinates of the target point Merge into time series data of boundary pixel coordinates and speed .
[0245] Further, let’s explain with a specific example and The selection principle and speed solution process. Figure 3 As shown, Figure 3 (a) is an image in a set of 32 remote sensing image sequences that has been processed by the first two steps. The image sequence contains a moving target, and the target point is already Figure 3 The target is circled in (b). The target moves at a speed of 0.5 pixels / frame in the x direction and 1 pixel / frame in the y direction.
[0246] Figure 4 For separate use and Compute the sum of weighted projections Sum of weighted projections result.
[0247] exist Figure 4 In (a), get The peak . Similarly, in Figure 4 (b) get The peak .like Figure 4 Explanation selection and For example, if you choose , because the discrete Fourier transform of a complex sine wave has two peaks: one at the frequency and the other at frequency and in this case , ,but Figure 4 The peak in (b) will appear at and In order to avoid the aliasing problem caused by undersampling, it is necessary to select a suitable and , the specific method is: select it as the closest An integer, where Is To establish the aliasing frequency limit, is the maximum expected target speed.
[0248] Table 1 mentioned above Figure 3Take the remote sensing image in (b) as an example, the size of which is 640×480 pixels. Through the method involved in the present invention, the oil spill boundary target point ( Figure 3 (b) (circled) pixel coordinates and speed time series:
[0249] Table 1 Pixel coordinates and velocity time series of oil spill boundary targets in frames 1-10
[0250]
[0251] Velocity solution of target frequency domain motion feature extraction: By converting the image sequence into the frequency domain, motion features that are not easily observed in traditional physical methods are revealed. Frequency domain analysis provides a new perspective to observe and quantify motion in images. The velocity component is calculated from the peak position in the spectrum, which simplifies the process of velocity solution and can provide higher accuracy.
[0252] After the first three stages of processing, we obtained the pixel coordinates and velocity sequence of the target points at the oil spill boundary from the oil spill remote sensing image. Next, the time series data is input into the autoencoder-LSTM neural network to predict the diffusion trend of the oil spill target.
[0253] Step 4: Input the time series data of boundary pixel coordinates and speed into the autoencoder-LSTM neural network to obtain the predicted oil spill target diffusion trend, that is, the predicted oil spill boundary pixel coordinates and speed at the future moment.
[0254] Furthermore, the step 4 specifically includes:
[0255] Step 4.1: Time series of boundary pixel coordinate velocity Perform normalization to obtain normalized data .
[0256] The normalization formula is as follows:
[0257]
[0258] in, is the normalized data (that is, the final ), For the original data ( Substitute them into the normalized formula to replace z for calculation), and are the minimum and maximum values of the data, respectively. They are mapped to the interval [0, 1] to improve the stability and convergence speed of model training.
[0259] Step 4.2: The normalized data is input into the autoencoder-LSTM neural network to obtain the diffusion trend of the oil spill target at the time to be predicted.
[0260] The autoencoder-LSTM neural network includes an encoder, an LSTM intermediate layer, and a decoder. The network structure is as follows Figure 5 shown.
[0261] Among them, the encoder network, the input layer receives the normalized oil spill boundary pixel coordinate position and speed data . The input data is feature extracted and compressed through a multi-layer neural network, and the data dimension is gradually reduced. The specific structure is as follows: including: the first fully connected layer, the first ReLU activation layer, the second fully connected layer, the second ReLU activation layer, and the third fully connected layer connected in sequence.
[0262] Among them, the first fully connected layer has an input dimension of 5. , the output dimension is 128.
[0263] The second fully connected layer has an input dimension of 128 and an output dimension of 64.
[0264] The third fully connected layer has an input dimension of 64 and an output dimension of 32.
[0265] Finally, a low-dimensional feature vector z is output, with a dimension of 32. The encoder is expressed as follows:
[0266]
[0267] The LSTM middle layer inputs the low-dimensional feature vector z output by the encoder into the LSTM middle layer. The LSTM middle layer contains 20 LSTM units, which are used to capture the time series characteristics and dynamic change rules during the oil spill diffusion process. The calculation process of the LSTM unit is as follows:
[0268]
[0269]
[0270]
[0271]
[0272]
[0273]
[0274] in, , , , , and Represent the outputs of the forget gate, input gate, candidate cell state, cell state, output gate, and hidden state respectively; and They are sigmoid activation function and hyperbolic tangent activation function respectively; , , , , , , , is the weight matrix; , , , is the bias term.
[0275] Physical information constrained LSTM network training and optimization
[0276] The oil spill diffusion physical model is introduced and incorporated into the learning process of the LSTM network as a constraint condition. The oil spill diffusion process follows the diffusion equation, and its mathematical expression is:
[0277]
[0278] Where D is the diffusion coefficient. Substitute the historical average value of a central oil field in the South China Sea into the above expression for calculation. C is the position at time t Collect the location data of the pixel coordinates of the oil spill boundary from time step t-49 to t Substitute the above physical model of oil spill diffusion into the equation. Use numerical methods, such as the finite difference method, to solve the diffusion equation and obtain the oil spill concentration at time 𝑡 In a small time interval, the concentration C remains unchanged. The oil spill concentration C obtained here can be used to calculate and constrain the training process at future moments (such as t+1 to t+50).
[0279] Among them, the constraints are implemented through the loss function. That is, when designing the loss function, in addition to considering the difference between the predicted value and the actual value, the physical model constraint term should also be included. The loss function can be expressed as:
[0280]
[0281] in, represents the predicted value of the x-coordinate of the i-th iteration, represents the actual value of the x-coordinate of the i-th iteration, represents the predicted value of the y coordinate of the i-th iteration, represents the actual value of the y coordinate of the i-th iteration, represents the predicted value of the x-direction velocity at the i-th iteration, represents the actual value of the x-direction velocity at the i-th iteration, represents the predicted value of the y-direction velocity at the i-th iteration, represents the actual value of the y-direction velocity at the i-th iteration, represents the number of iterations, D is the diffusion coefficient, C is the oil spill concentration, and are the weight coefficients of the prediction error term and the physical model constraint term, respectively, which are used to balance the prediction accuracy and the degree of conformity with the physical model.
[0282] The decoder network takes as input the hidden state output by the LSTM intermediate layer . The hidden state is decoded and dimensionally restored through a multi-layer neural network, gradually restoring the dimension of the original data. The specific structure is as follows: including: the fourth fully connected layer, the third ReLU activation layer, the fifth fully connected layer, the fourth ReLU activation layer, and the sixth fully connected layer connected in sequence.
[0283] Among them: the fourth fully connected layer has an input dimension of 20 and an output dimension of 64.
[0284] The fifth fully connected layer has an input dimension of 64 and an output dimension of 128.
[0285] The sixth fully connected layer has an input dimension of 128 and an output dimension of 5.
[0286] Finally, the predicted pixel coordinate position and velocity data of the oil spill boundary are output. The output expression of the decoder is as follows:
[0287]
[0288] in, represents a future time frame, Indicates the x-coordinate value of the oil spill boundary pixel in the future time frame, The y coordinate value of the oil spill boundary pixel in the future time frame, Indicates the x-axis speed of the oil spill boundary pixel in the future time frame, Indicates the y-axis speed of the oil spill boundary pixel in the future time frame.
[0289] In this way, the autoencoder-LSTM network is able to consider both data features and physical laws during the learning process, thereby improving the accuracy and reliability of oil spill diffusion trend prediction.
[0290] Finally, the decoder outputs the prediction results of oil spill diffusion in the future. .
[0291] Furthermore, the model training and optimization process of the autoencoder-LSTM neural network is as follows:
[0292] Among them, the training process:
[0293] Initialize network parameters: Initialize network parameters using random methods or use pre-trained parameters for initialization.
[0294] Pre-training: Each layer is pre-trained separately, and each layer is optimized using unsupervised learning methods (such as the reconstruction error of the autoencoder) to ensure that each layer can effectively extract features.
[0295] Joint training: Use the back-propagation algorithm to fine-tune the entire network, and introduce a loss function driven by physical information to ensure that the prediction results not only conform to the data-driven laws, but also meet the constraints of the actual physical process.
[0296] Dynamically adjust the learning rate: During the training process, the learning rate is dynamically adjusted according to the error on the validation set. If the error on the validation set does not decrease significantly within a number of consecutive epochs, the learning rate is reduced to prevent overfitting.
[0297] Early stopping technique: Stop training when the error on the validation set no longer decreases to prevent overfitting.
[0298] Optimization process:
[0299] Cross-validation: Use the cross-validation method to evaluate and validate the model, select the optimal model parameters and structure, and ensure that the model has good generalization ability and prediction accuracy.
[0300] Hyperparameter tuning: Further optimize the performance of the model by adjusting hyperparameters such as learning rate, number of iterations, and number of hidden layer units.
[0301] Example 2
[0302] This embodiment introduces a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a method for processing an offshore oil leak target as described in any one of Embodiment 1 is implemented.
[0303] Example 3
[0304] This embodiment introduces a computer device, including:
[0305] Memory, used to store instructions.
[0306] The processor is used to execute the instructions so that the computer device performs the operations of a method for handling an offshore oil leak target as described in any one of Example 1.
[0307] Embodiment 4:
[0308] This embodiment takes the remote sensing image of a central oil field in the South China Sea as an example. The performance of the present invention is compared with various existing oil spill image target processing methods, as shown in Table 2:
[0309] Table 2 Comparison of processing performance of each method
[0310]
[0311] By comparison, it is found that this method has higher robustness than the traditional statistical segmentation method, has stronger anti-interference ability for abnormal data caused by wind and waves, and is more suitable for offshore oil spill application scenarios. At the same time, compared with the deep learning neural network processing method, the number of parameters is greatly reduced, and there is no need to obtain a large number of photos for model parameter optimization, which saves computing resources, has the advantages of being lightweight, and can be processed in real time with fast response speed. It has significant advantages in processing accuracy and processing frame rate performance.
[0312] The same hardware platform is selected, PyTorch is used as the deep learning framework, and the existing CNN+LSTM prediction method and the present invention are used to perform simulation prediction. The results are as follows Figure 6 As shown, the present invention takes the pixel x-axis coordinate of the predicted image as an example to evaluate the degree of fit of the present patent and the prior art to the actual data. The data comparison is as follows: the horizontal axis represents the time series, and the vertical axis represents the predicted x-axis coordinate. It can be seen that the predicted x-axis coordinate obtained by this method is almost 100% fit to the actual data and is not affected by the wind and waves at the oil spill boundary. Although the prior art can also roughly predict the coordinate position, it is affected by the wind and waves and fluctuates too much, and the degree of fit to the actual data is low and there is a delay. Therefore, the result of using the solution of the present invention to predict the pixel coordinates is closer to the actual data, the prediction effect is better, and the accuracy of the prediction of the oil spill diffusion trend is improved.
[0313] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for handling an offshore oil spill target, characterized in that: Specifically include: Step 1: Perform image enhancement processing of the acquired remote sensing image of the offshore oil spill target by using a channel-by-channel frequency domain joint adaptive filtering to obtain a processed remote sensing image; Step 2: Perform image segmentation by parallel expansion and fusion of RGB color components on the processed remote sensing image to obtain edge pixels of the oil spill area; Step 3: Based on the edge pixel coordinate set of the oil spill area, the velocity solution of frequency domain motion feature extraction is performed to obtain the time series data of boundary pixel point coordinates and velocity; Step 4: Input the time series data of boundary pixel coordinates and speed into the autoencoder-LSTM neural network to obtain the predicted pixel coordinates and speed of the oil spill boundary at the future moment.
2. A method for treating an offshore oil spill target according to claim 1, characterized in that: The step 1 specifically includes: Step 1.1: Obtain color remote sensing images of offshore oil spill targets , for color remote sensing images Each channel is transformed in the frequency domain to obtain the frequency domain image of each channel ; Step 1.2: Frequency domain images of each channel Filter to obtain the frequency enhanced spectrum of each channel ; Step 1.3: Spectrum diagram after frequency enhancement of each channel Perform inverse frequency domain transform to obtain the frequency domain processed image of each channel ; Step 1.4: Use the boundary feature adaptive filtering algorithm to process the image after frequency domain processing of each channel Filtering is performed to obtain the images of each channel after spatial domain adaptive filtering. ; Step 1.5: Process the image in the spatial domain of each channel Perform weighted fusion to obtain the processed enhanced image .
3. The method for treating an offshore oil spill target according to claim 1, characterized in that: The step 2 specifically includes: Step 2.1: Enhanced image after processing Select a seed point set in each channel image; Step 2.2: The seed points of each channel are concentrated and the regional growth is performed according to the growth rule to obtain the growth result image of each channel; Step 2.3: Merge the growth result images of each channel to obtain the binary images of the segmented oil spill area and background area; Step 2.4: Use the 8-neighborhood connection method to check the neighborhood of each pixel in the oil spill area, obtain the edge pixels of the oil spill area, and form the edge pixels into an edge coordinate set .
4. The method for treating an offshore oil spill target according to claim 1, characterized in that: The step 3 specifically includes: Step 3.1: Get k images of size The edge pixels of the image containing the oil spill area are used to construct the edge pixel coordinate set of the oil spill area. ; Step 3.2: An edge pixel in the frame is taken as the target point, and the coordinates of the target point are Project onto the x-axis; sum the grayscale of each row of pixels of the target point in the projected image, and the sum is ; in, is the natural exponential function, is an imaginary unit, is the circumference of a circle, is a positive integer, is the x-axis coordinate value of the target point, is the time interval between frames; Step 3.3: In the frame, the target point changes from the initial position Move to a new location Repeat step 3.2 to get the sum ; Step 3.4: If the target point continues to move in the x-axis direction at a constant speed; at any integer time frame 𝑡, the position of the target point will be ; Repeat step 3.2 to get the sum ;in, ; Step 3.5: Use Euler's formula to sum Decompose into cosine function and sine function; Step 3.6: Set the size of k frames to The oil spill area images are composed of a sequence. At any integer time 𝑡, the sequence is projected onto the x-axis and the sum of the weighted projections is calculated. ; Step 3.7: Sum of weighted projections The sine function is used to transform the frequency domain and obtain the sum of weighted projections The peak value of the spectrum ; Step 3.8: Get the peak value of the spectrum Parameters in , according to the parameters and parameters And parameters and parameters , calculate the speed of the target point along the x-axis ; Step 3.9: Repeat steps 3.2 to 3.8 to calculate the velocity of the target point along the y-axis. ; Step 3.10: The speed of the target point along the x-axis and y-axis obtained in the same time frame , And the coordinates of the target point Merge into time series data of boundary pixel coordinates and speed .
5. The method for treating an offshore oil spill target according to claim 1, characterized in that: The autoencoder-LSTM neural network includes an encoder, an LSTM intermediate layer, and a decoder; The encoder includes: a first fully connected layer, a first ReLU activation layer, a second fully connected layer, a second ReLU activation layer, and a third fully connected layer connected in sequence; Among them, the first fully connected layer has an input dimension of 5 and an output dimension of 128; The second fully connected layer has an input dimension of 128 and an output dimension of 64; The third fully connected layer has an input dimension of 64 and an output dimension of 32; The LSTM middle layer includes: a plurality of LSTM units connected in sequence; Among them, the loss function of the LSTM intermediate layer is The expression is as follows: ; in, represents the predicted value of the x-coordinate of the i-th iteration, represents the actual value of the x-coordinate of the i-th iteration, represents the predicted value of the y coordinate of the i-th iteration, represents the actual value of the y coordinate of the i-th iteration, represents the predicted value of the x-direction velocity at the i-th iteration, represents the actual value of the x-direction velocity at the i-th iteration, represents the predicted value of the y-direction velocity at the i-th iteration, represents the actual value of the y-direction velocity at the i-th iteration, represents the number of iterations, D is the diffusion coefficient, C is the oil spill concentration, and are the weight coefficients of the prediction error term and the physical model constraint term respectively; The encoder comprises: a fourth fully connected layer, a third ReLU activation layer, a fifth fully connected layer, a fourth ReLU activation layer, and a sixth fully connected layer connected in sequence; Among them: the fourth fully connected layer has an input dimension of 20 and an output dimension of 64; The fifth fully connected layer has an input dimension of 64 and an output dimension of 128; The sixth fully connected layer has an input dimension of 128 and an output dimension of 5.
6. A method for handling an offshore oil spill target according to claim 2, characterized in that: The frequency spectrum of each channel after frequency enhancement The expression is as follows: ; in, represents the frequency domain joint filter; Frequency Domain Joint Filter The expression is as follows: ; in, represents a multi-scale Gaussian bandpass filter, represents a directional filter; Among them, the multi-scale Gaussian bandpass filter The expression is as follows: ; in, represents the natural exponential function, The frequency components of the image in the frequency domain are located in the horizontal and vertical coordinates of the two-dimensional coordinate system. Indicates the target frequency center value, represents standard deviation; Directional filter The expression is as follows: ; in, , used to indicate the direction angle of the current frequency component, Indicates the main direction angle set according to the fluctuation trend of the waves in the image.
7. The method for treating an offshore oil spill target according to claim 3, characterized in that: The method for obtaining the seed point set in each channel image is as follows: Calculate the main tone gray value of the high percentile value of the color histogram of each channel image respectively, and let the R channel color difference threshold be , the color difference threshold of the G channel is The color difference threshold of the B channel is ; The gray value of the pixel in each channel image is greater than the corresponding threshold , Threshold , Threshold The pixel points are used as the R channel seed point set , G channel seed point set and B channel seed point set ; The growth rules specifically include: Check each seed point to see if the pixels in the 8-neighborhood satisfy the predicate logic. ; If the conditions are met, the seed point is added to the queue and marked as processed; if the conditions are not met, the seed point is added to the queue and marked as not processed; Perform region growth on seed points that meet the conditions in each channel to generate three channel result images , , : ; in, is one of the R, G, and B channels, 1 is the oil spill area, and 0 is the background area; When the seed point set is empty, the region growing ends; Among them, predicate logic , specifically including: ; in, is the gray value of the current pixel; is the gray value of the seed point; by controlling value, you can dynamically adjust the looseness of growth; To meet the conditions, For not meeting the conditions; The method for obtaining edge pixels of the oil spill area is specifically as follows: Select any pixel in the oil spill area and determine whether the pixels in the four diagonal directions of the pixel are 0. If any pixel in the eight directions is 0, the selected pixel in the oil spill area is an edge pixel. Traverse all pixels in the oil spill area and add the coordinates of all edge pixels that meet the conditions to the edge coordinate set .
8. The method for treating an offshore oil spill target according to claim 4, characterized in that: The speed of the target point along the x-axis The size expression is as follows: ; The speed of the target point along the x-axis The method for obtaining the direction is as follows: Calculation parameters ,parameter ; Among them, the parameters The expression is as follows: ; in, For the practical department, To find the differential; ; in, To find the imaginary part, To find the differential; In time n: When the parameter With parameters The signs are the same, then the velocity of the target point along the x-axis The direction of is the positive direction; When the parameter With parameters If the signs are different, then the velocity of the target point along the x-axis The direction of is negative; When the parameter With parameters is 0, the speed of the target point along the x-axis The direction refers to the next time point The direction of the target point; The speed of the target point along the y axis The size expression is as follows: ; in, The peak value of the spectrum Medium Parameters , is the peak value of the spectrum Medium Parameters ; Among them, the speed of the target point along the y axis The direction acquisition method is as follows: Calculation parameters ,parameter ; Among them, the parameters The expression is as follows: ; in, For the practical department, To find the differential, It is the sum of the weighted projections of the sequence onto the y-axis; ; in, To find the imaginary part, To find the differential; In time n: When the parameter With parameters The signs are the same, then the speed of the target point along the y-axis The direction of is the positive direction; When the parameter With parameters If the signs are different, the speed of the target point along the y-axis The direction of is negative; When the parameter With parameters is 0, the speed of the target point along the y axis The direction refers to the next time point The direction of the target point.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, a method for handling an offshore oil leakage target as claimed in any one of claims 1 to 8 is implemented.
10. Computer equipment, characterized in that: include: A memory for storing instructions; A processor is used to execute the instructions so that the computer device performs the operations of the method for handling offshore oil leakage targets as described in any one of claims 1 to 8.