A Ship Target Segmentation Method Based on an Improved Whale Optimization Algorithm

By combining edge detection with morphological operations to improve the whale optimization algorithm, the problem of insufficient segmentation accuracy of traditional methods in complex environments is solved, achieving high-precision ship target recognition and improving the automation level of maritime target recognition.

CN121121126BActive Publication Date: 2026-03-17SHENZHEN INST OF GUANGDONG OCEAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511648421.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-03-17
Estimated Expiration
2045-11-12

AI Technical Summary

Technical Problem

Traditional algorithms are susceptible to noise interference in coastline segmentation and water target recognition. Fixed threshold segmentation is difficult to adapt to complex scenarios, leading to misjudgment and missed detection. Furthermore, traditional methods are not adaptable to dynamic thermal information changes and cannot meet the requirements of high-precision real-time recognition.

Method used

By integrating edge detection and morphological operations, an improved whale optimization algorithm is introduced to dynamically optimize the segmentation threshold. Target contour features are extracted through edge detection, and regions of interest are constructed by combining adaptive morphological operations. The improved whale optimization algorithm is then used to extract ship targets, and the threshold parameters for highlighting targets are dynamically adjusted.

Benefits of technology

It significantly improves segmentation accuracy in complex environments, reduces the false recognition rate of water targets, and enables accurate extraction of bright targets in low-contrast scenes, thereby enhancing the intelligence level of maritime traffic monitoring and fishery resource surveys.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121121126B_ABST
    Figure CN121121126B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing, and more particularly to a ship target segmentation method based on an improved whale optimization algorithm, comprising: acquiring airborne infrared images; generating a land-sea segmentation mask image; acquiring a SURF feature point dilation mask; multiplying the land-sea segmentation mask image and the SURF feature point dilation mask pixel by pixel to obtain a region of interest mask; extracting ship targets to obtain a first segmentation image; multiplying the first segmentation image and the region of interest mask pixel by pixel to obtain a preliminary ship segmentation image; and removing speckle noise from the preliminary ship segmentation image to obtain a ship recognition result image. This invention introduces an improved whale optimization algorithm, overcoming the limitations of fixed thresholds, adapting to different lighting and noise conditions, improving segmentation accuracy in complex environments, effectively removing land interference, reducing the false recognition rate of water targets, and accurately extracting bright targets even in low-contrast scenes, achieving automated and high-precision infrared image analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and in particular to a method for ship target segmentation based on an improved whale optimization algorithm. Background Technology

[0002] With the continuous evolution of infrared imaging technology, the identification of bright targets on water faces multiple challenges: strong interference from complex backgrounds weakens target features; the similarity of thermal radiation between the coastline and the target can easily lead to misjudgment; and traditional methods are not adaptable enough to dynamic changes in thermal information, making it difficult to meet the requirements of high-precision real-time identification.

[0003] Traditional algorithms for coastline segmentation and aquatic target recognition suffer from drawbacks such as susceptibility to noise interference in edge detection, difficulty adapting to complex scenes with fixed threshold segmentation, and loss of details during morphological post-processing, leading to misidentification of coastlines and missed target detection. This invention integrates edge detection and morphological operations to address the problem of connecting broken edges; it introduces an improved whale optimization algorithm to overcome the limitations of fixed thresholds and adapt to different lighting and noise conditions. This solution significantly improves segmentation accuracy in complex environments, effectively eliminates land interference, reduces the false recognition rate of aquatic targets, and can accurately extract bright targets even in low-contrast scenes, achieving automated and high-precision infrared image analysis. Summary of the Invention

[0004] To address this, this invention provides a ship target segmentation method based on an improved whale optimization algorithm. This method extracts target contour features through edge detection, constructs regions of interest using adaptive morphological operations, and introduces an improved whale optimization algorithm to dynamically optimize the segmentation threshold, overcoming the limitations of traditional fixed threshold methods. Experimental results show that this method can improve the accuracy of ship target identification under complex sea conditions and enhance the intelligence level of maritime traffic monitoring and fisheries resource surveys.

[0005] To achieve the above objectives, the present invention provides a system comprising:

