1. Introduction
A camera is an indispensable part of optical measurement systems, and it is the key to realizing fast and noncontact measurements. In particular, color cameras can simultaneously obtain the color texture and three-dimensional (3D) shape information of an object, which substantially improves the measurement speed. However, because of the optical characteristics of lenses, chromatic aberration (CA) exists in the captured images, which seriously affects the quality of the image and the accuracy of the measurement results. Therefore, to improve the measurement speed, and to obtain a precise color texture and the 3D data of an object’s morphology, the correction of the CA for each color channel has become an inevitable and urgent problem.
There are two main approaches to CA elimination. One is hardware design, which usually uses costly fluoro-crown glasses, abnormal flint glasses, or extra-low dispersion glasses [
1]. Using a precise optical calculation, lens grinding, and lens assembly, a lens that focuses light of different colors at the same position is produced, enhancing the clarity and color fidelity of images. The other approach is software elimination, during which the camera captures images and digital image processing is then used to correct the color differences.
Dollond invented two sets and two slices of concave and convex achromatic lenses in 1759, and Chevalier invented a set and two slices of concave and convex achromatic lenses in 1821 [
2,
3]. In 1968 and 1969, Japan’s Canon Inc. synthesized artificial fluorite (CaF
2 calcium fluoride) and developed Ultra-Dispersion (UD) and Super UD glass, launching the Canon FL-F300 F5.6, FL-F500 F5.6, and mixed low dispersion lenses. In 1972, Nikon synthesized an extra-low dispersion lens with a lower CA than that of a UD lens, but this can absorb red light and the brightness is poor [
4]. In 2015, a completely flat, ultra-thin lens was invented by the Harvard School of Engineering and Applied Sciences. The lens can focus different wavelengths of light at the same point and achieve instant color correction in one extremely thin, miniaturized device [
5]. This technology is expected to be applied to optical elements in the future, but the time to market and its price are unknown. Although hardware design can correct CA to a certain extent, it cannot eliminate the color difference completely. In addition, this approach leads to a longer development cycle, higher cost, and heavier camera. Therefore, a simple, fast, and low cost method to effectively correct lens CA is increasingly becoming of interest.
Zhang et al. and Sterk et al. used a calibration image with markers as a reference to calculate the differential displacement of reference points in different colors and then corrected the CA based on certain correction ratios [
6,
7]. However, their accuracy relies on the number of markers. Zhang et al. proposed a novel linear compensation method to compensate for longitudinal CA (LCA) resulting from the imaging lenses in a color fringe projection system [
8]. The precision is improved to some extent, but it is only applicable to the optimum three-fringe number selection algorithm. Willson et al. designed an active lens control system to calibrate CA. The best focus distance and relative magnification coefficients of red, green, and blue channels are obtained. Axial CA (ACA) and LCA are reduced by adjusting the distance between the imaging plane and the lens based on the obtained parameters [
9]. However, the system is complicated and it is difficult to ensure precision. Boult et al. used image warping to correct CA. First, the best focus distance and relative magnification coefficients are acquired using the active lens control system [
9]. Then, these parameters are used in the image warping function to calibrate CA in the horizontal and vertical directions [
10]. This method needs an external reference object as the standard of deformation: obtaining more feature points leads to better processing results. Kaufmann et al. established the relationship between the deviation of red, green, and blue channels caused by LCA and pixel position with the help of a black and white triangular mesh, and then used least-squares fitting to effectively compensate for LCA [
11]. The method’s precision is affected by the frequency of the triangular mesh. Mallon et al. calibrated LCA between different color channels using a high-density checkerboard [
12], but did not achieve full-field calibration. Chung et al. used an image to eliminate color differences. Regardless of whether the color stripe is caused by axial or lateral CA, they regarded the green channel as the benchmark and first analyzed the behavior of the image edge without CA. Then, the initial and final pixel positions of the color differences between the green and red channels, as well as between the green and blue channels, are obtained. Finally, CA is determined and corrected using the region above the pixel of interest [
13]. This method can eliminate obvious color differences in the image, but it is not good for regions with no obvious color differences. Chang et al. proposed a method of false color filtering to improve the image blurring and chromatic stripes produced by both ACA and LCA [
14]. Although the method can correct ghosting caused by color differences, its process is complicated and some parameters must be set empirically. Therefore, the existing methods cannot completely remove CA in a color image. Huang et al. calibrated the error of a camera and projector caused by LCA by extracting the centers of different color circles that were projected onto a calibration board. This method can obtain the errors of limited positions, but still needs to acquire the other positions by interpolation [
15].
Phase data methods based on fringe projection profilometry have been widely applied to the 3D shape measurement of an object’s surface because of the advantages of a full-field measurement, high accuracy, and high resolution. When fringe patterns are coded into the different major color channels of a DLP (digital light processing) projector and captured by a color CCD camera, the obtained absolute phase data have different values in each color channel because of CA. Hence, the phase data are related to CA and can be used to calibrate CA using full-field absolute phase maps. Two common methods of calculating the wrapped phase data are multi-step phase-shifting [
16] and transform-based algorithms [
17]. Although a transform-based algorithm can extract the wrapped phase from a single fringe pattern, it is time consuming and acquires less accurate phase data. Therefore, the four-step phase-shifting algorithm is used to accurately calculate the wrapped phase data [
18]. To obtain the absolute phase map, many spatial and temporal phase unwrapping algorithms have been developed [
19,
20,
21,
22,
23,
24,
25,
26]. By comparing the absolute phase map in different color channels pixel by pixel, full-field CA can be accurately determined.
This paper presents a novel method to calibrate and compensate for CA in color channels using absolute phase maps. In contrast to the above correction methods, accurate full-field pixel correspondence relationships among the red, green, and blue channels can be determined by comparing the unwrapped phase data of the three color channels. In the rest of the paper,
Section 2 describes CA behavior, explains the principle of the proposed method, and analyzes the systematic error.
Section 3 shows the results obtained using simulated and experimental data. The conclusions and remarks regarding future work are given in
Section 4.
3. Experiments and Results
To test the proposed method, an experimental system has been setup, as illustrated in
Figure 7. The system includes a liquid crystal display (LCD) screen, a CCD color camera, and a PC. The computer is connected to the camera and the LCD screen by a gigabit Ethernet cable and HDMI (high definition multimedia interface), respectively. This setup generates the circular fringe patterns, and saves and processes the data captured by the camera. The camera is used to capture the images displayed on the LCD screen, and the LCD screen is used to display the images generated by the computer.
Before calibrating the LCA of the lens, the system needs to satisfy two conditions. One is that the LCD is parallel to the image plane, the other is that the principal point of the camera is in alignment with the center of the circular sinusoidal fringes. These conditions can be satisfied as follows. First, the intrinsic parameters of the CCD camera are calibrated using a checkerboard by using the Camera Calibration Toolbox for Matlab [
29]. Second, a picture of the checkerboard is generated by software, displayed on the LCD screen, and captured by the CCD camera. The size of the checkerboard can be obtained because the unit pixel size of the LCD is known. The external parameters (3D position of the checkerboard in the camera reference frame, i.e., R and T matrices) and the angle between the LCD and image plane of the camera in the
X,
Y, and
Z directions can also be computed. They provide the basis for the parallel adjustment by using a three-axis rotary table. Moreover, the angle
between the normal vector of the image plane and LCD can be used to evaluate the parallelism of adjustment, which can be obtained using the following equation:
where
is the normal vector of the LCD and
is the normal vector of the image plane of the camera.
Finally, blue orthogonal fringes are displayed on the LCD and captured by the CCD camera to acquire the position relationship so that the principal point of the camera corresponds to the row and column coordinates on the display screen. It can be achieved according to the procedure of
Figure 6 in
Section 2.4. After obtaining the unwrapped phase of the principal point, its corresponding row and column coordinates on the LCD can also be computed through the inverse operation of Equation (8). Then, the corresponding row and column coordinates are taken as the center to generate circle fringes and are displayed on LCD. Therefore, the two conditions above are both satisfied. The proposed CA calibration method was tested using simulated data first and then actual experimental data.
3.1. Simulation
Twelve closed circular sinusoidal fringes patterns with a resolution of 768 × 1024 were generated and modulated into the red, green, and blue channels of the LCD screen. The sequence was 32, 31.5, and 28, and the phase shift step was
. Wrapped and unwrapped phases can be precisely computed using the four-step phase-shifting algorithm and the optimum three-fringe number method. Moreover, it is obviously known that 32, 31.5, and 28 are not the optimum three-fringe numbers, but because the fringes are circular, the unwrapped phase can be obtained using the optimum three-fringe numbers 64, 63, and 56 in the simulation [
24]. The average intensity, fringe contrast, and intensity noise of the fringes generated by the computer are 128, 100, and 2.5%, respectively, and the principal point of the camera is at (384, 512). To obtain fringes with different magnifications, the phase per pixel in the LCD screen of the red, green, and blue channels are 0.1971, 0.1963, and 0.1952, respectively.
Figure 8a shows the original composite fringe pattern image, where the color stripes are clearly far away from the principal point. The original unwrapped phases of the red, green, and blue channels are different, as shown in
Figure 9a,d.
Figure 9b,e shows the pixel deviation maps caused by the CA of the lens between red and blue channels and between the green and blue channels, respectively. These results verify the effectiveness of the proposed method because the phase deviations are decreased, as shown in
Figure 9c,f, and the color stripes are greatly eliminated, as shown in
Figure 8b.
3.2. Experiment Results for CA Compensation
Figure 10 shows the experimental system. This system mainly consists of off-the-shelf components: an SVCam-ECO655 color camera with a 2050 × 2448 resolutions and 3.45 × 3.45 ums pixel pitch, a CCTV (closed circuit television) zoom lens with a focus length of 6–12 mm and an adjustable aperture, and an LP097QX2 TFT-LCD display (LG) with a physical resolution of 1536 × 2048 and pixel pitch of 0.096 × 0.096 mm. Its color filter is distributed as a strip. It will have the phenomenon of a moire fringe when the camera directly looks at the LCD screen. In order to solve this problem, a holographic projection film was attached to the LCD screen surface.
The normal vector of the LCD display plane in the camera reference frame is (−0.009510, −0.005589, −0.999939), so the angle between the camera target and LCD display is 0.6320°.
Figure 11 shows the wrapped and unwrapped phase maps from the captured fringe patterns in the red channel of the color camera, where its distribution is circular.
Figure 12 shows the fringe patterns in the 90° direction of the captured image, where
Figure 12a is the original fringe pattern affected by CA, and
Figure 12b,c is the enlarged image and brightness curve of the red area in
Figure 12a, respectively. Correspondingly,
Figure 12d–f are the images after correction. It can be seen in
Figure 12e that the purple stripes in
Figure 12b are reduced, and the intensity curve of the three channels coincide after compensation using the proposed method.
Figure 13 shows the original unwrapped phase deviations caused by CA and phase deviations after CA correction between the red and green channels, and between the blue and green channels in the 90° direction of the captured image, respectively. It is known that the unwrapped phase deviation of the three channels is greatly reduced after correction.
Figure 14 shows the original closed circular sinusoidal fringe patterns affected by CA, and (b) is the enlarged image of red area in (a). After compensation, the color stripes are not obvious, as illustrated in (c) and (d).
Figure 15 demonstrates the unwrapped phase deviation before and after CA compensation for the red, green, and blue channels. It is clear that the phase deviations between the red and blue channels, and between the green and blue channels, are reduced after CA correction.
When qualitatively compared to the CA correction methods based on identification points in Refs. [
12,
15], the proposed method built the full-field corresponding relationship of the pixel by pixel deviation caused by CA among the three color channels. However, the methods in Refs. [
12,
15] can only obtain the CA at discrete points, and the accuracy depends on the density of the checkerboard pattern and circle. In order to qualitatively evaluate the performance, the method in Ref. [
13] was applied to the captured closed circle sinusoidal fringe patterns. The PSNR (peak signal-to-noise ratio) of the image was calculated after CA correction using both methods, as shown in
Table 1. The PSNR of the proposed method is larger than the method in Ref. [
13]. Therefore, the proposed method gives better results than that in Ref. [
13].
3.3. Systematic Error Analysis
Table 2 shows the phase deviations of the principal point in the horizontal and vertical directions among the red, green, and blue channels of fringes for the same sequence at different positions on the LCD. It shows that the phase deviation between the red and green channels is less than 0.15, and the phase deviation between the green and blue channels is larger than this. Moreover, phase deviations in the vertical direction are far smaller than in the horizontal direction, verifying the above analysis.
Table 3 shows the pixel deviations in the horizontal and vertical directions among the red, green, and blue filters of the LCD. The pixel deviation in the horizontal direction between the red and green filters is near 0.32, and it is 0.44 between the green and blue filters. Moreover, the pixel deviation in the vertical direction is very small, with a value of about 0.05.
Table 4 shows the phase deviations of the principal point in the horizontal direction among the red, green, and blue channels for different sequences and the same LCD position. It shows that as the fringe sequence increases, the phase deviation among the three channels increases. The phase data can also be converted to a pixel deviation among the three color filters of the LCD.
Figure 16 shows the phase deviations caused by systematic errors and the CA at the middle row.
Figure 16a shows the original deviations and
Figure 16b shows the deviations after compensating for the systematic errors introduced by the LCD. These results show the validity of the analysis in
Section 2.2.
4. Conclusions
This paper presented a novel method for full-field calibration and compensation for CA among the red, green, and blue channels of a color camera based on absolute phase maps. The radial correspondence between the three channels is obtained using phase data calculated from closed circular sinusoidal fringe patterns in polar coordinates, and pixel-to-pixel correspondences are acquired in Cartesian coordinates. CA is compensated for in the vertical and horizontal directions with sub-pixel accuracy. Furthermore, the systematic error introduced by the red, green, and blue color filters of the LCD is analyzed and eliminated. Finally, experimental results showed the effectiveness of the proposed method. Compared to the existing CA correction methods based on discrete identification points, the proposed method can ascertain the full-field pixel deviations caused by CA. Moreover, the PSNR of the proposed method is larger, so it gives better results. Because the CA varies with the distance from the tested object to the camera, the CA of several different depths will be calibrated and used to obtain the CA of the three channels of each depth through interpolation. Therefore, the relation between the CA and the distance from the tested object to the camera should be determined in future work. It can then be used to correct the effect of CA when different shapes of objects are measured.
The proposed calibration method can accurately and effectively determine the axial and radial CA for each pixel in a captured image. Using the calibrated results, one can completely eliminate CA displayed by the color images captured by color cameras. Therefore, compared to the existing methods, the proposed method has the following two advantages: (1) High resolution. Since the full-field images are used to calculate every pixel’s deviation between color channels, the obtained CA has a high resolution; and (2) High accuracy. The obtained CA is produced from a continuous phase map, so it has a high accuracy.