# Autonomous Visual Navigation System Based on a Single Camera for Floor-Sweeping Robot
## 4 Experiments
### Indoor Depth Perception and Dynamic Local Path Planning Experiment
#### 4.2.1 Indoor Depth Perception  
We acquired data using a Microsoft Kinect 2.0 depth camera, which contains a color camera and an infrared camera. The dataset has 1200 samples containing RGB images and depth images. Because of the installation position and field of view differences between the Kinect color camera and the infrared camera, the color images and the depth images need to be aligned. The camera calibration was performed using [PERSON]'s calibration method [36]. The calibration platform used Matlab's Stereo Camera Calibration toolkit to calibrate the color and infrared images using a checkerboard grid image. Finally, it obtained the internal parameters and distortion coefficients and the rotation matrix and translation matrix of the two cameras. Finally, the depth map alignment results are shown in Figure 12.  
In Figure 12, the depth map, shown in Figure 12b, has a large amount of noise and black hole areas, and there are still a small number of cases after alignment, Figure 12c. The anisotropic diffusion equation proposed by [PERSON] et al. [37] has a good repair effect of reducing the noise. The anisotropic diffusion equation restoration effect is shown in Figure 13.  
Figure 11: Indoor floor garbage detection experiment results.  
Figure 10: Variation in loss value for floor garbage detection.  
Based on the improved method of the self-encoder fully convolutional neural network, the pre-training model of [PERSON] et al. is experimentally selected to initialize the model parameters, which can accelerate the convergence of the model. After several experimental comparisons, the optimal parameters for this algorithm are as follows: the batch size is 4, the learning rate is initially 0.01, and the momentum is 0.9. After 70,000 steps, the model converged, and the algorithm model was obtained. The experimental results are shown in Figure 14, and the improved self-encoder convolutional neural network structure researched has a practical depth information estimation effect: (1) better handling of spatial dependencies and spatial distant and near connections of the scene; (2) the detection of contours between larger objects in space is evident; (3) the inference of the object depth is smoother and neater.  
Figure 14: Experimental results of indoor environment depth information inference: (**a**) original scene picture, (**b**) parallax map, (**c**) [PERSON]’s inference result, and (**d**) this chapter’s inference result (**e**) ground truth.  
Figure 12: Kinect depth image alignment: (**a**) original scene image, (**b**) kinect acquisition depth map, (**c**) image alignment result.  
Figure 13: Anisotropic equation repair depth image.  
We used common metrics to assess experimental results:  
Average relative error:  
\[Rel=\frac{1}{T}\sum\frac{y_{i}^{*}-y_{i}}{y_{i}^{*}}, \tag{5}\]  
Root mean squared error:  
\[RMS=\sqrt{\frac{1}{T}\sum(y_{i}^{*}-y)^{2}}, \tag{6}\]  
Average log10 error:  
\[\log 10=\frac{1}{T}\sum\lvert\log y_{i}^{*}-\log y_{i}\rvert, \tag{7}\]  
Accuracy:  
\[max(\frac{y_{i}^{*}}{y_{i}},\frac{y_{i}}{y_{i}^{*}})=\delta<threadhold. \tag{8}\]  
The percentage of pixels to the total pixels needs to satisfy Equation (8), where \(y_{i}^{*}\) and \(y_{i}\) are the model's predicted and valid depth values of pixels, respectively, and \(T\) is the sum of the number of test pixels.  
Table 6 shows the result of [PERSON]'s method compared with the improved method based on the dataset containing 1200 images. Based on the self-encoding fully convolutional neural network proposed by [PERSON] et al., we used inter-frame parallax maps to provide additional auxiliary information to the neural network. The accuracy improved by about 3.1% in the \(\delta<1.25\) accuracy metric, and the mean relative error Rel metric was reduced by about 10.4%.