## 2 Materials and Methods
### Supervised Learning Based Depth Extraction  
Assuming that a general depth image is obtained through multiple cameras, a learning method needs to be developed to obtain depth images using a single camera. In this study, we use the depth estimation method introduced by [32]. The depth image of the input image is built by training various monocular images taken in indoor and outdoor environments along with ground truth depth images measured by the laser scanner. A depth image is derived from a discriminatively trained Markov Random Field (MRF) for local and global features in combination with the individual and relative depths that denote the depths between different points. Here we derive a depth image for a new input image based on a training set that is composed of 425 individual images and depth image pairs. The trained image resolution is 1704 \(\times\) 2272 and depth image resolution is 86 \(\times\) 107. The trained images are of objects that we often encounter, such as forest, trees, buildings, roads, sidewalks, and so on.  
Depth Estimation from Both Absolute Depth and Relative Depth Features  
Two types of features, absolute and relative depth features, are required for each patch (e.g., T0-T4 in Figure 2) to estimate the scene global depth from a single image as seen in Figure 2. The entire process can be summarized as follows. First, a feature vector (\(E_{i}\)(n)) for a patch is obtained through the Equation (1) with a predefined filter \(F\) for the input image. Second, based on the feature vector, the absolute depth features are computed with multiple spatial scales of the patch and its surrounding patches as seen in the right-side of Figure 2. For instance, F0-F4, S0-S4, T0-T4 in Figure 2 are absolute feature vectors obtained with different scales from a patch F0. Third, the relative depth features are computed by the difference of the histograms (\(\,|y_{i}-y_{j}\,|\,\)) from each patch (\(y_{i}\) and \(y_{j}\) in Figure 2) on the left-hand side in Figure 2 (see [32; 33; 34] for details).  
\[\begin{array}{l}F_{n}(x,y),n=\{1,2,\ldots,17\},\\ E_{i}(n)=\sum_{(x,y)\in patch(i)}|I(x,y)*F_{n}(x,y)|\end{array} \tag{1}\]  
The scene global depth is finally obtained by a probability model (Equation (2)) integrating the absolute depth and relative depth features.  
\[P(d|X;\theta,\eta)=\frac{1}{Z}\exp\left(-\sum_{k=1}^{N}\frac{\left|d_{k}(1)-x_ {k}^{T}\theta_{r}\right|}{\eta_{1r}}-\sum_{m=1}^{3}\sum_{k=1}^{N}\sum_{l\in N \text{\emph{Em}}(k)}\frac{\left|d_{k}(m)-d_{l}(m)\right|}{\left|y_{ijm}\right| }\right) \tag{2}\]  
Figure 2: Absolute (the right-hand side) and relative depth features (the left-hand side) used for estimating scene global depth (see [32] for details).  
where \(d_{k}(m)\) represents the depth of patch \(k\) at three scales \(m=1,2,3\). \(Ne_{m}(k)\) denotes the four neighbors of the patch \(k\) at scale \(m\), \(N\) is the total number of the patches, \(x_{k}\) is the absolute depth feature vector, and \(y_{ij}\) is the relative depth feature vector for the patch \(k\), \(\theta,\eta\) are the learning parameters of the model, and \(Z\) is the normalization constant. In Figure 3a, we see that a person is quite far from the camera and (b) is close to the camera. Even though every depth image is obtained from a different location and (b) is based in a more complex environment, these depth maps are obtained based on the same training set. Both (a) and (b) represent the human part with almost the same depth value.