# RSCS6D: Keypoint Extraction-Based 6D Pose Estimation
## 3 Proposed Method
### Keypoint Cloud Extraction
#### 3.3.3 Curvature Calculation Using 2D Neighborhood-Based PCA  
Traditional point cloud PCA plane fitting methods [38] often use nearest-neighbor algorithms to determine the neighborhood points of a target point. This paper presents a method for curvature calculation in 3D point clouds using 2D neighborhood-based PCA.  
The process involves extracting an 8-neighborhood pixel matrix from the RGB image, standardizing it, and computing its covariance matrix. Singular Value Decomposition (SVD) is then applied to obtain singular values, which are used to calculate the curvature of the target point. This approach leverages 2D neighborhood relationships and depth information to enhance the accuracy and efficiency of curvature calculation in 3D point clouds. It addresses limitations of traditional nearest-neighbor methods by providing a more accurate representation of local geometric structure and improving plane fitting reliability. The specific steps are shown in Algorithm 1.  
```
Input: RGB-D Data Output: Curvature Value of Target Points 1. Extract 8-Neighbor Pixel Matrix:  Extract the 8-neighborhood pixel matrix \(\mathbf{X}_{\text{2D}}\) of the target point in the RGB image space. Using the camera intrinsic parameters and depth map, construct the corresponding 3D point cloud neighborhood matrix \(\mathbf{X}_{\text{3D}}\). 2. Standardized:  Standardize the matrix \(\mathbf{X}_{\text{3D}}\) to ensure numerical stability and consistency in scale. 3. Covariance and SVD Decomposition:  Compute the covariance matrix \(\mathbf{H}\) of the standardized matrix and perform Singular Value Decomposition (SVD). \[\mathbf{H}=\widetilde{\mathbf{X}}_{\text{3D}}\widetilde{\mathbf{X}}_{\text{3D }}^{T}=\mathbf{U}\mathbf{\Sigma}\mathbf{V}^{T}\]  where \(\mathbf{\Sigma}=diag(\lambda_{1},\lambda_{2},\lambda_{3})\), \(\lambda_{1}\geq\lambda_{2}\geq\lambda_{3}\) 4. Curvature Calculation:  Calculate the curvature value of the target point using the singular values obtained from the SVD decomposition. \[q=\frac{\lambda_{3}}{\lambda_{1}+\lambda_{2}+\lambda_{3}}\]
```  
**Algorithm 1**Curvature Calculation Using 2D Neighborhood-Based PCA  
This method leverages 2D neighborhood relationships and depth information to enhance the accuracy and efficiency of curvature calculation in 3D point clouds. However, potential failure modes, such as segmentation errors, sensor noise, and missing depth values, can adversely affect the determination of neighborhood points and subsequent curvature calculations, thereby reducing the accuracy and stability of keypoint extraction. To address this, the paper proposes an improved strategy: using only keypoints with valid depth values and treating each target's 1000 keypoints as a whole. By randomly selecting different combinations of keypoints in each computation round and iterating multiple times, the impact of segmentation errors, sensor noise, and missing depth values on keypoint extraction accuracy is effectively mitigated. This significantly enhances the robustness of keypoint extraction and the overall performance of pose estimation.