[0006] Acquire airborne infrared imagery; generate a land-sea segmentation mask image; acquire a SURF feature point dilation mask; multiply the land-sea segmentation mask image and the SURF feature point dilation mask pixel-by-pixel to obtain a region of interest mask; extract the ship target to obtain a first segmentation map; multiply the first segmentation map and the region of interest mask pixel-by-pixel to obtain a preliminary ship segmentation map; remove speckle noise from the preliminary ship segmentation map to obtain a ship identification result image; and use an improved whale optimization algorithm to extract the ship target to obtain the first segmentation map, including:

[0007] Initialize the whale population: Randomly generate N whales in the search space;

[0008] Fitness assessment: Calculate the fitness value for each whale and record the current optimal solution. ;

[0009] The whale's position is iteratively updated, which includes surrounding the prey, bubble web attack, random prey search, and updating the optimal solution;

[0010] In response to reaching the maximum number of iterations Or the fitness value changes by less than 1e -7 Stop the generation of updates, among which, =100;

[0011] in,

[0012] The condition for surrounding the prey is | | 1. If the whale chooses to randomly search for prey, the behavior of surrounding the prey is to move towards the current optimal solution. The formula for the position of other whales has been updated to include the contracted enclosure. Where t is the number of iterations;

[0013] The conditions for the bubble web attack are | If |<1 and p<0.5, the behavior of a bubble web attack is that the whale approaches its prey along a spiral path and simulates a bubble web attack. The position update formula is: ,in, ;

[0014] The condition for randomly searching for prey is | | 1. If p > 0.5, the whale's random prey search behavior involves randomly selecting an individual as a reference for a global search. The formula for random prey search is: , ,in, It is a randomly selected solution vector;

[0015] The updated optimal solution is to recalculate the fitness value of all whales after each iteration;

[0016] Where t is the current iteration number, It is a random vector. ∈[0,1], X(t) is the solution vector of the current iteration, X best (t) represents the currently found optimal solution vector, X rand( t) is a randomly selected solution vector, b is the spiral shape parameter, and l is a random number. ,in, t represents the current iteration number.

[0017] and For vector coefficients, and For distance, , , Update parameters in a linearly decreasing manner: p is a random probability;

[0018] After updating the whale's position, a Gaussian random perturbation is introduced:

[0019]

[0020] in, It is a Gaussian random number with a mean of 0 and a standard deviation of 0.1.

[0021] Furthermore, the fitness function is: ,in, To maximize the inter-class variance, ,in,

[0022] , , , ,

[0023] in, It is the probability of each pixel value i in the image.

[0024] Furthermore, the process of generating the land-sea segmentation mask image includes:

[0025] The image edge information of the airborne infrared image was extracted using the Canny operator;

[0026] Morphological expansion was used to connect the fractured edges;

[0027] Perform the cavity filling operation;

[0028] Extract the longest coastline as the land-sea boundary line;

[0029] Generate a land-sea segmentation mask image.

[0030] Furthermore, the process of obtaining the SURF feature point dilation mask includes:

[0031] Extract SURF feature points from the airborne infrared image;

[0032] Morphological dilation is performed around the feature point, with a radius of 20 pixels.

[0033] After filling the voids, an expansion mask of SURF feature points is obtained.

[0034] Compared with existing technologies, the advantages of this invention are as follows: Compared with traditional methods, this invention first effectively processes image noise and discontinuous edges through edge detection and morphological operations, thereby improving the accuracy of coastline extraction. Simultaneously, the improved whale optimization algorithm not only dynamically adjusts the threshold parameter for bright targets but also avoids the limitations of traditional fixed threshold methods, ensuring efficient segmentation in complex environments. This method not only improves segmentation accuracy but also enhances robustness under different conditions, especially in situations where the boundary between water and land is blurred, enabling automatic adaptation and accurate identification of coastlines. The application of this technology can be widely extended to provide more precise technical support for water resource management and marine monitoring. Attached Figure Description

[0035] Figure 1 This is a flowchart of a ship target segmentation method based on an improved whale optimization algorithm according to an embodiment of the present invention;

