# A Safety Prediction System for Lunar Orbit Rendezvous and Docking Mission
## 3 Human-Machine Collaborative Self-Judgment Framework for Safety of RVD
### Feature Selection and Matching of the Target Image  
It can be seen from Figure 2 that the feature extraction and selection of the target image is a key issue in system design. The surveillance camera is a monocular uncalibrated visible light camera. Since the surveillance camera is used to monitor the target, it should meet the requirements of imaging the entire target at a relatively long distance, and imaging notable regions at medium and short distances. The resolution of the camera affects the image clarity, the position error of extracted features and ultimately affects the accuracy of pose information and safety prediction. A low resolution will greatly affect the accuracy of the results. The field of view of the camera determines the closest distance to image the entire target or some notable regions of the target. A small field of view will make the proposed method inapplicable at a close range. Thus, based on the test environment, we set the camera resolution to 2048 \(\times\) 2048, pixel size to 5.5 \(\upmu\)m \(\times\) 5.5 \(\upmu\)m, focal length to 20 mm, field of view to 20\({}^{\circ}\)\(\times\) 20\({}^{\circ}\) and frame rate to 10 FPS. During the imaging process, it can be self-calibrated according to the known structure model of the measured target. The target relative working distance is 30-0.3 m, and the speed is 0.3 m/s. Due to the limitation of the depth of field, the camera cannot clearly image the target at a distance of 20 m. Therefore, it is difficult to ensure the matching accuracy through the traditional method of extracting points, lines and surfaces. In this regard, this paper divides the feature extraction, matching and application process on the target image into the following steps:  
1. Manually select several positions on the mechanical structure model of the end face of the target. These positions have precise coordinates on the mechanical structure drawing and can be extracted using the Scale-Invariant Feature Transform (SIFT) features [29];
2. Convert the position specified on the mechanical structure drawing to the (sub) pixel position on the simulated image by using the rotation matrix and displacement vector generated by the dynamics model;  
Figure 2: Self-judgment framework for safety of RVD. Extract the SIFT features from the real images collected in the test environment and the simulated images, and form feature point pairs;
4. In the construction stage of the safety knowledge base, the features on the images collected by the surveillance cameras are clustered, and the feature cluster centers are matched with the features on the simulated images. Then, the matching results are manually detected, and the false matches are deleted. Since the safety level corresponding to the simulated image can be obtained from the dynamics model, the label for the manually detected features can be obtained, which is the same as the matched simulated image. With the features and label, we can construct several training samples. Then, decision tree methods are used to construct a knowledge base. An example of the feature points is shown in Figure 3;
5. In the test stage, we first collect images using the surveillance camera, and then extract features and cluster them. After that, we manually detect the number of clusters and the degree of feature aggregation within the cluster and select the cluster centers. Finally, we obtain the safety level by inputting the filtered cluster centers into the decision tree. We select the cluster centers of the features manually and input them into the decision tree. The selection is based on the manually selected notable positions on the target. Due to the specific characteristics of space missions, we can manually select some easily identified positions on the target. In this way, we can easily find the corresponding positions on the target image. The disadvantage of this kind of manual selection is that we need to find notable positions for each specific mission.