In this paper, we realize an accurate and flexible measurement method for paraxial focal length with a simple apparatus. The proposed method utilizes the established measurement principle which is based on the differentiation of the Gaussian optical formula and geometrical relationship of camera-lens system to obtain the focal length of a lens. Some image processing methods are employed to experimentally realize this measurement principle with high accuracy and practicability. Image sharpness evaluation function is utilized to ensure the system conforms to the Gaussian optical formula. System calibration is adopted to compensate for the errors caused by the simple apparatus. In addition, aberration is considered to obtain a paraxial focal length of a lens. Experimental results indicate that repeatability error of measurement system is less than 0.11% for most lenses.
© 2019 Optical Society of America under the terms of the OSA Open Access Publishing Agreement
The focal length is regarded as a fundamental characteristic of a lens, which is the core component in the optical system. The focal length of a lens always deviates from its nominal value due to assembly and manufacturing errors. As a result, it is necessary to measure the focal length in the optical field.
There exist various methods to measure the focal length such as the classical methods based on nodal slide and image magnification . To improve the accuracy, some modern methods based on moire deflectometry [2,3] and Talbot interferometry [4,5] were proposed with measurement accuracy ranging from 0.19% to 0.8% for the lenses’ focal length around 200mm. However, for the micro-lenses (4mm–50mm), the method based on moire deflectometry  yields a relatively low accuracy of 3%. The reduction of the accuracies is mainly due to the direct measurement errors of the inclination of moire fringes and the parallelism of moire fringes. Grating shearing interferometry [7,8] determined the focal length by measuring the relative lateral distance between the diffracted first order and the undiffracted zero order. Their accuracies varied from 0.4% to 1% for the lenses’ focal length around 200mm. The accuracy of the method is limited by the accuracy of the charged-coupled device (CCD). Tay et al.  proposed a measurement method based on Lau phase interferometry with the accuracy of 0.2% for the lenses’ focal length around 50mm influenced by the aberrations of an unwrapped phase map. Yang  proposed a highly accurate method based on differential confocal technology which can reach 0.001% for the lenses’ focal length around 200mm.
Although the accuracies of most of existing focal length measurement methods range from 0.2% to 1% and Yang’s method can achieve the accuracy of 0.001%, all of these methods must use complex configurations and alignment processes which are expensive and hard to implement automatically. Furthermore, their apparatuses cannot measure the lenses’ focal length with a wide range once established. In this paper, we attempt to experimentally realize a flexible and accurate measurement method for paraxial focal length with a simple apparatus.
To realize this goal, we tackle this issue from different angles. We utilize more image processing techniques and feedback control algorithms in order to simplify the apparatus, compensate for errors and automate the measurement process. In this paper, one CCD camera and one calibration board (checkerboard) equipped with a displacement platform respectively are utilized without needing other alignment equipment. Generally, camera-lens system uses the pin-hole model as its system model which only functions well when the working distance is at least ten times larger than the focal length. This model greatly sacrifices the resolution of the CCD camera. As a result, the thick-lens model is applied in the paper to fully utilize the resolution of the CCD camera, then improving the measurement accuracy of camera-lens systems.
Besides, the commonly measured focal length is the effective focal length of a lens which ignores the aberration effect. In this case, aberration of optical system especially distortion should be considered and solved to obtain the paraxial focal length with a higher accuracy.
The paper is organized as follows: Section 2 presents the basic measurement principle and provides solutions to problems in practical measurement, Section 3 elaborates the procedures for measurement, Section 4 presents the theoretical error estimation of the proposed method, Section 5 presents the experimental results of the assumption in Section 2 and the measurement results, the final Section concludes this paper.
2. Measurement principle
For the thick-lens model shown in Fig. 1, it follows the Gaussian optical formula in Eq. (1) where the focal length can be solved once the working distance and its conjugate imaging distance are known.
To estimate the focal length from Eq. (1), it requires to know the direct working distance and its conjugate imaging distance. However, it is difficult to measure the direct working distance or its conjugate imaging distance in reality. To overcome the problem of absolute distance measurement, Zimmer and Kingslake presented a relative distance measurement method in [1,11]. As shown in Fig. 2, when the object is moved from Pi position to Pi+1 position, in order to have a clear image, its conjugate image plane will be moved from P′i position to P′i+1 position which is determined by the Gaussian optical formula. In other words, the optical system must follow the Gaussian optical formula in order to maintain a sharp imaging process.
Meanwhile, the length of the calibration target on the object plane and image plane can be represented by Eq. (3).
It should be noted that this measurement principle is only valid for paraxial rays which means that paraxial approximation sin θ ≈ θ, tan θ ≈ θ, cos θ ≈ θ should be satisfied. Once the angle between incident ray and optical axis is smaller than 15 degrees, the relative error of paraxial approximation is below 1%. If object or the CCD sensor deviates far away from the optical center, this paraxial approximation will be invalid. In this case, the centers of the CCD sensor and target object are aligned approximately around the optical axis of the lens which can be ensured by the calibration method in Section 2(d). As we want to fully utilize the resolution of the CCD sensor, the size of target is smaller than the CCD sensor due to magnification effect. Therefore, the maximum incident angle can be defined in Eq. (4). Once this angle is smaller than 15 degrees, the paraxial approximation is satisfied and the measurement method can be carried out.
However, the solution to the paraxial focal length given in Eq. (2) cannot be implemented before the five issues listed in the following are fully addressed.
- How to quantitatively ensure the system follows the Gaussian optical formula
The Gaussian optical formula should be strictly satisfied in the proposed system to avoid any information loss. And it is well known when the Gaussian optical formula is satisfied, the image captured by the CCD sensor is the sharpest for a given target. As a result, the measurement system should be capable of evaluating the image sharpness quantitatively by itself to not only automate the measurement process but ensure measurement accuracy as well. In this paper, the cumulative probability of blur detection (CPBD)  method is selected to quantitatively evaluate the accurate imaging position for a given target due to its excellent performance.
- How to ensure the calibration board totally lies on the object plane
In this paper, the calibration board are used as the object to be observed. We need to ensure that the whole object, i.e., the calibration board is within the object plane during the measurement process. Meanwhile, to fully utilize the resolution of the CCD sensor, the magnification of the optical system is as large as possible to induce a short working distance. As a result, the depth of view of the system is almost zero. To make all parts of the captured image sharp, the calibration board should totally lie on the object plane. Generally, when the calibration board totally lies on the object plane, the sharpness of different local parts of the captured image should be the same ideally. Therefore, the CPBD method is utilized to calculate their sharpness and the system is to be tuned based on their results. However, optical system is hard to be perfectly aligned in parallel by manual operation in practice. In this paper, the error of alignment is compensated by a rotation transformation between the object plane and the calibration board plane represented by Eq. (5).
- How to obtain the displacement of the calibration board along optical axis ΔZC
During the measurement process, the moving direction of displacement platform of the calibration board cannot be ensured to be perpendicular to the calibration board. As a result, there also exists a translation transformation which is a function of displacement of the displacement platform during the calibration board movement. Thus, Eq. (5) can be further expanded as Eq. (6).
- How to obtain the parameters in Ri and Ti
In practice, the calibration board which represents the object to be observed cannot be within the single plane that is perpendicular to the direction of motion. One rotation transformation and one translation transformation are proposed to compensate for the errors induced by alignments and setup as above. Next, how to obtain the parameters in these transformations is explained below.
To obtain Ri and the parameters in Ti, the camera-lens system should be calibrated initially. The proposed apparatus is established based on the thin-lens model where the imaging distance can be changed to ensure the sharpness of captured images. However, when the imaging distance is fixed in our apparatus, certain depth of view will be allowed for sharp images because the CCD sensor cannot recognize the change of working distance due to pixel size limitation. At this time, the thin-lens model with a fixed imaging distance can be regarded as a pin-hole model within the region of depth of view. Therefore, existing camera-lens calibration methods can be utilized for the thin-lens model with a fixed imaging distance to calibrate the fixed intrinsic parameters at this state. To enlarge the depth of view for easy calibration, the calibration board is moved away from the measured lens and the CPBD method is applied to find its conjugate imaging distance to acquire a sharp image. In this case, Zhang’s method  can be applied with different orientations of calibration board within the depth of view. Ri, Ti can be calculated by the division of homography and intrinsic matrix obtained by Zhang’s method. And the parameters tx, ty, tz, kx, ky, kz can be computed by the least square method based on the corresponding Ti and di.
Although the above parameters Ri, Ti are obtained within certain depth of view, it can be expanded to the whole measurement system. Once the apparatus of experiment is established, the calibration board plane and its moving direction do not change again which means that Ri and the parameters in Ti remain the same during movement for the apparatus. However, there exist vibration, noise and manufacture errors of the displacement platform during movement. Experiments are carried out to investigate their influences on rotation and translation transformation in Section 5.2.1.
In addition, the image center defined by the intersection of optical axis and the CCD sensor can be obtained by calibration method . The CCD sensor can be aligned with the lens based on its image center. Correspondingly, target object (calibration) can only be observed once aligned.
- How to obtain a paraxial focal length
Aberration of the optical system will distort the light rays passing through the lens. In this case, focused rays intersect in a small spot instead of one points due to aberrations. Common focal length is called effective focal length, which becomes paraxial focal length if aberration’s influence of optical system is eliminated . Therefore, the effect of aberrations is discussed and eliminated in this paper to obtain the paraxial focal length of a lens.
Therefore, the undistorted image size of objects can be represented by Eq. (8).
With the above proposed solution, we are ready to implement the relative focal length measurement given in Eq. (2).
3. Measurement procedures
The procedures of the paraxial focal length measurement are elaborated as following steps shown in Fig. 3.
The details for each step are elaborated as following:
- Ensure parallelism of the components based on CPBD value
The significance of parallelism of the system is to ensure a complete sharp image which has been explained in Section 2 (b). In this step, the calibration board approaches to the measured lens where the depth of view of the optical system is close to zero. Therefore, the complete sharp image can only be achieved when the calibration board lies on the object plane. When the optical system is aligned in parallel, the sharpness values at different local parts of the captured image should be almost equal. In this case, the system is aligned in parallel by evaluating the image sharpness of different local parts of the captured image with the CPBD method mentioned in Section 2 (b).
- Calibrate the intrinsic parameters of camera-lens system
To allow a large depth of view for easy calibration, the calibration board is moved far away from the measured lens. And the CPBD method is applied to determine the depth of view for its fixed conjugate imaging distance. The intrinsic parameters at this state of camera-lens system is calibrated using Zhang’s method  with different orientations of calibration board within the depth of view.
- Calculate Ri and the parameters of Ti
As the calibration board has been rotated to obtain different orientations, step(a) should be done once more to ensure parallelism of the system while the calibration board will only be rotated to align the system in parallel again at this time. The obtained intrinsic parameters only function in the state of step(b), so the displacement platform will move back to the last state. Therefore, Ri, Ti can be calculated by the division of homography and intrinsic matrix obtained by Zhang’s method.
- Find the position where the Gaussian optical formula is established
To fully utilize the resolution of the CCD sensor, the calibration board should be moved close to the measured lens. As the proposed measurement principle, the calibration board is initially fixed at the ith position, while the displacement platform of the CCD sensor will move to the position where the sharpest image can be captured based on the CPBD evaluation function. Repeating this step for the calibration board at the i+1th position. Therefore, the unknowns at these two positions can be obtained automatically.
- Eliminate the effect of aberration
Due to aberration, focused rays do not intersect in one point but a small spot. This will distort the image size of objects. To eliminate the effect of aberration, the undistorted image size of objects can be calculated based on Eq. (8).
- Calculate the focal length of the lens
With the five steps above, the optical system is calibrated and the unknowns lu,i, lu,i+1, lC,i, lC,i+1, ΔZC can be obtained. Therefore, the focal length of the lens can be solved by Eq. (2).
4. Error estimation
From Eq. (2), it can be observed that the errors of lu,i, lu,i+1, lC,i, lC,i+1, ΔZC will reduce the repeatability of the proposed focal length measurement. The error caused by above variables can be obtained by differentiating Eq. (2) which yields to Eq. (9).
The partial derivatives , , , , are regarded as error propagation coefficients and calculated as follows.
In our experiment, the measurement errors of lu,i and lu,i+1 are approximately the same which are determined by the accuracy of checkerboard’s corner detection algorithm. The Harris’ corner detection method  is utilized in the paper and the sub-pixel algorithm  is also applied to detect the corners of checkerboard. The accuracy is about 0.2 pixel (about 0.9 μm) for the checkerboard corner. Thus, Δlu,i=Δlu,i+1≈ 0.9μm. The errors of objects’ length in the camera plane lC,i and lC,i+1 are determined by the manufacture tolerance of calibration target (checkerboard). However, we do not change the target in our experiment. Thus, ΔlC,i=ΔlC,i+1= 0. The error of the displacement of the camera plane is determined by the accuracy of the displacement platform about 1 μm. Thus, Δ(ΔZC)≈ 1μm. The transformation matrix error between camera coordinate and world coordinate only affects the absolute accuracy of the system instead of repeatability which can be calibrated before measurement. The configurations in the paper are that lu,i≈ 4 ∼ 8mm, lC,i=lC,i+1=4mm, ZC,i≈ 0.5 f ∼ f, ΔZC ≈ 0.1 f.
To consider the best case of measurement repeatability, the theoretical repeatability error can be calculated as Eq. (15).
From Eq. (15), the repeatability error decreases with the increment of focal length ranges from 0.098% to 0.11%. For an ultra-long focal length lens, the value of ΔZC is very large which is hard to achieve by the displacement platform. Therefore, ΔZC is set to a fixed value 50mm for such kind of ultra-long focal length lens and the repeatability error of a 1000mm lens is about 0.158%.
5. Experimental verification
5.1. Experimental setup
The focal length measurement apparatus consists of two motorized displacement platforms, one calibration board, one CCD sensor and the lens to be measured. The experimental apparatus is depicted in Fig. 4 following the proposed measurement principle. Two Parker displacement platforms with 1μm accuracy are utilized to move the CCD sensor (camera) and the calibration board. The camera type is Allied Vision Tech Manta G283B and its pixel size is 4.54μm. The calibration board is a checkerboard with back-light whose square is 4mm manufactured by photolithography.
5.2. Experimental results and analysis
5.2.1. Obtaining external parameters Ri, Ti
Each blue frame in Fig. 5 represents the calibration board plane constructed by four sets of corresponding points with red, green, yellow and blue color. The rotation matrix Ri of the calibration board remains the same during the movement of the calibration board. Its value and variance shown in Table 1. And the least square method is applied to obtain the parameters in Ti matrix. The variances of these parameters are ignorable. The values of tx, ty, tz, kx, ky, kz are shown in Table 1 as well.
5.2.2. The effectiveness of the image sharpness evaluation function
In the proposed method, the performance of image sharpness evaluation function highly affects the accuracy of focal length measurement because the measurement principle is established based on the Gaussian optical formula which is reflected by image sharpness. To evaluate the performance of image sharpness function, the calibration board is fixed, while the CCD sensor gradually moves with different step sizes and captures images simultaneously. The CPBD method is to evaluate the sharpness values at different positions for an approximate 100mm lens. The results of Fig. 6 suggest that 10μm is the least step size between two positions in which case the image sharpness variance can be recognized. The influence of 10μm for a 100mm lens on the measurement accuracy is negligible. The focal length is far larger than the half size of the CCD sensor, so 10μm along the optical axis for a 100mm lens induces 0.4μm change which cannot be recognized by the CCD sensor.
5.2.3. Conducting focal length measurement
In our experimental verifications, a total of four different lenses are used for measurements. Initially, their focal lengths for reference are measured by the parallel light focusing method . Based on this method, their estimated focal lengths are 25mm, 30mm, 70mm and 100mm respectively. Then, the proposed method is implemented according to the procedures given in Section 3. The experiments are conducted at different ZC from 0.6f to f with 0.1f interval and five repeated tests are also carried out at each ZC.
Meanwhile, the aberration types of measured lenses in experiments are pincushion distortion. The f-number is approximately 2 for 25mm and 30mm lenses, 3 for 70mm lens and 4 for 100mm lens which conforms to the requirement of paraxial approximation.
The experimental results of effective focal length (with aberration) and paraxial focal length (without aberration) are shown in Fig. 7. The repeatability error of effective focal length is less than 0.16% and experiments show that error caused by the noise and vibration during experiments is relatively low about 0.015%. It is observed that the effective focal length decreases as the working distance is increased as shown in the dark lines in Fig. 7. This phenomenon is caused by the effect of aberration.
After eliminating the effect of aberration based on Eq. (8), the paraxial focal length of lenses can be obtained. The measurement results of paraxial focal length of four lenses are shown as the red lines in Fig. 7. It can be found that the systematic error of dark lines caused by aberration disappeared and the repeatability error of paraxial focal length is improved, lower than 0.077%.
In this paper, the relative measurement principle based on differentiation of the Gaussian optical formula and the geometrical relationship of the thick-lens model is used to measure the paraxial focal length of a lens. By integrating image processing and feedback control techniques with optical system, the proposed method can be realized with a simple apparatus and achieve high accuracy, flexibility and lower cost. In consideration of aberration, the paraxial focal length can be obtained. Experimental results indicate that the repeatability error of the proposed method is less than 0.077%. Image processing technologies play very important roles in this proposed method. Image sharpness evaluation method CPBD, camera calibration, Harris corner detection and sub-pixel corner detection are utilized in this paper. The process can be implemented automatically. In comparing with the conventional methods, the proposed method possesses the following advantages:
- The thick-lens model fully utilizes resolution of the CCD senor to improve measurement accuracy of focal length.
- System calibration method by algorithms enables the system to be established by simple apparatus that are easy to be implemented.
- System calibration and error compensation by algorithms also increase the measurement accuracy of the system.
- Aberration effect is taken into consideration to obtain the paraxial focal length of a lens. It also further improves the measurement accuracy.
In summary, a flexible and accurate measurement method of paraxial focal length with simple apparatus has been proposed in the paper.
Research Grants Council, University Grants Committee (GRF 16202718).
We are grateful to the editors and reviewers. Their advice helped us improve the quality and readability of paper.
1. R. Kingslake, Applied Optics and Optical Engineering, vol. 1 (Elsevier, 2012).
2. E. Keren, K. Kreske, and O. Kafri, “Universal method for determining the focal length of optical systems by moiré deflectometry,” Applied Optics 27, 1383–1385 (1988). [CrossRef]
3. S. Trivedi, J. Dhanotia, and S. Prakash, “Measurement of focal length using phase shifted moiré deflectometry,” Optics and Lasers in Engineering 51, 776–782 (2013). [CrossRef]
4. K. V. Sriram, M. P. Kothiyal, and R. Sirohi, “Direct determination of focal length by using Talbot interferometry,” Applied Optics 31, 5984–5987 (1992). [CrossRef]
5. P. Singh, M. S. Faridi, C. Shakher, and R. S. Sirohi, “Measurement of focal length with phase-shifting Talbot interferometry,” Applied Optics 44, 1572–1576 (2005). [CrossRef]
6. S. Rasouli, Y. Rajabi, and H. Sarabi, “Microlenses focal length measurement using Z-scan and parallel moiré deflectometry,” Optics and Lasers in Engineering 51, 1321–1326 (2013). [CrossRef]
8. J. Dhanotia and S. Prakash, “Focal length and radius of curvature measurement using coherent gradient sensing and Fourier fringe analysis,” Optik - International Journal for Light and Electron Optics 124, 2115–2120 (2013). [CrossRef]
9. C. Tay, M. Thakur, L. Chen, and C. Shakher, “Measurement of focal length of lens using phase shifting Lau phase interferometry,” Optics Communications 248, 339–345 (2005). [CrossRef]
10. J. Yang, L. Qiu, W. Zhao, and H. Wu, “Laser differential reflection-confocal focal-length measurement,” Optics Express 20, 26–27 (2012). [CrossRef]
11. H.-G. Zimmer, Geometrische Optik (Springer-Verlag, 2013).
12. N. D. Narvekar and L. J. Karam, “A no-reference image blur metric based on the cumulative probability of blur detection (CPBD),” IEEE Transactions on Image Processing 20, 2678–2683 (2011). [CrossRef]
13. Z. Zhang, “A flexible new technique for camera calibration,” Trans. Pat. Anal. Mach. Intel. 22, 1330–1334(2000). [CrossRef]
14. A. Miks and P. Pokorny, “Use of diffraction grating for measuring the focal length and distortion of optical systems,” Applied Optics 54, 10200–10206 (2015). [CrossRef]
15. A. Miks and J. Novak, “Estimation of accuracy of optical measuring systems with respect to object distance,” Optics Express 19, 14300–14314 (2011). [CrossRef]
16. A. Miks, J. Novak, and P. Novak, “Analysis of imaging for laser triangulation sensors under scheimpflug rule,” Optics Express 21, 18225–18235 (2013). [CrossRef]
17. C. Harris and M. Stephens, “A combined corner and edge detector,” in “Alvey vision conference,” 10–5244 (1988).
18. D. Chen and G. Zhang, “A new sub-pixel detector for x-corners in camera calibration targets,” in “WSCG SHORT papers proceedings,” 97–100 (2005).
19. L. Pedrotti, “Basic geometrical optics,” Society of Photo-Optical Instrumentation Engineers, 2017 (2008).