## 3 Methodology
### Distance Estimation Using Position Information
#### 3.1.1 Horizontal Camera Axis  
As can be seen in Figure 2a, the camera is held or set up horizontally, in which the optical axis of the camera is parallel to the ground and the pitch angle is 0\({}^{\circ}\). In the diagram, h is the height of the camera, b is the length of the blind area, d is the distance from the edge of the blind area to the bottom of the target object and w is the one-half width of the captured target object surface in real-world coordinates. \(\alpha\) indicates one-half of the vertical FOV and \(\gamma\) is one-half of the horizontal FOV of the camera.  
The remain factors in Figure 2a can be further derived from Equations (1)-(3).  
\[\tan\beta=\frac{b}{h} \tag{1}\]  
\[\alpha+\beta=90^{\circ} \tag{2}\]  
\[\tan\gamma=\frac{w}{d+b} \tag{3}\]  
where \(\beta\) is the viewing angle of the blind area. Assuming the image resolution is m by \(n\) in pixel, for a point in pixel coordinate \(P(u,v)\), which ranges from 0 to \((m-1)\) and 0 to \((n-1)\), respectively, the distance along the \(x\)- and \(y\)-axis in real-world coordinates can be determined by the following Equations (4) and (5).  
\[y=h\tan\biggl{[}\beta+2\alpha\biggl{(}\frac{n-1-v}{n-1}\biggr{)}\biggr{]} \tag{4}\]  
Figure 2: Camera positioning. (**a**) Scenario of holding the camera horizontally. (**b**) Scenario of camera setup at an arbitrary pitch angle.  
\[x=y\tan\biggl{[}\gamma\biggl{(}\frac{2u-m+1}{m-1}\biggr{)}\biggr{]} \tag{5}\]  
Above, Figure 3 illustrates the distance estimation of Equations (4) and (5). It assumes that there exists a point \(P_{1}\) lying on the \(y\)-axis and its projection in pixel coordinate is \({P_{1}}^{{}^{\prime}}\). The intersection angle of the projection line \(P_{1}\)\({P_{1}}^{{}^{\prime}}\) and \(z\)-axis (\(\theta\)) is \(\beta\) plus a portion of vertical FOV and the portion can be determined by the pixel coordinate \(v\) of the image, which is \(2\alpha\biggl{(}\frac{n-1-v}{n-1}\biggr{)}\). Thus, \(y=h\)\(\tan\theta=h\)\(\tan\biggl{[}\beta+2\alpha\biggl{(}\frac{n-1-v}{n-1}\biggr{)}\biggr{]}\) is obtained and Equation (4) is derived. For Equation (5), assuming there is a point \(P_{2}\), which is \(P_{1}\) shifting along the \(x\)-axis and the projection of \(P_{2}\) in pixel coordinate is \({P_{2}}^{{}^{\prime}}\). The intersection angle of the projection line \(P_{2}\)\({P_{2}}^{{}^{\prime}}\) and \(y\)-axis (\(\varphi\)) is a portion of horizontal FOV and the point can be determined by the pixel coordinate \(u\) of the image, which is \(\gamma\biggl{(}\frac{2u-m+1}{m-1}\biggr{)}\). Hence, \(x=y\)\(tan\varphi=y\)\(\tan\biggl{[}\gamma\biggl{(}\frac{2u-m+1}{m-1}\biggr{)}\biggr{]}\) is obtained based on the triangular relationship.  
Since the camera is held horizontally, the object placed sufficiently far away will eventually appear in the horizontal centerline of the image, then \(\alpha\) comes to \(0^{\circ}\), and \(y\) becomes infinity. \(x\) can be positive or negative from the equations. The positive value of \(x\) indicates that the object is at the front-right and the negative indicates that the object is at the front-left. According to Equations (4) and (5), \(x\) and \(y\) only rely on known parameters  
Figure 3: Distance estimation using triangulation relationship. (**a**) A point (\(P_{1}\)) on the \(y\)-axis in real coordinate and its projection in pixel coordinate (\(P_{1}^{{}^{\prime}}\)). (**b**) A point (\(P_{2}\)) shifting along the \(x\)-axis and its projection in pixel coordinate (\(P_{2}^{{}^{\prime}}\)).  
including \(h\) (the height of the camera), \(\alpha\), \(\beta\), \(\gamma\) (the FOV of the camera, which can be acquired from calibration), m and \(n\) is the resolution of images. Once the pixel coordinate \((u,v)\) of any object is known, its corresponding location in real-world coordinate \((x,y,0)\) can be converted as the object is assumed to be lying on the ground. Hence, the distance from the user's feet to the object's bottom along the ground surface is described in Equation (6):  
\[D=\sqrt{x^{2}+y^{2}} \tag{6}\]