# Dense Robust 3D Reconstruction and Measurement for 3D Printing Process Based on Vision
## 3 The Matching Method Based on the FFT-SIFT-AKAKAE
### Strategy and Method of FFT-SIFT-AKAZE Feature Matching  
The method flow of FFT-SIFT-AKAZE feature matching is presented in Figure 4:  
In the feature matching stage, when SIFT feature matching is used, it is assumed that the \(i\)-th descriptor of the first graph \(R\) is set to \(R_{i}\) = (\(r_{i1}\), \(r_{i2}\),..., \(r_{i128}\)), and the descriptor of the other graph \(S\) is \(S_{i}\) = (\(s_{i1}\), \(s_{i2}\),..., \(s_{i128}\)). Finally, the two images are matched according to the similarity of the descriptor of the feature vector. The expression of the matching similarity parameter is as follows:  
\[d(R_{i},S_{i})=\sqrt{\sum_{j=1}^{128}\bigl{(}r_{ij}-s_{ij}\bigr{)}^{2}} \tag{8}\]  
Find the feature point whose Euclidean distance is minimum from the descriptor of the first graph \(R\), and then take the next closest feature point. If the ratio of the two is smaller than the set threshold value, it is determined as a pair of feature points. AKAZE descriptors are stored in binary mode, so it is only necessary to calculate the Hamming  
Figure 4: Fusing process of multiple feature matching points.  
Figure 3: AKAZE calculates feature direction.  
distance between the two descriptors to judge the similarity between the two feature descriptors, as shown below:  
\[D_{\text{ham}}(v,u)=\sum_{i=1}^{n}v_{i}\oplus u_{i} \tag{9}\]  
where the \(v_{i}\) and the \(u_{i}\) represent the vectors of two descriptors respectively. The distance of binary descriptors can be calculated only by XOR operation. The criterion for judging the success of matching is still the ratio of the nearest neighbor and the next nearest neighbor.  
In order to improve the matching speed, this paper uses the fast nearest neighbor search algorithm to search the matching feature points [24]. The coordinates of all feature points are taken as keywords, and different feature points are divided into different spaces according to their positions in the image and stored. A binary Tree KD-tree is constructed, and the balance of the binary Tree is maintained to reduce a lot of meaningless matching time. If the size of the image is \(n\times n\), according to the nature of binary tree, the search time complexity in the matching can be reduced to \(log_{2}{n}\), and the total time complexity can be reduced to \(O(n\ log_{2}{n})\). The minimum Euclidean distance of FFT-SIFT feature point and the Hamming distance of AKAZE feature point are selected as the matching result. Then, the two kinds of matching points are superimposed and fused to obtain more matching point information. Since the feature extraction algorithms used by the two matching algorithms are completely different, the coordinates of the feature points obtained by the two algorithms are different and accurate to the sub-pixel level, s so the feature points obtained by the two algorithms almost do not coincide. In this way, the superposition of matching points obtained by the two matching algorithms not only retains rich edge feature information, but also greatly improves the matching number of feature points.