A light field measurement system through PSF estimation by a morphology-based method

Light field imaging technology can obtain three-dimensional (3D) information of a test surface in a single exposure. Traditional light field reconstruction algorithms not only take a long time to trace back to the original image, but also require the exact parameters of the light field system, such as the position and posture of a microlens array (MLA), which will cause errors in the reconstructed image if these parameters cannot be precisely obtained. This paper proposes a reconstruction algorithm for light field imaging based on the point spread function (PSF), which does not require prior knowledge of the system. The accurate PSF derivation process of a light field system is presented, and modeling and simulation were conducted to obtain the relationship between the spatial distribution characteristics and the PSF of the light field system. A morphology-based method is proposed to analyze the overlapping area of the subimages of light field images to identify the accurate spatial location of the MLA used in the system, which is thereafter used to accurately refocus light field imaging. A light field system is built to verify the algorithm’s effectiveness. Experimental results show that the measurement accuracy is increased over 41.0% compared with the traditional method by measuring a step standard. The accuracy of parameters is also improved through a microstructure measurement with a peak-to-valley value of 25.4% and root mean square value of 23.5% improvement. This further validates that the algorithm can effectively improve the refocusing efficiency and the accuracy of the light field imaging results with the superiority of refocusing light field imaging without prior knowledge of the system. The proposed method provides a new solution for fast and accurate 3D measurement based on a light field.


Introduction
Light field imaging technology is an important branch of computational optics that can obtain high precision * Author to whom any correspondence should be addressed.
Original content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. three-dimensional (3D) topography in a single exposure. Compared to traditional surface detection methods, light field imaging has the advantages of high precision, noncontact detection, and high efficiency. Light field imaging is an indirect imaging technology that has been proposed in the last century to calculate the spatial information of an imaging space by recording the light propagation direction. A light field system based on a microlens array (MLA) can obtain 3D measurement results through a single exposure [1]. In addition, images of different depths can be obtained by reconstruction algorithms such as ray tracing based on geometrical optics and the epipolar plane images (EPIs) [2]. In 2006, Levoy et al proposed light field microscopy and applied it in biological observation [3], and then combined it with a projector and a second MLA to expand the application of the light field system [4].
When a light field system is combined with a microscopic system, the depth resolution and the resolution of refocused images will be affected by the diffraction limit. For an optical imaging system, the point spread function (PSF) is an important performance parameter used to evaluate the imaging of the system. Moreover, the collected light field images can also be regarded as the images blurred by the imaging system, and the original image in object space can also be reconstructed through the deconvolution of the PSF. In the existing literature, PSF models can be divided into PSF based on geometrical optics and PSF based on wavefront optics. The simulation can be established based on the Debye model, and some researchers have obtained the PSF of a light field system via simulation and experimentation, which are time-consuming and need to consider the positioning errors of the components of the light field system [5][6][7]. Chen et al [8] introduced aberrations to the simulation of the PSF to improve the depth resolution of a light field system. Furthermore, the diffraction of a light field system cannot be ignored. The geometrical optics cannot be applied to the calculation of a light field system's PSF due to the introduction of an MLA. The position of the MLA also affects the accuracy of the reconstruction result. The light field system is a partial variant system, which means that the diffraction pattern behind the MLA changes depending on the spatial position of the point source [9,10]. This makes it difficult to determine the light field system's PSF, and assembly errors will be generated with the introduction of an MLA, which will lead to inaccurate PSF estimations and affect the reconstruction result of the light field image.
In this paper, in order to deeply understand the PSF of a light field imaging system, a calculation method is described and derived based on a signal error model. The PSF of the light field imaging system is modeled and simulated, and the spatial distribution characteristics are analyzed. The results show that the intensity distribution of the image space can be calculated by using the PSF. Then, a morphology-based method is proposed based on subimage template matching, and accurate parameters of the light field imaging system can be figured out to obtain an accurate PSF of the system by analyzing the light field image. Finally, a light field measurement system measuring a standard step and a microstructure is built to verify the validity of the algorithm. The experimental results show that the method can improve the measurement accuracy of a light field system.

