# Monocular Real Time Full Resolution Depth Estimation Arrangement with a Tunable Lens
## 4 Discussion  
The experimental setup is not directly comparable with other methods of acquisition, in that way different algorithms are chosen to compare the depth maps results. There are many different algorithms proposed in the state of the art to approximate the depth estimation from focal stack capture [19; 22; 34; 35; 36; 37]. The discussion is presented by choosing three, with the first chosen due to the similarity of the capture system [34], [PERSON] et al. presents a camera with a liquid lens which obtains the different focus positions varying the voltage like the arrangement proposed in this document. The second algorithm is the most referenced [36] in the literature, and uses classic computer vision to solve the problem, that is also comparable with the algorithm presented in the Section 2.3. The last one was selected to compare a classical computer vision algorithm with neural networks and is the first article that uses neural networks to solve the problem [19]. The article presented by our team [37] was compared visually with the algorithm presented here in the same way than the others. Noise study was not applied here given that the ground-truth used for this study were contemplated in the training stage. In the method presented in this paper, the focal stack acquisition and processing is done in real time, allowing for live video as presented in Section 2.3. In addition, our prototype works outdoors even with direct sunlight from behind the objects. Figure 13 shows the comparison between the method presented in this paper and the methods mentioned before [19; 34; 36], using real images. Only the computer vision algorithm could be compared as the focal stack was obtained with our camera and we did not have access to the raw data collected in the referenced works. In the images shown in Figure 13, our algorithm appears to be more edge preserving and smooth with the environment of the scene. [PERSON] et al. 's implementation appears to work well with big objects inside the scene, the algorithm is edge preserving but not very smooth between the different levels of distances. The DDFF algorithm has very low resolution output, and the neural network is trained with a mobile captured dataset under very different conditions than the proposed cameras. VDFF and our results are similar but execute slower and has less accuracy under noisy conditions. Relative multiscale deep depth from a focus approach [37] is compared with the same images as the others, as shown in the Figure 14. The neural network approach shows better results in some scenes. Under textureless zones, the zone without edges has good depth map values, but if we modify or use images of a camera with a different configuration, like the three top images, the classical algorithms adapt better than the neural network approach, and the same happens if we add a macro lens in the top of the arrangement and capture the focal stack by varying the focus positions, as we can see in the bottom images. Figure 12: Point cloud generated from a frame of video in Figure 9, the different views of the point cloud were generated with the MeshLab [33] interface. To evaluate the accuracy of our method a PSNR metric was chosen:  
\[PSNR=10\log_{10}(\frac{M^{2}}{MSE(D,GT)}), \tag{9}\]  
where \(M\) is the maximum pixel value and \(MSE\) is the mean squared error between \(D\) computed depth map and \(GT\) ground truth. The metric result is expressed in dB. Ground truth depth maps were obtained from Middleburry dataset [39], using the original left image to generate synthetic defocused images following the procedure of [PERSON] et al. [40]. The comparison shown in Figure 15 was made using different images of the cited dataset, by adding simulated camera noise to evaluate the robustness of the different algorithms. The PSNR average was computed with the following equation:  
\[PSNR_{A}=10\log_{10}(\frac{\sum_{i=0}^{N}10^{\frac{PSNR(D)(GT)(i)}{10}}}{N}) \tag{10}\]  
where \(N\) is the number of the images in the dataset, five in our case.