Method and system for detecting flat region in permanent shadow region of moon
By combining YOLOv9 and Kmeans detection algorithms, SAR images and DEM data are used to solve the problem of flat area detection in the permanent shadow area of the moon, and a fast, accurate and safe detection effect is achieved.
Patent Information
- Application Number
- CN202510113438.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-27
AI Technical Summary
The prior art is difficult to quickly and accurately detect flat areas in the permanent shadowed areas of the moon, especially in the absence of optical images, and cannot effectively analyze PSR topography.
The YOLOv9 object detection algorithm and Kmeans detection algorithm are combined with DEM data, and the fusion of SAR images and tilt angle maps can achieve rapid and accurate detection of flat areas in the permanent shadow area of the moon.
It realizes rapid and accurate detection of flat areas in the permanent shadow area of the moon, improves the safety and accuracy of detection, and provides a high-precision solution for the safe landing of the lunar lander.
Smart Images

Figure CN120047912A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lunar landform detection, and in particular to a method and system for detecting flat areas in the permanently shadowed regions of the moon. Background Art
[0002] Currently, many countries are conducting research on exploring water ice resources in the permanently shadowed regions of the moon. During the exploration process, a lunar lander carrying a small hopper will land in the lunar polar region, and the small hopper will move to the corresponding area for in-situ detection; the selection of the landing site in the lunar polar region and the movement and obstacle avoidance of the small hopper are crucial for ensuring the safety of the lander and the hopper.
[0003] In order to successfully complete the sample collection of water ice resources, it is necessary to identify topographies such as craters and rock spallation areas in the PSR, and select a flat landing area for the small hopper. There have been a large number of studies on the detection of crater landforms. Crater detection algorithms include: traditional methods based on image processing and methods based on deep learning. Traditional methods based on image processing include Canny edge detection, Hough transform, and an automatic crater extraction algorithm based on feature matching. This type of method utilizes the morphological structure and other characteristics of the crater. Methods based on deep learning include an efficient lunar crater detection algorithm, U-net network, SwiftNet network, and You Only Look Once version7 (YOLOv7) model, etc. However, the above methods mainly focus on DEM images and high-resolution optical images. Optical images are applied in the sun-illuminated areas, while there is no sunlight in the PSR of the lunar polar region, lacking optical images and unable to analyze the topography of the PSR; for the topography of the PSR, it can be analyzed through DEM, but the high-resolution DEM in the polar region is affected by orbital errors and homogenization is performed during the processing, so the undulating topography of smaller craters is filtered out and the details of the PSR landform cannot be shown.
[0004] Currently, most lunar surface topography detection studies focus on optical images and terrain digital elevation data (DEM) data, lacking research on lunar surface topography recognition based on synthetic aperture radar images (SAR). The target features in SAR images are affected by the shape of the target. The crater wall facing the radar has strong echo scattering, and the crater wall facing away from the radar has lower echo scattering. Therefore, the crater appears as a semi-bright and semi-dark circle in the SAR image. Electromagnetic waves are sensitive to the rough undulations caused by lunar surface rocks, and rocks can be detected in SAR images. The Mini-RF on the Lunar Reconnaissance Orbiter (LRO) obtains SAR images of the entire moon, which can be used to detect craters and rocks. Summary of the Invention
[0005] The object of the present invention is to overcome the defects existing in the above-mentioned prior art and provide a method and system for detecting flat areas in the permanently shadowed regions of the moon, so as to achieve fast, accurate and safer flat area detection.
[0006] The object of the present invention can be achieved by the following technical solutions:
[0007] A method for detecting flat areas in the permanently shadowed regions of the moon, comprising the following steps:
[0008] Obtain the SAR image and DEM data to be detected in the permanently shadowed regions of the moon;
[0009] Input the SAR image into a pre-trained object detection algorithm model to obtain the detection results of the crater area and the non-detected crater area;
[0010] Perform Kmeans detection on the SAR image to obtain the statistical classification results of whether each pixel point in the SAR image is a rough area or a non-rough area;
[0011] Convert the DEM data into an inclination angle map, and determine the classification results of the flat area and the slope area in the inclination angle map through a threshold extraction algorithm;
[0012] Register and fuse the detection results of the crater area and the non-detected crater area, the statistical classification results of the rough area and the non-rough area, and the classification results of the flat area and the slope area to obtain the final flat area detection result.
[0013] Further, the detection process of the object detection algorithm model further includes:
[0014] Restore the local coordinates of the crater area detected by the object detection algorithm model to the overall coordinates of the full Antarctic SAR image, and use the non-maximum suppression algorithm to eliminate the duplicate boxes of the same crater, and retain the coordinate box with the maximum confidence to obtain the final detection results of the crater area and the non-detected crater area.
[0015] Further, the acquisition process of the data set used in the training process of the object detection algorithm model includes:
[0016] Collect SAR images, construct a data set for training, and perform annotation of the crater area;
[0017] Use data augmentation technology to perform data augmentation on the data set;
[0018] Crop the larger images in the data set.
[0019] Further, the object detection algorithm model is a YOLOv9 detection algorithm model.
[0020] Furthermore, the process of the Kmeans detection is specifically as follows:
[0021] S301: If the SAR image to be detected is an M×N matrix, where M and N are the height and width of the image, then reshape the SAR image into a matrix X=(x i , i∈(1, K), K = M×N), and initialize the centroid C j , where j is the category;
[0022] S302: Calculate the Euclidean distance between each pixel data x i in the reshaped matrix X and each centroid C j respectively, and redefine the label category of each pixel according to the Euclidean distance as the label with a smaller Euclidean distance;
[0023] S303: Calculate the new centroid of each cluster according to the labels of each category;
[0024] S304: Repeat steps S302 and S303 to perform the allocation of pixel data and the update of the centroid until the change in the centroid is less than a preset threshold or reaches a preset maximum number of iterations to obtain the final classification result of the SAR image.
[0025] Furthermore, the calculation expression of the Euclidean distance from the pixel data x i to the centroid C j is:
[0026]
[0027] In the formula, d(x i , C j ) is the Euclidean distance between the i-th pixel data x i and the j-th centroid C j ;
[0028] The update expression of the label category of each pixel is:
[0029]
[0030] In the formula, J i is the label category of the i-th data point, and J is the set of possible category labels in the image;
[0031] The calculation expression of the new centroid is:
[0032]
[0033] In the formula, N j is the number of data points in the j-th category label, and S jis the set of all data points in the j-th class label.
[0034] Further, the threshold extraction algorithm sets the area with an angle less than 15° in the tilt angle map as the flat area, and the remaining areas as the slope areas.
[0035] Further, the registration and fusion process is specifically as follows:
[0036] For the detection result of the target detection algorithm model, set the value of the detected crater area to 0, and the value of the area where no crater is detected to 1;
[0037] For the result of Kmeans detection, set the value of the detected rough area to 0, and the value of the non-rough area to 1;
[0038] For the detection result of the threshold extraction algorithm, set the value of the detected slope area to 0, and the value of the flat area to 1;
[0039] Perform data registration on the detection results of the target detection algorithm model, Kmeans detection, and threshold extraction algorithm, and then perform an AND operation on the data. Take the area with a value of 1 as the final flat area detection result.
[0040] Further, the final flat area detection result is used as the area suitable for the lander to land.
[0041] The present invention also provides a flat area detection system in the permanently shadowed region of the moon, including a memory and a processor. The memory stores a computer program, and the processor calls the computer program to execute the steps of the method described above.
[0042] Compared with the prior art, the present invention has the following advantages:
[0043] (1) Fast: In the solution of the present invention, the selected detection algorithms YOLOv9 and Kmeans detection algorithm are characterized by fast detection speed, and can quickly identify the strong echo areas in the SAR image, and detect the crater, the strong echo area of the rock, the fresh crater sputtering area, and the large slope;
[0044] (2) Accurate: In the solution of the present invention, on the premise of verifying the feasibility of the solution, using high-resolution data in the future can improve the detection accuracy and provide a high-precision solution for the selection of the flat area on the moon. And compared with other detection algorithms, using the YOLOv9 algorithm for detection has an obvious detection accuracy advantage;
[0045] (3) Safety: In the solution of the present invention, three detection algorithms are used simultaneously to detect respectively and take the union of the detection results to improve the accuracy of the detection results. The YOLOv9 algorithm is used to detect the crater, the Kmeans algorithm is used to extract the strong echo regions of the crater, the spatter region, the rough rock region and the slope, and the threshold extraction algorithm is used to extract the crater wall, the slope and the regions with a large slope; the intersection of the three algorithms can extract a safer flat area, providing a highly secure solution for the selection of the flat area on the moon. Description of the Drawings
[0046] Figure 1 It is a schematic flowchart of a method for detecting flat areas in the permanently shadowed regions on the moon provided in an embodiment of the present invention;
[0047] Figure 2 It is a schematic diagram of the detection results of the entire South Pole provided in an embodiment of the present invention;
[0048] Figure 3 It is a schematic diagram of the results of detecting craters using YOLOv9 in a 600×600 pixel SAR image provided in an embodiment of the present invention;
[0049] Figure 4 It is an analysis diagram of the Kmeans detection results provided in an embodiment of the present invention, where a is a schematic diagram of the SAR image, b is the classified image, and c is the high-resolution optical image;
[0050] Figure 5 It is provided in an embodiment of the present invention from Figure 4 (c) The high-resolution optical image in the red box, where (a, b) is Figure 4 The optical image of the same resolution of the ejecta region marked by the red box in Figure 4 The high-resolution optical image of the flat area marked by the red box in , with a resolution of 1m / pixel;
[0051] Figure 6 It is a detection map of the flat area of the entire South Pole provided in an embodiment of the present invention. Detailed Embodiments
[0052] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and illustrated herein can be arranged and designed in various different configurations.
[0053] Accordingly, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0054] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0055] Embodiment 1
[0056] As Figure 1 shown, this embodiment provides a method for detecting flat areas in the permanently shadowed regions of the moon, including the following steps:
[0057] S1: Obtain the SAR image and DEM data to be detected in the permanently shadowed regions of the moon;
[0058] S2: Input the SAR image into a pre-trained object detection algorithm model to obtain the detection results of the crater area and the non-detected crater area; the object detection algorithm model can be a detection algorithm such as YOLOv9;
[0059] S3: Perform Kmeans detection on the SAR image to obtain the statistical classification results of whether each pixel point in the SAR image is a rough area or a non-rough area;
[0060] S4: Convert the DEM data into an inclination angle map, and determine the classification results of the flat area and the slope area in the inclination angle map through a threshold extraction algorithm;
[0061] S5: Register and fuse the detection results of the crater area and the non-detected crater area, the statistical classification results of the rough area and the non-rough area, and the classification results of the flat area and the slope area to obtain the final flat area detection result.
[0062] Equivalently, this solution proposes the YOLOv9 detection algorithm for detecting small and medium-sized craters, the Kmeans algorithm for detecting pixel-level craters and rock sputtering areas, and the threshold extraction method for removing large slopes and giant crater walls based on DEM.
[0063] Register the results of the three detection algorithms and logically add them to obtain the final detected flat area.
[0064] The following specifically describes the processing processes of each algorithm:
[0065] I. YOLOv9 Detection Algorithm for Detecting Small and Medium-Sized Craters
[0066] 1.1. Specific process of the algorithm
[0067] In this embodiment, the processing process of the algorithm is specifically as follows:
[0068] Collect SAR images to generate a dataset, and divide the dataset into a training set and a validation set according to 8:2;
[0069] Train the YOLOv9 algorithm to initially achieve a detection effect, and enhance the dataset;
[0070] Use the YOLOv9 object detection algorithm to detect the target meteorite craters existing in the SAR images;
[0071] Perform meteorite crater detection on the full Antarctic SAR image with a resolution of 60m / pixel to obtain the detection effect of the entire Antarctic; The detection effect is as Figure 2 shown.
[0072] This solution preferably uses the YOLOv9 detection algorithm for object detection because, compared with other detection algorithms, the YOLOv9 algorithm has obvious advantages in detection accuracy, as shown in Table 1;
[0073] Table 1: Comparison chart of different algorithms
[0074] Method AP@.5 Inference speed(s) Cascade - RCNN 0.657 0.2853 YOLOv7 0.738 0.0192 YOLOv9 0.863 0.0124
[0075] 1.2. Redundancy removal process
[0076] Preferably, the detection process of the YOLOv9 detection algorithm further includes:
[0077] Restore the local coordinates of the meteorite crater area detected by the YOLOv9 detection algorithm model to the overall coordinates of the full Antarctic SAR image, and use the non-maximum suppression algorithm to eliminate the duplicate boxes of the same meteorite crater, and retain the coordinate box with the highest confidence to obtain the final detection results of the meteorite crater area and the undetected meteorite crater area.
[0078] Specifically, the processing process of this embodiment is specifically as follows:
[0079] Data processing: Download the full Antarctic region Mini-RF image (70°N - 90°N) with a resolution of 60m / pixel. Before inputting into the network, cut the full Antarctic image into small pictures of 600×600 pixels in size from top to bottom and from left to right. To avoid missing meteorite craters, there is an overlapping area of 200 pixels between adjacent pictures.
[0080] Detection of small-size SAR images: Input the 600×600 pixel SAR image into the YOLOv9 algorithm to detect meteorite craters; The detection result is as Figure 3 shown.
[0081] Remove redundancy using the Non-Maximum Suppression (NMS) algorithm: Restore the local coordinates of the detected crater boxes in each small-sized image to the overall coordinates of the full Antarctic SAR image. Use the Non-Maximum Suppression algorithm to eliminate duplicate boxes of the same crater and retain the coordinate box with the highest confidence.
[0082] Filtering of detection results: After removing redundancy from the detection results of the entire Antarctic region of the moon using NMS, fine-tune the detection results to ensure the accuracy of the detection results.
[0083] 1.3 Dataset production and enhancement processing
[0084] Optionally, the process of obtaining the dataset used in the training process of the YOLOv9 detection algorithm model includes:
[0085] Collect SAR images, construct a dataset for training, and perform annotation of the crater area;
[0086] Use data augmentation techniques to augment the dataset;
[0087] Crop the larger images in the dataset.
[0088] In this embodiment, the processing process of the above dataset is specifically as follows:
[0089] Dataset preparation: The SAR images for the training set and test set are both from the lunar polar region obtained by Mini-RF, and the slope angle map is from the lunar polar region obtained by the Lunar Orbiter Laser Altimeter (LOLA) on LRO. The SAR and slope angle maps are from the website quickmap.lroc.asu.edu, with a spatial resolution of 60m / pixel.
[0090] Image cropping: The spatial resolution range of the large-area SAR images and slope angle maps is from 60 to 120m / pixel. The large-area images are cropped into 500 small images with a size of 600×600 pixels. The initial annotation process is manual annotation.
[0091] Dataset division: 80% of the annotated images are used as the training set, and 20% of the annotated images are used as the test set.
[0092] YOLO assisted annotation: Apply data augmentation techniques to further augment the training dataset. The trained model is used to automatically annotate another 25 large-area SAR images and slope angle maps. Manual correction is performed to obtain accurate labels.
[0093] Image cropping: The annotated large images are then cropped into 1000 small images with a size of 600×600 pixels and a side length of 36km.
[0094] Dataset division: 1500 cropped SAR images and 1500 cropped slope angle maps are randomly divided into a training set and a test set at a ratio of 8:2.
[0095] It should be noted that during this process, some large meteorite craters with a diameter greater than 600 pixels (the resolution of the SAR images used is 60m / pixel, corresponding to a meteorite crater diameter of 36km) cannot be completely included in any of the segmented sub-images, resulting in the loss of the labels of these meteorite craters.
[0096] II. Kmeans Algorithm for Detecting Pixel-Level Meteorite Craters and Rock Sputtering Areas
[0097] 2.1 Preferably, the process of Kmeans detection is specifically as follows:
[0098] S301: If the SAR image to be detected is an M×N matrix, where M and N are the height and width of the image, then reshape the SAR image into a matrix X = (x i , i ∈ (1, K), K = M×N), and initialize the centroid C j , where j is the category;
[0099] S302: For each pixel data x i in the reshaped matrix X, calculate the Euclidean distance from each to each centroid C j , and redefine the label category of each pixel point as the label with the smaller Euclidean distance according to the Euclidean distance;
[0100] S303: Calculate the new centroid of each cluster according to the labels of each category;
[0101] S304: Repeat steps S302 and S303 for pixel data assignment and centroid update until the change in the centroid is less than a preset threshold or reaches a preset maximum number of iterations to obtain the final classification result of the SAR image.
[0102] The above processing process in this embodiment is specifically introduced as follows:
[0103] Kmeans is an unsupervised method. Kmeans is widely used in image pixel-level classification and is thus used for SAR image classification. According to the Kmeans algorithm, the probability that a pixel belongs to category j is likely to be affected by surrounding pixels of the same category, that is, clustering the pixels in the image.
[0104] First, assume that the input grayscale SAR image X` is an M×N matrix, where M and N are the height and width of the image, and reshape the input image data into a matrix X = (x i , i ∈ (1, K), K = M×N). Initialize the centroid Cj , where \(j\) is the category. \(J\) represents the set of possible category labels in the image, and \(J\) i represents the label category of the \(i\)-th data point.
[0105] Secondly, for each pixel data \(x\) of the reshaped matrix \(X\) i , substitute it into formula (1) to calculate its Euclidean distance from each centroid \(C\) j :
[0106]
[0107] where \(d(x\) i , \(C\) j ) represents the Euclidean distance between the \(i\)-th data point and the \(j\)-th centroid.
[0108] Assign the data points to the nearest centroid to form a preliminary cluster assignment. That is, after calculating the Euclidean distances between each data point and different centroids, redefine its label category according to formula (2) as the label with the smaller Euclidean distance:
[0109]
[0110] Then calculate the new centroids of each cluster:
[0111]
[0112] where \(N\) j is the number of data points in the \(j\)-th category label, and \(S\) j is the set of all data points in the \(j\)-th category label.
[0113] Then repeat the assignment and update steps until the change in the centroid is less than the set threshold or the maximum number of iterations (e.g., 100 times) is reached.
[0114] At this point, it is considered that convergence has been achieved, and the final classification result of the SAR image is obtained.
[0115] 2.2 Quantitative verification method for the accuracy of the Kmeans algorithm in detecting craters and rocks
[0116] For the SAR image data that needs to be classified by Kmeans, as Figure 4 (a) shows, count the \(S\) 1 values on the pixel points determined as rough areas and flat areas respectively, as Figure 4 (b) shows. Among them, \(S\) 1 is the first Stokes parameter, which refers to the total scattered echo intensity.
[0117] Figure 5 (a - d) areFigure 4 The magnified image in the red box.
[0118] Figure 5 (a, b) shows large rocks covered by ejecta. The bright rock spallation area is covered by a layer of fresh material, resulting in strong scattered echoes. Rocks can be seen in these images, so the Kmeans algorithm Figure 4 identifies this area as a rough area in (b).
[0119] Figure 5 (c, d) shows a relatively flat lunar surface. There are almost no huge rocks in this area, so the Kmeans algorithm Figure 4 identifies this area as a flat area in (b).
[0120] III. Threshold extraction method for removing large slopes and giant crater walls based on DEM
[0121] Preferably, the threshold extraction algorithm sets the area with an angle less than 15° in the tilt angle map as a flat area, and the remaining areas as slope areas.
[0122] In this embodiment, the corresponding specific processing process is as follows:
[0123] Convert the DEM data into a tilt angle map, transforming the terrain height information of the relative elevation data into the angle information between pixel points. The resolution of the tilt angle map is 60m / pixel.
[0124] Set the area with an angle less than 15° in the tilt angle map as a flat area, and the area greater than 15° as a slope area. This area mainly includes crater walls and slopes with a large tilt angle. The slope area is not suitable for the landing of the lander and is likely to cause the lander to tip over.
[0125] Classify the slope angle map of the entire Antarctic region into flat areas and inclined areas, where the inclined areas are not suitable for the landing of the lander.
[0126] IV. Fusion process of three detection algorithms
[0127] Optionally, the fusion process of the three detection algorithms is as follows:
[0128] For the craters detected by YOLOv9, set all the detected crater areas to 0 and the areas where no craters are detected to 1.
[0129] For the information of the rough areas of the craters detected by the Kmeans algorithm, set the rough areas to 0 and the non-rough areas to 1.
[0130] For the ramp region extracted by the threshold extraction algorithm in the tilt angle map, set the ramp region to 0 and the flat region to 1.
[0131] Register the data extracted by the three methods, then perform a "AND" operation on the three data, set the rough tilt region in the finally obtained region to 0, and the flat region to 1. Obtain the final detection result, as Figure 6 shown, where white is the flat region and black is the rough rock area.
[0132] Within the flat region, it is the area suitable for the lander to land. The rough region contains typical landforms such as steep crater walls, rough rock regions, fresh ejecta blanket regions, and central peaks.
[0133] In summary, this solution uses YOLOv9 to detect craters in SAR images. Compare the results of the SAR images with the DEM images and optical images of the same area, and analyze the performance of YOLOv9 detection based on SAR images. In addition, identify the distribution of lunar surface rocks and small craters in SAR images through Kmeans. Probability density functions and high-resolution optical images are used to verify the Kmeans detection effect in SAR images. Detect the distribution of craters, rocks, and steep slopes in the permanently shadowed area of the lunar south pole using YOLOv9 and Kmeans.
[0134] This embodiment also provides a flat region detection system within the permanently shadowed area of the moon, including a memory and a processor. The memory stores a computer program, and the processor calls the computer program to execute the steps of the above-mentioned flat region detection method within the permanently shadowed area of the moon.
[0135] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations based on the concept of the present invention without creative labor. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field of the present invention through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the protection scope determined by the claims.
Claims
1. A method for detecting a flat area in a permanent shadow region of the moon, characterized in that: The following steps are involved: Obtain SAR images and DEM data to be detected in the permanent shadow area of the moon; Input the SAR image into the pre-trained target detection algorithm model to obtain the detection results of the crater area and the undetected crater area; Perform Kmeans detection on the SAR image to obtain the statistical classification result of whether each pixel in the SAR image is a rough area or a non-rough area; The DEM data is converted into a tilt angle map, and a classification result of a flat area and a slope area is determined in the tilt angle map by a threshold extraction algorithm; The detection results of crater areas and undetected crater areas, the statistical classification results of rough areas and non-rough areas, and the classification results of flat areas and slope areas are registered and fused to obtain the final flat area detection result.
2. A method for detecting a flat area in a permanent shadow region of the moon according to claim 1, characterized in that: The detection process of the target detection algorithm model also includes: The local coordinates of the crater area detected by the target detection algorithm model are restored to the global coordinates of the Antarctic SAR image. The non-maximum suppression algorithm is used to eliminate the duplicate frames of the same crater, and the coordinate frame with the highest confidence is retained to obtain the final detection results of the crater area and the undetected crater area.
3. The method for detecting a flat area in a permanent shadow region of the moon according to claim 1, characterized in that: The process of acquiring the data set used in the training process of the target detection algorithm model includes: Collect SAR images, build a dataset for training, and annotate the crater area; Use data enhancement technology to enhance the data set; Crop the larger images in the dataset.
4. The method for detecting a flat area in a permanent shadow region of the moon according to claim 1, characterized in that: The target detection algorithm model is the YOLOv9 detection algorithm model.
5. The method for detecting a flat area in a permanent shadow region of the moon according to claim 1, characterized in that: The specific process of Kmeans detection is as follows: S301: If the SAR image to be detected is an M×N matrix, where M and N are the height and width of the image, the SAR image is reshaped into a matrix X=(x i ,i∈(1,K),K=M×N), and initialize the centroid C j , where j is the category; S302: For each pixel data x of the reshaped matrix X i Calculate the value of each centroid C separately j The Euclidean distance of each pixel is redefined as the label with the smallest Euclidean distance according to the Euclidean distance. S303: Calculate the new centroid of each cluster according to the labels of each category; S304: Repeat step S302 and step S303 to distribute pixel data and update the centroid until the change of the centroid is less than a preset threshold or reaches a preset maximum number of iterations, thereby obtaining the final classification result of the SAR image.
6. A method for detecting a flat area in a permanent shadow region of the moon according to claim 5, characterized in that: Pixel data x i To the centroid C j The calculation expression of the Euclidean distance is: In the formula, d(x i ,C j ) is the i-th pixel data x i To the jth centroid C j The Euclidean distance between The update expression of the label category of each pixel is: In the formula, J i is the label category of the i-th data point, and J is the set of possible category labels in the image; The calculation expression of the new centroid is: Where N j is the number of data points in the jth category label, S j is the set of all data points in the jth category label.
7. The method for detecting a flat area in a permanent shadow region of the moon according to claim 1, characterized in that: The threshold extraction algorithm sets the area with an angle less than 15° in the tilt angle map as a flat area, and the rest of the area as a slope area.
8. The method for detecting a flat area in a permanent shadow region of the moon according to claim 1, characterized in that: The registration and fusion process is specifically as follows: For the detection results of the target detection algorithm model, the value of the detected crater area is set to 0, and the value of the undetected crater area is set to 1; For the results of Kmeans detection, the value of the detected rough area is set to 0, and the value of the non-rough area is set to 1; For the detection results of the threshold extraction algorithm, the value of the detected slope area is set to 0, and the value of the flat area is set to 1; The detection results of the target detection algorithm model, Kmeans detection and threshold extraction algorithm are registered, and then the data is operated and the area with a value of 1 is taken as the final flat area detection result.
9. The method for detecting a flat area in a permanent shadow region of the moon according to claim 1, characterized in that: The final flat area detection result is used as an area suitable for the lander to land.
10. A flat area detection system in the permanent shadow area of the moon, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor calls the computer program to execute the steps of any one of the methods according to claims 1 to 9.