Light field deconvolution algorithm
For a light field system, the acquisition process of a light field image can also be regarded as a degradation process of the object image. By obtaining the accurate PSF of the light field system, the original information of the object can be obtained by the deconvolution algorithm. Presently, common deconvolution algorithms can be divided into three categories: linear deconvolution algorithms, blind deconvolution algorithms and the Lucy-Richardson (L-R) algorithm [11][12][13]. Generally, linear deconvolution is fast and effective in some cases when image degradation is not serious, which can simplify the calculation. However, linear deconvolution is sensitive to noise signals and has a poor image recovery effect in high frequency regions.
For blind deconvolution algorithms, the initial image and PSF are usually unknown. At present, blind deconvolution algorithms can be divided into two categories: stochastic algorithms based on Bayesian frameworks and deterministic methods based on non-Bayesian frameworks. Blind deconvolution algorithms are based on the established model and the selected derivation methods based on prior knowledge [13]. However, light field images have uncommon PSFs, so complicated mathematical modeling and PSF needs to be updated repeatedly in the operating process, which is complicated and time-consuming. Therefore, a common blind deconvolution algorithm is not used to conduct refocusing operations on light field images.
The L-R algorithm is an image deconvolution algorithm based on iterative operations. Its final operating results converge to the maximum likelihood solution via Poisson statistics. In the operating process, the L-R algorithm assumes that the image, the PSF, and the original image are satisfied with a certain statistical probability model. According to Bayesian theory, the original image can be recovered through multiple iterative operations, and its expression is: where p( f |g) represents the estimated value of the original image, p(g| f ) represents the PSF, p( f ) represents the original image that needs to be reconstructed, and p(g) represents the light field image. Then, a Poisson random field is used to model the image. Given the original image and the PSF, each of the above values is assumed to be independent of each other. Then: According to equation (2), the maximum likelihood estimation is used to derive the expression of the original image as follows: Assuming that ∂ ∂f(x,y) [ln P (g| f )] = 0, the following equation can be obtained: Since the L-R algorithm is a multiplication iterative algorithm based on a gradient, by solving equation (4), the (n + 1)st iterative solution of the image can be expressed as: After the accurate PSF is obtained through the above analysis, the maximum likelihood solution of the clear original image is obtained, which can be expressed as the following formula: * f n (x, y) .
(6) In summary, the L-R algorithm can be used to reconstruct original light field images. However, the premise is to obtain a more accurate PSF of a light field system.

PSF of a light field system
For the PSF of an optical system, the current solutions of the PSF model include PSF models based on geometric optics and those based on wavefront optics [14]. As mentioned above, a light field system is affected by system diffraction, and the current PSF model cannot be applied to a light field system without prior knowledge of the introduced MLA. Therefore, a PSF model of a light field system based on wavefront optics needs to be established to determine the accurate PSF of the light field system. In the existing literature, the PSF is determined mainly through the two approaches of simulation and experimentation. The experimental method used to obtain the PSF of a light field requires that the fluorescent imaging particles are smaller than the diffraction limit, which is difficult to implement in actual experiments. The method also needs to consider the PSF system's calibration, which will cause the acquisition of the PSF to be very time-consuming. The efficiency of acquiring the PSF via theoretical calculations is much higher than that through the experimental process, the adaptation of different systems can be realized by changing the system parameters, and the stability via theoretical calculations is also higher than the experimental measurement results. Therefore, the PSF expression of a light field system is obtained via theoretical calculations in the present study.
The imaging process can be regarded as the imaging process of multiple point light sources at different spatial locations. To obtain the PSF of a light field system, the imaging process of the point light source is derived from the distance of the image surface to the sensor. In the simulation process, it is assumed that the intersection of the objective lens is the origin and the optical axis of the system is the Z-axis; hence, the coordinate system is established, as shown in figure 1. Then, the z-coordinate of the objective plane equals 0. When Z is positive, it means that the imaging point is defocused and close to the objective lens of the system. Similarly, when Z is negative, the imaging point is defocused and far from the objective lens. The point light source emits spherical waves. The propagation process of light can be divided into three parts: (a) The spherical wave propagates to the MLA surface through the objective lens and tube lens of the microscope. In the theoretical derivation, it is assumed that the system is a diffracted limited system, and the spherical wave of the point light source (x,y,z) in space turns into a converging spherical wave after passing through the objective lens and the tube lens. According to the diffraction theory of wavefront optics [9], the spherical wave expression of the light wave on the MLA plane can be deduced as follows: where x, y, and z represent the spatial coordinates of the point light source; r and a represent the radial and axial coordinates of the point light source at the object surface, respectively; f o represents the focal length of the objective lens; λ is the wavelength of the light that is transmitted; M is the magnification ratio of the objective lens; half of α is the incident angle of the object lens, which can be expressed as α = sin −1 (NA) and is suitable for the numerical aperture of the objective NA; ρ is the normalized radial coordinate of the aperture of the objective lens; P (ρ) is the normalized pupil function of the system; J 0 is a zero-order Bessel function; and s and t are the coordinate values of the point light source on the MLA plane.
(b) Light travels though the MLA plane. In the theoretical derivation, the MLA can be reduced to a two-dimensional comb function. In this derivation, the MLA is assumed to be orthogonal, and the aperture of each sublens can be regarded as a square aperture. Then, the transmittance ratio of the MLA can be expressed as: where T(x,y,z) represents the relationship between the transmittance and spatial position of the MLA, and rect represents the function of the square aperture. The value of the points inside the square is 1, while the value of the points outside the square is 0. comb represents a comb function; and f µ and D represent the focal length of the MLA and the aperture of the sublens, respectively. When the spherical wave reaches the MLA plane and passes through the MLA, its wavefront distribution U ′ (x, y, z) can be expressed as: (c) The spherical wave reaches the plane of the sensor after passing through the MLA. The process of spherical waves arriving at the plane of the sensor after propagating in space can be regarded as Fresnel diffraction. Then, according to the Fresnel diffraction formula, the wavefront distribution U ′ ′ (x, y, z) on the sensor plane can be expressed as: where K is a wave vector, which can be calculated using the formula k = 2π/λ; and u and v are the coordinates corresponding to the point light source on the sensor plane. The Fourier transform is applied to the above formula. The frequency domain of equation (10) can be expressed as: The spatial frequencies corresponding to the plane coordinates of elements u and v are expressed in equations ξ = u/ (λf u ) and η = v/ (λf u ), respectively. F and F −1 represent the Fourier transform and the inverse Fourier transform, respectively. The light intensity distribution on the plane of the sensor can then be expressed as: According to equations (7)- (14), the PSF corresponding to different spatial positions in a light field system can be calculated.

