A white balance processing method and system for color imaging of image sensor

By statistically fitting the R, G and B channel data of the white area in the color imaging of the image sensor, a grayscale mapping table is made and search maps are performed, the problem of low white balance processing efficiency in the prior art is solved, and efficient image processing and high-quality image output are achieved.

CN114245095BActive Publication Date: 2025-05-06XIAN RUIFENG PHOTOELECTRIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111486904.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-07
Publication Date
2025-05-06
Estimated Expiration
2041-12-07

AI Technical Summary

Technical Problem

The prior art is difficult to achieve efficient white balance processing in image sensor color imaging, especially in the increased risk of system cost and volume, limiting the diversity of the system application.

Method used

By statistically and function fitting the R, G and B channel data of white areas under different brightness, a grayscale mapping table is made based on the image grayscale value range, and the table is used for search mapping and conversion to achieve white balance processing.

Benefits of technology

This method can efficiently complete white balance processing in common scenarios, reduces the system's requirements for the test environment, simplifies the operation process, improves image processing speed, and outputs high-quality images in a short time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114245095B_ABST
    Figure CN114245095B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a white balance processing method and system for color imaging of an image sensor, the method comprising the following steps: step 1), statistics and function fitting of data of R, G and B channels of white areas under different brightnesses, and preparation of a grayscale mapping table in combination with the grayscale value range of the image; step 2), searching and mapping the grayscale values ​​of the original image to be processed using the grayscale mapping table to obtain the mapped grayscale values; then converting the mapped grayscale values ​​to obtain a color image after white balance processing. The white balance processing method for color imaging of an image sensor of the present invention can complete all operation processes in common scenarios and has an efficient image processing speed. During operation, it is only necessary to search and convert the data in the original image and the data in the grayscale mapping table accordingly to output the correct color image after white balance processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a white balance processing method and system for color imaging of an image sensor. Background Art

[0002] The 21st century is an information age. Social development is gradually moving towards intelligence, informatization and automation. Image data acquisition plays a vital role in this development process. Imaging systems have become an indispensable key component in every corner of life, every link of industrial applications and every stage of social development.

[0003] With such a huge image market, the application requirements for imaging systems are diverse and advanced, which has led to higher requirements for the size and cost of imaging equipment. Image processing is one of the basic structures of the imaging system, and image white balance is the basic requirement for color image processing, so white balance processing is one of the essential links in the entire color imaging system.

[0004] White balance can be understood as the balance of the white color of an image. In a common color image, red, green and blue are the three basic colors that make up the image. White refers to the three colors of blue, green and red that are in the same proportion and have a certain brightness. In an imaging system, the white perceived by the human eye is not truly output as white, but usually has a certain color cast, which is determined by the chip characteristics of the image sensor. Therefore, for each imaging system, white balance processing is required to achieve a color image output by the system that is basically consistent with the visual effect observed by the human eye.

[0005] Due to the different production processes of image sensors, the color deviation of the output is different. At present, white balance processing algorithms include gray world method, dynamic threshold automatic adjustment method, mirror method, scale mapping method, color correlation method, etc., all of which have different levels of algorithm complexity and certain scene differences; while neural network method and machine learning method with better processing effect cannot be implemented in most systems due to their high processing power requirements, which in turn increases the system cost and volume, becoming an obstacle to the diverse application of the system.

[0006] In view of the shortcomings of the prior art, the present invention provides a white balance processing method with low implementation difficulty for the widely used Sony series image sensors, which can be applied on any processing platform, has good portability and low system requirements. Summary of the invention

[0007] In view of the problems existing in the prior art, the present invention provides a white balance processing method and system for color imaging of an image sensor.

[0008] The present invention is achieved through the following technical solutions:

[0009] A white balance processing method for color imaging of an image sensor comprises the following steps:

[0010] Step 1), statistics and function fitting are performed on the data of R, G and B channels of the white area under different brightness, and a grayscale mapping table is prepared in combination with the grayscale value range of the image;

[0011] Step 2), the grayscale value of the original image to be processed is searched and mapped using a grayscale mapping table to obtain a mapped grayscale value; then the mapped grayscale value is converted to obtain a color image after white balance processing.

[0012] Preferably, in step 1), the following steps are included:

[0013] Step 11), selecting common scenes for image acquisition, and adjusting the brightness of the acquired images to obtain images of different brightness;

[0014] Step 12), performing statistical fitting of the data of R, G, and B channels for the white areas in the images with different brightness;

[0015] Step 13), taking the G channel value as the target and the data of the R and B channels as the base, curve fitting is performed to obtain the fitting functions of R and B;

[0016] Step 14), substitute the grayscale value range of 0 to 255 into the fitting functions of R and B in turn to obtain the corresponding grayscale target values, the corresponding grayscale target values ​​form a grayscale target value data set, and the grayscale values ​​in the grayscale value range and the grayscale target value data set together constitute a grayscale mapping table.

[0017] Preferably, in step 11), when selecting common scenes, natural light or white light is selected.

[0018] Preferably, in step 11), the exposure time is adjusted to obtain images at different brightness.

