Unmanned aerial vehicle image ship detection method and system based on FAST features and HSO algorithm
By combining FAST features and the HSO algorithm, efficient ROI localization and segmentation threshold optimization in UAV images are achieved, solving the problems of low efficiency and poor noise resistance in traditional methods, and improving the efficiency and accuracy of image processing.
Patent Information
- Application Number
- CN202511738498.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-11-25
AI Technical Summary
Traditional UAV infrared image ship detection methods suffer from low ROI localization efficiency and poor segmentation thresholding, especially in high-resolution image processing where computational costs are high and they are susceptible to noise.
The FAST feature detection method is used to determine the region of interest (ROI) image, and the HSO algorithm is used to iteratively optimize the candidate detection threshold set. Combined with image segmentation and ship detection, the ROI can be efficiently located and the segmentation threshold optimized.
It improves the efficiency and noise resistance of UAV image processing, enhances the accuracy of target detection and its ability to adapt to complex scenes, and reduces computing costs.
Smart Images

Figure CN121190755B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of infrared image processing technology, specifically to a method and system for ship detection in UAV images based on FAST features and HSO algorithm. Background Technology
[0002] Image target extraction is a core task in the field of computer vision that supports the application of scenarios such as industrial inspection, medical imaging, and robot navigation. Its core requirement is to accurately separate effective targets from complex backgrounds while taking into account processing efficiency and anti-interference capabilities.
[0003] Traditional UAV infrared data target extraction methods have obvious limitations: First, the location of Region of Interest (ROI) relies on manual annotation or fixed area selection, which is inefficient when processing high-resolution images across the entire image and has high computational costs for large images. There is no efficient way to locate ROI to narrow down the processing range. Second, the segmentation threshold is mostly obtained by using a single threshold method. Although it can guarantee the theoretical optimality, it is inefficient for megapixel-level images, and the single threshold is easily affected by noise, leading to oversegmentation. Summary of the Invention
[0004] In view of the above problems, this invention proposes a method and system for ship detection in UAV images based on FAST features and HSO algorithm, which solves the problems of inefficient ROI localization and poor segmentation thresholding of traditional methods.
[0005] According to one aspect of the present invention, a method for ship detection in UAV images based on FAST features and HSO algorithm is proposed, the method comprising:
[0006] Perform FAST feature detection on the target UAV image and determine the region of interest image based on the feature detection results;
[0007] The HSO algorithm is used to determine a set of candidate detection thresholds for the region of interest image. The set of candidate detection thresholds is iteratively optimized until a termination condition is met, and the detection threshold when the termination condition is met is output.
[0008] The detection threshold is used to segment the region of interest image, and ship detection is performed on the segmented image to obtain the ship detection results in the target UAV image.
[0009] Further, the step of performing FAST feature detection on the target UAV image and determining the region of interest image based on the feature detection results includes:
[0010] The target UAV image is divided into sliding windows of a preset size, the brightness value of each pixel in each sliding window is obtained, and the center pixel of all sliding windows that meet the set brightness requirements is taken as FAST feature point.
[0011] The region of interest image is determined by combining all feature points and the pre-set boundary margin of the target UAV image.
[0012] Furthermore, the step of using the HSO algorithm to determine the candidate detection threshold set for the region of interest image includes:
[0013] Set the spatial range for the detection threshold;
[0014] Within the specified spatial range, S candidate detection thresholds are randomly generated according to the population initialization rules, and a set of candidate detection thresholds is generated.
[0015] Furthermore, within the aforementioned spatial range, S candidate detection thresholds are randomly generated according to the population initialization rule, and a candidate detection threshold set is generated, including:
[0016] Generate a candidate detection threshold set X of size S, using the formula:
[0017] ;
[0018] X: The set of candidate detection thresholds, containing S independent candidate detection thresholds;
[0019] The i-th detection threshold in the candidate detection threshold set;
[0020] Generate a uniformly distributed random number in the range 0-1;
[0021] L, U: The lower and upper bounds of the spatial range of the detection threshold.
[0022] Further, the candidate detection threshold set is subjected to iterative optimization processing, including:
[0023] Fitness evaluation step: Perform fitness evaluation on each candidate detection threshold in the candidate detection threshold set to obtain a candidate fitness value;
[0024] Iterative update steps: Perform random iteration on each candidate detection threshold in the candidate detection threshold set to generate an iterated detection threshold; evaluate the fitness of each iterated detection threshold to obtain an iterated fitness value;
[0025] Compare the candidate fitness value and the corresponding iterative fitness value of each candidate detection threshold. Based on the comparison results, determine whether to retain the candidate detection threshold in the candidate detection threshold set or replace the candidate detection threshold with the iterative detection threshold.
[0026] Repeat the fitness evaluation step and the iterative update step, and match them with the termination condition.
[0027] Furthermore, the termination condition is at least one of the following conditions:
[0028] The number of iterations t reaches the preset maximum number of iterations T;
[0029] The change in the optimal fitness value of the candidate detection threshold set over k consecutive iterations is less than the preset threshold.
[0030] Furthermore, the fitness evaluation step includes: calculating the merits of each candidate detection threshold in the candidate detection threshold set using a fitness function, the expression of which is:
[0031] ;
[0032] Candidate detection threshold fitness value;
[0033] To maximize the inter-class variance, for a threshold T, the foreground proportion mean Background proportion mean The between-class variance is:
[0034] ;
[0035] The proportion of foreground pixels in the image, i.e., the number of pixels with gray values greater than T / the total number of pixels;
[0036] The average gray value of the foreground pixel, which is the average gray value of all pixels with a gray value > T.
[0037] The proportion of background pixels in the image, i.e., the number of pixels with grayscale values ≤ T / the total number of pixels, satisfies... ;
[0038] The average grayscale value of the background pixels, which is the average grayscale value of all pixels with a grayscale value ≤ T.
[0039] For dynamic reward items, the expression is:
[0040] ;
[0041] Among them, the threshold preference factor for:
[0042]
[0043] when hour, This is the maximum reward;
[0044] when hour, 0 means no reward;
[0045] [L,U] represents the spatial range of the preset detection threshold;
[0046] The normalized between-class variance is expressed as:
[0047] .
[0048] Furthermore, for each candidate detection threshold in the candidate detection threshold set Perform random iteration to generate the detection threshold after iteration. ,include:
[0049] The iterative progress coefficient E is used to perform phased processing of the stochastic iterative process, wherein...
[0050] ;
[0051] Where t is the number of iterations, and T is the preset maximum number of iterations;
[0052] When E≥1, it is the exploration phase: a random number q between (0, 1) is generated. If the random number q≥0.5, the detection threshold after iteration is... Represented as:
[0053] ;
[0054] in, A random number in the range (0, 1); : The candidate detection threshold randomly selected from the candidate detection threshold set during the t-th iteration;
[0055] If the random number q < 0.5, the detection threshold after iteration Represented as:
[0056] ;
[0057] in, The mean of all candidate detection thresholds in the candidate detection threshold set at the t-th iteration;
[0058] When E < 1, it is the development stage, and the exploration factor K is used to further process it in stages, where the value of K ranges from (-1, 1).
[0059] when At that time, for randomized local development:
[0060] Iterated detection threshold Represented as:
[0061] ;
[0062] ;
[0063] when At that time, it was for small-scale in-depth development:
[0064] Iterated detection threshold Represented as:
[0065] ;
[0066] when At that time, it was a medium-scale localized development:
[0067] Iterated detection threshold Represented as:
[0068] ;
[0069] in, The candidate detection threshold with the highest fitness in the candidate detection threshold set at the t-th iteration; For random positions biased towards low thresholds; It is a random number with a value in the range (0, 2).
[0070] According to another aspect of the present invention, a ship detection system based on FAST features and HSO algorithm for UAV images is proposed, comprising:
[0071] The region of interest extraction module is configured to perform FAST feature detection on the target UAV image and determine the region of interest image based on the feature detection results.
[0072] The iterative optimization module is configured to use the HSO algorithm to determine a set of candidate detection thresholds for each region of interest image, perform iterative optimization on the set of candidate detection thresholds until a termination condition is met, and output the detection threshold when the termination condition is met.
[0073] The ship detection module is configured to perform image segmentation on the region of interest image using the detection threshold, and to perform ship detection on the segmented image to obtain the ship detection result in the target UAV image.
[0074] According to another aspect of the present invention, a terminal device is provided, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the UAV image ship detection method based on FAST features and HSO algorithm as described above.
[0075] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the UAV image ship detection method based on FAST features and HSO algorithm as described above.
[0076] The beneficial technical effects of this invention are:
[0077] This invention proposes a method and system for ship detection in UAV images based on FAST features and the HSO algorithm. It integrates ROI feature localization, intelligent segmentation, and precise optimization techniques for UAV infrared digital image processing, constructing an integrated "localization-segmentation-optimization" solution. The technical solution of this invention achieves efficient ROI localization through FAST feature detection, significantly reducing the processing range. Combined with the Holistic Swarm Optimization (HSO) algorithm, it improves the efficiency of target detection and segmentation threshold search, enhances noise resistance, and, with invalid target screening optimization, forms an image target extraction technology system adaptable to various complex scenarios. Attached Figure Description
[0078] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:
[0079] Figure 1 This is a flowchart of the UAV image ship detection method based on FAST features and HSO algorithm described in this embodiment of the invention;
[0080] Figure 2 This is a schematic diagram of the sliding window for FAST feature detection in an embodiment of the present invention;
[0081] Figure 3 This is a schematic diagram of FAST feature points of a target UAV image in an embodiment of the present invention;
[0082] Figure 4 This is a schematic diagram of the region of interest image in an embodiment of the present invention;
[0083] Figure 5 This is a schematic diagram of the segmentation results in an embodiment of the present invention;
[0084] Figure 6 This is a schematic diagram of the segmentation result after filling the voids in an embodiment of the present invention;
[0085] Figure 7 This is a schematic diagram of the results of removing the largest connected region in an embodiment of the present invention;
[0086] Figure 8 This is a schematic diagram of the final processing result after removing small-area interference in an embodiment of the present invention;
[0087] Figure 9 This is a schematic diagram of the structure of the UAV image ship detection system based on FAST features and HSO algorithm according to an embodiment of the present invention. Detailed Implementation
[0088] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0089] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, apparatus, device, method, or computer program product. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software. It should be understood herein that any number of elements in the accompanying drawings is for illustrative purposes only and not as a limitation, and any naming is for distinction only and has no limiting meaning.
[0090] This invention proposes a method for ship detection in UAV images based on FAST features and the HSO algorithm, such as... Figure 1 As shown, the method includes:
[0091] S1. Perform FAST feature detection on the target UAV image and determine the region of interest image based on the feature detection results;
[0092] S2. The HSO algorithm is used to determine the candidate detection threshold set for the region of interest image. The candidate detection threshold set is iteratively optimized until the termination condition is met, and the detection threshold when the termination condition is met is output.
[0093] S3. The image of the region of interest is segmented using the detection threshold, and ship detection is performed on the segmented image to obtain the ship detection result in the target UAV image.
[0094] The method begins with S1. In S1, FAST feature detection is performed on the target UAV image, and the region of interest image is determined based on the feature detection results, including:
[0095] The target UAV image is divided into sliding windows of a preset size, the brightness value of each pixel in each sliding window is obtained, and the center pixel of all sliding windows that meet the set brightness requirements is taken as FAST feature point.
[0096] The region of interest image is determined by combining all feature points and the pre-set boundary margin of the target UAV image.
[0097] Specifically, the target drone image is as follows: Figure 2 As shown, for the center pixel Its brightness value With a sliding window radius of 3, there are N consecutive pixels. satisfy:
[0098]
[0099] The i-th sampled pixel The brightness value (grayscale value). In some cases, N=16.
[0100] like Figure 3 In the image, circles indicate the extracted FAST feature points that meet the brightness requirements.
[0101] Based on the coordinates of all FAST feature points ( , Calculate the boundaries of the region of interest image:
[0102]
[0103]
[0104] The left and right boundaries of the ROI region in the horizontal direction (x-axis);
[0105] The lower and upper boundaries of the ROI region in the vertical direction (y-axis);
[0106] in,( , () represents the image width and height. The boundary margin (which can be 20 in this embodiment) is used to define the region of interest image as follows. Figure 4 As shown.
[0107] Then in S2, the HSO algorithm is used to determine the set of candidate detection thresholds for the region of interest image, including:
[0108] Set the spatial range for the detection threshold;
[0109] Within the specified spatial range, S candidate detection thresholds are randomly generated according to the population initialization rules, and a set of candidate detection thresholds is generated.
[0110] In this embodiment of the invention, the HSO model is used for "population iterative optimization," approximating the optimal solution (the optimal detection threshold in this embodiment) through a cycle of "initialization → evaluation → update → selection." First, the candidate detection threshold set is initialized:
[0111] Let the spatial range of the detection threshold in the optimization problem be [L, U]. Generate an initial candidate detection threshold set X of size S, using the following formula:
[0112]
[0113] X: The set of candidate detection thresholds, containing S independent candidate detection thresholds;
[0114] The i-th candidate detection threshold in the candidate detection threshold set;
[0115] Generate a uniformly distributed random number in the 0-1 interval to ensure that the initial candidate detection threshold uniformly covers the spatial range [L,U].
[0116] L, U: Lower and upper bounds of the spatial range (set according to the specific problem, for example, if the target drone image is a grayscale image with a resolution of 256, the spatial range can be set to [50,128] or [0,165], etc.).
[0117] In S2, the candidate detection threshold set is iteratively optimized, including:
[0118] Fitness evaluation step: Perform fitness evaluation on each candidate detection threshold in the candidate detection threshold set to obtain a candidate fitness value;
[0119] Iterative update steps: Perform random iteration on each candidate detection threshold in the candidate detection threshold set to generate an iterated detection threshold; evaluate the fitness of each iterated detection threshold to obtain an iterated fitness value;
[0120] Compare the candidate fitness value and the corresponding iterative fitness value of each candidate detection threshold. Based on the comparison results, determine whether to retain the candidate detection threshold in the candidate detection threshold set or replace the candidate detection threshold with the iterative detection threshold.
[0121] Repeat the fitness evaluation step and the iterative update step, and match them with the termination condition.
[0122] In this embodiment of the invention, the fitness evaluation of each candidate detection threshold in the candidate detection threshold set is performed in the same way as the fitness evaluation of each detection threshold after iteration; both methods use a fitness function to determine the merits of the candidate detection thresholds. The formula is:
[0123]
[0124] : The fitness value of the i-th candidate detection threshold in the candidate detection threshold set (the larger the value, the better the fitness).
[0125] : Fitness function.
[0126] The termination condition is at least one of the following conditions:
[0127] The number of iterations t reaches the preset maximum number of iterations T;
[0128] The change in the optimal fitness value of the candidate detection threshold set over k consecutive iterations is less than the preset threshold.
[0129] In this embodiment of the invention, the optimal fitness value of the candidate detection threshold set does not change significantly (convergence) after k consecutive iterations, i.e. . This is the candidate detection threshold corresponding to the optimal fitness value in the current iteration t.
[0130] The final output evaluates the optimal solution in the set of detection thresholds:
[0131]
[0132] The globally optimal solution found by the HSO algorithm;
[0133] : The operation that takes the "detection threshold that maximizes fitness";
[0134] The candidate detection threshold with the "highest fitness" in the current set of candidate detection thresholds. This represents the candidate detection threshold with the highest fitness among the candidate detection threshold sets at the t-th iteration.
[0135] In this embodiment of the invention, the fitness function introduces a "dynamic threshold reward" to prioritize the detection threshold with the best performance. The fitness function in this embodiment of the invention enhances the competitiveness of the detection threshold with the "highest fitness" through the "dynamic threshold reward".
[0136] The fitness evaluation step includes: calculating the merits of each candidate detection threshold in the candidate detection threshold set using a fitness function, the expression of which is:
[0137] ;
[0138] Candidate detection threshold fitness value;
[0139] To maximize the inter-class variance, for a threshold T, the foreground proportion mean Background proportion mean The between-class variance is:
[0140] ;
[0141] The proportion of foreground pixels in the image, i.e., the number of pixels with gray values greater than T / the total number of pixels;
[0142] The average gray value of the foreground pixel, which is the average gray value of all pixels with a gray value > T.
[0143] The proportion of background pixels in the image, i.e., the number of pixels with grayscale values ≤ T / the total number of pixels, satisfies... ;
[0144] The average grayscale value of the background pixels, which is the average grayscale value of all pixels with a grayscale value ≤ T.
[0145] For dynamic reward items, the expression is:
[0146] ;
[0147] Among them, the threshold preference factor for:
[0148]
[0149] when hour, This is the maximum reward;
[0150] when hour, 0 means no reward;
[0151] [L,U] represents the spatial range of the preset detection threshold;
[0152] The normalized between-class variance is expressed as:
[0153] .
[0154] In this embodiment of the invention, for each candidate detection threshold in the candidate detection threshold set Perform random iteration to generate the detection threshold after iteration. ,include:
[0155] The iterative progress coefficient E is used to perform phased processing of the stochastic iterative process, wherein...
[0156] ;
[0157] Where t is the number of iterations, and T is the preset maximum number of iterations;
[0158] When E≥1, it is the exploration phase: a random number q between (0, 1) is generated. If the random number q≥0.5, the detection threshold after iteration is... Represented as:
[0159] ;
[0160] in, A random number in the range (0, 1); : The candidate detection threshold randomly selected from the candidate detection threshold set during the t-th iteration;
[0161] If the random number q < 0.5, the detection threshold after iteration Represented as:
[0162] ;
[0163] in, The mean of all candidate detection thresholds in the candidate detection threshold set at the t-th iteration;
[0164] When E < 1, it is the development stage, and the exploration factor K is used to further process it in stages, where the value of K ranges from (-1, 1).
[0165] when At that time, for randomized local development:
[0166] Iterated detection threshold Represented as:
[0167] ;
[0168] ;
[0169] when At that time, it was for small-scale in-depth development:
[0170] Iterated detection threshold Represented as:
[0171] ;
[0172] when At that time, it was a medium-scale localized development:
[0173] Iterated detection threshold Represented as:
[0174] ;
[0175] in, The candidate detection threshold with the highest fitness in the candidate detection threshold set at the t-th iteration; For random positions biased towards low thresholds; It is a random number with a value in the range (0, 2).
[0176] Then, in S3, based on the improved HSO algorithm, the globally optimal solution searched by the HSO algorithm is used. right Figure 4 The ROI is extracted from the image and segmented, such as... Figure 5 As shown.
[0177] The process of detecting ships in a segmented image generally includes: hole filling and region filtering.
[0178] 1. Filling voids
[0179] Figure 5 The image shows the segmented result. It can be seen that there are many black areas within the segmented white areas. To ensure the integrity of connected regions, hole filling is needed to repair them. The repaired image is shown below. Figure 6 As shown.
[0180] 2. Region Filtering
[0181] In this embodiment of the invention, firstly, the largest connected region (which can be considered as land background interference) is deleted.
[0182] Figure 6The segmentation results shown contain large areas of background interference. To ensure the accuracy of the final results, this type of interference needs to be effectively removed. Considering that background interference has a large area, this embodiment of the invention uses a threshold method based on area to identify the largest connected region in the segmentation results and remove it as background interference, thereby achieving precise removal of background interference. Figure 7 This displays the results of removing the largest connected region.
[0183] Then, remove small areas of interference (this area can be considered as noise interference).
[0184] In addition to large-area background interference, the segmentation results also contain small-area interference (such as noise, artifacts, etc.). These small-area interferences are characterized by their small size. This embodiment of the invention uses a method based on area thresholding to selectively remove small-area interference regions with areas smaller than a specified threshold, thereby further refining the segmentation results. Figure 8 This displays the final processing result after removing small-area interference. Figure 8 The small area threshold is 50, which means that all interference with an area smaller than 50 pixels is removed.
[0185] This invention solves the problems of "low efficiency, poor noise resistance, insufficient accuracy, and narrow versatility" of existing technologies by using the collaborative processing of "FAST feature localization to reduce range, HSO optimization to improve efficiency, and two-step optimization to ensure accuracy". While ensuring the accuracy of target extraction as much as possible, it also takes into account the computational lightness and scene adaptability, making it suitable for practical application scenarios with "unlabeled data and complex backgrounds".
[0186] This invention also proposes a UAV image ship detection system based on FAST features and HSO algorithm, comprising:
[0187] The region of interest extraction module is configured to perform FAST feature detection on the target UAV image and determine the region of interest image based on the feature detection results.
[0188] The iterative optimization module is configured to use the HSO algorithm to determine a set of candidate detection thresholds for each region of interest image, perform iterative optimization on the set of candidate detection thresholds until a termination condition is met, and output the detection threshold when the termination condition is met.
[0189] The ship detection module is configured to perform image segmentation on the region of interest image using the detection threshold, and to perform ship detection on the segmented image to obtain the ship detection result in the target UAV image.
[0190] The modules are connected via wired and / or wireless means to enable data transmission between them.
[0191] The functionality of the UAV image ship detection system based on FAST features and HSO algorithm described in this embodiment can be explained by the aforementioned UAV image ship detection method based on FAST features and HSO algorithm. Therefore, for parts not detailed in the system embodiment, please refer to the above method embodiment, and will not be repeated here.
[0192] Another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the UAV image ship detection method based on FAST features and HSO algorithm described in the above embodiment.
[0193] Since the terminal device described in this embodiment is an electronic device used to implement the UAV image ship detection method based on FAST features and HSO algorithm in this application embodiment, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the UAV image ship detection method based on FAST features and HSO algorithm described in this application embodiment. Therefore, how the electronic device implements the method in this application embodiment will not be described in detail here.
[0194] Another embodiment of the present invention provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the UAV image ship detection method based on FAST features and HSO algorithm described in the above embodiment.
[0195] It should be noted that although several units, modules, or sub-modules are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0196] Furthermore, although the operations of the method of the present invention are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0197] While the spirit and principles of the invention have been described with reference to several specific embodiments, it should be understood that the invention is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for ease of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A method for ship detection in UAV images based on FAST features and HSO algorithm, characterized in that, include: Perform FAST feature detection on the target UAV image and determine the region of interest image based on the feature detection results; The HSO algorithm is used to determine a set of candidate detection thresholds for the region of interest image. The set of candidate detection thresholds is iteratively optimized until a termination condition is met, and the detection threshold when the termination condition is met is output. The detection threshold is used to segment the region of interest image, and ship detection is performed on the segmented image to obtain the ship detection results in the target UAV image; The step of using the HSO algorithm to determine the candidate detection threshold set for the region of interest image includes: Set the spatial range for the detection threshold; Within the specified spatial range, S candidate detection thresholds are randomly generated according to the population initialization rule, and a set of candidate detection thresholds is generated. Within the defined spatial range, S candidate detection thresholds are randomly generated according to the population initialization rule, and a set of candidate detection thresholds is generated, including: Generate a candidate detection threshold set X of size S, using the formula: ; X: The set of candidate detection thresholds, containing S independent candidate detection thresholds; The i-th detection threshold in the candidate detection threshold set; Generate a uniformly distributed random number in the range 0-1; L, U: Lower and upper bounds of the spatial range of the detection threshold; The iterative optimization process for the candidate detection threshold set includes: Fitness evaluation step: Perform fitness evaluation on each candidate detection threshold in the candidate detection threshold set to obtain a candidate fitness value; Iterative update steps: Perform random iteration on each candidate detection threshold in the candidate detection threshold set to generate an iterated detection threshold; evaluate the fitness of each iterated detection threshold to obtain an iterated fitness value; Compare the candidate fitness value and the corresponding iterative fitness value of each candidate detection threshold. Based on the comparison results, determine whether to retain the candidate detection threshold in the candidate detection threshold set or replace the candidate detection threshold with the iterative detection threshold. Repeat the fitness evaluation step and the iterative update step, and match them with the termination condition; The fitness evaluation step includes: calculating the merits of each candidate detection threshold in the candidate detection threshold set using a fitness function, the expression of which is: ; Candidate detection threshold fitness value; To maximize the inter-class variance, for a threshold T, the foreground proportion mean Background proportion mean The between-class variance is: ; The proportion of foreground pixels in the image, i.e., the number of pixels with gray values greater than T / the total number of pixels; The average gray value of the foreground pixel, which is the average gray value of all pixels with a gray value > T. The proportion of background pixels in the image, i.e., the number of pixels with grayscale values ≤ T / the total number of pixels, satisfies... ; The average grayscale value of the background pixels, which is the average grayscale value of all pixels with a grayscale value ≤ T. For dynamic reward items, the expression is: ; Among them, the threshold preference factor for: ; when hour, This is the maximum reward; when hour, 0 means no reward; [L,U] represents the spatial range of the preset detection threshold; The normalized between-class variance is expressed as: 。 2. The method according to claim 1, characterized in that, The step of performing FAST feature detection on the target UAV image and determining the region of interest image based on the feature detection results includes: The target UAV image is divided into sliding windows of a preset size, the brightness value of each pixel in each sliding window is obtained, and the center pixel of all sliding windows that meet the set brightness requirements is taken as FAST feature point. The region of interest image is determined by combining all feature points and the pre-set boundary margin of the target UAV image.
3. The method according to claim 1, characterized in that, The termination condition is at least one of the following conditions: The number of iterations t reaches the preset maximum number of iterations T; The change in the optimal fitness value of the candidate detection threshold set over k consecutive iterations is less than the preset threshold.
4. The method according to claim 1, characterized in that, For each candidate detection threshold in the candidate detection threshold set Perform random iteration to generate the detection threshold after iteration. ,include: The iterative progress coefficient E is used to perform phased processing of the stochastic iterative process, wherein... ; Where t is the number of iterations, and T is the preset maximum number of iterations; When E≥1, it is the exploration phase: a random number q between (0, 1) is generated. If the random number q≥0.5, the detection threshold after iteration is... Represented as: ; in, A random number in the range (0, 1); : The candidate detection threshold randomly selected from the candidate detection threshold set during the t-th iteration; If the random number q < 0.5, the detection threshold after iteration Represented as: ; in, The mean of all candidate detection thresholds in the candidate detection threshold set at the t-th iteration; When E < 1, it is the development stage, and the exploration factor K is used to further process it in stages, where the value of K ranges from (-1, 1). when At that time, for randomized local development: Iterated detection threshold Represented as: ; ; when At that time, it was for small-scale in-depth development: Iterated detection threshold Represented as: ; when At that time, it was a medium-scale localized development: Iterated detection threshold Represented as: ; in, The candidate detection threshold with the highest fitness in the candidate detection threshold set at the t-th iteration; For random positions biased towards low thresholds; It is a random number with a value in the range (0, 2).
5. A UAV image ship detection system based on FAST features and HSO algorithm, characterized in that, include: The region of interest extraction module is configured to perform FAST feature detection on the target UAV image and determine the region of interest image based on the feature detection results. The iterative optimization module is configured to use the HSO algorithm to determine a set of candidate detection thresholds for each region of interest image, perform iterative optimization on the set of candidate detection thresholds until a termination condition is met, and output the detection threshold when the termination condition is met. The ship detection module is configured to perform image segmentation on the region of interest image using the detection threshold, and then perform ship detection on the segmented image to obtain the ship detection result in the target UAV image; The iterative optimization module uses the HSO algorithm to determine the candidate detection threshold set for the region of interest image, including: Set the spatial range for the detection threshold; Within the specified spatial range, S candidate detection thresholds are randomly generated according to the population initialization rule, and a set of candidate detection thresholds is generated. Within the defined spatial range, S candidate detection thresholds are randomly generated according to the population initialization rule, and a set of candidate detection thresholds is generated, including: Generate a candidate detection threshold set X of size S, using the formula: ; X: The set of candidate detection thresholds, containing S independent candidate detection thresholds; The i-th detection threshold in the candidate detection threshold set; Generate a uniformly distributed random number in the range 0-1; L, U: Lower and upper bounds of the spatial range of the detection threshold; The iterative optimization module performs iterative optimization processing on the candidate detection threshold set, including: Fitness evaluation step: Perform fitness evaluation on each candidate detection threshold in the candidate detection threshold set to obtain a candidate fitness value; Iterative update steps: Perform random iteration on each candidate detection threshold in the candidate detection threshold set to generate an iterated detection threshold; evaluate the fitness of each iterated detection threshold to obtain an iterated fitness value; Compare the candidate fitness value and the corresponding iterative fitness value of each candidate detection threshold. Based on the comparison results, determine whether to retain the candidate detection threshold in the candidate detection threshold set or replace the candidate detection threshold with the iterative detection threshold. Repeat the fitness evaluation step and the iterative update step, and match them with the termination condition; The fitness evaluation step includes: calculating the merits of each candidate detection threshold in the candidate detection threshold set using a fitness function, the expression of which is: ; Candidate detection threshold fitness value; To maximize the inter-class variance, for a threshold T, the foreground proportion mean Background proportion mean The between-class variance is: ; The proportion of foreground pixels in the image, i.e., the number of pixels with gray values greater than T / the total number of pixels; The average gray value of the foreground pixel, which is the average gray value of all pixels with a gray value > T. The proportion of background pixels in the image, i.e., the number of pixels with grayscale values ≤ T / the total number of pixels, satisfies... ; The average grayscale value of the background pixels, which is the average grayscale value of all pixels with a grayscale value ≤ T. For dynamic reward items, the expression is: ; Among them, the threshold preference factor for: ; when hour, This is the maximum reward; when hour, 0 means no reward; [L,U] represents the spatial range of the preset detection threshold; The normalized between-class variance is expressed as: 。 6. A terminal device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the UAV image ship detection method based on FAST features and HSO algorithm as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Aerial image positioning method based on airborne task machine
CN116452995A
Modeling of temporarily static objects in surveillance video data
US20130051613A1