A white balance correction method and device, electronic equipment and storage medium

By performing initial and secondary corrections on the image and utilizing the correction matrix of the CIE 1931 color space, the problem of inaccurate image color correction in existing technologies is solved, achieving smaller color temperature errors and closer color display effects.

CN117237200BActive Publication Date: 2026-05-08GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU SHIYUAN ELECTRONICS CO LTD
Filing Date
2022-06-06
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Current technologies lack accurate image color correction, resulting in a large color temperature error range and significant differences between the colors displayed on the device and the actual colors.

Method used

By performing initial correction on each pixel to obtain the first RGB gain value, a correction matrix based on the CIE 1931 color space is constructed. Secondary correction is then performed using the RGB gain compensation value to obtain corrected color coordinates that are closer to the target color coordinates.

Benefits of technology

The range of color temperature error has been narrowed, making the color temperature of the corrected color coordinates closer to the target color coordinates, thus improving the accuracy of the correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117237200B_ABST
    Figure CN117237200B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a white balance correction method and device, electronic equipment and a storage medium, wherein the method comprises: obtaining a target color coordinate corresponding to a display mode to be corrected; performing initial correction on each pixel point to obtain a first RGB gain value corresponding to each pixel point, wherein a deviation between a first color coordinate corresponding to the first RGB gain value and the target color coordinate is within a preset error range; confirming a position of the target color coordinate in a correction matrix, the correction matrix being constructed based on a CIE 1931 color space and divided with the first RGB gain value as an origin, and each matrix element in the correction matrix being configured with an RGB gain compensation value with the origin as a reference; and performing secondary correction on the first RGB gain value according to the RGB gain compensation value of the matrix element where the target color coordinate is located to obtain a corrected color coordinate corresponding to the display mode to be corrected, thereby solving the technical problems of inaccurate correction and a large color temperature error range after correction in the prior art.
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 correction method, apparatus, electronic device and storage medium. Background Technology

[0002] With the development of imaging technology, image processing can achieve desired picture effects by adjusting white balance to manipulate image colors. White balance is an indicator that describes how the three primary colors of red, green, and blue are mixed to produce white in a display device. Under any light source, it can restore white objects to white, thereby reproducing different image colors and making the images displayed on the device more realistic.

[0003] Existing correction methods mainly correct the X and Y coordinates in the color coordinates. The correction ends when the corrected X and Y coordinates are within the allowable error range of the target X and Y coordinates.

[0004] The inventors discovered that when correcting image colors using existing technologies, the error between the corrected color coordinates and the target color coordinates is generally quite large, resulting in a large range of color temperature errors. Therefore, the colors of the images displayed on the display device differ significantly from the true colors. Summary of the Invention

[0005] This invention provides a white balance correction method, apparatus, electronic device, and storage medium to solve the technical problems of insufficient accuracy and large range of color temperature error after correction in existing technologies.

[0006] In a first aspect, embodiments of the present invention provide a white balance correction method, comprising:

[0007] Obtain the target color coordinates corresponding to the display mode to be corrected;

[0008] Each pixel is initially corrected to obtain the first RGB gain value corresponding to each pixel. The deviation between the first color coordinates corresponding to the first RGB gain value and the target color coordinates is within a preset error range.

[0009] Confirm the position of the target color coordinates in the calibration matrix. The calibration matrix is ​​based on the CIE 1931 color space and is constructed with the first RGB gain value as the origin. Each matrix unit in the calibration matrix is ​​configured with an RGB gain compensation value with the origin as the reference.

[0010] The first RGB gain value is corrected a second time based on the RGB gain compensation value of the matrix unit where the target color coordinates are located, so as to obtain the corrected color coordinates corresponding to the display mode to be corrected.

[0011] Secondly, embodiments of the present invention provide a white balance correction device, comprising:

[0012] The acquisition unit is used to acquire the target color coordinates corresponding to the display mode to be corrected.

[0013] An initial correction unit is used to perform initial correction on each pixel to obtain the first RGB gain value corresponding to each pixel. The deviation between the first color coordinates corresponding to the first RGB gain value and the target color coordinates is within a preset error range.

