A target detection method, device and medium based on multi-scale morphological operators
Through multi-scale morphological operators processing images, the detection problem of weak targets under the background of complex tailed stars is solved, the detection accuracy is improved and the false alarm rate is reduced, and effective detection of targets close to stars is achieved.
Patent Information
- Application Number
- CN202510506413.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-01
- 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.
Image preprocessing is performed by multi-scale morphological operators, and the binary segmentation detection of the target is achieved through multi-scale morphological expansion operations and optimal scale selection, combined with morphological characteristic value judgment.
It significantly improves the detection ability of weak targets in complex backgrounds, reduces the false alarm rate, and can effectively detect targets in the long tailed background close to stars.
Smart Images

Figure CN120032135B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of object detection in image processing, and in particular provides an object detection method, device and medium based on multi-scale morphological operators. Background Art
[0002] The technologies for monitoring, tracking and identifying various objects such as targets and space debris in the space environment are of great significance to fields such as space traffic safety management, satellite navigation, and space science research. With the rapid development of space technology, the number of objects in space has increased sharply, and the requirements for object detection technology have also become higher and higher. The technical background of object 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. Object detection is the basis for realizing space environment perception.
[0004] 2. Data processing and analysis technologies: High-performance computing technologies and advanced algorithms make it possible to process and analyze a large amount of target data.
[0005] 3. Optical technologies: Optical telescopes are also important tools for object detection, especially when observing targets such as space debris.
[0006] The development and application of object detection technology help to improve the space environment perception ability, ensure space traffic safety, and promote the sustainable development of space technology. With the continuous progress of technology, object detection technology is also constantly evolving, including the use of more advanced sensors, improved data processing algorithms, and more automated and intelligent systems. These improvements not only improve the detection accuracy and efficiency, 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 object detection and recognition tasks.
[0008] In object detection, the application of morphological operators usually includes the following aspects:
[0009] 1. Image enhancement: By dilation and erosion, the bright or dark regions in the image can be enhanced, which helps to improve the contrast between the target and the background.
[0010] 2. Noise elimination: Opening and closing operations can be used to remove bright spots (noise) and dark spots (defects) in the image respectively, while smoothing the image and 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, target objects in the image can be separated from the background, thus achieving target detection.
[0013] Morphological operators in the field of target detection include license plate recognition, medical image analysis, industrial inspection, and small target detection and tracking under imaging systems such as infrared / visible light / SAR. Morphological operators are an important tool in image processing. They are simple and effective, especially when dealing with binary images or grayscale images. However, their application needs to be adjusted according to specific problems and image characteristics to obtain the best results. Summary of the Invention
[0014] The purpose of the present invention is to address the problems of difficult extraction of small targets, high false alarms, and low detection rates in the background of complex trailing stars. The present invention provides a target detection method, device, and medium based on multi-scale morphological operators. This algorithm can effectively alleviate false alarm events caused by local gray-scale transformation of long-trailing stars, and can still detect the target when the star is too close to the target. Compared with conventional methods, it significantly improves the target detection ability in the background of complex, dense, and long-trailing stars.
[0015] The technical solution adopted by the present invention is as follows: A target detection method based on multi-scale morphological operators, including the following steps:
[0016] Step 1: Read in a single-frame image and remove isolated noise points to obtain a preprocessed image;
[0017] Step 2: Use a multi-scale morphological dilation operator to perform multi-scale morphological dilation operations on each pixel point of the preprocessed image obtained in Step 1 to obtain the dilation result and erosion result of each pixel point under each scale structuring element;
[0018] Step 3: For each pixel point, construct a gray-scale transformation index using the dilation results and erosion results under multiple structuring element scales obtained in Step 2, and mark the structuring element scale with the smallest gray-scale transformation index value as the optimal scale;
[0019] Step 4: For each pixel point, calculate the mean value of the pixel points corresponding to the optimal scale structuring element in Step 3;
[0020] Step 5: For each pixel, use the pixel mean of the optimal scale structuring element obtained in Step 4, the dilation result of the optimal scale structuring element, and the gray level of this pixel to construct a morphological feature value, and determine whether the morphological feature value of the current pixel is greater than a specified threshold. If it is less, it is considered that this pixel is background or trailing star information, and the segmentation result of this point is set to zero; if the morphological feature value is greater than the specified threshold, it is considered that this pixel is the target, and the binary segmentation result of this point is marked as non-zero, thus realizing the binary segmentation detection of the target.
[0021] An electronic device includes: 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 object detection method based on multi-scale morphological operators.
[0022] A computer-readable storage medium stores executable instructions thereon, and when the instructions are executed by a processor, the processor implements the above-mentioned object detection method based on multi-scale morphological operators.
[0023] The beneficial effects of the present invention are:
[0024] The multi-scale strategy of the present invention improves the object detection ability in the case where long trailing stars and the target are too close, and can effectively sense weak targets beside long trailing stars with large gray levels. This method significantly improves the detection ability of weak targets in complex backgrounds. The multi-scale morphological operation of the present invention has the characteristics of high detection probability and low false alarm compared with traditional methods, and can effectively alleviate false alarm events caused by local gray level changes. The multi-scale strategy of the present invention has good detection ability in the case where stars and the target are too close, and can detect weak targets beside relatively large gray-level long trailing stars. The present invention provides a detection strategy based on multi-scale morphological operations and adaptive thresholds, which meets the real-time and detection probability requirements of the embedded platform. The main methods include: a morphological dilation operator based on a multi-scale single-ring structure, an optimal scale selection strategy, and an object morphological feature defined by the optimal scale, and a morphological feature threshold is constructed for segmenting and extracting the target. Description of the Drawings
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0026] Figure 1Flowchart of a target detection method based on multi-scale morphological operators according to the present invention;
[0027] Figure 2 Input image of the present invention;
[0028] Figure 3(a) is the grayscale image of the morphological eigenvalue;
[0029] Figure 3(b) is the 3D amplitude image of the morphological eigenvalue;
[0030] Figure 4(a) is the binarized segmentation result output by the present invention;
[0031] Figure 4(b) is the final detection result of the present invention;
[0032] Figure 5 Schematic diagram of a single-ring structural element. Detailed implementation manner
[0033] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to 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 used to limit the present invention. In addition, the technical features involved in the various embodiments 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 objectives, the present invention adopts the following technical solutions.
[0034] As Figure 1 shown, the present invention provides a target detection method, device and medium based on multi-scale morphological operators, including the following steps:
[0035] Step 1: Read in a single-frame image and remove isolated noise points to obtain a preprocessed image;
[0036] Step 2: Use a multi-scale morphological dilation operator to perform multi-scale morphological dilation operations on each pixel point of the preprocessed image obtained in Step 1 to obtain the dilation result and erosion result of each pixel point under each scale structural element;
[0037] Step 3: For each pixel point, construct a gray-scale transformation index using the dilation results and erosion results under multiple structural element scales obtained in Step 2, and mark the structural element scale with the smallest gray-scale transformation index value as the optimal one;
[0038] Step 4: For each pixel point, calculate the mean value of the pixel points corresponding to the optimal scale structural element in Step 3;
[0039] Step 5: For each pixel, use the pixel mean of the optimal scale structuring element obtained in Step 4, the dilation result of this structuring element, and the gray level of this pixel to construct a morphological feature value, and determine whether the morphological feature value of the current pixel is greater than a specified threshold. If it is less, it is considered that this pixel is background or trailing star information, and the segmentation result of this point is set to zero. If the morphological feature value is greater than the specified threshold, it is considered that this pixel is the target, and the binary segmentation result of this point is marked as non-zero, thus 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 set composed of the pixels on the multi-scale structuring element centered on the pixel with coordinates as follows:
[0045] ;
[0046] Among them, represents the coordinate of the pixel to be processed, is the pixel coordinate on the structuring element, represents the diameter of the single-ring structuring element, and the dilation result of the pixels on this single-ring structuring element is:
[0047] ;
[0048] The corresponding erosion result is as follows:
[0049] ;
[0050] Among them, represents the gray level of the pixel point , thus obtaining a series of dilation results. Single-ring structuring elements of multiple scales, as shown in Figure 5 , where , is to take the minimum value, is to take the maximum value.
[0051] The specific steps of Step 3 are:
[0052] Step 3.1: Construct a local gray-scale transformation index using the dilation result and erosion result obtained in Step 2. Define the scale of the structuring element corresponding to the minimum value of this local gray-scale transformation index as the optimal scale. Then, the optimal scale is expressed as:
[0053] ;
[0054] where, represents the independent variable .
[0055] The specific steps of Step 4 are as follows:
[0056] Step 4.1: Calculate the gray-scale mean of the pixel points corresponding to the optimal-scale structuring element in Step 3 , and calculate it according to the following formula:
[0057] ;
[0058] represents obtaining the number of elements in the set.
[0059] The specific steps of Step 5 are as follows:
[0060] Step 5.1: Use the mean of the optimal-scale structuring element obtained in Step 4, as well as the dilation result and erosion result of this structuring element, and the pixel gray-scale 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] where, represents the gray-scale of the pixel point , and are the dilation result and erosion result of the optimal-scale structuring element respectively;
[0063] Step 5.2: Judge the size of the morphological feature value of the current pixel point and the specified threshold T . If the feature value is greater than the specified threshold T , then consider this pixel point as the target, otherwise consider it as the background or long trailing star. The comparison method is defined as:
[0064] ; The specified threshold T is obtained through experience. If the morphological feature value satisfies the above inequality, it is considered as the target.
[0065] The final output of the morphological feature segmentation provided by the present invention is defined as:
[0066] ;
[0067] Perform subsequent binarization, connected component analysis, and extraction operations on the output results to obtain the target coordinates.
[0068] Perform an effect analysis based on the attached drawings:
[0069] Figure 1 Indicates the flowchart of the present invention. Figure 2 Show a real star map to be processed, including two long-tail stars and a target very close to the strip star. Fig. 3(a) is Figure 2 The grayscale map of the morphological feature values in the example, and Fig. 3(b) is the 3D amplitude map of the morphological feature values. The pixels with feature values greater than the specified threshold T are considered as the target, and those less than it are considered as long-tail stars or starry sky background. Fig. 4(a) shows the binarization segmentation result output by the present invention, where only the pixels related to the target are segmented and marked as 1, and other positions such as long-tail stars and the background are removed and not marked in the binary map. Fig. 4(b) shows the final detection result of the present invention. The centroid position of the target is extracted through subsequent connected component analysis as shown by the red box in the figure, indicating that the target is successfully extracted.
[0070] The present invention also provides an electronic device, including: 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 multi-scale morphological operators.
[0071] The present invention also provides a computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor implements the above-mentioned target detection method based on multi-scale morphological operators.
Claims
1. A target detection method based on multi-scale morphological operators, characterized in that, It includes the following steps: Step 1: Read in a single-frame image and remove isolated noise points to obtain a preprocessed image; Step 2: Use a multi-scale morphological dilation operator to perform multi-scale morphological dilation operations on each pixel point of the preprocessed image obtained in Step 1, and obtain the dilation result and erosion result of each pixel point under each scale structuring element; Step 3: For each pixel point, construct a gray-scale transformation index using the dilation results and erosion results under multiple structuring element scales obtained in Step 2, and mark the structuring element scale with the smallest gray-scale transformation index value as the optimal scale; Step 4: For each pixel point, calculate the mean value of the pixel points corresponding to the optimal scale structuring element in Step 3; Step 5: For each pixel point, use the mean value of the pixel points of the optimal scale structuring element obtained in Step 4, the dilation result of this optimal scale structuring element, and the gray scale of this pixel point to construct a morphological feature value, and determine whether the morphological feature value of the current pixel is greater than a specified threshold. If it is less, it is considered that this pixel point is background or trailing star information, and the segmentation result of this point is set to zero; if the morphological feature value is greater than the specified threshold, it is considered that this pixel point is a target, and mark the binary segmentation result of this point as non-zero, so as to realize the binary segmentation detection of the target; The specific steps of Step 3 are as follows: Step 3.1: Construct a local gray-scale transformation index using the dilation result and erosion result, and define the structuring element scale corresponding to the smallest value of this local gray-scale transformation index as the optimal scale. The optimal scale is expressed as: ; Among them, represents the independent variable ; The specific steps of Step 5 are as follows: Step 5.1: The morphological feature value is defined as follows: ; Among them, represents the pixel point gray scale, and are respectively the dilation result and erosion result of the optimal scale structuring element; Step 5.2 Determine the morphological feature value of the current pixel point and the specified threshold size. If the feature value is greater than the specified threshold , then consider this pixel point as the target, otherwise consider it as the background or long trailing star.
2. The object 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 a reference image; Step 1.2: Use a median filter to remove isolated point noise.
3. The object 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 set composed of the pixel points on the multi-scale structural element centered at the pixel point with the coordinate as follows: ; Among them, represents the coordinates of the pixel points to be processed, is the pixel coordinates on the structuring element, represents the diameter of the single-ring structuring element, and the dilation result of the pixels on the single-ring structuring element is: ; The corresponding corrosion results are as follows: ; Among them, represents the gray scale of a pixel point to obtain a series of dilation results, where , is to take the minimum value, is to take the maximum value.
4. The object detection method based on a multi-scale morphological operator according to claim 3, wherein Specified threshold Obtained empirically.
5. The object detection method based on a multi-scale morphological operator according to claim 3, wherein The final output of morphological feature segmentation is defined as: 。 6. An electronic device, characterized in that, It includes: 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 a target detection method based on a multi-scale morphological operator according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, An executable instruction is stored thereon, and when the instruction is executed by a processor, the processor implements a target detection method based on a multi-scale morphological operator according to any one of claims 1 to 5.
Citation Information
Patent Citations
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