Gamma correction method based on multi-color channel
By gamma correction of monochromatic light and fitting the color crosstalk coefficient, the problem of low measurement accuracy under multi-color channels is solved, and a higher precision structured light measurement is achieved.
Patent Information
- Application Number
- CN202411949985.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-07-04
AI Technical Summary
The existing gamma correction methods have color crosstalk problems under multi-color channels, resulting in low measurement accuracy.
The gamma correction method based on multi-color channels is adopted to perform gamma correction on monochromatic light, collect the light intensity changes of the remaining color channels, fit the color crosstalk coefficient, and compensate, so as to achieve pre-modulation.
The measurement accuracy of multi-color channel structure light measurement is improved, the error caused by color crosstalk is reduced, and the stability and robustness of the measurement system are enhanced.
Smart Images

Figure CN120259143A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of general optical three-dimensional measurement, particularly to the field of three-dimensional reconstruction using fringe projection profilometry, especially to the reconstruction method using multiple color channels. Background Art
[0002] Fringe Projection Profilometry (FPP) is a three-dimensional measurement technology based on structured light, which has shown extensive application value in many fields.
[0003] The definition of fringe projection profilometry is as follows: Fringe projection profilometry is to design a fringe grating with specific intervals and widths by a computer and project it onto the surface of the object to be measured using a projector. When the fringes are modulated by different height points on the object surface and deformed, these deformed fringes carry the height information of the object.
[0004] The working principle of fringe projection profilometry is as follows: Use a projection device to project various combinations of digital grating fringes (such as different frequencies, different numbers of steps, etc.) onto the surface of the object to be measured. The digital grating fringes change their shapes correspondingly with the height undulations of the surface of the object to be measured, so that the height information of the object to be measured is modulated into the fringes. Subsequently, use a photographing device to capture the deformed digital grating fringes, thereby realizing the three-dimensional measurement of the object to be measured.
[0005] In fringe projection profilometry, gamma correction is a crucial step, and its importance is mainly reflected in the following aspects:
[0006] Fringe projection profilometry depends on the light fringe patterns generated by the projector. The brightness of these light fringes usually has a non-linear relationship with the electrical signals output by the projector. The human eye's perception of brightness is also non-linear. Therefore, the brightness values in the image need to be gamma-corrected to be consistent with the human eye's perception. Gamma correction can make the brightness distribution of the image more uniform, thereby avoiding image distortion caused by brightness differences during the reconstruction process and improving the measurement accuracy.
[0007] Most projection devices (such as DLP projectors, liquid crystal displays, etc.) have non-linear characteristics of light output, especially in the low-brightness or high-brightness ranges. This non-linearity may cause uneven brightness distribution of the fringes in the projection pattern in different regions. Through gamma correction, this non-linearity can be compensated, so that the brightness of the projected fringe pattern in different regions is more uniform, which is helpful for subsequent image analysis and three-dimensional reconstruction.
[0008] In terms of improving measurement accuracy and robustness, gamma correction helps enhance the contrast of the fringe pattern, making the edges of the fringes clearer and reducing the impact of image noise on the measurement results. This is particularly important for 3D reconstruction under high-contrast and low-light conditions.
[0009] Gamma correction can effectively reduce image noise caused by uneven illumination or improper camera exposure during the projection process, thereby improving the stability and robustness of the measurement.
[0010] In summary, gamma correction is an essential step in fringe projection profilometry. It not only helps improve measurement accuracy and image quality but is also one of the key technologies for successful 3D reconstruction. In practical applications, we need to select an appropriate gamma correction method according to specific measurement requirements and object characteristics to ensure the accuracy and reliability of the measurement results. Summary of the Invention
[0011] Aiming at the problems existing in the existing gamma correction methods, such as different correction results for multiple color channels and color crosstalk, the present invention proposes a gamma correction method based on multiple color channels, which can significantly achieve gamma correction for the above problems and improve the measurement accuracy.
[0012] To achieve the above object, the technical solution of the present invention is realized as follows: The gamma correction method based on multiple color channels includes the following steps:
[0013] S1: Perform gamma correction on monochromatic light;
[0014] S2: Project the corrected monochromatic light with different intensities and collect the light intensity changes of the remaining color channels;
[0015] S3: Fit the collected data to obtain the coefficients of color crosstalk between different channels;
[0016] S4: Compensate the projection picture according to the coefficients to complete pre-modulation;
[0017] Furthermore, the specific method of step S1 is as follows:
[0018] S1.1: A color picture can be represented by pixel matrices of three channels, namely R, G, and B, that is:
[0019]
[0020] S1.2: Among them, is the matrix storing image information, , , It is a matrix of the same type as the picture pixels, which are used to store the information of the red, green, and blue color channels respectively. The unmodulated color picture is distorted after being processed by the projector:
[0021]
[0022] In the formula, 、 、 are the inputs of the three color channels of the projector respectively 、 、 are the outputs of the three color channels after passing through the projector respectively 、 、 are the gamma values of the three color channels respectively.
[0023] S1.3: The image generated by the projector is projected onto the object, reflected by the object, and collected by the camera. Different from the monochromatic light reflection model, the data of each channel collected may be affected by other color channels, and this effect can be approximately regarded as linear. The mathematical model is as follows:
[0024]
[0025]
[0026] Among them, is the light intensity matrix collected by the camera, is the coefficient matrix, , and are the coefficients mainly generated by reflectivity and normalization, , , , , and are the coefficients mainly generated by color crosstalk, is the light intensity matrix output by the projector, is the background light intensity matrix.
[0027] S1.4: In the above formula, , can be obtained through data acquisition. When the parameters within and are all unknown, it is difficult to solve. Also, because the color crosstalk part has relatively little influence, that is, there is often , the coefficient can be ignored first to find the other parameters:
[0028]
[0029]
[0030] where is the matrix composed of ignored parameters post-parameters which represents the influence of the input of different color channels on the output of their respective channels. A pure color image is generated at a certain light intensity interval, the light intensity is recorded, projected onto the object in turn and collected by a camera, and the average intensity of the collected data is calculated to obtain the matrix , parameters. By fitting the three channels respectively, the matrix , parameters can be obtained. Substitute the parameters to perform the first pre-correction on the light intensity. At this time, the input and output of the pure color image are approximately linear.
[0031] Furthermore, the specific method of step S2 is as follows:
[0032] S2.1: Generate a corrected pure color image every 10 intensities.
[0033] S2.2: Project the corrected pure color image and collect the average value changes of the other two channels.
[0034] Furthermore, the specific method of step S3 is as follows:
[0035] S3.1: Fit the collected data by the least square method to obtain the influence coefficients , , , , and .
[0036] S3.2: Substitute the coefficients to obtain the input-output relationship:
[0037]
[0038] Furthermore, the specific method of step S4 is as follows:
[0039] S4.1: Perform pre-modulation according to the obtained input-output relationship. The modulation relationship is as follows:
[0040]
[0041] S4.2: Since the present invention is mainly used for multi-color channel measurement of fringe projection profilometry, sine fringes are generated and projected according to the following relationship to verify the effectiveness of the present invention.
[0042]
[0043] S4.3: Collect the modulated sine fringes and verify any one row.
[0044] The beneficial effects of the present invention are as follows:
[0045] Aiming at the problem of inaccurate acquisition of intensity information of each channel in the environment of using multi-color channels for structured light measurement, the present invention proposes a method of combined gamma correction, comprehensively considering the influence of the entire structured light measurement system hardware, the different responses of different colors, and the influence of background light intensity on gamma correction, and performing a certain error compensation for color crosstalk. It effectively improves the accuracy of the measurement system to obtain the phase. Generally speaking, the present invention is beneficial to the structured light measurement using multi-color channels, making the obtained phase more accurate, thereby improving the accuracy of the measurement results. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0047] Figure 1 It is a flowchart of the present invention
[0048] Figure 2 It is a schematic diagram of a multi-color channel structured light measurement system
[0049] Figure 3 It is a physical diagram of the system for gamma correction in the present invention
[0050] Figure 4 It is a schematic diagram of the acquisition range of an industrial camera
[0051] Figure 5 It is a schematic diagram of collecting the changes of other channels by projecting monochromatic light
[0052] Figure 6 It is a result diagram of gamma correction for sine fringes with different phases DETAILED DESCRIPTION OF THE EMBODIMENTS
[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0054] As Figure 1As shown, the gamma correction method based on multiple color channels includes the following steps:
[0055] S1.1: This invention is mainly used for the structured light measurement technology of multiple color channels. The measurement process is as Figure 2 shown Figure 3 Figure shows the structured light measurement system that needs to perform multi-channel joint gamma correction. The 3lcd projector model used in this invention is the CB-FH06 of Epson. The pixel value is 1920*1080. A color picture can be represented by pixel matrices of three channels, namely R, G, and B, that is:
[0056]
[0057] S1.2: Among them, is the matrix for storing image information, , , are matrices of the same type as the picture pixels, and are respectively used to store the information of the red, green, and blue color channels. The unmodulated color picture is distorted after being processed by the projector:
[0058]
[0059] In the formula, , , are respectively the inputs of the three color channels of the projector , , are respectively the outputs of the three color channels after passing through the projector , , are respectively the gamma values of the three color channels.
[0060] S1.3: The image generated by the projector is projected onto the object, reflected by the object, and collected by the camera. The collection area is as Figure 4 shown. Different from the monochromatic light reflection model, the data of each channel collected may be affected by other color channels, and this influence can be approximately regarded as linear. The mathematical model is as follows:
[0061]
[0062]
[0063] Among them, is the light intensity matrix collected by the camera, is the coefficient matrix, , and are the coefficients mainly generated by reflectivity and normalization, , , , , and are coefficients mainly generated by color crosstalk, is the light intensity matrix output by the projector, is the background light intensity matrix.
[0064] S1.4: In the above formula, , can be obtained through data acquisition. When the parameters in and are all unknown, it is difficult to solve. Also, because the color crosstalk part has relatively little influence, that is, there often exists , the coefficient can be ignored first to find the remaining parameters:
[0065]
[0066]
[0067] where is the matrix composed of the parameters after ignoring the parameter , representing the influence of the input of different color channels on the output of their respective channels. Generate a pure color image at a certain light intensity interval, record the light intensity, project it onto the object in turn and collect it with a camera, and calculate the average value of the collected intensity, so as to obtain the matrix , parameters. Fit each of the three channels respectively to obtain the matrix , parameters. Among them, , , , , , , , , . Substitute the parameters to perform the first pre-correction on the light intensity, that is , , , and at this time, the input and output of the pure color image are approximately linear.
[0068] S2: Project monochromatic light of different intensities after projection correction, and collect the light intensity changes of the remaining color channels. The specific method is:
[0069] S2.1: Generate a corrected pure color image every 10 intensities.
[0070] S2.2: For the solid-color image after projection correction, collect the mean value changes of the other two channels, as Figure 5 shown.
[0071] S3: Fit the collected data to obtain the coefficients of color crosstalk between different channels. The specific method is as follows:
[0072] S3.1: Fit the collected data using the least squares method to obtain the influence coefficients , , , , and .
[0073] S3.2: Substitute the coefficients to obtain the input-output relationship:
[0074]
[0075] S4.1: Perform pre-modulation according to the obtained input-output relationship. The modulation relationship is as follows:
[0076]
[0077] S4.2: Since the present invention is mainly used for multi-color channel measurement in fringe projection profilometry, sine fringes are generated and projected according to the following relationship to verify the effectiveness of the present invention.
[0078]
[0079] S4.3: Collect the modulated sine fringes and randomly select one row for verification. In the present invention, the 650th row is selected, and the verification results are shown in the figure.
[0080] The present invention comprehensively considers the influence of the entire structured light measurement system hardware, the different responses of different colors, and the influence of the background light intensity on gamma correction, and performs a certain error compensation for color crosstalk. Finally, the gamma correction of the sine fringes of multiple color channels is realized, effectively improving the accuracy of the measurement system for obtaining the phase. As shown in the figure. The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. Gamma correction method based on multiple color channels, characterized in that, It includes the following steps: S1: Perform gamma correction on monochromatic light; S2: Project the corrected monochromatic light with different intensities and collect the light intensity changes of the remaining color channels; S3: Fit the collected data to obtain the coefficients of color crosstalk between different channels; S4: Compensate the projected image according to the coefficients to complete pre-modulation.
2. The gamma correction method based on multiple color channels according to claim 1, wherein The method for roughly extracting the picture containing highlight information described in step S1 is as follows: S1.1: A color picture can be represented by pixel matrices of three channels, namely R, G, and B; S1.2: The unmodulated color image is distorted after being processed by the projector: Wherein, , , are respectively the inputs of the three color channels of the projector , , are respectively the outputs of the three color channels after passing through the projector , , are respectively the gamma values of the three color channels; S1.3: The image generated by the projector is projected onto the object, reflected by the object, and collected by the camera. Different from the monochromatic light reflection model, the data of each channel collected may be affected by other color channels, and this effect can be approximately regarded as linear. The mathematical model is as follows: Among them, is the light intensity matrix collected by the camera, is the coefficient matrix, , and are coefficients mainly generated by reflectivity and normalization, , , , , and are coefficients mainly generated by color crosstalk, is the light intensity matrix output by the projector, is the background light intensity matrix; S1.4: In the above formula, , can be obtained through data collection. When the parameters in and are all unknown, it is relatively difficult to solve. Also, since the color crosstalk part has relatively little influence, that is, there often exists , the coefficient can be ignored first to find the remaining parameters: , Among them is the matrix composed of the ignored parameters and the post-parameters , representing the influence of the inputs of different color channels on the outputs of their respective channels. Pure color images are generated at regular intervals of light intensity, the light intensity is recorded, projected onto the object in sequence and collected by a camera, and the mean value of the collected intensity is calculated to obtain the matrix , parameters. By fitting the three channels respectively, the matrix , parameters can be obtained. Substitute the parameters to perform the first pre-correction on the light intensity. At this time, the input and output of the pure color image are approximately linear relationships.
3. The method for gamma correction based on multiple color channels according to claim 1, wherein The method for step S2 to project the corrected monochromatic light with different intensities and collect the light intensity changes of the remaining color channels is as follows; S2.1: Generate a corrected pure-color picture every 10 intensities; S2.2: Project the corrected pure-color picture and collect the mean value changes of the remaining two channels.
4. The method for gamma correction based on multiple color channels according to claim 1, wherein, The method for step S3 to fit the collected data to obtain the coefficients of color crosstalk between different channels is as follows; S3.1: Fit the collected data using the least squares method to obtain the influence coefficients , , , , and ; S3.2: Substitute the coefficients to obtain the input-output relationship: , which is the basis for pre-modulation.
5. The method for gamma correction based on multiple color channels according to claim 1, wherein The method for step S4 to compensate the projected image according to the coefficients to complete pre-modulation is as follows; S4.1: Perform pre-modulation according to the obtained input-output relationship. The modulation relational expression is as follows: , S4.2: Since the present invention is mainly used for multi-color channel measurement of fringe projection profilometry, sinusoidal fringes are generated and projected according to the following relationship to verify the effectiveness of the present invention; , S4.3: Collect the modulated sine fringes and randomly select a row for verification.