# PSDFH: A Phase-Space-Based Depth from Hologram Extraction Method
## 3 Proposed Methodology
### Step 5: Curvature Estimation Using a DFF Method  
The three steps described in the previous sections implicitly assume that the 2D scene is composed of piece-wise planar objects and are thus not suited for curved objects. In this section, we propose to refine the set of linear segments into a set of curved segments when processing 1D slices of a 2D hologram by using the DFF method presented in the following. It is not possible to extract 1D holograms corresponding to each of the 2D space slices directly from the 2D hologram. However, it is possible to extract a 2D phase space \((x,\xi)\) corresponding to one slice \((x,z)\) from 4D phase space \((x,y,\xi,\eta)\) computed from a 2D hologram by selecting only the 2D phase space representation along a specific frequency. More formally, given a 2D hologram, the 4D representation in phase space is calculated using STFT producing a four-dimensional complex-valued matrix of size \(N\times N\times M\times M\) which represents the axes \(x,y,\xi,\eta\), given as:  
Figure 4: An illustrative example that motivates the use of a buffer in the proposed algorithm. Given the input phase space representation, the ROIs colored blue are extracted. The extracted regions of interest encapsulate all the points of the scene colored in red and are completely disjoint in 2D space. However, their representation in the phase space is not disjoint. A first candidate line colored in green which is fully embedded in one of the regions of interest and contributes the most to the input mask is selected. Since no buffer is used, the contribution of the selected line is directly removed from the inputted phase space representation, and the resulting representation is mapped again in the 2D space. The resulting ROI encapsulates only two objects, and no ROI is associated with the third object which shares similar points in the phase space as the candidate line. Figure 5: Result of the application of the iterative method for the decomposition of phase space into sets of straight lines. The proposed algorithm provides a minimal set of lines that when mapped in the phase space produce the same representation as the input phase space representation. Each 2D line is represented in phase space by a band with a slope and a thickness which are given by the depth and the length of the 2D line segment. Even though 2D lines are spatially disjoint in 2D space, their representation in phase space can intersect. \[\bigg{\{}x[n_{1}]:=\frac{W\Delta_{x}}{2N}(2n_{1}-N+1):n_{1}=0,1,\ldots,N-1 \bigg{\}}, \tag{18}\] \[\bigg{\{}y[n_{2}]:=\frac{H\Delta_{y}}{2N}(2n_{2}-N+1):n_{2}=0,1, \ldots,N-1\bigg{\}},\] (19) \[\bigg{\{}\xi[m_{1}]:=\frac{1}{2\Delta_{x}M}(2m_{1}-M+1):m_{1}=0,1, \ldots,M-1\bigg{\}},\] (20) \[\bigg{\{}\eta[m_{2}]:=\frac{1}{2\Delta_{y}M}(2m_{2}-M+1):m_{2}=0,1, \ldots,M-1\bigg{\}}, \tag{21}\]  
where \(H,W\) are the height and width of the hologram, and \(\Delta_{x}\), \(\Delta_{y}\) are the pixel along the X and Y directions. By rearranging the axes of the matrix to \(y,\eta,(x,\xi)\), the phase space representation can be seen as a set of 2D phase space representation \((x,\xi)\) of oriented 2D planes with an orientation and a position that depend on \(\eta\) and \(y\), respectively, as shown in Figure 6. The choice of frequency \(\eta\) corresponds to a certain orientation of the 2D plane, and the central frequency \(\eta=0\) produces a set of 2D planes \((x,z)\) which cut the scene horizontally at \(y\) without containing occlusion, i.e., two points cannot share the same \(x\) position at different depths. In the present work, only a sub-part of the phase space representation defined from a central frequency \(\eta=0\) is kept, thus producing a tensor denoted \(L\) of size \(N\times N\times M\) corresponding to a 2D phase space representation \((x,\xi)\) of a 2D horizontal plane \((x,z)\) with a height equal to \(y\). The choice of the frequency \(f_{\eta}=0\) is motivated by two reasons. First, it produces horizontal slices which do not contain an occlusion.