Simulation of the PSF of a light field
Using the above calculations, the simulation of the PSF of a light field system setting with appropriate parameters is conducted using MATLAB ® software. The parameters for the light field system are shown in table 1. Using the parameters in table 1 and equations (7)- (14), the PSF of a light field system is modeled and simulated. The simulation is divided into two parts: the simulation of the PSF at different depths on the optical axis and the simulation of the PSF at different spatial positions at the same depth.

PSF of a light field system at different depths on the optical axis
In the simulation process, the parameters of the spatial locations of the x and y coordinates are set to 0, which can be seen as the point light sources on the optical axis. By changing the z coordinate values, several images are calculated in the simulation, which represent the light field PSFs on the axis at different depths. The simulation results are shown in figure 2. To guarantee the visibility of the PSFs, the PSFs of the image are in the scope of the middle part of the light field, and the PSF image is 200 × 200 after cropping. Figure 2 shows the PSF images corresponding to depths varying from 0 to 240 µm. As the images show, when the depth ranges from 0 to 60 µm, the PSF is a circle. In this case, the light only passes through a sublens in the MLA during the propagation process, and so it is consistent with the traditional imaging system. When the depth is greater than 60 µm, it can be seen that the PSF is no longer a circle, but rather that it consists of a number of discrete round spots, and this is due to the introduction of the MLA when the light travels through several sublens. As the depth information continues to increase, the shape and number of discrete spots change. Therefore, according to the shape and quantity distribution of the PSF of the light field, the depth information can be deduced by the PSF. Figure 3 is a schematic diagram of the selection of different spatial locations at the same depth. As shown in figure 3(a), the selected nine points correspond to the four corners and four midpoints of the sides of the lattice divided by the aperture, and one center point of the sublens. Figure 3(b) is the PSF of light field points at different spatial positions at the same depth (z = 120 µm). The nine selected points are used to calculate the diffusion function of light field points at different spatial positions at the same depth. As shown in the above figure, for the PSF of the light field, the PSF images corresponding to different spatial positions do not meet the requirements of spatial translation and deformation, which is inconsistent with the traditional optical imaging system. However, if the two points are symmetric about the center of the sublens, the PSF image is symmetric about the sublens image. Similarly, the PSF images of symmetric points about the center of any sublens in the MLA are also symmetric.