[0014] The confirmation unit is used to confirm the position of the target color coordinates mapped in the correction matrix. The correction matrix is ​​based on the CIE1931 color space and is constructed with the first RGB gain value as the origin. Each matrix unit in the correction matrix is ​​configured with an RGB gain compensation value with the origin as the reference.

[0015] The secondary correction unit is used to perform secondary correction on the first RGB gain value based on the RGB gain compensation value of the matrix unit where the target color coordinates are located, so as to obtain the corrected color coordinates corresponding to the display mode to be corrected.

[0016] Thirdly, embodiments of the present invention provide an electronic device, comprising:

[0017] One or more processors;

[0018] Memory, used to store one or more computer programs;

[0019] When one or more computer programs are executed by one or more processors, electronic devices can perform white balance correction methods as described in the first aspect.

[0020] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the white balance correction method as described in the first aspect.

[0021] The aforementioned white balance correction method, apparatus, electronic device, and storage medium, in this method, obtains the target color coordinates corresponding to the display mode to be corrected; performs initial correction on each pixel to obtain a first RGB gain value corresponding to each pixel, wherein the deviation between the first color coordinates corresponding to the first RGB gain value and the target color coordinates is within a preset error range; confirms the position of the target color coordinates mapped in the correction matrix, the correction matrix being constructed based on the CIE 1931 color space, with the first RGB gain value as the origin, and each matrix unit in the correction matrix corresponding to an RGB gain compensation value with the origin as a reference; and performs secondary correction on the first RGB gain value according to the RGB gain compensation value of the matrix unit where the target color coordinates are located, to obtain the corrected color coordinates corresponding to the display mode to be corrected. This application first performs initial correction on the pixels to obtain the first RGB gain value corresponding to each pixel. Then, it determines the matrix unit in the correction matrix constructed with the first RGB gain value as the origin, thereby obtaining the RGB gain compensation value with the first RGB gain value as the origin. The first RGB gain value is then corrected a second time to obtain the corresponding corrected color coordinates, so that the color temperature of the corrected color coordinates after compensation is closer to the color temperature of the target color coordinates, reducing the color temperature error range and solving the technical problems of insufficient correction and large color temperature error range in the prior art. Attached Figure Description

[0022] Figure 1 This is a flowchart illustrating a white balance correction method provided in an embodiment of the present invention.

[0023] Figure 2 A schematic diagram of the CIE 1931 color space provided for an embodiment of the present invention;

[0024] Figure 3 This is a schematic diagram illustrating the distribution of RGB gain values ​​near the first RGB gain value provided in an embodiment of the present invention.

[0025] Figure 4 A schematic diagram of the correction matrix provided in an embodiment of the present invention;

[0026] Figure 5 A schematic diagram of the compensation values ​​of different matrix units in the correction matrix provided in an embodiment of the present invention;

[0027] Figure 6 This is a schematic diagram of the structure of a white balance correction device provided in an embodiment of the present invention;

[0028] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0029] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and not for limiting the invention. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention and not all of the structures.

[0030] It should be noted that, due to space limitations, this application specification does not exhaustively list all possible implementation methods. Those skilled in the art should be able to conceive after reading this application specification that, as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method.

[0031] The embodiments of the present invention will be described in detail below.

[0032] Figure 1 This is a flowchart illustrating a white balance correction method provided in an embodiment of the present invention. Figure 1 As shown, the white balance correction method includes:

[0033] Step S101: Obtain the target color coordinates corresponding to the display mode to be calibrated.

[0034] When display devices such as mobile phones, computers, LCD TVs, and cameras display images, the colors shown may differ from the colors of actual objects. Therefore, white balance correction is necessary. When the colors displayed on a device closely resemble the colors of actual objects as perceived by the human eye, the image quality is considered good. Display devices have corresponding desired color effects, or target color coordinates, for the displayed images in different display modes such as dark, eye-protection, monochrome, or color.

