Spatial target edge detection method, device, equipment and medium
By using edge detection models, adaptive dynamic threshold segmentation and morphological operations in spatial target edge detection, the problem of insufficient robustness of edge detection in the prior art is solved, and more accurate and continuous edge detection results are achieved.
Patent Information
- Application Number
- CN202510327375.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-03-19
AI Technical Summary
The prior art is not robust in spatial target edge detection and is susceptible to noise and complex background interference, resulting in misjudgment, fracture or deviation of edge points.
The spatial target edge detection model is adopted, combined with adaptive dynamic threshold segmentation and morphological operations, an edge prediction map is output and a closed operation is performed to obtain a complete edge image.
Improves the accuracy and continuity of edge detection, reduces background noise interference, and enhances the integrity and clarity of edge detection results.
Smart Images

Figure CN119850665B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target detection, and particularly to a method, device, equipment and medium for detecting the edge of a space target. Background Art
[0002] Space targets generally refer to various flying objects active in the outer space of the earth, such as communication and observation satellites, abandoned satellites, and space debris. In recent years, with the rapid development of space technology, more and more space targets have been sent into space. Many on-orbit spacecraft are out of control due to reasons such as fuel exhaustion and failure, and can no longer perform their established tasks, threatening space exploration activities at all times and causing serious harm to space assets. To ensure space order, various space agencies have carried out a series of related researches, and in-orbit service technologies such as component replacement, fuel filling, and high-value component recovery have become research hotspots. In order to obtain reliable guidance information, accurate identification and stable tracking of space targets are key issues to be solved urgently.
[0003] For space targets, the main challenges in edge detection are as follows: The noise and complex background in the space target image will interfere with edge detection, resulting in misjudgment of edge points, and causing the edge to break or deviate. Traditional edge detection algorithms identify and locate the positions where mutations occur in the image based on gradient operations, such as Roberts operator, Sobel operator, Prewitt operator, Laplacian operator, and Canny operator. These methods have simple principles and good real-time performance, but their robustness is not strong, and they are easily affected by factors such as noise. In practical applications, there are often many false alarm points and discontinuous edges, and the actual effect depends on the manual debugging of parameters. The edge detection effects presented under different thresholds often vary greatly. Edge detection methods based on convolutional neural networks, such as the Holostically-Nested Edge Detection (HED) model, have a high model complexity and inaccurate processing of detailed edges. Summary of the Invention
[0004] Based on this, it is necessary to provide a method, device, equipment and medium for detecting the edge of a space target with higher robustness and accuracy in view of the above technical problems.
[0005] A method for detecting the edge of a space target, the method comprising:
[0006] Obtain a space target image;
[0007] Construct a space target edge detection model, input the space target image into the space target edge detection model for processing, and output an edge prediction map;
[0008] Perform adaptive dynamic threshold segmentation on the spatial target image to obtain a segmentation prediction map;
[0009] Process the edge prediction map and the segmentation prediction map through morphological operations to obtain a spatial target edge map;
[0010] Perform a closing operation on the small holes and breaks in the spatial target edge map to obtain a complete edge image.
[0011] A spatial target edge detection device, the device includes:
[0012] A data acquisition module for acquiring a spatial target image;
[0013] An edge prediction map output module for constructing a spatial target edge detection model, inputting the spatial target image into the spatial target edge detection model for processing, and outputting an edge prediction map;
[0014] A segmentation prediction map output module for performing adaptive dynamic threshold segmentation on the spatial target image to obtain a segmentation prediction map;
[0015] A spatial target edge map output module for processing the edge prediction map and the segmentation prediction map through morphological operations to obtain a spatial target edge map;
[0016] A complete edge image output module for performing a closing operation on the small holes and breaks in the spatial target edge map to obtain a complete edge image.
[0017] A computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the spatial target edge detection method are implemented.
[0018] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the spatial target edge detection method are implemented.
[0019] For the above-mentioned spatial target edge detection method, device, equipment and medium, first acquire a spatial target image; then construct a spatial target edge detection model, input the spatial target image into the spatial target edge detection model for processing, and output an edge prediction map; at the same time, perform adaptive dynamic threshold segmentation on the spatial target image to obtain a segmentation prediction map; then process the edge prediction map and the segmentation prediction map through morphological operations to obtain a spatial target edge map; finally, perform a closing operation on the small holes and breaks in the spatial target edge map to obtain a complete edge image.
[0020] Through the spatial target edge detection model, the present invention can extract the contour edges of spatial targets more accurately, improving the accuracy of edge detection. Through adaptive dynamic threshold segmentation, it can effectively distinguish the background area and the spatial target area in the image, reducing the interference of background noise and complex environments on edge detection, enhancing the accuracy of the edge detection results, and reducing errors. Through morphological thinning processing and adaptive filling methods, small holes and breaks in the image are effectively processed. This post-processing technology optimizes the continuity and integrity of the edge detection results, making the final edge image clearer and more accurate, providing a more reliable basis for subsequent image analysis and target recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0022] Figure 1 It is a schematic flow diagram of spatial target edge detection in Embodiment 1;
[0023] Figure 2 It is a schematic structural diagram of the spatial target edge detection model in Embodiment 1;
[0024] Figure 3 It is a structural block diagram of the spatial target edge detection device in Embodiment 2;
[0025] Figure 4 It is an internal structure diagram of the computer device in Embodiment 3.
[0026] The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments and with reference to the drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
[0028] It can be understood that the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0029] The embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0030] Embodiment 1
[0031] This embodiment discloses a method for detecting the edges of space targets. By constructing a space target edge detection model, the contour edges of space targets can be extracted more accurately, improving the accuracy of edge detection; through adaptive dynamic threshold segmentation, the background region and the space target region in the image can be effectively distinguished, reducing the interference of background noise and complex environments on edge detection, enhancing the accuracy of edge detection results, and reducing errors. The morphological thinning process and the adaptive filling method are used to effectively handle small holes and breaks in the image. This post-processing technology optimizes the continuity and integrity of the edge detection results, making the final edge image clearer and more accurate, providing a more reliable basis for subsequent image analysis and target recognition.
[0032] As Figure 1 shown, the method for detecting the edges of space targets provided in this embodiment includes the following steps:
[0033] Step 201, obtain a space target image.
[0034] Step 202, construct a space target edge detection model, input the space target image into the space target edge detection model for processing, and output an edge prediction map.
[0035] Step 203, perform adaptive dynamic threshold segmentation on the space target image to obtain a segmentation prediction map.
[0036] Step 204, process the edge prediction map and the segmentation prediction map through morphological AND operation to obtain a space target edge map.
[0037] Step 205, perform a closing operation on the small holes and breaks in the space target edge map to obtain a complete edge image.
[0038] In the specific implementation process of step 201, the obtained space target image is the space target image to be detected. Due to the complex and changeable imaging environment of space targets, the obtained space target image to be detected includes, in addition to the space target, noise interference in the space environment and the complexity of the background. The purpose of the present invention is to exclude the interference factors in the space target image to be detected and extract accurate and complete space targets.
[0039] In the specific implementation process of step 202, first, a data set is obtained. The data set includes space target images for training. By annotating the edges of the space targets in the space target images, edge annotation data corresponding to the space target images is obtained. The space target images and the edge annotation data corresponding to the space target images are used as a set of training data; multiple sets of training data form the data set. Then, the data set is divided into a training set, a validation set, and a test set. The division ratio is determined according to requirements. In this embodiment, the division is performed according to a ratio of 3:1:1.
[0040] Construct a space target edge detection model. The space target edge detection model includes several feature extraction modules with different scales. Through each feature extraction module, feature extraction is performed on the space target images to obtain feature maps at different scales; the feature maps at different scales are spliced in a cascaded manner to obtain a multi-scale information feature map; feature extraction and fusion are performed on the multi-scale information feature map to obtain an edge prediction map.
[0041] Refer to Figure 2 , for the space target edge detection model provided in this embodiment, which includes 6 feature extraction modules. Among them, the first feature extraction module stage0 is a convolutional layer with an output channel number of 32; the second feature extraction module stage1 is a bottleneck module with a dilation factor of 1 and an output channel number of 16; the third feature extraction module stage2 is two bottleneck modules with a dilation factor of 6 and an output channel number of 24; the fourth feature extraction module stage3 is three bottleneck modules with a dilation factor of 6 and an output channel number of 32; the fifth feature extraction module stage4 is four bottleneck modules with a dilation factor of 6 and an output channel number of 64; the sixth feature extraction module stage5 is three bottleneck modules with a dilation factor of 6 and an output channel number of 96. In each bottleneck module, it contains a pointwise convolutional expansion layer, a depth convolutional layer, and a projection convolutional layer.
[0042] When the space target edge detection model performs data processing, the input of the next feature extraction module is the output of the previous feature extraction module. After convolutional and deconvolutional operations are performed on the feature maps output by each feature extraction module, they are spliced in a cascaded manner. The obtained multi-scale information feature map is then extracted and fused through an additional convolutional layer to obtain higher-level features, and binary processing is performed on the higher-level features to generate an edge prediction map.
[0043] In this embodiment, based on the pre-constructed loss function, the spatial target edge detection model is trained using the training set to obtain a trained spatial target edge detection model. The image of the spatial target to be detected is input into the trained spatial target edge detection model for processing, and an edge prediction map is output.
[0044] The pre-constructed loss function includes a total side output loss function and a fusion layer loss function, and the expression is:
[0045] ;
[0046] In the formula, represents the fusion weight coefficient of a single side output layer; represents the set of network parameters; represents the parameters of the side output layer.
[0047] Total side output loss function The expression of is:
[0048] ;
[0049] In the formula, represents the weight of the loss function of a single side output layer; represents the loss function of a single side output layer.
[0050] Among them,
[0051] ;
[0052] In the formula, , , and respectively represent the number of non-edge pixels and edge pixels in the label; represents the parameter for balancing positive and negative samples, and the value ranges from 0 to 1; represents the value of the true label at the j th pixel; represents layer's side output layer parameters.
[0053] Fusion layer loss function The expression of is:
[0054] ;
[0055] In the formula, represents the fusion layer of the network, which is the result of weighted fusion of side output layers, where represents layer's side output; represents the total number of pixels; Represents the true label.
[0056] It can be understood that the spatial target edge detection model structure constructed in this embodiment uses a lightweight network module as the backbone network, reducing the number of model parameters and computational resource consumption, reducing model complexity, saving computational resources, and being particularly suitable for applications in resource-constrained environments. At the same time, it avoids the problems of blurred prediction edges and inaccurate positioning easily caused by deep convolutions, and can extract the contour edges of spatial targets more accurately. The pre-constructed loss function can predict the overlap degree between the result and the true label, can better capture local edge information, solve the problem of unstable training caused by the imbalance of positive and negative samples in the edge detection task, and can effectively improve the accuracy of edge detection.
[0057] In the specific implementation process of step 203, the spatial target image is divided into multiple local regions, and the gray histogram is calculated for each local region; based on the gray histogram, the optimal threshold of each local region is calculated; the optimal thresholds of each local region are weighted and averaged to obtain a global threshold; based on the global threshold, the spatial target image is segmented to obtain a segmentation result; the segmentation result is evaluated through the pixel accuracy index to obtain an evaluation result; according to the evaluation result, the global threshold is adaptively and dynamically adjusted, and the spatial target image is segmented again to obtain the final segmentation prediction map.
[0058] Specifically, adaptively and dynamically adjusting the global threshold according to the evaluation result includes:
[0059] (1) If the pixel accuracy is lower than the preset threshold, the global threshold is adjusted: if the background area is over-segmented, the global threshold can be appropriately increased; if the target area is over-segmented, the global threshold can be appropriately decreased.
[0060] (2) Determine the adjustment amplitude of the global threshold based on the gap between the current pixel accuracy and the preset threshold. For example, when the pixel accuracy differs from the preset threshold by 0.1, the global threshold is adjusted by 5%; when the pixel accuracy differs from the preset threshold by 0.01, the global threshold is adjusted by 0.5%.
[0061] It can be understood that by introducing an adaptive threshold dynamic adjustment method in the edge detection task, the background area and the spatial target area in the image are effectively distinguished, the interference of background noise and complex environment on edge detection is reduced, the accuracy of the edge detection result is enhanced, and the error is reduced.
[0062] In this embodiment, according to different illumination and noise conditions, the OTSU threshold segmentation method or the threshold segmentation method based on local variance or the adaptive threshold segmentation method, etc. can be used to calculate the optimal threshold of each local region. The OTSU threshold segmentation method is preferably used in this embodiment.
[0063] In the specific implementation process of step 204, by combining the segmentation prediction map and the edge prediction map, a spatial target edge map is obtained using morphological operations. In this step, by combining the advantages of the two methods, a more complete edge contour of the spatial target can be obtained.
[0064] Specifically, it is implemented using the morphological operation functions in an image processing software or library (such as OpenCV), which will not be elaborated here.
[0065] In the specific implementation process of step 205, the spatial target edge map is refined to close small holes and breaks in the edge contour, obtaining a complete edge image.
[0066] Specifically, first, morphological thinning processing is performed on the spatial target edge map to obtain a thinned edge image; then, breakpoints are marked on the thinned edge image, and edge closing processing is performed based on the marked breakpoint positions to obtain a complete edge image.
[0067] Among them, morphological thinning processing is performed on the spatial target edge map to obtain a thinned edge image, that is, the size of the object in the image is reduced through iterative erosion operations, and then the original size of the object is restored through dilation operations. Further specifically, first, the spatial target edge map is converted into a binary edge image, and a structuring element is determined. In this embodiment, the structuring element is a small square, which mainly determines the range of erosion and dilation operations, and the image is processed pixel by pixel. Then, the erosion operation is performed, that is, the minimum value of the values in the rectangular neighborhood at each position is taken as the output gray value at that position, and the binary edge image is eroded using the structuring element to obtain the eroded image. Then, the dilation operation is performed. Dilation is equivalent to the reverse operation of erosion. The size of the brighter objects in the image will increase, and the size of the darker objects will decrease; the eroded image is dilated using the structuring element to obtain the dilated image. Through iterative erosion and dilation operations, the edge width of the binary edge image is reduced to one pixel, obtaining a thinned edge image.
[0068] In the spatial target edge map, the thinning operation can remove the redundant pixels in the edge width, leaving only the most core edge pixels, which helps to clearly distinguish the edge and non-edge regions and provides more accurate edge information for subsequent processing.
[0069] After obtaining the refined edge image, the next step is to perform breakpoint annotation and perform edge closing processing based on the annotated breakpoint positions to obtain a complete edge image. It can be understood that a breakpoint refers to a place where the edge is discontinuous, that is, there is a gap between edge pixels. The purpose of annotating these breakpoints is to identify the areas that need further processing. Here, it is achieved by detecting the interval between edge pixels. If the distance between two edge pixels exceeds a certain threshold, it can be considered that there is a breakpoint here, and these breakpoints will serve as the starting points for subsequent closing processing.
[0070] Specifically, traverse the refined edge image to mark all edge pixels; for each edge pixel, calculate its distance to the nearest edge pixel, which can be achieved by scanning the neighborhood of the edge pixel.
[0071] Set a threshold , the threshold is determined based on the expected width of the edge and the resolution of the image; determine whether the distance between two edge pixels is greater than the threshold , if so, mark a breakpoint between the two edge pixels; if not, it is considered that there is no breakpoint between the two edge pixels and no marking is required.
[0072] Record all breakpoint positions and perform edge closing processing based on the breakpoint positions to obtain a complete edge image.
[0073] More specifically, according to the position of the breakpoint and the direction information of the edge, adaptively fill the small holes and breaks in the edge contour to obtain a complete edge image. The key to this step is to determine how to fill these gaps to ensure that the filled edge is visually consistent with the original edge. In this embodiment, an interpolation method based on the edge direction is adopted to ensure that the filled edge is consistent with the original edge in direction, so as to achieve natural and accurate closing. For example, if the edge is horizontal at the breakpoint, the filling operation may add pixels horizontally above and below the breakpoint.
[0074] The operation steps are as follows:
[0075] First, determine the filling direction. For each breakpoint, determine the filling direction according to the direction information of the edges on both sides of the breakpoint. If the edge directions on both sides of the breakpoint are the same, fill along this direction; if the directions are different, select the most likely filling direction according to the continuity of the edge.
[0076] Then, perform adaptive filling. According to the determined filling direction, adaptively add edge pixels at the breakpoint until the hole or break is completely filled. The length and width of the filling can be determined according to the spacing and direction of the edges on both sides of the breakpoint.
[0077] Finally, after the filling process, some post - processing steps are needed to further improve the quality of the edge image, including removing too - small fragments, smoothing the edges, enhancing the contrast of the edges, etc. Among them, the too - small fragments may be caused by noise or over - processing during the thinning process; the edge - smoothing process can reduce the discontinuities introduced by the thinning and filling operations; enhancing the contrast of the edges can make the edges more obvious and easy to identify. These operations are implemented through morphological operations (such as opening and closing operations) and Gaussian filtering (such as Gaussian filtering) techniques.
[0078] It can be understood that in this step, through morphological thinning processing and adaptive filling methods, small holes and breaks in the spatial target edge map are effectively processed. This post - processing technology optimizes the continuity and integrity of the edge detection results, making the final edge image clearer and more accurate, providing a more reliable basis for subsequent image analysis and target recognition.
[0079] Although each step in this embodiment Figure 1 is shown in sequence according to the indication of the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figure 1 at least a part of the steps may include multiple sub - steps or multiple stages. These sub - steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub - steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub - steps or stages of other steps.
[0080] Embodiment 2
[0081] Based on the spatial target edge detection method in Embodiment 1, this embodiment discloses a spatial target edge detection device. As Figure 3 shown, the spatial target edge detection device includes: a data acquisition module 401, an edge prediction map output module 402, a segmentation prediction map output module 403, a spatial target edge map output module 404, and a complete edge image output module 405, where:
[0082] The data acquisition module 401 is used to acquire the spatial target image.
[0083] The edge prediction map output module 402 is used to construct a spatial target edge detection model, input the spatial target image into the spatial target edge detection model, and output an edge prediction map.
[0084] The segmentation prediction map output module 403 is used to perform adaptive dynamic threshold segmentation on the spatial target image to obtain a segmentation prediction map.
[0085] The spatial target edge map output module 404 is used to process the edge prediction map and the segmentation prediction map through morphological operations to obtain the spatial target edge map.
[0086] The complete edge image output module 405 is used to close the small holes and breaks in the spatial target edge map to obtain a complete edge image.
[0087] In this embodiment, the specific working processes and working principles of the data acquisition module 401, the edge prediction map output module 402, the segmentation prediction map output module 403, the spatial target edge map output module 404, and the complete edge image output module 405 are the same as those of the method in Embodiment 1, so they will not be elaborated herein. Each of these unit modules can be implemented in whole or in part by software, hardware, and their combination. Each unit module can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of these unit modules.
[0088] Embodiment 3
[0089] As Figure 4 shown, a terminal device disclosed in this embodiment includes a transmitter, a receiver, a memory, and a processor. Among them, the transmitter is used to send instructions and data, the receiver is used to receive instructions and data, the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions stored in the memory to implement the method in Embodiment 1 above.
[0090] It should be noted that the above memory can be either independent or integrated with the processor. When the memory is set independently, the terminal device further includes a bus for connecting the memory and the processor.
[0091] Embodiment 4
[0092] This embodiment discloses a computer-readable storage medium, in which computer-executable instructions are stored. When the processor executes the computer-executable instructions, the method in Embodiment 1 above is implemented.
[0093] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0094] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0095] The above-described embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the appended claims.
Claims
1. A space target edge detection method, characterized in that: The method comprises: Acquire space target images; Constructing a space target edge detection model, inputting the space target image into the space target edge detection model for processing, and outputting an edge prediction map; Performing adaptive dynamic threshold segmentation on the space target image to obtain a segmentation prediction map; Processing the edge prediction map and the segmentation prediction map through morphological operations to obtain a spatial target edge map; Closing small holes and breaks in the edge image of the space target to obtain a complete edge image; The space target edge detection model includes several feature extraction modules of different scales, and the feature extraction modules are used to extract features from the space target image to obtain feature maps at different scales; wherein the first layer of feature extraction modules is a convolution layer, and the feature extraction modules above the second layer include more than one bottleneck module; in each bottleneck module, a point-by-point convolution expansion layer, a depth convolution layer and a projection convolution layer are included; The feature maps at different scales are concatenated to obtain a multi-scale information feature map; Feature extraction and fusion are performed on the multi-scale information feature map to obtain an edge prediction map.
2. The space target edge detection method according to claim 1, characterized in that: The spatial object edge detection model is trained based on a pre-built loss function, which includes a total side output loss function and a fusion layer loss function, and the expression is: ; Among them, the total side output loss function The expression is: ; Fusion layer loss function The expression is: ; In the formula, Represents a set of network parameters; Represents the side output layer parameters; Represents the fusion weight coefficient of a single side output layer; Represents the weight of the loss function of a single side output layer; represents the loss function of a single side output layer; represents the fusion layer of the network; Indicates the total number of pixels; represents the true label.
3. The space target edge detection method according to claim 1 or 2, characterized in that: The space target image is subjected to adaptive dynamic threshold segmentation to obtain a segmentation prediction map, including: Dividing the space target image into a plurality of local areas, and calculating a grayscale histogram for each local area; Based on the grayscale histogram, the optimal threshold of each local area is calculated; the optimal threshold of each local area is weighted averaged and fused to obtain a global threshold; Segmenting the space target image based on the global threshold to obtain a segmentation result; Evaluate the segmentation result by using a pixel accuracy index to obtain an evaluation result; The global threshold is adaptively and dynamically adjusted according to the evaluation result, and the spatial target image is re-segmented to obtain a final segmentation prediction map.
4. The space target edge detection method according to claim 1 or 2, characterized in that: The small holes and breaks in the edge image of the space target are closed to obtain a complete edge image, including: The space target edge map is subjected to morphological refinement processing to obtain a refined edge image; breakpoints are marked on the refined edge image, and edge closing processing is performed based on the marked breakpoint positions to obtain a complete edge image.
5. The space target edge detection method according to claim 4, characterized in that: Performing morphological thinning processing on the space target edge map to obtain a thinned edge image includes: Converting the spatial target edge map into a binary edge image; Using a structural element to perform an erosion operation on the binary edge image to obtain an eroded image; Performing a dilation operation on the eroded image to obtain a dilated image; By iteratively performing erosion and dilation operations, the edge width of the binary edge image is reduced to one pixel, thereby obtaining a refined edge image.
6. The space target edge detection method according to claim 5, characterized in that: The thinned edge image is marked with breakpoints, and edge closing processing is performed based on the marked breakpoint positions to obtain a complete edge image, including: Traversing the refined edge image, marking all edge pixels; for each edge pixel, calculating the distance between it and the nearest edge pixel; Set a threshold and determine whether the distance between two edge pixels is greater than the threshold. If so, mark a breakpoint between the two edge pixels. All breakpoint positions are recorded, and edge closing processing is performed based on the breakpoint positions to obtain a complete edge image.
7. A space target edge detection device, characterized in that: The space target edge detection method according to any one of claims 1 to 6 is adopted, wherein the device comprises: A data acquisition module, used for acquiring space target images; An edge prediction map output module is used to construct a space target edge detection model, input the space target image into the space target edge detection model for processing, and output an edge prediction map; A segmentation prediction map output module is used to perform adaptive dynamic threshold segmentation on the space target image to obtain a segmentation prediction map; A spatial target edge map output module is used to process the edge prediction map and the segmentation prediction map through morphological operations to obtain a spatial target edge map; The complete edge image output module is used to close the small holes and breaks in the edge image of the space target to obtain a complete edge image.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the space object edge detection method described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the space object edge detection method described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Deep learning-based photovoltaic module positioning and defect detection method in infrared image
CN115082455A
Surface defect detection method and system based on feature focusing refinement
CN119444729A