[0019] Preferably, during the exposure process, the exposure time adjustment rule is: the exposure time when the recorded image data is close to saturation is recorded as E; the number of exposures is evenly distributed between 0 and E, and the exposure value is set each time; during exposure, the shooting scene is kept unchanged, and the corresponding original image data is stored according to the set exposure value.

[0020] Preferably, the exposure values ​​are arranged in order from small to large during storage.

[0021] Preferably, in step 12), the data of the three channels R, G, and B are fitted using the least squares method.

[0022] Preferably, in step 2), the grayscale value of the original image to be processed is searched and mapped in the grayscale value range of the grayscale mapping table, and then the grayscale target value corresponding to the grayscale value of the original image to be processed is output from the grayscale mapping table, and the output grayscale target value is the mapped grayscale value.

[0023] Preferably, in step 2), during conversion, the mapped grayscale values ​​are converted using an interpolation conversion method.

[0024] A white balance processing system for color imaging of an image sensor comprises a grayscale mapping table module and a white balance processing module. The grayscale mapping table module is used to perform statistics and function fitting on data of R, G and B channels of white areas under different brightnesses, and to prepare a grayscale mapping table in combination with the grayscale value range of an image. The white balance processing module is used to search and map the grayscale value of an original image to be processed using the grayscale mapping table to obtain a mapped grayscale value. The mapped grayscale value is then converted to obtain a color image after white balance processing.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] The present invention discloses a white balance processing method for color imaging of an image sensor, which can complete all operation processes in common scenes, has low requirements for the test environment, and has a simple operation method and operation process, has a high image processing speed, and can output high-quality images in a short time. During operation, it is only necessary to search and convert the data in the original image and the data in the grayscale mapping table accordingly, and then the correct color image after white balance processing can be output.

[0027] The white balance processing method of color imaging of an image sensor of the present invention has relatively low engineering complexity. Since the design of complex operations is pre-placed, that is, the grayscale mapping table is prepared in advance, the engineering complexity is greatly reduced, so that the complexity overhead of the O(1) level can be achieved in terms of both time complexity and space complexity.

[0028] The white balance processing system for color imaging of an image sensor of the present invention has extremely strong system compatibility, can be implemented and applied on any embedded processor platform such as FPGA, CPU, DSP, ARM, etc., and is compatible with all system platforms. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a three-channel response curve of R, G and B in a white balance processing method of color imaging of an image sensor of the present invention;

[0030] Figure 2 It is an R channel mapping curve in a white balance processing method for color imaging of an image sensor according to the present invention;

[0031] Figure 3 This is a B channel mapping curve in a white balance processing method for color imaging of an image sensor according to the present invention. DETAILED DESCRIPTION

[0032] The present invention is further described in detail below in conjunction with specific embodiments, which are intended to explain the present invention rather than to limit it.

[0033] The present invention discloses a white balance processing method for color imaging of an image sensor, comprising the following steps:

[0034] Step 1) statistics and function fitting are performed on the data of R, G and B channels of the white area under different brightness, and a grayscale mapping table is prepared in combination with the grayscale value range of the image. The following steps are included:

[0035] Step 11), select common scenes under natural light or white light for image acquisition, and adjust the brightness of the acquired images by adjusting the exposure time to obtain images with different brightness; the adjustment rule of the exposure time is: the exposure time when the recorded image data is close to saturation is recorded as E; the number of exposures is evenly distributed between 0 and E, and the exposure value of each exposure is set; during exposure, the shooting scene is kept unchanged, and the corresponding original image data is stored according to the set exposure value.

[0036] Step 12), performing statistical fitting of the data of R, G, and B channels for the white areas in the images with different brightness;

[0037] Step 13), taking the G channel value as the target and the data of the R and B channels as the base, using the least square method to perform curve fitting to obtain the fitting functions of R and B;

[0038] Step 14), substitute the grayscale value range of 0 to 255 into the fitting functions of R and B to obtain the corresponding grayscale target value. The grayscale values ​​in the grayscale value range and the grayscale target value together constitute a grayscale mapping table.

[0039] Step 2), the grayscale value of the original image to be processed is searched and mapped in the grayscale value range of the grayscale mapping table, and then the grayscale target value corresponding to the grayscale value of the original image to be processed is output from the grayscale mapping table, and the output grayscale target value is the mapped grayscale value.

[0040] Then the mapped grayscale value is converted using an interpolation conversion method, and a color image after white balance processing is obtained after the conversion.

[0041] The implementation steps of a white balance processing method for color imaging of an image sensor are as follows:

[0042] Step 1) making a grayscale mapping table;

[0043] Step 11), select a large area of ​​white objects as a common scene, and in this embodiment, select a wall as the target scene; adjust the exposure time of the system, and record the exposure time when the image data is close to saturation as E. The exposure time is distributed in 40 levels within the value of 0 to E, and the system shooting scene is kept unchanged. After setting each exposure value, the corresponding original image data is stored, and the image data is named 1 to 40 in order from small to large.

[0044] This embodiment takes the Sony series image sensor as the research object and adopts the Sony series imaging system to store the original Bayer format image data.