[0035] Color coordinates are the coordinates of a color, also called colorimetric coordinates. Color coordinates are usually represented by X and Y coordinates. A point on a chromaticity diagram can be determined using color coordinates; that is, color coordinates can accurately represent color. In display devices such as LCD TVs, the displayed image colors often deviate from the desired colors. Therefore, it is necessary to correct the image colors under different display modes on this display device. In this embodiment, the display mode that needs correction is referred to as the display mode to be corrected. The image color in the display mode to be corrected consists of multiple pixels, each pixel corresponding to a color coordinate. The image color composed of multiple pixels that achieve the ideal emission color is the desired image effect, and the color coordinate corresponding to each pixel that achieves the ideal emission color is the target color coordinate. Therefore, before correction, this application needs to obtain the target color coordinates corresponding to the pixels of the desired image effect in the display mode to be corrected.

[0036] Step S102: Perform initial correction on each pixel to obtain the first RGB gain value corresponding to each pixel. The deviation between the first color coordinates corresponding to the first RGB gain value and the target color coordinates is within a preset error range.

[0037] Color coordinates can be represented using various systems, including the Munsell color system, the CIE color system, and the XYZ color system. These systems can be converted to each other under certain conditions. For example... Figure 2 As shown, the CIE color system uses the three primary colors of red, green, and blue to synthesize all colors. Different colors of light to be mixed can be represented by the color equation: C = R(R) + G(G) + B(B), where (R), (G), and (B) represent the unit quantities of the three primary colors of red, green, and blue that produce the mixed color, and R, G, and B are the quantities of the three primary colors of red, green, and blue required to match the desired color, called tristimulus values. For monochromatic light of equal energy, the coordinates of each element in the RGB three-dimensional space can be calculated using the tristimulus values, resulting in the CIE 1931 xy chromaticity diagram, i.e., the CIE 1931 color space. In other words, the color emitted by each pixel can be obtained by matching the three primary colors of R, G, and B. Therefore, each pixel can be represented by an RGB gain value; different pixels correspond to different quantities of R, G, and B, i.e., different RGB gain values. The CIE colorimetric system, based on the RGB colorimetric system, can be modified to use three hypothetical primary colors XYZ to establish a new colorimetric system. This system is matched with the tristimulus values ​​of the equal-energy spectrum, namely the CIE 1931 standard colorimetric observer spectral tristimulus values, abbreviated as the XYZ colorimetric system. After transformation, all chromaticity coordinates are positive. The XY coordinates are then normalized to obtain the XY chromaticity coordinates, also known as the CIExyY chromaticity diagram, where the Y-axis represents luminance. In essence, the color emitted by each pixel can be represented by its X and Y chromaticity coordinates, and the chromaticity coordinates and RGB gain values ​​corresponding to each pixel can be converted to each other.

[0038] Color temperature is a unit of measurement representing the color components contained in light, and it can be calculated using color coordinates. There can be a significant difference between the color temperature of a pixel's color coordinates and the color temperature of the target color coordinates. That is, the color coordinates of a pixel and the target color coordinates for achieving the ideal emitted color will both differ to some extent. Due to limitations in correction cost and technology, it is difficult to correct the color coordinates of a pixel to be completely identical to the target color coordinates. Therefore, it is usually necessary to set an error range based on the target color coordinates before correcting the pixel, ensuring that the corrected pixel falls within this error range, thereby reducing the difference between the pixel's color coordinates and the target color coordinates. Of course, in this embodiment, to improve correction accuracy, the preset error range can be minimized, and then initial correction can be performed on each pixel to obtain the first RGB gain value corresponding to each pixel, ensuring that the deviation between the first color coordinates corresponding to the first RGB gain value and the target color coordinates is within the preset error range.

[0039] Step S103: Confirm the position of the target color coordinates in the calibration matrix. The calibration matrix is ​​constructed based on the CIE 1931 color space, with the first RGB gain value as the origin. Each matrix unit in the calibration matrix is ​​configured with an RGB gain compensation value with the origin as the reference.