[0036] Figure 2 Airborne infrared imagery as described in an embodiment of the present invention;

[0037] Figure 3 This is a land-sea segmentation mask image according to an embodiment of the present invention;

[0038] Figure 4 This is a SURF feature point dilation mask according to an embodiment of the present invention;

[0039] Figure 5 This is a region of interest mask according to an embodiment of the present invention;

[0040] Figure 6 This is a first segmented view of an embodiment of the present invention;

[0041] Figure 7 This is a preliminary section diagram of a ship according to an embodiment of the present invention;

[0042] Figure 8 This is a diagram showing the ship identification results according to an embodiment of the present invention. Detailed Implementation

[0043] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.

[0044] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.

[0045] Please see Figures 1 to 8The figures shown are, respectively, a flowchart of the ship target segmentation method based on the improved whale optimization algorithm according to an embodiment of the present invention; an airborne infrared image according to an embodiment of the present invention; a land-sea segmentation mask image according to an embodiment of the present invention; a SURF feature point dilation mask according to an embodiment of the present invention; a region of interest mask according to an embodiment of the present invention; a first segmentation image according to an embodiment of the present invention; a preliminary ship segmentation image according to an embodiment of the present invention; and a ship identification result image according to an embodiment of the present invention.

[0046] An embodiment of the present invention provides a ship target segmentation method based on an improved whale optimization algorithm, comprising:

[0047] Step S1: Acquire airborne infrared imagery;

[0048] Step S2: Generate a land-sea segmentation mask image;

[0049] Step S3: Obtain the SURF feature point dilation mask;

[0050] Step S4: Multiply the land-sea segmentation mask image pixel by pixel with the SURF feature point dilation mask to obtain the region of interest mask;

[0051] Step S5: Extract the ship target to obtain the first segmentation map;

[0052] Step S6: Multiply the first segmentation image with the region of interest mask pixel by pixel to obtain a preliminary segmentation image of the ship;

[0053] Step S7: Remove speckle noise from the preliminary ship segmentation image to obtain the ship identification result image.

[0054] Specifically, the improved whale optimization algorithm is used to extract ship targets and obtain the first segmentation map, including:

[0055] Step S501, Initialize the whale population: Randomly generate N whales in the search space;

[0056] Step S502, evaluate fitness: calculate the fitness value for each whale and record the current optimal solution. ;

[0057] Step S503, whale position iterative update, which includes surrounding prey, bubble net attack, random prey search and updating the optimal solution;

[0058] Step S504, in response to reaching the maximum number of iterations Alternatively, the generation update may stop when the fitness value changes to meet preset conditions; this invention recommends... The fitness value is 100, and the change in fitness value is less than 1e. -7 .

[0059] in,

[0060] The condition for surrounding the prey is | | 1. If the whale chooses to randomly search for prey, the behavior of surrounding the prey is to move towards the current optimal solution. The formula for shrinking the encirclement, which surrounds the prey, and thus the formula for the location of other whales, is updated to: ;

[0061] The conditions for the bubble web attack are | If |<1 and p<0.5, the behavior of a bubble web attack is that the whale approaches its prey along a spiral path and simulates a bubble web attack. The formula for the bubble web attack, i.e., the position update formula, is: ,in, ;

[0062] The condition for randomly searching for prey is | | 1. If p > 0.5, the whale's random prey search behavior involves randomly selecting an individual as a reference for a global search. The formula for random prey search is: , ,in, It is a randomly selected solution vector;

[0063] The updated optimal solution involves recalculating the fitness of all whales after each iteration.

[0064] Where t is the current iteration number, It is a random vector. ∈[0,1], X(t) is the solution vector of the current iteration, X best (t) represents the currently found optimal solution vector, X rand( t) is a randomly selected solution vector, b is the spiral shape parameter, and l is a random number. ,in, t represents the current iteration number.

[0065] and For vector coefficients, and For distance, , , Update parameters in a linearly decreasing manner: , where p is a random probability.

[0066] Updating whale location Then, a Gaussian random perturbation is introduced:

[0067]

