# 3D Reconstruction of a Single Bubble in Transparent Media Using Three Orthographic Digital Images
## 3 3D Bubble Reconstruction
### Calculating Parameters of Horizontal Ellipse Slices  
Since the dimension of the single bubble is much smaller than the distance between the camera and the bubble, it can be reasonable to assume that the incident light is parallel light, so the bubble is evenly divided into \(n\) pieces of ellipse slices along the height direction. Further, both of the azimuth angle (\(\beta_{T}\)) and the projection parameter, \(\alpha\) (\(\alpha_{F}\) or \(\alpha_{S}\)), of the ellipse slices were assumed to be constant at each layer. The major and minor semi-axes of the \(i\)th layer of the ellipse at a height of \(H_{i}\) were indicated by \(a_{i}\) and bi, respectively, and the projection widths in the front and side views were denoted  
Figure 5: A schematic of posture correction. by \(l_{Fi}\) and \(l_{Si}\), respectively (Figure 6). The equation of the \(i\)th layer of the ellipse projected onto the top view can be written by:  
\[A_{i}x^{2}+B_{i}y^{2}+C_{i}xy=1 \tag{7}\]  
where, \(A_{i}=\left(\frac{\cos^{2}\beta_{T}}{a_{i}^{2}}+\frac{\sin^{2}\beta_{T}}{b_{i} ^{2}}\right)\), \(B_{i}=\left(\frac{\sin^{2}\beta_{T}}{a_{i}^{2}}+\frac{\cos^{2}\beta_{T}}{b_{i} ^{2}}\right)\), and \(C_{i}=2\left(\frac{1}{a_{i}^{2}}-\frac{1}{b_{i}^{2}}\right)\cos\beta_{T}\sin \beta_{T}\). Two tangent points are derived from the two tangent lines parallel with the \(x\)-axis on layer \(i\), and the chord length of the line passing through the two tangent points and the ellipse is equal to the width of projection onto the side view (\(l_{Si}\)) as shown in Figure 6. The formula for \(l_{Si}\) is expressed as:  
\[l_{Si}=\frac{2\tan\alpha_{S}}{\sqrt{A_{i}+B_{i}\tan^{2}\alpha_{S}+C_{i}\tan \alpha_{S}}} \tag{8}\]  
where, \(\alpha_{S}\) is a projection parameter associated with the angle between the chord length and horizontal line. By rearranging, these parameters can be related as follows:  
\[\frac{1}{l_{Si}^{2}}=\frac{c_{1}^{2}}{a_{i}^{2}}+\frac{c_{1}^{2}}{b_{i}^{2}} \tag{9}\]  
where, \(c_{1}=\frac{\cos\beta_{T}+\sin\beta_{T}\tan\alpha_{S}}{2\tan\alpha_{S}}\) and \(c_{2}=\frac{\sin\beta_{T}-\cos\beta_{T}\tan\alpha_{S}}{2\tan\alpha_{S}}\). By rearranging Equation (9) into a dimensionless equation, where \(a_{0}=\frac{a_{i}}{l_{Si}}\) and \(b_{0}=\frac{b_{i}}{l_{Si}}\), one may obtain:  
\[\frac{c_{1}^{2}}{a_{0}^{2}}+\frac{c_{2}^{2}}{b_{0}^{2}}=1 \tag{10}\]  
The tangent coordinates of the tangent line, the slope of which is zero since it is parallel with the \(x\)-axis, are defined by (\(x  
By combining Equations (10) and (12), one can obtain:  
\[\left\{ \begin{array}{l}a_{0}=\frac{1}{2}\sqrt{\frac{\cos(\alpha_{S}-\beta_{T})}{ \sin\alpha_{S}\sin\beta_{T}}}\\ b_{0}=\frac{1}{2}\sqrt{\frac{\sin(\alpha_{S}-\beta_{T})}{\sin\alpha_{S}\cos \beta_{T}}}\end{array} \right. \tag{13}\]  
Equation (13) shows that the dimensionless parameters \(a_{0}\) and \(b_{0}\) are only associated with the azimuth angle (\(\beta_{T}\)), so the projection parameter (\(\alpha_{S}\)) of an arbitrary ellipse slice is constant. Both the long semi-axis (\(a_{i}\)) and short semi-axis (\(b_{i}\)) of the ellipse slice in the \(i\)th layer can be calculated by the following formula:  
\[\left\{ \begin{array}{l}a_{i}=a_{0}\cdot l_{Si}\\ b_{i}=b_{0}\cdot l_{Si}\end{array} \right. \tag{14}\]  
Using the same procedure, similar results can also be obtained by using the projection width of the front view, and the corresponding dimensionless parameters of the ellipse can be calculated as:  
\[\left\{ \begin{array}{l}a_{0}=\frac{1}{2}\sqrt{\frac{\cos(\alpha_{T}-\beta_{ T})}{\cos\alpha_{S}\cos\beta_{T}}}\\ b_{0}=\frac{1}{2}\sqrt{\frac{-\sin(\alpha_{T}-\beta_{T})}{\cos\alpha_{S}\sin \beta_{T}}}\end{array} \right. \tag{15}\]  
The long semi-axis (\(a_{i}\)) and short semi-axis (\(b_{i}\)) in layer \(i\) are defined using the following equation:  
\[\left\{ \begin{array}{l}a_{i}=a_{0}\cdot l_{Fi}\\ b_{i}=b_{0}\cdot l_{Fi}\end{array} \right. \tag{16}\]  
All the ellipse slices were then stacked to form the 3D shape of the single bubble after traversing each layer of the ellipse slice.