A lateral chromatic aberration correction method for a dual-prism virtual binocular vision system
Patent Information
- Application Number
- CN202311321426.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-10-13
AI Technical Summary
[0027]本发明的优点和积极效果是:
Smart Images

Figure CN117278821B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing methods, specifically a lateral chromatic aberration correction method for a dual-prism virtual binocular vision system. Background Technology
[0002] Virtual binocular vision systems based on double prisms are widely used in medical endoscopy, microscopic 3D measurement, and strain measurement due to their compact structure and the fact that image acquisition does not require external triggering synchronization. The imaging principle of the system is as follows: Figure 1 As shown, a biprism is placed in front of the camera lens. After the light is refracted by the biprism, it is captured by the camera and forms a stereoscopic image. The imaging process can be equivalent to a pair of stereoscopic images captured by two virtual cameras.
[0003] However, biprisms introduce lateral chromatic aberration during imaging, manifesting as color artifacts at object edges. The primary cause of these artifacts is the double refraction of light as it enters and exits the biprism. Different colors of light, due to their different wavelengths, cause dispersion after refraction. This dispersed light, projected onto the camera's imaging surface, manifests as pixel shifts in the RGB color channels, resulting in noticeable lateral chromatic aberration in high-contrast image edge regions. Lateral chromatic aberration alters the representation of an object's shape, color, and other information, thus affecting the calibration and measurement accuracy of the vision system. For example, when using circular or checkerboard targets for stereo calibration, color artifacts at the edges can increase the extraction error of the center or corner points, and may even prevent the detection of checkerboard corner points.
[0004] To address the lateral chromatic aberration problem in binocular virtual binocular vision systems, two common correction methods are hardware and software. Hardware correction methods typically involve adding additional optical lenses to the camera's lens module to eliminate lateral chromatic aberration from an optical design perspective. However, hardware methods require precise manufacturing and assembly of optical lenses, increasing the difficulty and cost of correction. Software correction methods correct lateral chromatic aberration from an image processing perspective, offering lower cost and higher efficiency compared to hardware methods. Previous image processing-based lateral correction methods have generally been used to correct lateral chromatic aberration caused by camera lenses, with little research specifically addressing lateral chromatic aberration caused by binoculars. In conclusion, this study proposes a lateral chromatic aberration correction method for binocular virtual binocular vision systems, which plays a crucial role in improving the system's calibration and measurement accuracy.
[0005] The following publicly disclosed existing patent technologies were found through a search:
[0006] A method and medium for eliminating lateral chromatic aberration in lenses based on an image processor (CN111242863B) includes: a distortion model acquisition step: modeling the lateral chromatic aberration of the target camera lens to be corrected to obtain distortion models of the lateral chromatic aberration in the R, G, and B color channels; and a distortion parameter acquisition step: calibrating the target camera lens using a checkerboard as a calibration board to obtain the distortion parameters of the lateral chromatic aberration in the R, G, and B channels of the camera lens to be corrected. This invention downsamples the displacement of each pixel in the R and B channels, storing only 32x18x2 sample points, which significantly reduces the storage complexity of displacement for a 1080P resolution camera.
[0007] In the aforementioned prior art, a checkerboard-shaped calibration plate is used to obtain the distortion parameters of the lateral chromatic aberration of the R, G, and B channels of the camera lens to be corrected, thereby eliminating the lateral chromatic aberration of the lens.
[0008] A method and system for correcting color difference in binocular camera images (CN108270952B) includes the following steps: performing an OB correction test on the binocular camera to generate an OB offset parameter matrix; performing a relative brightness correction test on the binocular camera to generate a brightness compensation parameter matrix; performing a distortion correction test on the binocular camera to generate a distortion compensation parameter matrix; performing an automatic white balance correction test on the binocular camera to generate an RGB compensation parameter matrix; and performing a Gamma correction test on the binocular camera to adjust the brightness values of the primary and secondary lenses. This invention can eliminate color deviation in the output image caused by differences between the two lenses, greatly improving the image quality of the dual lenses and facilitating the low-cost development and production of civilian-grade and consumer-grade panoramic cameras.
[0009] The aforementioned prior art uses a binocular camera to acquire images, with the aim of correcting color differences in the images acquired by the two cameras of the binocular camera. This differs significantly from the technical purpose and solution of this patent application.
[0010] In summary, no prior art identical or similar to the technical solution of this patent application was found in the published patent literature. Summary of the Invention
[0011] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method for correcting lateral chromatic aberration introduced by a biprism, thereby improving image quality for a biprism-based virtual binocular vision system.
[0012] The technical problem solved by this invention is achieved through the following technical solution:
[0013] A method for lateral chromatic aberration correction in a dual-prism virtual binocular vision system, comprising the following steps:
[0014] S1: The original image is split using a virtual binocular vision system based on dual prisms to form a left image I with equal pixel size. L And right image I R ;
[0015] S2: For the left image I L And right image I R Perform color channel separation to obtain the blue channel image I in the left image. Lb Left image, green channel image I Lg Left image, red channel image I Lr The blue channel image I on the right Rb The green channel image on the right (I) Rg Right image, red channel I Rr ;
[0016] S3: For I respectively Lb I Lg I Lr The center of each ellipse is extracted to obtain the pixel coordinates of the center of each ellipse in the left image, which are denoted as P, the center pixel of the blue channel ellipse in the left image. Lbi (u Lbi ,v Lbi (Left image, green channel ellipse center pixel P) Lgi (u Lgi ,v Lgi (Left image, red channel ellipse center pixel P) Lri (u Lri ,v Lri ), respectively for I Rb I Rg I Rr The center of each ellipse is extracted to obtain the pixel coordinates of the center of each ellipse in the right image, which are denoted as P, the center pixel of the blue channel ellipse in the right image. Rbi (u Rbi ,v Rbi (Right image, green channel ellipse center pixel P) Rgi (u Rgi ,v Rgi (Right image, red channel ellipse center pixel P) Rri (u Rri ,v Rri );
[0017] S4: Calculate the inter-channel column pixel offset, using the center pixel of the green channel ellipse in the left and right images as the reference, and calculate I. L The column-direction pixel offset between the blue and green channels {v Lgi -v Lbi}, calculate the column-direction pixel offset {v} between the red and green channels. Lgi -v Lri}, calculate IR The set of pixel offset values between the blue and green channels {v Rgi -v Rbi}, calculate the set of pixel offset values between the red and green channels {v Rgi -v Rri};
[0018] S5: Obtain the pixel offset correction equations for the blue and red channel images. By performing linear fitting on the inter-column pixel offset data from the previous step, obtain the linear correction equation L for the blue channel of the left image. Lg-b The linear correction equation L for the red channel in the left figure. Lg-r The linear correction equation L for the blue channel in the right figure. Rg-b The linear correction equation L for the red channel in the right figure Rg-r ;
[0019] S6: Using the linear correction equation in S5, correct the pixel offset of the blue and red channel images in the left and right images to form the corrected blue and red channel images I of the left image. LNb I LNr And the blue and red channel images on the right (I) RNb I RNr ;
[0020] S7: I LNr I LNb and I Lg The corresponding color channel images are synthesized to form a new color image I. LN Similarly, I RNr I RNb and I Rg Synthesize to form a new color image I RN .
[0021] Moreover, the specific steps of S4 are as follows:
[0022] Using the precisely extracted ellipse centers of each color channel image, the set of column-directed pixel offset values representing the lateral color difference is calculated. For I L , with P Lgi (u Lgi ,v Lgi Using ) as a benchmark, calculate P Lbi (u Lbi ,v Lbi ) and P Lgi (u Lgi ,v Lgi The column-wise pixel offset between ) is denoted as the set of values {v Lgi -v Lbi}, calculate P Lri (u Lri ,v Lri ) and P Lgi (uLgi ,v Lgi The column-wise pixel offset between ) is denoted as the set of values {v Lgi -v Lri Similarly, calculate I. R The set of pixel offset values between the blue and green channels {v Rgi -v Rbi}, calculate the set of pixel offset values between the red and green channels {v Rgi -v Rri}
[0023] Moreover, the specific steps of S5 are as follows:
[0024] For {v Lgi -v Lbi The linear correction equation L for the blue channel in the left image is obtained by performing a linear fit. Lg-b ; for {v Lgi -v Lri By performing a linear fit, the linear correction equation L for the red channel in the left image is obtained. Lg-r Similarly, the linear correction equation L for the blue channel in the right figure is obtained. Rg-b The linear correction equation L for the red channel in the right figure is obtained. Rg-r .
[0025] Moreover, the specific steps of S6 are as follows:
[0026] Using linear equation L Lg-b and L Lg-r The pixel offset correction values for the blue and red channels are calculated column by column, and the blue and red channel images are then shifted accordingly in the column direction to form the corrected blue and red channel images, denoted as I. LNb and I LNr Similarly, using the linear equation L Rg-b and L Rg-r This generates corrected blue and red channel images, denoted as I, respectively. RNb and I RNr .
[0027] The advantages and positive effects of this invention are:
[0028] This invention is applicable to virtual binocular vision systems based on dual prisms. Color cameras typically use a Bayer array to interpolate the grayscale information of each pixel's RGB three channels, with the green channel occupying half the space in the Bayer array. The green channel dominates the imaging process of a color camera, and its pixel grayscale distribution more closely resembles reality. Therefore, this invention uses the green channel in the color channels of a circular target image as a benchmark to obtain linear equations representing the pixel offsets of the blue and red channels, thereby achieving lateral color difference correction. Specifically, it offers the following advantages:
[0029] (1) The method of the present invention only requires the acquisition of one circular target image to correct the lateral color difference introduced by the double prism. The method is simple and efficient.
[0030] (2) The method of the present invention uses the center coordinates of the ellipse of the green channel as a reference to establish a linear equation for the pixel offset of the blue and red channels, which better adapts to the variation law of the lateral color difference formed by the double prism in the full field of view.
[0031] (3) The method of the present invention obtains accurate blue and red channel pixel offsets by extracting elliptical contours and center fitting, which are used to fit the linear equation of the above pixel offsets. It has the advantages of simple and accurate feature extraction. Attached Figure Description
[0032] Figure 1 It is the imaging principle of a dual-prism virtual binocular vision system.
[0033] Figure 2 This is a flowchart of obtaining the column-directed pixel offset correction equation in an embodiment of the present invention.
[0034] Figure 3 This is a flowchart of lateral color difference correction in an embodiment of the present invention.
[0035] Figure 4 This is a circular target image acquired by a dual-prism virtual binocular vision system in an example of the present invention.
[0036] Figure 5 These are the left and right images obtained by splitting the circular target image in the first step of the first part of the present invention. (a) is the left image, and (b) is the right image.
[0037] Figure 6 The images shown are elliptical center distribution diagrams of the left and right color channels obtained in the third step of the first part of this invention. (a) is the elliptical center distribution diagram of the left image and (b) is the elliptical center distribution diagram of the right image.
[0038] Figure 7 The images are scatter plots of pixel offsets of the blue and red channels relative to the green channel in the left and right images obtained in the fourth step of the first part of this invention. (a) is the scatter plot of pixel offsets of the left image, and (b) is the scatter plot of pixel offsets of the right image.
[0039] Figure 8 The first part of this invention uses the fifth step of fitting a straight line to obtain the pixel offset correction equations for the blue and red channels. (a) is the linear correction line for the blue channel in the left image, (b) is the linear correction line for the red channel in the left image, (c) is the linear correction line for the blue channel in the right image, and (d) is the linear correction line for the red channel in the right image.
[0040] Figure 9 These are comparison images of the circular target image before and after lateral color difference correction in an example of the present invention. (a) shows the local image effect before correction, and (b) shows the local image effect after correction.
[0041] Figure 10 These are comparison images of the checkerboard image before and after lateral color difference correction in an example of the present invention. (a) shows the local image effect before correction, and (b) shows the local image effect after correction.
[0042] Figure 11 These are grayscale distribution diagrams of the RGB color channels of the circular target image before and after correction in an example of the present invention. (a) is the distribution diagram before correction, and (b) is the distribution diagram after correction.
[0043] Figure 12 These are grayscale distribution diagrams of the RGB color channels before and after correction of the checkerboard image in this invention example. (a) is the distribution diagram before correction, and (b) is the distribution diagram after correction. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer and easier to understand, the present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit the scope of this application.
[0045] The overall process of the lateral chromatic aberration correction method for a dual-prism virtual binocular vision system according to an embodiment of the present invention is divided into two parts: First, it describes the process of obtaining the column-direction pixel offset correction equation by processing the acquired circular target image. Second, it describes the process of using the obtained correction equation for lateral chromatic aberration correction of images acquired in real time by the system.
[0046] Figure 2 The flowchart shown illustrates the process of obtaining the column-directed pixel offset correction equation. First, a circular target image I1 is acquired using a dual-prism virtual binocular vision system. Then, the original image is split into two identical left and right images I1. L and I R After that, I L Perform color channel separation to obtain blue channel image I. Lb Green Channel Diagram I Lg Red Channel Diagram I Lr Similarly, I R Perform color channel separation to obtain the corresponding I Rb I Rg I RrThen, the ellipse centers of each color channel image in the left and right images are extracted to obtain the pixel coordinates of each ellipse center. After that, using the ellipse center extracted from the green image as a reference, the column pixel offset of each ellipse center between the blue channel image and the green channel image is calculated. Similarly, the column pixel offset of each ellipse center between the red channel image and the green channel image is calculated. Finally, the column pixel offset data is fitted with a straight line to obtain the linear equations for the pixel offset correction of the blue and red channel images.
[0047] Figure 3 The flowchart shown is for lateral color difference correction. First, after splitting the image acquired in real time by the system and separating the color channels, the linear equation obtained in the first part of the process is used to calculate the column-wise pixel offset correction value column by column, and the blue and red channel images are shifted accordingly to form the corrected blue and red channel images. Finally, the corrected blue and red channel images are merged with the original green channel image to form the color image after lateral color difference correction and output.
[0048] Combination Figure 2 The process of obtaining the column-directed pixel offset correction equation of the present invention is described in detail below, and the specific implementation steps are as follows:
[0049] (1) Image splitting: The original image is cropped from the column towards the center to form left and right images I with equal pixel size. L and I R ,like Figure 5 As shown.
[0050] (2) Color channel separation: I L Perform color channel separation to obtain blue channel image I. Lb Green Channel Diagram I Lg Red Channel Diagram I Lr Similarly, I R Perform color channel separation to obtain the corresponding I Rb I Rg I Rr picture;
[0051] (3) Ellipse center extraction: extract the center of the ellipse for each of the I... Lb I Lg I Lr The center of each ellipse is extracted, and the pixel coordinates of the center of each ellipse are obtained, denoted as P. Lbi (u Lbi ,v Lbi ), P Lgi (u Lgi ,v Lgi ), P Lri (u Lri ,v Lri The distribution diagram of the ellipse centers of each color channel is as follows: Figure 6 As shown in (a). Similarly, for I respectively Rb I Rg I Rr Perform ellipse center extraction to obtain the pixel coordinates P of each ellipse center. Rbi (u Rbi ,v Rbi ), P Rgi (u Rgi ,v Rgi ), P Rri (u Rri ,v Rri The distribution diagram of the ellipse centers of each color channel is as follows: Figure 6 As shown in (b). Where u and v represent the row and column coordinates of the image, respectively, and i represents the index value of the number of ellipses.
[0052] (4) Calculate the inter-channel column pixel offset: For I L , with P Lgi (u Lgi ,v Lgi Using ) as a benchmark, calculate P Lbi (u Lbi ,v Lbi ) and P Lgi (u Lgi ,v Lgi The column-wise pixel offset between ) is denoted as the set of values {v Lgi -v Lbi},like Figure 7 As shown in (a); calculate P Lri (u Lri ,v Lri ) and P Lgi (u Lgi ,v Lgi The column-wise pixel offset between ) is denoted as the set of values {v Lgi -v Lri},like Figure 7 As shown in (b). Similarly, calculate I. R The set of pixel offset values between the blue and green channels {v Rgi -v Rbi},like Figure 7 As shown in (c), calculate the set of pixel offset values between the red and green channels {v Rgi -v Rri},like Figure 7 As shown in (d).
[0053] (5) Obtain the pixel offset correction equations for the blue and red channel images: For I L , for {v Lgi -v Lbi The linear correction equation L for the blue channel is obtained by performing a straight line fit. Lg-b,like Figure 8 As shown in (a); for {v Lgi -v Lri The linear correction equation L for the red channel is obtained by performing a straight line fit. Lg-r ,like Figure 8 As shown in (b). Similarly, I is obtained. R The linear correction equation L for the blue channel Rg-b ,like Figure 8 As shown in (c), the linear correction equation L for the red channel is obtained. Rg-r ,like Figure 8 As shown in (d).
[0054] Combination Figure 2 As shown, the process of lateral color difference correction of the present invention is explained in detail, and the specific implementation steps are as follows:
[0055] (1) Image splitting: The original image acquired in real time is cropped from the column to the center to form left and right images I with equal pixel size. L and I R .
[0056] (2) Color channel separation: I L Perform color channel separation to obtain blue channel image I. Lb Green Channel Diagram I Lg Red Channel Diagram I Lr Similarly, I R Perform color channel separation to obtain the corresponding I Rb I Rg I Rr picture.
[0057] (3) Correction of pixel offset in blue and red channel images: For I L Using the linear equation L Lg-b and L Lg-r The pixel offset correction values for the blue and red channels are calculated column by column, and the blue and red channel images are then shifted accordingly in the column direction to form the corrected blue and red channel images, denoted as I. LNb and I LNr Similarly, for I R Using the linear equation L Rg-b and L Rg-r This generates corrected blue and red channel images, denoted as I, respectively. RNb and I RNr .
[0058] (4) Color channel composite output: I LNr I LNb and I Lg The corresponding color channel images are synthesized to form a new color image I. LNSimilarly, I RNr I RNb and I Rg Synthesize to form a new color image I RN .
[0059] Figure 9 The images show a comparison of the circular target image before and after lateral color difference correction. (a) shows the local image effect before correction, and (b) shows the local image effect after correction. Figure 10 The images show a comparison of the chessboard image before and after lateral color difference correction. (a) shows the local image effect before correction, and (b) shows the local image effect after correction. The comparison of the experimental images shows that the method of this invention effectively reduces the impact of lateral color difference introduced by the double prism, thus improving image quality. To further quantify the improvement effect of the method of this invention, the grayscale values of the RGB color channels of the circular target image and the chessboard image before and after correction were statistically analyzed, and the corresponding RGB color channel grayscale distribution maps were plotted. The distribution map of the circular target image is shown below. Figure 11 As shown, the distribution map of the checkerboard pattern is as follows: Figure 12 As shown in the figure, (a) is the distribution map before correction, and (b) is the distribution map after correction. It can be seen that, compared with the uncorrected image, the pixel gray values of the image after correcting the lateral color difference using the method of the present invention are more concentrated in the white and black areas, the scattered pixels in the transition area are significantly reduced, and the color difference phenomenon is significantly weakened.
[0060] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for lateral chromatic aberration correction in a dual-prism virtual binocular vision system, characterized in that: The specific steps include: S1: The original image is split using a virtual binocular vision system based on dual prisms to form a left image I with equal pixel size. L And right image I R ; S2: For the left image I L And right image I R Perform color channel separation to obtain the blue channel image I in the left image. Lb Left image, green channel image I Lg Left image, red channel image I Lr The blue channel image I on the right Rb The green channel image on the right (I) Rg Right image, red channel I Rr ; S3: For I respectively Lb I Lg I Lr The center of each ellipse is extracted to obtain the pixel coordinates of the center of each ellipse in the left image, which are denoted as P, the center pixel of the blue channel ellipse in the left image. Lbi (u Lbi ,v Lbi (Left image, green channel ellipse center pixel P) Lgi (u Lgi ,v Lgi (Left image, red channel ellipse center pixel P) Lri (u Lri ,v Lri ), respectively for I Rb I Rg I Rr The center of each ellipse is extracted to obtain the pixel coordinates of the center of each ellipse in the right image, which are denoted as P, the center pixel of the blue channel ellipse in the right image. Rbi (u Rbi ,v Rbi (Right image, green channel ellipse center pixel P) Rgi (u Rgi ,v Rgi (Right image, red channel ellipse center pixel P) Rri (u Rri ,v Rri ); S4: Calculate the inter-channel column pixel offset, using the center pixel of the green channel ellipse in the left and right images as the reference, and calculate I. L The column-direction pixel offset between the blue and green channels {v Lgi -v Lbi }, calculate the column-direction pixel offset {v} between the red and green channels. Lgi -v Lri }, calculate I R The set of pixel offset values between the blue and green channels {v Rgi -v Rbi }, calculate the set of pixel offset values between the red and green channels {v Rgi -v Rri }; S5: Obtain the pixel offset correction equations for the blue and red channel images. By performing linear fitting on the inter-column pixel offset data from the previous step, obtain the linear correction equation L for the blue channel of the left image. Lg-b The linear correction equation L for the red channel in the left figure. Lg-r The linear correction equation L for the blue channel in the right figure Rg-b The linear correction equation L for the red channel in the right figure Rg-r ; S6: Using the linear correction equation in S5, correct the pixel offset of the blue and red channel images in the left and right images to form the corrected blue and red channel images I of the left image. LNb I LNr And the blue and red channel images on the right (I) RNb I RNr ; S7: I LNr I LNb and I Lg The corresponding color channel images are synthesized to form a new color image I. LN Similarly, I RNr I RNb and I Rg Synthesize to form a new color image I RN .
2. The lateral chromatic aberration correction method for a dual-prism virtual binocular vision system according to claim 1, characterized in that: The specific steps of S4 are as follows: Using the precisely extracted ellipse centers of each color channel image, the set of column-directed pixel offset values representing the lateral color difference is calculated. For I L , with P Lgi (u Lgi ,v Lgi Using ) as a benchmark, calculate P Lbi (u Lbi ,v Lbi ) and P Lgi (u Lgi ,v Lgi The column-wise pixel offset between ) is denoted as the set of values {v Lgi -v Lbi }, calculate P Lri (u Lri ,v Lri ) and P Lgi (u Lgi ,v Lgi The column-wise pixel offset between ) is denoted as the set of values {v Lgi -v Lri Similarly, calculate I. R The set of pixel offset values between the blue and green channels {v Rgi -v Rbi }, calculate the set of pixel offset values between the red and green channels {v Rgi -v Rri } 3. The lateral chromatic aberration correction method for a dual-prism virtual binocular vision system according to claim 1, characterized in that: The specific steps of S5 are as follows: For {v Lgi -v Lbi The linear correction equation L for the blue channel in the left image is obtained by performing a linear fit. Lg-b ; for {v Lgi -v Lri By performing a linear fit, the linear correction equation L for the red channel in the left image is obtained. Lg-r Similarly, the linear correction equation L for the blue channel in the right figure is obtained. Rg-b The linear correction equation L for the red channel in the right figure is obtained. Rg-r .
4. The lateral chromatic aberration correction method for a dual-prism virtual binocular vision system according to claim 1, characterized in that: The specific steps of S6 are as follows: Using linear equation L Lg-b and L Lg-r The pixel offset correction values for the blue and red channels are calculated column by column, and the blue and red channel images are then shifted accordingly in the column direction to form the corrected blue and red channel images, denoted as I. LNb and I LNr Similarly, using the linear equation L Rg-b and L Rg-r This generates corrected blue and red channel images, denoted as I, respectively. RNb and I RNr .
Citation Information
Patent Citations
A method and system for correcting chromatic aberration in binocular camera images
CN108270952B
A method and medium for eliminating lateral chromatic aberration in lenses based on an image processor.
CN111242863B