PSF of the light field system at different positions at the same depth
The PSF images at different spatial locations were calculated from z = 0 µm to Z = 240 µm, and the results are shown in figure 4, where the depth increases from left to right. With the constant change of depth, the PSF of the image on the optical axis shape changes from similar to that of a single round shape with the traditional optical imaging system to multiple points that change gradually. As the depth increases, the PSF images diverge even more. The cause of this phenomenon is that the image of the point light source in the focal plane gradually widens as the depth increases, and the covered area also gradually increases. Since the MLA is arranged periodically, the PSF of the light field system should also be distributed periodically in space. Similarly, the imaging of the off-axis points also meets this law, and the PSF image shapes and spatial positions at different positions are centrally symmetric with respect to the points on the optical axis.
From the above two simulation results, it can be seen that when the PSF image of the light field is obtained, its depth coordinates can be determined by comparing its shape, and the x and y coordinates of the PSF image in space can also be determined by the position of the sublens corresponding to the PSF image of the light field. Then, the deconvolution algorithm will be used to reconstruct the original image according to the obtained PSF image of the light field.

PSF acquisition
For a light field system, the hardware parameters are usually known. However, in the system construction process, the precise positions of system components usually cannot be guaranteed. The information directly obtained from the light field image includes the resolution of the light field image, the number of sublens involved in the imaging process, and the number of pixels covered by each sublens. Thus, in the actual experiment, the exact position of the components, especially the MLA, directly affects the accuracy of the PSF. Therefore, the exact location of the MLA needs to be ensured to reconstruct the refocused image.
According to the principles of a light field system, the placement position of the MLA is directly related to the light field image. Based on the placement position of the MLA, the light field system can be divided into light field 1.0 and light field 2.0 [15]. As shown in figure 5, when the MLA is placed on the focal plane of the main lens, as shown in figure 5(a), it is called the light field 1.0 system. The distance between the detector plane and the MLA plane is the focal length of the MLA. Under this circumstance, each subimage in the light field image is tangent to each other, and there is no overlapping image. When the MLA is placed after the focal plane of the objective lens, it is called the light field 2.0 system. The distance between the MLA plane and focal plane of the objective and that between the MLA plane and the sensor plane satisfy the Gaussian imaging formulas, which ensures that the light after the MLA is gathered in the detector plane to guarantee the spatial resolution of the light field image.
For the light field microscopy proposed by Levoy, the light field microscope meets the light field 1.0 system. The MLA should be at the focal plane of the main lens, and the corresponding parameters can be put into equations (7) and (14) to obtain the PSF of the light field system.
For the light field 2.0 system, the position of the MLA is always difficult to determine. Therefore, obtaining the exact position of the MLA becomes the research focus. For the subimages of the light field 2.0 system, although the subimages are tangent to each other, there will be overlapping areas between each subimage. By calculating the overlapping sublens image, the magnification of the sublens to the image can be solved, and then the exact position of the MLA can be solved using a Gaussian formula when the focal length is known where f represents the focal length of the MLA, a represents the distance between the MLA plane and the focal plane of the objective lens, and b represents the distance between the MLA  plane and the CMOS plane. After that, a and b are fed back into equations (7)-(14) by changing the propagation distance of the wavefront (z). This generates accurate PSF images of the light field system. How to obtain the overlapping area of two subimages is related to the image registration problem. Image registration is a typical problem in the image processing field. The purpose of image registration is to compare or fuse images acquired from the same object under different conditions [16,17]. The purpose of image matching is to ensure that two or more images of the same object are in the same position to realize the exact correspondence to achieve image fusion. Image registration methods can be divided into three categories according to their types, which are feature-based matching methods, domain transformation-based methods, and grayscale and template-based methods.
A feature-based image matching method needs to extract the features in the image, then generate the feature operator, and finally use the similarity between each image and the feature operator to complete the image matching. The resolution of a light field image is low, which means that the feature points or feature edges appearing in the image are not obvious, and it is difficult to extract the features using an image recognition algorithm. An image matching method based on the domain transform usually uses the Fourier transformation to match images in the frequency domain. For subimages of light field images, the directly overlapping part of the image is usually linear, and rotation and scaling do not occur. Therefore, the matching algorithm based on the domain transformation is not applicable to the registration of light field subimages.
For grayscale and template matching-based methods, correlation operations and other methods are directly used to solve the correlation between subimages. By determining the correlation, the overlapping area of two images can be calculated. For light field images, the resolution of subimages is low, and so the template matching algorithm can be used to calculate the overlapping area of subimages. Common template matching algorithms include the following: the mean absolute difference (MAD), the sum of absolute differences, the sum of squared differences, etc. In this paper, the MAD algorithm is used for image matching.
The similarity formula of the MAD algorithm is expressed as follows: where S is the comparison image; T is the selected template; the image resolution of S is m × n; the image resolution of T is M × N; and (i j) is the spatial coordinate of the template for matching, and it satisfies 1 ⩽ i ⩽ n − M + 1, 1 ⩽ j ⩽ n − N + 1.