[0040] Figure 2 This is a schematic diagram of the CIE 1931 color space. Figure 2 This example only illustrates the basic outline of the CIE 1931 color space and does not specifically show the color distribution within the space. Therefore, this embodiment uses the words red, green, and blue to represent the distribution of the three primary colors. Figure 2 As shown, each color can be obtained by matching different amounts of the three primary colors: red, green, and blue, i.e., RGB gain values. Although the human eye perceives certain areas of the CIE 1931 color space as emitting the same color, these colors may actually contain different RGB gain values. That is, the color emitted by the RGB gain value of a pixel is similar to the color emitted by its neighboring RGB gain values. An RGB gain value can be obtained by adding or subtracting the difference between it and its neighboring RGB gain values; this difference is the RGB gain compensation value.

[0041] Based on the distribution pattern of RGB gain in the CIE 1931 color space, a relatively stable RGB gain value can be found relative to the first RGB gain value obtained after initial correction, using this first RGB gain value as the origin. Specifically, the colors of images displayed by a display device may exhibit color cast under certain specific conditions, meaning the RGB gain value corresponding to a pixel changes. These specific conditions may include a protective film applied to the display device or interference from magnetic fields emitted by nearby mobile phones or speakers. By experimenting with display devices under different specific conditions, the inventors were able to find RGB gain values ​​that are relatively prone to change relative to the first RGB gain value and relatively stable RGB gain values. Then, the relatively stable RGB gain values ​​relative to the first RGB gain value are retained, thereby constructing a correction matrix with the first RGB gain value as the origin. Each matrix unit in this correction matrix typically includes multiple RGB gain values, and the differences between these multiple RGB gain values ​​and the first RGB gain value are almost identical. Therefore, a fixed compensation value can be assigned to this difference; that is, each matrix unit is configured with an RGB gain compensation value.

[0042] Since the deviation between the first color coordinates and the target color coordinates corresponding to the first RGB gain value is within a preset error range, this embodiment constructs a correction matrix with the first RGB gain value as the origin, and then determines the position of the target color coordinates mapped in the correction matrix to obtain the difference between the first color coordinates and the target color coordinates more accurately, i.e., the RGB gain compensation value.

[0043] Step S104: Perform secondary correction on the first RGB gain value based on the RGB gain compensation value of the matrix unit where the target color coordinates are located, to obtain the corrected color coordinates corresponding to the display mode to be corrected.

[0044] This embodiment determines the matrix unit of the target color coordinates in the correction matrix by determining the initial RGB gain value corresponding to the target color coordinates. The difference between the first RGB gain value and the initial RGB gain value corresponding to the target color coordinates can be obtained, which is the RGB gain compensation value. Finally, the corrected color coordinates after secondary correction are obtained by summing the RGB gain compensation value and the first RGB gain value.

[0045] The same matrix unit can include RGB gain values ​​corresponding to multiple pixels. The RGB gain compensation value in each matrix unit is the same. Therefore, in this embodiment, the sum of the RGB gain compensation value and the first RGB gain value cannot make the corrected color coordinates and the target color coordinates exactly the same. However, compared with the prior art, this embodiment can further reduce the deviation between the corrected color coordinates and the target color coordinates, thereby making the color temperature of the corrected color coordinates closer to the color temperature of the target color coordinates and narrowing the color temperature error range.

[0046] In the specific implementation process, step S103 can be implemented as follows:

[0047] Step S1031: Map the target color coordinates to the CIE 1931 color space to obtain the initial RGB gain value.

[0048] Step S1032: Determine the matrix cell in the correction matrix based on the initial RGB gain value.

[0049] The color coordinates of each pixel can be represented by RGB gain values. By mapping the target color coordinates to the CIE1931 color space, the initial RGB gain value corresponding to the target color coordinates can be obtained. Then, based on the position of the initial RGB gain value in the correction matrix, the matrix unit of the initial RGB gain value in the correction matrix can be determined.

[0050] In the specific implementation process, step S104 can be implemented as follows:

[0051] Step S1041: Correct the first RGB gain value according to the RGB gain compensation value of the matrix cell in which the target color coordinates are located in the correction matrix to obtain the second RGB gain value.

