# Holographic 3D Display Using Depth Maps Generated by 2D-to-3D Rendering Approach
## 2 Generation of Depth Maps  
### Distant View Images  
Currently, 2D images are usually captured by 2D cameras. Most 2D cameras can be simplified as lens-based imaging systems, as shown in Figure 1a. When _dis_ is the distance between the object and the focal plane in the object space,\(f\) is the focal length in the object space, and _siz_ is the size of the object, then the size of the object in the captured 2D image _siz_\({}^{\prime}\) can be obtained from [PERSON]'s image formula (Equation (1)):  
\[\textit{siz}^{\prime}=\frac{f}{\textit{dis}}\times\textit{siz} \tag{1}\]  
An object located at an infinite distance from the lens appears to be a point in a 2D image. This point is called the vanishing point. In a 2D image, as the distance to the vanishing point changes, objects with a same size appear to be distributed along divergent lines originating at the vanishing point, as shown in Figure 1b. These divergent lines are called vanishing lines.  
Figure 1: Images captured by lens-based imaging systems. (**a**) Relationship between size of an image and shooting distance in a lens-based imaging system. (**b**) Same size objects distributed along the vanishing lines. (**c**) Vanishing point in distant view image. (**d**) Vanishing point in perspective image.  
There are two types of 2D images that contain a vanishing point and vanishing lines. The first type is a 2D image with a large shooting distance. These images are often captured outdoors, and typically present the sky, land areas, and water bodies. These type of images are referred to as distant view images, which primarily capture scenes on the horizontal plane. The second type is a 2D image with a moderate shooting distance, and such images contain an obvious perspective effect. The scenes on both the horizontal and vertical planes are presented, and such images are referred to as perspective images. The vanishing point of a distant view image is always located on the borderline between the sky and other physical elements (Figure 1c), while that of a perspective image is located near the central area of the image (Figure 1d).  
The CGDMs of these two types of 2D images are calculated according to different depth gradient models in the proposed method. Therefore, the image type should be firstly identified. Identification of a distant view image uses the color feature. The 2D image is transformed from the RGB color space to the hue-saturation-intensity (HSI) color space [35]. Pixels representing the sky, land areas, and water bodies, have typical pixel values in the range [36]:  
\[Pixel\ Value\in\ \left\{\begin{array}{l}\left((80<I<255)\text{\&\&\&(100<H< 180))\right)\\ ||\ ((80<S<255)\text{\&\&\&(20<H<100))\end{array}\right\} \tag{2}\]  
where \(H\), \(S\), and \(I\) are the hue, saturation, and intensity, respectively. In addition, \(p\) is the proportion of the pixels whose values are in the above range (Equation (2)). When \(p\) > 0.5, the 2D image is classified as a distant view type.  
Because the vanishing point of a distant view image is always located on the borderline between the sky and other physical elements, the CGDM is calculated using a cumulative horizontal edge histogram [37]. In this model, the sky is assumed to be infinitely far from the observer. The distances to other physical elements are linearly far-to-near, from the top edge of the image to its bottom edge. The borderline is therefore distinguished first, and subsequently the CGDM _depth_ (\(x,y\)) can be expressed as:  
\[depth(x,y)\ =\frac{2^{BD}-1}{N-y_{ho}}(y-y_{ho}) \tag{3}\]  
where \(BD\) is the bit depth of the CGDM, \(N\) is the pixel number of the CGDM in the vertical direction, and \(y_{ho}\) is the vertical coordinate value of the borderline. A larger pixel value indicates that the point is nearer to the observer. The pixel value for the sky is assigned as zero. As the distant view image appears far-to-near, extraction of the vanishing point and vanishing lines is unnecessary in the cumulative horizontal edge histogram.