Experiments and discussions
To verify the effectiveness of the proposed algorithm, a light field system was built, as shown in figure 6. A 10× objective lens (Mitutoyo Plan Apo Infinity Corrected Long WD from Edmund Optics) with a long working distance of 34 mm was used in the light field system. The tube lens was an MT-4 from Edmund Optics, and it was connected to the back of the objective lens. The relay lens used in this system was 1:1 with a focal length of 30 mm. The MLA used in this system was made from fused silica with a focal length of 5.1 mm, and the aperture of the sublens was 300 µm. The camera was a CMOS EO-4010 from Edmund Optics with a resolution of 2048 × 2048 and the pixel size of 5.5 µm. The parameters set in the simulation experiment are shown in table 1. The sample to be measured was placed on a two-dimensional translation platform. The samples to be tested included a standard step and a microstructure.
The flowchart of this experiment is shown in figure 7. The resolution of the detector plane can be determined via the imported original light field image captured directly by the CMOS of the light field system. The edge recognition algorithm was used to obtain the sublens edge of the light field image to extract the corresponding sublens image. The aberration correction algorithm was used to correct the light field image [18]. Through the edge recognition algorithm, the number of sublenses involved in the imaging of the light field system was calculated as S × T. The light field image was segmented to obtain separate subimages, and the MAD algorithm was used to calculate the overlapping area of the image. After conversion, the magnification M' of the MLA to the image was obtained. Since the light field image can be regarded as the reimaging of the focusing surface image of the MLA, the object distance and image distance of the focal surface relative to the MLA can be obtained according to the image magnification and Gaussian imaging formula; thus, the accurate position of the MLA in the light field system was determined. Using the parameters obtained in equations (7)- (14), the PSF of the light field system was calculated. The calculated PSF of the light field system was taken as the convolution kernel of the light field image after aberration correction. The L-R deconvolution algorithm was used to obtain the refocused images of the light field image at different depths.
To verify the effectiveness of the algorithm, a standard step was measured using the built light field system. The schematic diagram of the standard step is shown on the top-left side in figure 8(c), and the nominal value of the measured height was 0.2 mm, with a calibrated value of 0.2004 mm according to the product specification. Figure 8(a) is the light field image of the standard step taken by the light field system. After aberration correction and edge recognition, the extracted subimage is shown in figure 8(b). The image edge was selected as the grayscale template for image registration, and then the accurate position of the MLA in the light field system was calculated. In image registration and calculation, the edge of subimages is selected as the template for template matching between adjacent images. As shown in figure 8(b), the intermediate image is regarded as the image to be matched. The subimages to the right, left, above, and below were used to calculate the similarity. The calculated results were normalized and are shown in figure 8(c), where X1, X2, Y1 and Y2 correspond to the four directions of the imaging registration. The x-axis is the number of pixels, and the y-axis is the normalized numerical gray value calculated by the MAD algorithm.
From figure 8(c), the image reaches the highest similarity when the number of pixels is 72, which means that the image magnification of the MLA is 0.2. At a focal length of f = 5.1 mm and a magnification of b/a = 0.2 of the MLA, a = 30.6 mm, and b = 6.12 mm. These parameters were inserted into equations (7)- (14), and then the PSF of the light field system was calculated.
Compared with the traditional light field image reconstruction algorithm and depth extraction algorithm based on the EPI, the deconvolution algorithm based on the light field PSF was more efficient since it does not need to track each light ray separately and image reconstruction is carried out in the frequency domain. The light field PSF obtained in the above steps was taken as the deconvolution kernel of the L-R deconvolution algorithm to reconstruct the light field images at different depths, and the results are shown in figure 9.
As seen from figure 9, the surface of the refocused image gradually changes from the left plane to the right plane as  the depth changes, indicating that there is a height difference between the two planes. To compare the accuracy of this method with that of the traditional light field reconstruction algorithm (the traditional light field reconstruction algorithm mentioned is the ray tracing algorithm based on 4D light field), the light field image is reconstructed both by the traditional light field refocused algorithm [19] and the proposed deconvolution algorithm based on the light field PSF, as shown in figure 10.
The normal height of the standard step was 200.4 µm, and the measured step height obtained by using the traditional light field refocusing algorithm was 196.5 µm. The light field image was reconstructed by the proposed deconvolution algorithm in this paper, and the obtained step height was 202.7 µm. The deviation from the normal value was reduced from 3.9 µm to 2.3 µm, or the measurement error decreased by 41.0%. The running time of the traditional algorithm for a single light field image was 1.33 s, while that by the proposed PSF deconvolution for the refocused image was 0.88 s, which shows the computational efficiency improved by 33% (Software: Matlab 2018b; Platform OS: MS Windows 10 Pro 64; i7-4790, RAM 32GB).    The test standard step was also measured using a digital microscope with a large field depth (Keyence VHX-5000) to determine the 3D residuals between the reconstructed image and the Keyence measurement, and the results are shown in figure 11.
The residual errors were analyzed, and the peak-to-valley (PV) value and root mean square (RMS) value were calculated to compare the accuracy of the reconstructed depth image of the two methods. The results shows that by using the depth image obtained by the proposed PSF deconvolution algorithm, the PV value decreased from 60.7 µm to 31.9 µm, which is a 47.4% decrease. The RMS increases slightly from 6.7 µm to 7.1 µm with a small change in the overall stability. This proves that the light field reconstruction algorithm proposed in this paper can improve the accuracy of the reconstructed depth image.
Another microstructure was also measured by the system. The schematic diagram of the microstructure is shown in figure 12, and the design parameters are: W 1 = 450 µm and W 2 = 450 µm. The observation area is within the red box in figure 12. The reconstructed image and residuals between the reconstruction results and depth map obtained by Keyence are shown in figure 13. Figure 13(a) shows the depth map obtained directly by Keyence which was taken as a reference depth image. Figure 13 and (d), respectively. Two parameters, the PV and RMS, were calculated for the residuals. The PV decreased from 24.0 µm to 17.9 µm, which is a 25.4% decrease; and the RMS decreased from 3.4 µm to 2.6 µm, which is a 23.5% decrease. This indicates that the proposed method can obtain a more accurate measurement result than the traditional method.
The experimental results show that the deconvolution algorithm based on the light field PSF proposed in this paper is more efficient and more accurate than the traditional reconstruction algorithm. Accurate parameters of the system can be deduced by the overlapping area of subimages to obtain the accurate PSF of the light field system. Then, the precise depth reconstruction image of the light field image can be obtained by the deconvolution algorithm. Therefore, the algorithm can also refocus light field images even without prior knowledge of the system. This is another advantage of the proposed method.