[0052] Step S1042: Map the second RGB gain value to the CIE 1931 color space to obtain the second color coordinates as the calibration color coordinates corresponding to the display mode to be calibrated.

[0053] Since each matrix unit is configured with an RGB gain compensation value, after confirming that the target color coordinates are in the matrix unit of the correction matrix, the RGB gain compensation value of that matrix unit can be obtained. Thus, the difference between the first RGB gain value and the initial RGB gain value corresponding to the target color coordinates can be determined. Then, the RGB gain compensation value and the first RGB gain value are summed to obtain the corrected second RGB gain value. The second RGB gain value is then mapped to the CIE1931 color space to obtain the corresponding second color coordinates, which are the correction color coordinates corresponding to the display mode to be corrected.

[0054] In practice, the correction matrix covers a portion of the CIE 1931 color space.

[0055] The colors displayed on a screen are created by mixing red, green, and blue in different proportions. Therefore, red, green, and blue are also known as the three primary colors of light, or RGB. RGB values ​​refer to brightness and can be represented by integers. Typically, RGB has 256 brightness levels, represented numerically from 0, 1, 2... up to 255, for a total of 256 levels. These 256 RGB levels can combine to create approximately 16.78 million colors, or 256 × 256 × 256 = 16,777,216. Therefore, the CIE 1931 color space includes various colors composed of different levels of RGB, covering a relatively large range of RGB gain values. The correction matrix in this embodiment is constructed with the first RGB gain value as the origin. The difference between different RGB gain values ​​in the correction matrix and the first RGB gain value is relatively small; that is, the RGB gain values ​​corresponding to the areas covered by the correction matrix are relatively similar. For example, the correction matrix may include multiple RGB gain values ​​such as 110-230-130, 112-228-127, and 109-229-128. Therefore, the correction matrix in this embodiment can cover a portion of the regions emitting different colors in the CIE 1931 color space.

[0056] In practice, the correction matrix can be set as a 3x5 matrix.

[0057] The first RGB gain value is usually surrounded by multiple RGB gain values. Since different RGB gain values ​​that emit similar colors do not differ significantly, the correction matrix constructed in this embodiment can be a 3x3, 4x5, 5x5, or 3x5 matrix. However, through numerous experiments, the inventors discovered that larger matrix styles (4x5 or more) cover more unstable RGB gain values, while smaller matrix styles (3x3 or less) cover fewer RGB gain values, easily eliminating more stable RGB gain values ​​and reducing correction accuracy. Ultimately, the inventors found that constructing a 3x5 correction matrix with each RGB gain value as the origin provides a suitable number of RGB gain values, and these RGB gain values ​​are relatively stable relative to the origin, thus ensuring correction accuracy.

[0058] In practice, the column width of the matrix unit is 0.001 and the row height is 0.002.

[0059] Since each matrix unit of the correction matrix in this embodiment corresponds to an RGB gain compensation value, and each matrix unit typically includes multiple RGB gain values, in order to ensure that the difference between the RGB gain values ​​covered by each matrix unit and the first RGB gain value is almost the same, this embodiment can minimize the column width and row height of the matrix unit to ensure that the error between the RGB gain values ​​in each matrix unit is approximately 0, thereby making the difference between the RGB gain value in each matrix unit and the first RGB gain value almost the same. Specifically, in this embodiment, the column width of the matrix unit can be set to 0.001 and the row height can be set to 0.002 to reduce the compensation error.

[0060] In practice, the RGB gain compensation value is within the range of ±1.

