Ship wake extraction and segmentation method, storage medium and terminal equipment
By employing optical image processing technology, utilizing image feature extraction, dimensionality reduction, and clustering algorithms, combined with filtering and filling processing, the problem of inaccurate ship wake segmentation was solved, achieving high-precision wake segmentation and recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, ship wake processing techniques based on SAR images are difficult to accurately extract and segment different types of wakes.
A method for ship wake extraction and segmentation based on optical images is adopted. Through image feature extraction, dimensionality reduction, clustering, filtering and filling, combined with the Otsu algorithm and heuristic rules, the wake region is accurately segmented.
It improves the recognition accuracy of ship wakes, effectively distinguishing turbulent wakes from other types of ship wakes, and is suitable for ship trajectory monitoring and environmental monitoring.
Smart Images

Figure CN121811352A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing and target monitoring technology, and particularly relates to a method for extracting and segmenting ship wakes, a storage medium, and a terminal device. Background Technology
[0002] Ships create contrails when navigating the sea surface. Compared to other ship targets, the contrails cover a larger area and last longer, making them easier to detect. Furthermore, underwater targets such as submarines can also create contrails, allowing for the detection of stealth underwater targets in certain situations. The optical characteristics of contrails include shape, size, contrast, color, and texture. By studying these characteristics, information such as the target's speed, course, position, and displacement can be deduced. Additionally, there are four types of ship contrails: turbulent contrails, internal wave contrails, Kelvin contrails, and narrow V-shaped contrails. Each type reflects ship characteristics.
[0003] Currently, most scholars primarily use SAR (Synthetic Aperture Radar) images for ship wake detection. However, due to the unique characteristics of ship wakes and the limitations of radar images, current ship wake processing techniques based on SAR images face the problem of accurately extracting and segmenting different types of wakes. Summary of the Invention
[0004] This invention provides a method, storage medium, and terminal device for extracting and segmenting ship wakes based on optical images, aiming to improve the recognition accuracy of ship wakes. The technical solution for implementing this invention is as follows:
[0005] In a first aspect, the present invention provides a method for extracting and segmenting ship wakes, comprising:
[0006] S100: Read optical images of the ship's wake;
[0007] S200. Extract image features from the optical image of the ship's wake, wherein the image features include pixel values, pixel coordinates, spot features, and texture features;
[0008] S300. Perform dimensionality reduction processing on the image features to obtain sample data;
[0009] S400. Cluster the sample data. Divide the sample data into multiple clusters by a preset radius and threshold, and extract the centroid of each cluster for image point classification.
[0010] S500: Perform median filtering and filling on the image obtained in step S400 to eliminate holes and ensure regional connectivity. Further segment the image based on the characteristics of different regions to extract the ship's wake region.
[0011] S600: Automatically extracts texture regions and selects source and target regions based on similarity comparison;
[0012] S700: Generate the final segmented image of the ship's wake region and display the segmentation results.
[0013] As a preferred technical solution, in step S200, for a grayscale image, the pixel value is a grayscale value as a feature; for a color image, the pixel value is three features: R, G, and B.
[0014] As a preferred technical solution, in step S200, multiple spot features and multiple stripe features are extracted by using multiple DOOG filters and multiple DOG filters respectively.
[0015] As a preferred technical solution, in step S300, the image features are subjected to dimensionality reduction processing using principal component analysis algorithm, and the specific steps are as follows:
[0016] (a) Normalize and decentralize the data;
[0017] (b) Calculate the covariance matrix;
[0018] (c) Calculate eigenvalues, eigenvectors, and select principal components.
[0019] As a preferred technical solution, in step S400, the sample data is clustered using the Mean-shift algorithm, specifically including:
[0020] (A) Randomly select a pixel x0 from the data point set of the image (the feature set obtained after dimensionality reduction) as the center point. The pixel x0 as the center point is the updated cluster center.
[0021] (B) Find all points that are less than r away from the center point x0, denoted as set M, and consider these points to belong to category CL. At the same time, increment the number of visits of these points in category CL by 1.
[0022] (C) Calculate the vector from x0 to each element in set M, and average these vectors to obtain the drift vector M. h ,
[0023] (D) Update the drift point. Is updating the drift point simply the formula: x0 = x + M? h (x), representing x0 along the direction M h The distance moved is ||Mh ||;
[0024] (E) Repeat step bd until ||M h If the value is less than the set threshold, remember the position of x0. All points encountered in this iteration process belong to category CL.
[0025] (F) If the distance between the center of the current category CL and the center of the previously existing category CL' is less than the threshold when convergence, then the current CL and CL' belong to the same category and are merged; otherwise, CL is regarded as a new category.
[0026] (G) Repeat step AF until all points have been marked as visited;
[0027] (H) Identify the category that is visited most frequently for each point and classify the point into that category.
[0028] As a preferred technical solution, in step S500, the voids are filled using a flooding filling method, and the fractured areas are connected using a connectivity component analysis method.
[0029] As a preferred technical solution, in step S600, the threshold is automatically selected by the Otsu algorithm, and the relationship between the textured region and the non-textured region is determined based on the pixel value similarity of the region, and the source region and the target region are selected according to the similarity.
[0030] As a preferred technical solution, step S700 specifically involves generating multiple images according to steps S100-S600, stitching these images together, and generating the final segmented image of the ship's wake region.
[0031] In a second aspect, the present invention also provides a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.
[0032] Thirdly, the present invention also provides a terminal device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method steps.
[0033] The beneficial effects of the technical solution of the present invention include at least the following:
[0034] The ship wake extraction and segmentation method provided by this invention is based on optical images and segments different types of wakes according to texture information. First, multiple image features, including image texture, are extracted. Then, the feature dimensionality is reduced to improve computational efficiency. Next, the image is clustered to segment different wake regions. Finally, the segmentation effect is further optimized using the Otsu adaptive thresholding method and heuristic rules to ensure the connectivity of image regions. Experimental results show that this invention can effectively distinguish turbulent wakes from other types of ship wakes with high accuracy, and is suitable for applications such as ship trajectory monitoring and environmental monitoring, enabling precise segmentation of ship wakes. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 This is the main flowchart of the ship wake extraction and segmentation method in this specific embodiment.
[0037] Figure 2 The texture feature maps are extracted by the eight texture feature filters in this specific embodiment.
[0038] Figure 3 This is a schematic diagram of principal component analysis dimensionality reduction in this specific embodiment, wherein... Figure 3 (a) is a schematic diagram of a set of data in a two-dimensional space according to this specific embodiment. Figure 3 (b) is a schematic diagram of the one-dimensional data after dimensionality reduction in this specific embodiment.
[0039] Figure 4 This is the ship wake test diagram used in this experimental example.
[0040] Figure 5 This is a segmented image of the ship's wake test pattern after segmentation in this experimental example.
[0041] Figure 6 This is the segmented full image extracted in this experimental example.
[0042] Figure 7 This is the ship wake image extracted from the segmented full image and merged in this experimental example.
[0043] Figure 8 This is a turbulent wake diagram obtained by merging the segmented images from this experimental example.
[0044] Figure 9This is a schematic diagram of the structure of a terminal device provided by the present invention. Detailed Implementation
[0045] To make the technical solution of the present invention clearer and its technical advantages more apparent, the technical solution of the present invention will be clearly and completely described below in conjunction with specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, and 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 effort are within the scope of the present invention.
[0046] Target monitoring technology based on optical images such as satellite images and aerial photographs started relatively late. However, with the rapid development of space technology in recent years, the resolution of optical images has become increasingly higher, and optical satellite images also have the advantages of being easily obtainable and highly intuitive. This provides the conditions for the extraction and segmentation of ship wakes. This invention is based on optical images such as satellite images and aerial photographs to achieve ship wake extraction and segmentation, aiming to provide a method for ship wake extraction and segmentation that can extract different types of wakes based on texture features.
[0047] Combination Figure 1 As shown, the ship wake extraction and segmentation method provided in this embodiment includes the following steps:
[0048] S100: Read optical images of the ship's wake;
[0049] S200. Extract image features from the optical image of the ship's wake, wherein the image features include pixel values, pixel coordinates, spot features, and texture features;
[0050] S300. Perform dimensionality reduction processing on the image features to obtain sample data;
[0051] S400. Cluster the sample data. Divide the sample data into multiple clusters by a preset radius and threshold, and extract the centroid of each cluster for image point classification.
[0052] S500: Perform median filtering and filling on the image obtained in step S400 to eliminate holes and ensure regional connectivity. Further segment the image based on the characteristics of different regions to extract the ship's wake region.
[0053] S600: Automatically extracts texture regions and selects source and target regions based on similarity comparison;
[0054] S700: Generate the final segmented image of the ship's wake region and display the segmentation results.
[0055] The following is a detailed explanation of each step:
[0056] S100: Input a frame of ship wake image to be processed.
[0057] S200: Texture feature extraction, image features include pixel values, pixel coordinates, blob features and texture features;
[0058] First, it is determined whether the image is a color image or a grayscale image. The image is digitized through sampling, quantization, and encoding. If it is a grayscale image, the grayscale value of each pixel and its spatial relationship (x-axis and y-axis) are saved, providing three-dimensional information. If it is a color image, the RGB value of each pixel and its spatial relationship (x-axis and y-axis) are saved, providing five-dimensional information.
[0059] In addition, eight texture filters were designed, including two blob features and six stripe features.
[0060] For speckle feature extraction, a Difference of Gaussian (DOG) filter is used. In the DOG algorithm, the original image is processed by convolution kernels of Gaussian functions with two different standard deviations. The two Gaussian smoothed curves after convolution are subtracted to obtain the response image of the DOG algorithm.
[0061] Gaussian filtering is a smoothing filter based on the Gaussian function, used to remove image noise. Two speckle filters, DOG1 and DOG2, are:
[0062]
[0063] In the formula, σ, σ1, σ2, σ3, and σ4 represent different standard deviations.
[0064] Stripe features were extracted using a Gaussian Offset Differential Filter (DOG). This is a variant of the Difference of Gaussian (DOG) filter where the center of the Gaussian function is slightly offset, so that instead of simply subtracting two Gaussian filters originating from the same point, the offset center point is used. This offset increases the filter's sensitivity to local image features, especially directional and symmetrical features in the image.
[0065] The formula for a fringe filter is defined as follows:
[0066]
[0067] In the formula, θ is the direction angle, and the direction angles of the six fringe filters are different. b y is 0 c =-y a ;σ x To control the scale (standard deviation) of the Gaussian distribution in the x-direction, σ yTo control the scale (standard deviation) of the Gaussian distribution in the y-direction, these two parameters determine the shape of the filter; larger values mean a smoother filter, while smaller values mean a more sensitive filter to local texture variations; y c The center coordinates before the offset represent the location of the center point of the Gaussian distribution; y a The offset center coordinates (usually a small offset).
[0068] At this point, feature extraction is complete, and the texture features extracted by the eight filters are as follows: Figure 2 As shown, each pixel in a grayscale image has 11-dimensional features, while each pixel in a color image has 13-dimensional features. Specifically, a grayscale image has 11-dimensional features, including (grayscale value, position coordinates (x, y), two speckle features, and six stripe features); a color image has 13-dimensional features, including (R, G, B values, position coordinates (x, y), two half-dot features, and six stripe features).
[0069] It is important to emphasize that stripe feature extraction and blob feature extraction are independent steps. Both operate on the original image, rather than extracting blob features first and then stripe features. Blob feature extraction (DOG filter) operates directly on the original image, primarily detecting local "blob" structures, producing two response images (corresponding to two DOG filters with different standard deviations). Stripe feature extraction (DOOG filter) also operates directly on the original image, not on the DOG-processed image. Its goal is to extract stripe textures in specific directions (such as the stretched shape of a ship's stern), producing six response images (corresponding to six DOOG filters with different directional angles).
[0070] Furthermore, it's understandable that setting eight texture filters is only a preferred method and doesn't necessarily require eight; any number of DOG filters can be used for blob feature extraction; the same applies to stripe features. It's important to note that stripe feature extraction uses a Difference-Offset Gaussian (DOOG) filter instead of a Difference-of-Gaussian (DOG) filter.
[0071] S300: As shown in S200, each pixel has a relatively high dimensionality, which increases the complexity of the algorithm and leads to a longer computation time. Reducing the dimensionality can reduce the complexity of the algorithm, and Principal Component Analysis (PCA) is one such method.
[0072] The main idea of PCA is: assuming an image contains only one texture, other texture filters will have almost no response to the image, or if they do, it will be redundant because the corresponding filters already have a good response to it. In this case, we retain the features that have a response to the image and filter out features that have no response or a small response. This reduces the computation time for smaller dimensions while still achieving good segmentation results. Figure 3 (a) represents a set of data in a two-dimensional space with a length of 100 and a width of 80. The goal is to reduce this two-dimensional data to one dimension. The reduced one-dimensional data better represents the original data; at this point, the data becomes a straight line, such as... Figure 3 (b) can represent the direction of the original two-dimensional data, but the data after dimensionality reduction loses some information. The removed data can be regarded as texture features with smaller response.
[0073] In this embodiment, the specific steps of PCA dimensionality reduction are as follows:
[0074] (a) Normalize and decenter the data. Normalize the 11-dimensional or 13-dimensional features of each pixel (11-dimensional features for grayscale image pixels and 13-dimensional features for color image pixels). Then, decenter the original data and subtract the mean of the feature value over the entire dataset from the mean of each feature value, so that the mean of the data is zero.
[0075] Specifically, the normalization method uses Min-Max normalization, which scales the features to the range [0, 1]. The result after normalization is not the mean of the pixel feature values, but rather the normalization of the values of the corresponding dimensions of the pixels in the entire image. For example, the dimension of grayscale values is mapped from [0, 255] to [0, 1], and each value still represents the feature of that pixel.
[0076] In this context, "original data" refers to the data after feature extraction, and the object of decentralization is this feature vector dataset, not the original image itself. The decentralization method involves mean removal: calculating the mean of each feature dimension and subtracting the mean of that dimension from all data samples. Furthermore, the dataset refers to the collection of data obtained during the feature extraction step; the object of decentralization is this feature vector dataset.
[0077] (b) Calculate the covariance matrix, let X = (X1, X2, ..., X...). n ) T It is a 1-dimensional random variable, and its sample covariance matrix is:
[0078]
[0079] in, This is the sample mean vector (i.e., the mean of each feature);
[0080] (c) Calculate eigenvalues, eigenvectors, and select principal components. Assume the following linear transformation exists:
[0081]
[0082] Among them, a i Let be the eigenvector of the covariance matrix C, corresponding to the eigenvalue λ. i ;Y = (Y1,Y2,…,Y N ) T These are the principal components after dimensionality reduction (or the new features after PCA transformation). The eigenvalues are not in this formula; they are based on Ca. i =λ i a i It is calculated that λ i It is the i-th eigenvalue. This means that by calculating the eigenvalues and eigenvectors, the principal component (Y) can be selected using the following formula;
[0083] To replace the original n multidimensional variables with Y1, Y1 needs to reflect the characteristic information of the original n variables to the greatest extent possible. The variance var(Y1) represents the amount of information contained in Y1; the larger the variance, the more information it contains. Therefore, var(Y1) must be as large as possible, while simultaneously ensuring... The goal is to eliminate the uncertainty of the maximum variance. Therefore, it can be calculated that... That is, the variance var(Y1) of the principal component is calculated using the covariance matrix C and its eigenvalues.
[0084] Solving using the Lagrange multiplier method, we have Ca1 = λa1. Let λ = λ1 be the largest eigenvalue of C, then the corresponding a1 is the desired value. Define a threshold T; if other eigenvalues are less than T% of the largest eigenvalue, discard that eigenvector. Project eigenvectors with eigenvalues greater than T% of the largest eigenvalue into a feature space to obtain the final feature set, thus achieving dimensionality reduction.
[0085] S400: Clustering helps classify pixels or regions in an image into different categories, allowing pixels with similar features to be grouped together, thus extracting different regions in the image. The Mean-shift algorithm is a non-parametric clustering algorithm. Compared to the K-means algorithm, the Mean-shift algorithm has the advantages of not requiring a specified number of clusters; the choice of initial points has no impact on the results because Mean-shift automatically adjusts the cluster centers; and the Mean-shift algorithm can be applied to non-convex clusters. In other words, the Mean-shift algorithm is an unsupervised, adaptive texture segmentation method that does not require training or prior knowledge of the number of clusters. The Mean-shift algorithm is explained below:
[0086] Sample points in space are represented by x i The description is as follows: the mean-shift vector M between the cluster center x and the samples. h (x) is:
[0087]
[0088] Where k is the density of pixels within the kernel range r, i.e., k = |{i|||x i -x|| 2 <r 2}|.
[0089] The updated cluster center x0 is
[0090] x0=x+M h (x)
[0091] The steps of the Mean-shift algorithm are as follows:
[0092] (A) Randomly select a pixel x0 from the data point set of the image (the feature set obtained after dimensionality reduction) as the center point. The pixel x0 as the center point is the updated cluster center.
[0093] (B) Find all points that are less than r away from the center point x0, denoted as set M, and consider these points to belong to category CL. At the same time, increment the number of visits of these points in category CL by 1.
[0094] (C) Calculate the vector from x0 to each element in set M, and average these vectors to obtain the drift vector M. h ,
[0095] (D) Update the drift point. Is updating the drift point simply the formula: x0 = x + M? h (x), representing x0 along the direction M h The distance moved is ||M h ||;
[0096] (E) Repeat step bd until ||M h If the value is less than the set threshold, remember the position of x0. All points encountered in this iteration process belong to category CL.
[0097] (F) If the distance between the center of the current category CL and the center of the previously existing category CL' is less than the threshold when convergence, then the current CL and CL' belong to the same category and are merged; otherwise, CL is regarded as a new category.
[0098] (G) Repeat step AF until all points have been marked as visited;
[0099] (H) Identify the category that is visited most frequently for each point and classify the point into that category.
[0100] S500: The region segmentation results obtained through Mean-shift clustering and PCA dimensionality reduction may contain holes or breaks. Holes refer to areas within an image region that are not filled with pixels, even if they belong to a region, they are not marked as part of that region. Breaks refer to regions whose boundaries are not fully connected, causing pixels belonging to one region to be incorrectly assigned to different regions. Post-processing requires a filling operation to correct these problems by filling holes or connecting broken regions, ensuring that each independent region is connected. Specifically, this involves filling and connecting different regions extracted by the clustering algorithm. Filling method: Flood Fill; Connection method: Connected Component Analysis (CCA).
[0101] S600: Ship wakes in images are mostly textured areas, and different types of wakes have different texture features. In order to more accurately select meaningful regions based on the actual texture and structural information in ship wake images, adaptive selection of source and target regions is required.
[0102] The source region is a high-texture area. Ship wakes on the water surface typically exhibit turbulent or wave-like structures, and the texture features (such as frequency, directionality, and gradient) of these regions are significantly different from the surrounding background. The target region is an area with indistinct texture features, adjacent to or potentially similar to ship wakes, which can be the water surface area surrounding the ship wake.
[0103] The obtained texture feature values are thresholded. Using the Otsu algorithm, an optimal threshold is automatically selected. Based on this automatically calculated threshold, if the texture feature value of a region is higher than the threshold, it is considered a textured region; otherwise, it is a non-textured region. Let |A| i |For the i-th region A i The number of pixels in the image, where S is the texture area, then all... The area is considered a "texture area".
[0104] The texture feature value of a region is obtained through the following steps: First, it is calculated using multiple texture filters. Second, normalization is performed, as described in detail above. Third, the maximum texture response is calculated for the entire region to quantify the texture intensity of that region. The maximum value represents the local texture intensity of that region, i.e., the texture feature value.
[0105] After the image is segmented into textured and non-textured regions, we then use a rule-based heuristic to further classify these regions into source and target regions. For all textured regions, we first construct an adjacency matrix to represent the spatial relationships between the regions. Assume |B i | represents the number of pixels at the boundary of the i-th region. If two regions i and j share a boundary, they are considered adjacent and represented in the adjacency matrix. For each textured region, its adjacent non-textured regions are examined. If a non-textured region is "similar" to a textured region, these regions are marked as potential source and target regions in the adjacency matrix. Similarity is determined by the mean grayscale value of the regions (for color images, the mean of each RGB channel). If the difference between the mean grayscale values of a textured region and its adjacent regions is less than a threshold set in an experiment, the two regions are considered similar.
[0106] S700: Segmentation Result Display. This generates and displays the final segmented image of the ship's wake region. Following the above steps will generate multiple images, such as... Figure 6 By piecing these images together, you can obtain... Figure 7 , Figure 8 This is one of the generated images, showing the segmented, complete turbulent wake.
[0107] Experimental example:
[0108] To verify the effectiveness of the proposed image processing-based ship wake extraction and segmentation method, actual ship wake images were used, such as... Figure 4 The method was tested to evaluate its effectiveness and accuracy in segmenting different types of ship wakes.
[0109] In the experimental example, the ship's wake was extracted and segmented using the method of this invention.
[0110] like Figure 5 As shown in the figure, this image displays the segmented image after feature extraction, principal component analysis dimensionality reduction, Mean-shift clustering, and hole filling post-processing. Figure 7 The image shows the segmented ship wake extracted in this experimental example. As you can see, this method can clearly separate the wake from the background, and the boundaries are clear. Figure 8 This is a segmented image of the turbulent wake from this experimental example. It shows that the turbulent wake (the original image contains various types of wakes) Figure 8 The complete segmentation of the turbulent wake (which can be well distinguished from other wakes) demonstrates that this method can effectively and accurately segment different types of wakes.
[0111] This invention also provides a computer storage medium that can store multiple instructions adapted for loading and execution by a processor as described above. Figure 1 The method steps of the illustrated embodiment can be found in the following documentation for detailed execution. Figure 1 The specific details of the illustrated embodiments will not be elaborated here.
[0112] The present invention also provides a computer program product that stores at least one instruction, which is loaded and executed by the processor to implement the ship wake extraction and segmentation method as described in the above embodiments.
[0113] Please see Figure 9 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. Figure 9 As shown, the terminal device 500 may include: at least one processor 501, at least one network interface 504, user interface 503, memory 505, and at least one communication bus 502.
[0114] The communication bus 502 is used to enable communication between these components.
[0115] The user interface 503 may include a display screen and a camera. Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.
[0116] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0117] The processor 501 may include one or more processing cores. The processor 501 connects to various parts within the terminal device 500 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 505, and by calling data stored in the memory 505. Optionally, the processor 501 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 501 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 501 and may be implemented as a separate chip.
[0118] The memory 505 may include random access memory (RAM) or read-only memory. Optionally, the memory 505 may include a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 505 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the above-described ship wake extraction and segmentation method embodiments, etc.; the data storage area may store data involved in the above-described ship wake extraction and segmentation method embodiments, etc. Optionally, the memory 505 may also be at least one storage device located remotely from the aforementioned processor 501. Figure 9 As shown, the memory 505, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs.
[0119] exist Figure 9In the terminal device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and to obtain the user's input data; while the processor 501 can be used to call the application program stored in the memory 505 and specifically execute, such as Figure 1 The method shown can be referred to for details. Figure 1 As shown, it will not be elaborated further here.
[0120] Those skilled in the art will understand that implementing all or part of the processes in the ship wake extraction and segmentation method of the above embodiments can be accomplished by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the ship wake extraction and segmentation method described above. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0121] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for extracting and segmenting ship wakes, characterized in that, include: S100: Read optical images of the ship's wake; S200. Extract image features from the optical image of the ship's wake, wherein the image features include pixel values, pixel coordinates, spot features, and texture features; S300. Perform dimensionality reduction processing on the image features to obtain sample data; S400. Cluster the sample data. Divide the sample data into multiple clusters by a preset radius and threshold, and extract the centroid of each cluster for image point classification. S500: Perform median filtering and filling on the image obtained in step S400 to eliminate holes and ensure regional connectivity. Further segment the image based on the characteristics of different regions to extract the ship's wake region. S600: Automatically extracts texture regions and selects source and target regions based on similarity comparison; S700: Generate the final segmented image of the ship's wake region and display the segmentation results.
2. The method for extracting and segmenting ship wakes according to claim 1, characterized in that, In step S200, for a grayscale image, the pixel value is a grayscale value as a feature; for a color image, the pixel value is three features: R, G, and B.
3. The method for extracting and segmenting ship wakes according to claim 1, characterized in that, In step S200, multiple spot features and multiple stripe features are extracted using multiple DOOG filters and multiple DOG filters, respectively.
4. The method for extracting and segmenting ship wakes according to claim 3, characterized in that, In step S300, the image features are subjected to dimensionality reduction processing using principal component analysis algorithm. The specific steps are as follows: (a) Normalize and decentralize the data; (b) Calculate the covariance matrix; (c) Calculate eigenvalues, eigenvectors, and select principal components.
5. The method for extracting and segmenting ship wakes according to claim 1, characterized in that, In step S400, the sample data is clustered using the Mean-shift algorithm, specifically including: (A) Randomly select a pixel x0 from the data point set of the image (the feature set obtained after dimensionality reduction) as the center point. The pixel x0 as the center point is the updated cluster center. (B) Find all points that are less than r away from the center point x0, denoted as set M, and consider these points to belong to category CL. At the same time, increment the number of visits of these points in category CL by 1. (C) Calculate the vector from x0 to each element in set M, and average these vectors to obtain the drift vector M. h , (D) Update the drift point. Is updating the drift point simply the formula: x0 = x + M? h (x), representing x0 along the direction M h The distance moved is ||M h ||; (E) Repeat step bd until ||M h If the value is less than the set threshold, remember the position of x0. All points encountered in this iteration process belong to category CL. (F) If the distance between the center of the current category CL and the center of the previously existing category CL' is less than the threshold when convergence, then the current CL and CL' belong to the same category and are merged; otherwise, CL is regarded as a new category. (G) Repeat step AF until all points have been marked as visited; (H) Identify the category that is visited most frequently for each point and classify the point into that category.
6. The method for extracting and segmenting ship wakes according to claim 1, characterized in that, In step S500, the voids are filled using the flooding filling method, and the fractured areas are connected using the connectivity component analysis method.
7. The method for extracting and segmenting ship wakes according to claim 1, characterized in that, In step S600, the threshold is automatically selected using the Otsu algorithm, and the relationship between textured and non-textured regions is determined based on the pixel value similarity of the regions. The source region and target region are then selected based on the similarity.
8. The method for extracting and segmenting ship wakes according to claim 1, characterized in that, Step S700 specifically involves generating multiple images according to steps S100-S600, stitching these images together, and generating the final segmented image of the ship's wake region.
9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as method steps as claimed in any one of claims 1 to 8.
10. A terminal device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 8.