Conclusions
The traditional light field reconstruction algorithm requires the actual system parameters to obtain an accurate depth map, which is time-assuming and always results in more errors in the system. This paper proposed a deconvolution algorithm based on the light field PSF and a morphology-based method to analyze the overlapping area of subimages of light field images to obtain the accurate spatial location of the MLA. Based on wavefront optics, the numerical calculation of the PSF of the light field system was analyzed and deduced. Through simulation experiments, it was found that the PSF of the light field system satisfies a periodic distribution and that its changing period directly relates to the diameter of the sublens. The assembly error of the MLA leads to the estimation error of the PSF. After using the grayscale template matching-based method, the overlapping area of the subimages was solved to calculate the actual position of the MLA to accurately calculate the PSF of the light field system. A light field system was built to verify the effectiveness and accuracy of the proposed algorithm. The experimental studies show that the measurement accuracy increased over 41.0% compared with the traditional method through a step standard, and the accuracy of parameters also improved through a microstructure measurement with a PV value of 25.4% and RMS value of 23.5% improvement. This further validates that the algorithm can effectively improve the accuracy of the light field imaging results and perform the refocusing operation of light field imaging without prior knowledge of the system, enhancing the measurement efficiency. This study provides a new solution for fast and accurate 3D measurements based on light fields in precision metrology.