[0061] Because different pixels can correspond to different RGB gain values, and the difference between the RGB gain values ​​around the origin and the first RGB gain value can include values ​​in units of 1, 2, or 3. For example... Figure 3 As shown, in order to obtain relatively stable RGB gain values ​​with the first RGB gain value as the origin, this embodiment will search for multiple RGB gain values ​​in units of ±1. Each color in red, green and blue in units of ±1 can be increased by 1, -1 or 0 based on the original color quantity value, that is, the combination of RGB gain values ​​can include 27 kinds. Then, the RGB gain values ​​that are relatively unstable compared with the first RGB gain value are removed from these 27 kinds. The remaining ones are all relatively stable RGB gain values. Therefore, the combination of relatively stable RGB gain values ​​may be 7, 8 or 10 kinds, etc. Then, the relatively stable RGB gain values ​​are divided and a correction matrix is ​​constructed with the first RGB gain value as the origin. Since the difference between these stable RGB gain values ​​is within the range of ±1, the RGB gain compensation value corresponding to each matrix unit is also within the range of ±1.

[0062] like Figure 2 and 3As shown, when the color coordinates of the corrected pixels are mapped to the CIE 1931 color space, the first RGB gain value can be obtained. Using this first RGB gain value as the origin, a range of ±1 units is used to find 27 possible combinations of RGB gain values. These 27 combinations include: (0-+), (0+-), (-0+), (-+0), (+-0), (+0-), (0-0), (00-), (-00), (00+), (+00), (0+0), (--0), (--+), (-+-), (-0-), (0--), (+--), (++0), (++-), (+0+), (0++), (+-+), (-++), (000), (+++), and (---). Among these 27 RGB gain values, unstable RGB gain values ​​are discarded, and stable RGB gain values ​​are retained. For example... Figure 4 As shown, the 3x5 matrix constructed with the first RGB gain value as the origin only includes a portion of the 27 possible combinations. Figure 5 As shown, each matrix element is configured with a corresponding RGB gain value. The RGB gain compensation value for the matrix element containing the first RGB gain value at the origin is (---). Furthermore, as... Figure 5 As shown, in practical applications, the area corresponding to the compensation value does not completely correspond to the matrix distribution obtained after dividing the CIE 1931 color space. The correction matrix mentioned in this scheme is merely a matrix generation process similar to classification, based on the actual division and statistical analysis of color differences. Figure 5 The bottom point in the second column and third row should actually correspond to the matrix cell in the first column and third row. Its compensation value should be (--0) instead of (00+).

[0063] In the actual implementation process, when all display modes to be calibrated are completed, a bin file is generated based on all calibrated color coordinates.

[0064] When the calibration of the display mode to be calibrated is completed, the image color achieved by the display mode to be calibrated is the desired color effect. Therefore, it is necessary to generate a bin file of the calibration color coordinates of each display mode to be calibrated so that when switching to the display mode next time, the bin file can be directly used for white balance calibration so that the image color in the display mode can achieve the desired color effect.

[0065] To more clearly illustrate the technical solutions of the embodiments of this application, the following description is provided in conjunction with specific application scenarios:

[0066] Assuming the RGB gain value of the pixel to be corrected is 115-120-128, the first RGB gain value obtained by initial correction of this pixel is 115-120-126. The deviation between the first color coordinates corresponding to 115-120-126 and the target color coordinates is within a preset error range. The position of the initial RGB gain value corresponding to the target color coordinates in the correction matrix constructed with 115-120-126 as the origin is determined. For example, matrix cell (2, 3) in the correction matrix... Figure 5 As shown, the RGB gain compensation value corresponding to matrix unit (2, 3) is (+-0). Therefore, the first RGB gain value 115-120-126 and the RGB gain compensation value (+-0) are summed to perform a secondary correction on the first RGB gain value, resulting in the second RGB gain value 116-119-126. Then, by mapping the second RGB gain value to the CIE 1931 color space, the second color coordinates are obtained as the correction color coordinates corresponding to the display mode to be corrected. The final corrected color coordinates are close to the target color coordinates. Therefore, the color temperature calculated based on the corrected color coordinates corresponding to 116-119-126 is also close to the color temperature calculated based on the target color coordinates. This allows the color temperature error range to be controlled within ±100K, greatly reducing the color temperature error range.

