## 2 Materials and Methods  
Assuming a perpendicular imaging angle, the mm length of an object can be measured accurately. Accurate estimation of the mm length of an object from the pixel length of the object's image is the primary goal of calibrated horizontal measurement. Assuming an optical system that is symmetrical around its optical axis, the relationship between an object and its image can be determined. Let \(\mathrm{h_{o}}\) denote the mm length of an object and \(\mathrm{h_{i}}\) denote the pixel length of the object's image. Also, let \(\mathrm{O}\) be the intersection point between a ray of light from the object and the lens of the camera (Figure 1) expressed in the polar coordinates (\(\rho\), \(\varphi\)). We would have [29],  
\[\mathrm{h_{i}}=\mathrm{A_{1}}\rho\cos\varphi+\mathrm{A_{2}}\mathrm{h_{0}}+ \mathrm{B_{1}}\rho^{3}\mathrm{cos}\varphi+\mathrm{B_{2}}\rho^{2}\mathrm{h_{0} }(2+\mathrm{cos}\,2\varphi)+(3\mathrm{B_{3}}+\mathrm{B_{4}})\mathrm{\rho h_{o }^{2}}\mathrm{cos}\varphi+\mathrm{B_{5}}\mathrm{h_{0}^{3}}+\mathrm{\ HOT} \tag{1}\]  
where \(\mathrm{A_{j}}\) and \(\mathrm{B_{j}}\) are constants, and \(\mathrm{HOT}\) represents the higher-order terms. Readers interested in more detailed analysis of image formation may refer to [29] and its references.  
Equation (1) shows a non-linear and complex relationship between pixel and mm lengths. Using the thin-lens assumption and small-angle approximation [29] Equation (1) can be approximated with a much simpler model known as the Gaussian optics [29]. In this model, the ratio of pixel length to mm length is a constant number, which is called the magnification factor of the system (m). Equation (2) shows the following:  
\[\mathrm{m}=\frac{\mathrm{h_{i}}}{\mathrm{h_{o}}} \tag{2}\]  
In the Gaussian optics, magnification factor and the working distance have an inverse relationship [29], and therefore the working distance would be a confounding factor for calibrated horizontal measurements.  
Flexible fiberoptic endoscopes employ wide-angle lenses to maximize their FOV sizes. However, wide-angle lenses violate the small-angle approximation of the Gaussian optics. This leads to a more complex relationship between pixel and mm lengths. Specifically, this deviation introduces significant non-linear distortion into recorded images. Recently,  
Figure 1: Relationship between the length of an object (\(\mathrm{h_{o}}\)) and its image (\(\mathrm{h_{i}}\)) in an axially symmetrical optical system.  
[PERSON] et al. [14] studied the distortion of a flexible laryngoscope and showed that when the imaging axis is perpendicular to the target surface, the distortion is symmetrical around the optical axis, and points with similar distances from the FOV center experience similar distortions. Considering this symmetry, Equation (1) may govern the image formation in flexible endoscopy. Additionally, that study showed the pixel length of an object significantly depends on its spatial location within the FOV [14]. Therefore, the spatial location of the target object is another confounding factor for horizontal measurements. Circular grids can exploit this symmetry efficiently; thus, the proposed method uses circular grids to account for the effect of working distance and the spatial location of the target object.  
To demonstrate this, a circular grid with the spacing of 0.5 mm was recorded at working distances of 2.87 mm and 2.24 mm. Figure 2 shows the recorded images. The circles had a constant distance of 0.5 mm from each other. However, in Figure 2A we see as we go from the center toward the periphery the distance between consecutive circles decreases from 30 pixels to 20 pixels. This clearly demonstrates the dependence of horizontal measurements on the spatial location. Comparing Figure 2A,B we see the effect of working distance, where the distance between the two smallest circles increases from 30 pixels to 35.5 pixels when the working distance decreases from 2.87 mm (Figure 2A) to 2.24 mm (Figure 2B).