Target detection method and device based on multi-scale morphological operator, and medium
By adopting multi-scale morphological operators and optimal scale selection strategies in target detection, the problem of difficulty in extracting weak targets under the background of complex tailed stars is solved, and efficient target detection is achieved, reducing false alarm rates and improving detection accuracy.
Patent Information
- Application Number
- CN202510506413.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-04-22
AI Technical Summary
In the context of complex tailing stars, it is difficult to extract weak targets, with high false alarms and low detection rate.
The object detection method based on multi-scale morphological operators is adopted, and the morphological characteristic values are constructed and threshold judgments are performed through multi-scale morphological expansion operators and optimal scale selection strategies to achieve binary segmentation detection of the target.
Effectively alleviate false alarm events caused by local grayscale transformation of long-tailed stars, improve the target detection ability in the background of complex and dense long-tailed stars, and significantly improve the detection rate and detection accuracy of weak targets.
Smart Images

Figure CN120032135A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of target detection in image processing, and in particular provides a target detection method, device and medium based on a multi-scale morphological operator. Background Art
[0002] The technology of monitoring, tracking and identifying various targets, space debris and other objects in the space environment is of great significance to the fields of space traffic safety management, satellite navigation, space science research, etc. With the rapid development of space technology, the number of objects in space has increased dramatically, and the requirements for target detection technology have become increasingly higher. The technical background of target detection mainly includes the following aspects:
[0003] 1. Space environment perception: Space environment perception includes the ability to perceive, understand and predict various debris and targets in the space environment. Target detection is the basis for achieving space environment perception.
[0004] 2. Data processing and analysis technology: High-performance computing technology and advanced algorithms make it possible to process and analyze large amounts of target data.
[0005] 3. Optical technology: Optical telescopes are also important tools for target detection, especially when observing targets such as space debris.
[0006] The development and application of target detection technology will help improve the ability to perceive the space environment, ensure space traffic safety, and promote the sustainable development of space technology. With the continuous advancement of technology, target detection technology is also constantly developing, including the use of more advanced sensors, improved data processing algorithms, and more automated and intelligent systems. These advances not only improve the accuracy and efficiency of detection, but also expand the detection range, making the monitoring of targets more comprehensive and detailed.
[0007] Morphological operators are commonly used in the field of image processing. Morphological operators are a series of tools used to extract image components and structural information in image processing. They are based on the principles of mathematical morphology and are usually used in the preprocessing stage to improve the performance of subsequent target detection and recognition tasks.
[0008] In target detection, the application of morphological operators usually includes the following aspects:
[0009] 1. Image enhancement: Dilation and erosion can enhance the bright or dark areas in the image, which helps to improve the contrast between the target and the background.
[0010] 2. Noise removal: Opening and closing operations can be used to remove bright spots (noise) and dark spots (defects) in the image, respectively, smoothing the image while retaining important structural features.
[0011] 3. Feature extraction: Morphological operators can be used to extract geometric features of target objects, such as area, perimeter, connectivity, etc. These features can be used for target recognition and classification.
[0012] 4. Target segmentation: Through morphological operations, the target object in the image can be separated from the background, thereby achieving target detection.
[0013] Morphological operators are used in the field of target detection, including license plate recognition, medical image analysis, industrial detection, small target detection and tracking in infrared, visible light, SAR and other imaging systems. Morphological operators are an important tool in image processing. They are simple and effective, especially when processing binary images or grayscale images. However, their application needs to be adjusted according to the specific problem and image characteristics to obtain the best results. Summary of the invention
[0014] The purpose of the present invention is to solve the problem that it is difficult to extract weak targets under the background of complex trailing stars, the false alarm is high and the detection rate is low. The present invention provides a target detection method, device and medium based on multi-scale morphological operators. The algorithm can effectively alleviate the false alarm events caused by the local grayscale transformation of long-tailed stars, and can still detect the target when the star is too close to the target, which significantly improves the target detection capability under the background of complex and dense long-tailed stars compared with conventional methods.
[0015] The technical solution adopted by the present invention is as follows: a target detection method based on a multi-scale morphological operator, comprising the following steps:
[0016] Step 1: Read a single frame image and remove isolated noise points to obtain a preprocessed image;
[0017] Step 2: Using a multi-scale morphological dilation operator, perform a multi-scale morphological dilation operation pixel by pixel on the preprocessed image obtained in step 1 to obtain the dilation result and erosion result of each pixel under each scale structure element;
[0018] Step 3: For each pixel, use the dilation results and erosion results of multiple structural element scales obtained in step 2 to construct a grayscale transformation index, and mark the structural element scale with the smallest grayscale transformation index value as the optimal scale;
[0019] Step 4: For each pixel, calculate the mean value of the pixel corresponding to the optimal scale structure element in step 3;
[0020] Step 5: For each pixel, use step 4 to obtain the pixel mean of the optimal scale structure element, the dilation result of the optimal scale structure element, and the grayscale morphological feature value of the pixel, and determine whether the morphological feature value of the current pixel is greater than the specified threshold. If it is less than, the pixel is considered to be background or trailing star information, and the segmentation result of the point is set to zero; if the morphological feature value is greater than the specified threshold, the pixel is considered to be a target, and the binary segmentation result of the point is marked as non-zero, thereby realizing binary segmentation detection of the target.
[0021] An electronic device comprises: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned target detection method based on a multi-scale morphological operator.
[0022] A computer-readable storage medium stores executable instructions, which, when executed by a processor, enable the processor to implement the above-mentioned target detection method based on a multi-scale morphological operator.
[0023] The beneficial effects of the present invention are:
[0024] The multi-scale strategy of the present invention improves the target detection capability when the long-tailed star and the target are too close, and can effectively perceive the weak targets next to the long-tailed star with a large grayscale. The method significantly improves the detection capability of weak targets under complex backgrounds. Compared with traditional methods, the multi-scale morphological operation of the present invention has the characteristics of high detection probability and low false alarm, and can effectively alleviate the false alarm events caused by local changes in grayscale. The multi-scale strategy of the present invention has a good ability to detect when the star and the target are too close, and can detect the weak targets next to the long-tailed star with a relatively large grayscale. The present invention provides a detection strategy based on multi-scale morphological operation and adaptive threshold, which meets the real-time and detection probability requirements of the embedded platform. The main method includes: a morphological dilation operator based on a multi-scale single-ring structure, an optimal scale selection strategy, and a target morphological feature defined by the optimal scale, and constructing a morphological feature threshold for segmenting and extracting the target. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0026] Figure 1A flow chart of a target detection method based on a multi-scale morphological operator of the present invention;
[0027] Figure 2 is an input image of the present invention;
[0028] Figure 3(a) is a grayscale image of the morphological feature value;
[0029] Figure 3(b) is the 3D amplitude map of the morphological eigenvalues;
[0030] FIG4( a ) is a binary segmentation result output by the present invention;
[0031] FIG4( b) is the final detection result of the present invention;
[0032] Figure 5 Schematic diagram of a single ring structure element. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in each embodiment of the present invention described below can be combined with each other as long as they do not conflict with each other. To achieve the above-mentioned purpose, the present invention adopts the following technical scheme.
[0034] like Figure 1 As shown, the present invention provides a target detection method, device and medium based on a multi-scale morphological operator, comprising the following steps:
[0035] Step 1: Read a single frame image and remove isolated noise points to obtain a preprocessed image;
[0036] Step 2: Using a multi-scale morphological dilation operator, perform a multi-scale morphological dilation operation pixel by pixel on the preprocessed image obtained in step 1 to obtain the dilation result and erosion result of each pixel under each scale structure element;
[0037] Step 3: For each pixel, the grayscale transformation index is constructed using the dilation results and erosion results of multiple structural element scales obtained in step 2, and the structural element scale with the smallest grayscale transformation index value is marked as the optimal one;
[0038] Step 4: For each pixel, calculate the mean of the pixel corresponding to the optimal scale structure element in step 3;
[0039] Step 5: For each pixel, use step 4 to obtain the pixel mean of the optimal scale structure element, the dilation result of the structure element, and the grayscale of the pixel to construct the morphological feature value, and determine whether the morphological feature value of the current pixel is greater than the specified threshold. If it is less than, the pixel is considered to be background or trailing star information, and the segmentation result of the point is set to zero. If the morphological feature value is greater than the specified threshold, the pixel is considered to be a target, and the binary segmentation result of the point is marked as non-zero, thereby realizing the binary segmentation detection of the target.
[0040] Step 1 includes the following steps:
[0041] Step 1.1: Read in the reference image;
[0042] Step 1.2: Use a median filter to remove isolated point noise.
[0043] Step 2 includes the following steps:
[0044] Step 2.1: First define the coordinates The set of pixels on the multi-scale structural element centered on the pixel point is as follows:
[0045] ;
[0046] in, Represents the coordinates of the pixel being processed. is the pixel coordinate on the structure element, Represents the diameter of the structural element of a single ring, the dilation result of the pixel on the structural element of the single ring for:
[0047] ;
[0048] Corresponding corrosion results as follows:
[0049] ;
[0050] in, Represents pixel Grayscale, thus obtaining a series of expansion results. Single-ring structure elements of multiple scales, such as Figure 5 As shown, , To obtain the minimum value, To get the maximum value.
[0051] The specific steps of step 3 are:
[0052] Step 3.1: Use the dilation and erosion results obtained in step 2 to construct a local grayscale transformation index. The scale of the structural element corresponding to the minimum value of the local grayscale transformation index is defined as the optimal scale. Then the optimal scale is expressed as:
[0053] ;
[0054] in, Indicates the independent variable .
[0055] The specific steps of step 4 are:
[0056] Step 4.1: Calculate the grayscale mean of the pixel corresponding to the optimal scale structure element in step 3 , calculated according to the following formula:
[0057] ;
[0058] Represents the number of elements in a collection.
[0059] The specific steps of step 5 are:
[0060] Step 5.1: Use the mean value of the optimal scale structure element obtained in step 4, the dilation result and the erosion result of the structure element, and the pixel grayscale to construct the morphological feature value of the current pixel. The morphological feature value provided by the present invention is defined as follows:
[0061] ;
[0062] in, Represents pixel Grayscale, and They are the expansion result and erosion result of the optimal scale structure element respectively;
[0063] Step 5.2 Determine the morphological feature value of the current pixel and the specified threshold T Size, if the feature value is greater than the specified threshold T , then the pixel is considered as the target, otherwise it is considered as the background or a long-tailed star. The comparison method is defined as:
[0064] ; Specify the threshold T Obtained through experience. The morphological feature values that satisfy the above inequality are considered to be the target.
[0065] Step 5.3 The final output of the morphological feature segmentation provided by the present invention is defined as:
[0066] ;
[0067] The output results are subjected to subsequent binarization, connected domain analysis and extraction operations to obtain the target coordinates.
[0068] Analyze the effect according to the attached figure:
[0069] Figure 1 A flow chart showing the present invention. Figure 2 A real star image to be processed is shown, which contains two long-tailed stars and a target very close to the bar star. Figure 2 The grayscale image of the morphological eigenvalue in the example, and Figure 3(b) is the 3D amplitude image of the morphological eigenvalue. The eigenvalue is greater than the specified threshold T Pixels smaller than 0 are considered as targets, and pixels smaller than 0 are considered as long-tailed stars or starry sky background. FIG4(a) is the binary segmentation result output by the present invention, in which only the target-related pixels are segmented and marked as 1, and other positions such as long-tailed stars and background are removed and not marked in the binary image. FIG4(b) shows the final detection result of the present invention. The target centroid position extracted by subsequent connected domain analysis is shown in the red box in the figure, indicating that the target is successfully extracted.
[0070] The present invention also provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned target detection method based on a multi-scale morphological operator.
[0071] The present invention also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the above-mentioned target detection method based on a multi-scale morphological operator.
Claims
1. A target detection method based on multi-scale morphological operators, characterized in that: The steps include: Step 1: Read a single frame image and remove isolated noise points to obtain a preprocessed image; Step 2: Using a multi-scale morphological dilation operator, perform a multi-scale morphological dilation operation pixel by pixel on the preprocessed image obtained in step 1 to obtain the dilation result and erosion result of each pixel under each scale structure element; Step 3: For each pixel, use the dilation results and erosion results of multiple structural element scales obtained in step 2 to construct a grayscale transformation index, and mark the structural element scale with the smallest grayscale transformation index value as the optimal scale; Step 4: For each pixel, calculate the mean value of the pixel corresponding to the optimal scale structure element in step 3; Step 5: For each pixel, use step 4 to obtain the pixel mean of the optimal scale structure element, the dilation result of the optimal scale structure element, and the grayscale morphological feature value of the pixel, and determine whether the morphological feature value of the current pixel is greater than the specified threshold. If it is less than the threshold, the pixel is considered to be background or trailing star information, and the segmentation result of the point is set to zero; If the morphological feature value is greater than the specified threshold, the pixel is considered to be a target, and the binary segmentation result of the point is marked as non-zero, thereby realizing the binary segmentation detection of the target.
2. The target detection method based on multi-scale morphological operators according to claim 1, characterized in that: Step 1 includes the following steps: Step 1.1: Read in the reference image; Step 1.2: Use a median filter to remove isolated point noise.
3. The target detection method based on multi-scale morphological operators according to claim 1, characterized in that: Step 2 includes the following steps: Step 2.1: First define the coordinates The set of pixels on the multi-scale structural element centered on the pixel point is as follows: ; in, Represents the coordinates of the pixel being processed. is the pixel coordinate on the structure element, Represents the diameter of the structural element of a single ring, the dilation result of the pixels on the structural element of the single ring for: ; Corresponding corrosion results as follows: ; in, Represents pixel grayscale, thereby obtaining a series of expansion results, among which , To obtain the minimum value, To get the maximum value.
4. The target detection method based on multi-scale morphological operators according to claim 3, characterized in that: The specific steps of step 3 are: Step 3.1: Use the expansion result and the erosion result to construct a local grayscale transformation index. The structural element scale corresponding to the minimum value of the local grayscale transformation index is defined as the optimal scale. The optimal scale is expressed as: ; in, Indicates the independent variable .
5. The target detection method based on multi-scale morphological operators according to claim 4, characterized in that: The specific steps of step 4 are: Step 4.1: Calculate the grayscale mean of the pixel corresponding to the optimal scale structure element , calculated according to the following formula: ; Represents the number of elements in a collection.
6. The target detection method based on multi-scale morphological operators according to claim 5, characterized in that: The specific steps of step 5 are: Step 5.1: The morphological feature values are defined as follows: ; in, Represents pixel Grayscale, and They are the expansion result and erosion result of the optimal scale structure element respectively; Step 5.2 Determine the morphological feature value of the current pixel and the specified threshold T Size, if the feature value is greater than the specified threshold T , then the pixel is considered to be the target, otherwise it is considered to be the background or a long-tailed star.
7. The target detection method based on multi-scale morphological operators according to claim 6, characterized in that: Specifying a threshold T Gained through experience.
8. The target detection method based on multi-scale morphological operators according to claim 6, characterized in that: The final output of morphological feature segmentation is defined as: 。 9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the target detection method based on a multi-scale morphological operator as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: Executable instructions are stored thereon, and when the instructions are executed by a processor, the processor implements a target detection method based on a multi-scale morphological operator as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Image enhancing method using multi-dimensional multi-structural element mathematical morphology
CN101807294A
Marine internal wave detection algorithm based on multi-scale mathematical morphological feature fusion
CN109410228A
An infrared small target capturing method based on target background pixel statistical constraint
CN109712158A
A weighted local entropy infrared small target detection method based on multi-scale morphological fusion
CN109816641A
Target detection and identification method based on structural similarity measurement
CN112819094A