# Feature Detection of Focused Plenoptic Camera Based on Central Projection Stereo Focal Stack
## 3 Feature Detection Based on CPSFS
### Central Projection Stereo Refocused Image Pair with Parallax  
We can get two refocused images when utilizing half of the micro-images (left semicircle and right semicircle) based on the algorithm in Section 2.3. The obtained two refocused images are called the central projection stereo refocused image pair in this paper. The CPSFS is composed of multiple central projection stereo refocused image pairs from different refocus planes.  
In the following part, we will analyze the relationship between the parallax of central projection stereo refocused image pair and the plenoptic disc radius. Assume that the main lens has a circular aperture. Using a semicircular micro-image during refocusing is equivalent to blocking half the main lens aperture. If \(Q\) is an imaging point of a point source of light, there will be two defocus semicircles in the left and right refocused images, as shown in the Figure 5a. The parallax between these two semicircles can be approximated by the parallax between the barycenters of two semicircles in the direction of s-axis from coordinates system \(o^{\prime}st\).  
It can be seen from Figure 5a that the barycenters \(C^{L}\) and \(C^{R}\) of the two semicircles in different refocus planes always correspond to the same two points \(p^{l}\) and \(p^{r}\) in the raw images. If the micro-lenses are regarded as continuously distributed pinholes, then there will be corresponding micro-image center \(i^{l}\) and \(i^{r}\)with regard to \(p^{l}\) and \(p^{r}\). According to Equation (8), we can calculate the parallax along s-axis as  
\[\epsilon_{Q}=dR_{F}(D_{u}-\delta_{u})+dD_{u}, \tag{9}\]  
with \(\epsilon_{Q}=C_{s}^{L}-C_{s}^{R}\), \(D_{u}=i_{u}^{l}-i_{u}^{r}\), and \(\delta_{u}=p_{u}^{l}-p_{u}^{r}\). \((p_{u}^{l},p_{v}^{l})\), \((p_{u}^{r},p_{v}^{r})\), \((i_{u}^{l},i_{v}^{l})\), and \((i_{u}^{r},i_{v}^{r})\) are the pixel coordinates of \(p^{l},p^{r},i^{l}\), and \(i^{r}\) in \(ouv\), respectively. \(C_{s}^{L}\) and \(C_{s}^{R}\) are the s-coordinates of \(C^{L}\) and \(C^{R}\) in \(o^{\prime}st\). \(R_{F}\) is the plenoptic disc radius of current refocus plane. Based on Equation (5), the plenoptic disc radius of \(Q\) can be calculated as \(R_{Q}=D_{u}/(\delta_{u}-D_{u})\). Thus, Equation (9) is turned into  
\[\epsilon_{Q}=-dD_{u}R_{F}/R_{Q}+dD_{u}. \tag{10}\]  
As one can see, there is a linear relationship between \(\epsilon_{Q}\) and \(R_{F}\). According to the centroid formula of semicircle, we can get \(D_{u}=8R_{Q}r_{mi}/(3\pi)\). Furthermore, we can get  
\[R_{Q}=R_{F}-3\pi\epsilon_{Q}/(8r_{mi}d). \tag{11}\]  
Figure 5: Illustration of parallax in central projection stereo focal stack (CPSFS). (**a**) Central projection stereo refocused image pair. (**b**) Parallax of \(Q\) in CPSFS.  
In this way, the plenoptic disc radius can be calculated using the parallax from central projection stereo refocused image pair. However, in practice, the calculated \(R_{Q}\) is error prone due to noise and mismatching. Therefore, a more robust way is to use CPSFS with two or more layers. The details are described in Sections 3.2 and 3.3.