[0067] This embodiment first performs initial correction on the pixels to obtain the first RGB gain value corresponding to each pixel. Then, it determines the matrix unit in the matrix constructed with the first RGB gain value as the origin to determine the target color coordinates, thereby obtaining the compensation value for the first RGB gain value. The first RGB gain value is then corrected a second time to obtain the corresponding corrected color coordinates, so that the color temperature of the corrected color coordinates after compensation is closer to the color temperature of the target color coordinates, reducing the color temperature error range and solving the technical problems of insufficient correction and large color temperature error range after correction in the prior art.

[0068] Figure 6 This is a schematic diagram of a white balance correction device provided in an embodiment of the present invention, with reference to... Figure 6 The white balance correction device includes an acquisition unit 210, an initial correction unit 220, a confirmation unit 230, and a secondary correction unit 240.

[0069] The system includes: an acquisition unit 210 for acquiring the target color coordinates corresponding to the display mode to be calibrated; an initial calibration unit 220 for performing initial calibration on each pixel to obtain the first RGB gain value corresponding to each pixel, wherein the deviation between the first color coordinates corresponding to the first RGB gain value and the target color coordinates is within a preset error range; a confirmation unit 230 for confirming the position of the target color coordinates mapped in the calibration matrix, wherein the calibration matrix is ​​constructed based on the CIE 1931 color space, with the first RGB gain value as the origin, and each matrix unit in the calibration matrix is ​​configured with an RGB gain compensation value with the origin as a reference; and a secondary calibration unit 240 for performing secondary calibration on the first RGB gain value according to the RGB gain compensation value of the matrix unit where the target color coordinates are located, to obtain the calibrated color coordinates corresponding to the display mode to be calibrated.

[0070] Based on the above embodiments, the confirmation unit 230 includes:

[0071] The first mapping module is used to map the target color coordinates to the CIE 1931 color space to obtain the initial RGB gain value.

[0072] The first confirmation module is used to confirm the matrix cell in the correction matrix based on the initial RGB gain value.

[0073] Based on the above embodiments, the secondary correction unit 240 includes:

[0074] The correction module is used to correct the first RGB gain value based on the RGB gain compensation value of the matrix cell in which the target color coordinates are located in the correction matrix, so as to obtain the second RGB gain value.

[0075] The second mapping module is used to map the second RGB gain value to the CIE 1931 color space to obtain the second color coordinates as the correction color coordinates corresponding to the display mode to be corrected.

[0076] Based on the above embodiments, the correction matrix covers a portion of the CIE 1931 color space.

[0077] Based on the above embodiments, the correction matrix is ​​a 3-row, 5-column matrix.

[0078] Based on the above embodiment, the column width of the matrix unit is 0.001 and the row height is 0.002.

[0079] Based on the above embodiments, the RGB gain compensation value is within the range of ±1.

[0080] Based on the above embodiments, it also includes:

[0081] The generation unit is used to generate a bin file based on all the calibration color coordinates when all display modes to be calibrated are completed.

[0082] The white balance correction device provided in this embodiment of the invention is included in an electronic device and can be used to execute the corresponding white balance correction method provided in the above embodiment, and has the corresponding functions and beneficial effects.

[0083] It is worth noting that in the above embodiments of the white balance correction device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0084] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Figure 7 As shown, the electronic device includes a processor 610 and a memory 620, and may also include an input device 630, an output device 640, and a communication device 650; the number of processors 410 in the electronic device may be one or more. Figure 7 Taking a processor 610 as an example; the processor 610, memory 620, input device 630, output device 640, and communication device 650 in the electronic device can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.

[0085] The memory 620, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the white balance correction method in this embodiment of the invention. The processor 610 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 620, thereby implementing the aforementioned white balance correction method.

[0086] The memory 620 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 620 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 620 may further include memory remotely located relative to the processor 610, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0087] Input device 630 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 640 may include display devices such as a display screen.

[0088] The aforementioned electronic device includes a white balance correction device, which can be used to perform any white balance correction method and has corresponding functions and beneficial effects.

[0089] This invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program performs relevant operations in the white balance correction method provided in any embodiment of this application and has corresponding functions and beneficial effects.

[0090] Those skilled in the art will understand that embodiments of this application may be provided as methods, systems, or computer program products.