[0045] Step 12), by software programming, the mean values ​​of the R, G, and B channels of the same position and the same number of pixels of each image data are taken to obtain 40 R, G, and B values. Figure 1 These are the three-channel response curves in the same scene, where the black solid line on the left is the G channel response curve, the black dotted line in the middle is the R channel response curve, and the gray solid line on the right is the B channel response curve.

[0046] Step 13), using the least squares curve fitting function polyfit with R and B as the base and G as the target, perform curve fitting to obtain the fitting function of R and B.

[0047] Step 14), 0 to 255 is used as the input value, and is sequentially substituted into the fitting functions of R and B to obtain two grayscale target values ​​of 256. 0 to 255 and the grayscale target value constitute the grayscale mapping table (such as Figure 1 as shown in the figure).

[0048] Step 2), the R and B values ​​of the image to be processed are searched and mapped according to the grayscale mapping table (such as Figure 2 , 3 As shown, Figure 2 The black solid line in the middle is the grayscale curve of the image to be processed, and the gray dotted line is the mapping curve of the R channel; Figure 3 The black solid line in the middle is the grayscale curve of the image to be processed, and the gray dotted line is the mapping curve of the B channel), and then interpolation conversion is performed to output a color image with correct color.

[0049] The present invention discloses a white balance processing method for color imaging of an image sensor, which can complete all operation processes in common scenes, has low requirements for the test environment, and has a simple operation method and operation process, has a high image processing speed, and can output high-quality images in a short time. During operation, it is only necessary to search and convert the data in the original image and the data in the grayscale mapping table accordingly, and then the correct color image after white balance processing can be output.

[0050] A white balance processing system for color imaging of an image sensor comprises a grayscale mapping table module and a white balance processing module. The grayscale mapping table module is used to perform statistics and function fitting on data of R, G and B channels of white areas under different brightnesses, and to prepare a grayscale mapping table in combination with the grayscale value range of an image; the white balance processing module is used to search and map the grayscale value of an original image to be processed using the grayscale mapping table to obtain a mapped grayscale value; and then the mapped grayscale value is converted to obtain a color image after white balance processing.

[0051] The white balance processing system for color imaging of an image sensor of the present invention has extremely strong system compatibility, can be implemented and applied on any embedded processor platform such as FPGA, CPU, DSP, ARM, etc., and is compatible with all system platforms.

Claims

1. A white balance processing method for color imaging of an image sensor, characterized in that: The following steps are involved: Step 1) statistics and function fitting are performed on the data of R, G and B channels of the white area under different brightness, and a grayscale mapping table is prepared in combination with the grayscale value range of the image; the specific steps are as follows: Step 11), selecting common scenes for image acquisition, and adjusting the brightness of the acquired images to obtain images of different brightness; wherein, when selecting common scenes, natural light or white light is selected; images of different brightness are obtained by adjusting the exposure time, and the adjustment rule of the exposure time is: the exposure time when the recorded image data is close to saturation is recorded as E; the number of exposures is evenly distributed between 0 and E, and the exposure value of each exposure is set; when exposing, the shooting scene is kept unchanged, and the corresponding original image data is stored according to the set exposure value, and the storage is arranged in the order of the exposure value from small to large; Step 12), performing statistical fitting of the data of R, G, and B channels on the white areas in the images with different brightness; Step 13), taking the G channel value as the target and the data of the R and B channels as the base, curve fitting is performed to obtain the fitting functions of R and B; Step 14), the grayscale value range 0-255 is substituted into the fitting functions of R and B in turn to obtain the corresponding grayscale target value, the corresponding grayscale target value forms a grayscale target value data set, and the grayscale values ​​in the grayscale value range and the grayscale target value data set together constitute a grayscale mapping table; Step 2), the grayscale value of the original image to be processed is searched and mapped using the grayscale mapping table to obtain the mapped grayscale value; then the mapped grayscale value is converted to obtain a color image after white balance processing; wherein the grayscale value of the original image to be processed is searched and mapped in the grayscale value range of the grayscale mapping table, and then the grayscale target value corresponding to the grayscale value of the original image to be processed is output from the grayscale mapping table, and the output grayscale target value is the mapped grayscale value; During conversion, the mapped grayscale values ​​are converted using an interpolation conversion method.

2. The white balance processing method for color imaging of an image sensor according to claim 1, characterized in that: In step 12), the data of the three channels R, G, and B are fitted using the least squares method.

3. A white balance processing system for color imaging of an image sensor, characterized in that: A method for implementing white balance processing of color imaging of an image sensor as claimed in any one of claims 1 to 2, comprising a grayscale mapping table module and a white balance processing module, wherein the grayscale mapping table module is used to perform statistics and function fitting on data of R, G and B channels of white areas under different brightnesses, and to prepare a grayscale mapping table in combination with the grayscale value range of the image; the white balance processing module is used to use the grayscale mapping table to search and map the grayscale value of the original image to be processed to obtain a mapped grayscale value; and then the mapped grayscale value is converted to obtain a color image after white balance processing.

Citation Information

Patent Citations

  • White balance processing method, processing device, processing equipment and storage medium

    CN108337496A

  • Plasma two-dimensional display with grey scale white balancing device

    CN1549233A