[0068] in, It is a Gaussian random number with a mean of 0 and a standard deviation of 0.1.

[0069] Specifically, the fitness function is ,in, To maximize the inter-class variance, ,in,

[0070] , , , ,

[0071] in, It is the probability of each pixel value i in the image.

[0072] Specifically, the process of generating the land-sea segmentation mask image includes:

[0073] The image edge information of the airborne infrared image was extracted using the Canny operator;

[0074] Morphological expansion was used to connect the fractured edges;

[0075] Perform the cavity filling operation;

[0076] Extract the longest coastline as the land-sea boundary line;

[0077] Generate a land-sea segmentation mask image.

[0078] Specifically, the process of obtaining the SURF feature point dilation mask includes:

[0079] Extract SURF feature points from the airborne infrared image;

[0080] Morphological dilation is performed around the feature point, with a radius of 20 pixels.

[0081] After filling the voids, an expansion mask of SURF feature points is obtained.

[0082] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

[0083] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A ship target segmentation method based on an improved whale optimization algorithm, comprising: Acquiring an airborne infrared image; Generating a sea-land segmentation mask image; Acquiring a SURF feature point inflation mask; Multiplying the sea-land segmentation mask image and the SURF feature point inflation mask pixel by pixel to acquire an area of interest mask; extracting a ship target to acquire a first segmentation image; multiplying the first segmentation image and the area of interest mask pixel by pixel to acquire a ship preliminary segmentation image; and removing spot noise from the ship preliminary segmentation image to acquire a ship recognition result image, characterized in that the improved whale optimization algorithm is used for ship target extraction to acquire a first segmentation image, comprising: Initializing a whale population: randomly generating N whales in a search space; Assess fitness: Calculate fitness value for each of the whales, record the current best solution ; Iterative updating of whale position, including surrounding prey, bubble net attack, random search for prey, and updating the optimal solution; in response to reaching a maximum number of iterations or fitness value change is less than 1e -7 stop generation update, where, = 100; Wherein, The condition for surrounding the prey is | 1, then the random search prey is selected, and the behavior of surrounding the prey is that the whale moves to the current optimal solution The surrounding is contracted, and the position formula of other whales is updated as Wherein, t is the iteration number. The conditions of the bubble net attack are |<1 and p<0.5, the behavior of the bubble net attack is that the whale approaches the prey along a spiral path and simulates the bubble net attack, and the position update formula is wherein, ; The condition for the random search prey is | 1 and p>0.5, the behavior of the random search prey is that the whale randomly selects an individual as a reference to perform global search, and the formula of the random search prey is , wherein, is a randomly selected solution vector; The updated optimal solution is the recalculated fitness value of all whales after each iteration; where t is the current iteration number, is a random vector, ∈ [0, 1], X(t) is the solution vector of the current iteration, and l is a random number, where , and is a vector coefficient, and is a distance, , , is a linear decreasing update parameter: p is a random probability; After updating the whale position, Gaussian random disturbance is introduced: , wherein is a Gaussian random number with mean 0 and standard deviation 0.1; The process of generating the sea-land segmentation mask image includes: Extracting image edge information of the airborne infrared image using a Canny operator; Performing morphological inflation to connect broken edges; Performing a hole filling operation; Extracting the longest coastline as a sea-land boundary line; Generating a sea-land segmentation mask image.

2. The ship target segmentation method based on improved whale optimization algorithm according to claim 1, characterized in that, The fitness function is wherein, is the maximum inter-class variance, wherein, , , , , wherein, is the probability of each pixel value i in the image.

3. The ship target segmentation method based on improved whale optimization algorithm according to claim 2, characterized in that, The process of acquiring the SURF feature point inflation mask includes: Extracting the SURF feature points of the airborne infrared image; Performing morphological inflation around the feature points, with a morphological inflation radius of 20 pixels; After the hole filling operation, a SURF feature point inflation mask is obtained.

Citation Information

Patent Citations

  • Ship target segmentation method and system based on improved Harris eagle optimization algorithm

    CN120672779A

  • Information processing method, radar apparatus, and recording medium

    US20240310483A1