[0091] Therefore, this application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce implementations of the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0092] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0093] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0094] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0095] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A white balance correction method, characterized in that, include: Obtain the target color coordinates corresponding to the display mode to be calibrated, wherein the display mode to be calibrated includes dark mode, eye protection mode, monochrome mode and color mode; Each pixel is initially corrected to obtain the first RGB gain value corresponding to each pixel. The deviation between the first color coordinate corresponding to the first RGB gain value and the target color coordinate is within a preset error range. Confirm the position of the target color coordinates mapped in the correction matrix. The correction matrix is ​​based on the CIE 1931 color space and is constructed with the first RGB gain value as the origin. Each matrix unit in the correction matrix is ​​configured with an RGB gain compensation value with the origin as a reference. The first RGB gain value is corrected a second time based on the RGB gain compensation value of the matrix unit where the target color coordinates are located, so as to obtain the corrected color coordinates corresponding to the display mode to be corrected; The step of confirming the position of the target color coordinates mapped in the correction matrix includes: The target color coordinates are mapped to the CIE 1931 color space to obtain the initial RGB gain values; The matrix cell in the correction matrix is ​​determined based on the initial RGB gain value; The step of performing secondary correction on the first RGB gain value based on the RGB gain compensation value of the matrix unit where the target color coordinates are located to obtain the corrected color coordinates corresponding to the display mode to be corrected includes: The first RGB gain value is corrected based on the RGB gain compensation value of the matrix cell in which the target color coordinates are located in the correction matrix to obtain the second RGB gain value; The second RGB gain value is mapped to the CIE 1931 color space to obtain the second color coordinates, which are used as the correction color coordinates corresponding to the display mode to be corrected.

2. The white balance correction method according to claim 1, characterized in that, The correction matrix covers a portion of the CIE1931 color space.

3. The white balance correction method according to claim 2, characterized in that, The correction matrix is ​​a 3-row, 5-column matrix.

4. The white balance correction method according to claim 1, characterized in that, The column width of the matrix unit is 0.001, and the row height is 0.

002.

5. The white balance correction method according to claim 1, characterized in that, The RGB gain compensation value is within the range of ±1.

6. The white balance correction method according to claim 1, characterized in that, The white balance correction method further includes: Once all display modes to be calibrated are calibrated, a bin file is generated based on all calibrated color coordinates.

7. A white balance correction device, characterized in that, include: The acquisition unit is used to acquire the target color coordinates corresponding to the display mode to be calibrated, wherein the display mode to be calibrated includes dark mode, eye protection mode, monochrome mode and color mode; An initial correction unit is used to perform initial correction on each pixel to obtain a first RGB gain value corresponding to each pixel. The deviation between the first color coordinate corresponding to the first RGB gain value and the target color coordinate is within a preset error range. A confirmation unit is used to confirm the position of the target color coordinates mapped in the correction matrix. The correction matrix is ​​constructed based on the CIE1931 color space, with the first RGB gain value as the origin. Each matrix unit in the correction matrix is ​​configured with an RGB gain compensation value with the origin as a reference. The secondary correction unit is used to perform secondary correction on the first RGB gain value based on the RGB gain compensation value of the matrix unit where the target color coordinates are located, so as to obtain the corrected color coordinates corresponding to the display mode to be corrected. The confirmation unit includes: The first mapping module is used to map the target color coordinates to the CIE 1931 color space to obtain the initial RGB gain value; The first confirmation module is used to confirm the matrix cell in the correction matrix based on the initial RGB gain value. The secondary correction unit includes: The correction module is used to correct the first RGB gain value according to the RGB gain compensation value of the matrix unit in which the target color coordinates are located in the correction matrix, so as to obtain the second RGB gain value. The second mapping module is used to map the second RGB gain value to the CIE 1931 color space to obtain the second color coordinates as the correction color coordinates corresponding to the display mode to be corrected.

8. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more computer programs; When the one or more computer programs are executed by the one or more processors, the electronic device implements the white balance correction method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the white balance correction method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Automatic white balance correction method and device and computer storage medium

    CN112492286A