Image color temperature adjusting method and device, computer equipment, readable storage medium and program product

By performing the brightness transformation and use of target mapping curves on the image, the problem of poor color temperature adjustment in the prior art is solved, and high-precision color temperature adjustment under different brightness conditions is achieved, and more accurate color temperature tones are obtained.

CN119299865APending Publication Date: 2025-01-10SHENZHEN XIHUA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411344493.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the prior art, the image color temperature adjustment method adopts a fixed mapping formula, which leads to poor adaptability of color temperature adjustment and is difficult to achieve high-precision color temperature adjustment, especially in different brightness conditions, which is difficult to accurately adjust the color temperature offset.

Method used

By performing brightness transformation on the three primary color gamuts of the image to be processed, the target mapping curve is determined based on the brightness data and the preset brightness offset table, the color difference data is mapped through the target mapping curve, the target color difference data is obtained, and the three primary color transformation is performed. Implement adaptability adjustment of chromatic aberration data under different brightness conditions.

Benefits of technology

The image color temperature is accurately adjusted, adaptive adjustment can be made according to different brightness conditions, improving the accuracy and adaptability of color temperature adjustment, and obtaining more accurate color temperature and tones.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299865A_ABST
    Figure CN119299865A_ABST
Patent Text Reader

Abstract

The invention relates to an image color temperature adjusting method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: performing brightness and chroma conversion on three primary color domains of a to-be-processed image to obtain brightness and color domain data; determining a target mapping curve according to the brightness data of the brightness and color domain data and a preset brightness offset table; wherein the preset hue offset table is used for determining chromatic aberration offsets corresponding to bright color domain data under different brightness; mapping the color difference data of the bright color domain data through the target mapping curve to obtain target color difference data; and performing three-primary-color transformation on the bright color domain data corresponding to the target color difference data to obtain a target three-primary-color domain, and determining a target image according to the target three-primary-color domain. By adopting the method, the color temperature adjustment offset can be adaptively adjusted according to different brightness conditions, so that a more accurate color temperature adjustment method is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image color temperature adjustment method, device, computer equipment, computer-readable storage medium and computer program product. Background Art

[0002] With the development of image processing technology, the colors collected by different image sensors in the same shooting scene will be different and different from the human eye. Therefore, it is necessary to adjust the color temperature of the captured image to restore the true color. The current color temperature adjustment method usually transforms the color matrix coordinates of the captured image through a fixed mapping formula. However, the color temperature adjustment method using a fixed mapping formula is prone to poor adaptability of color temperature adjustment, making it difficult for color temperature adjustment to meet actual application requirements and difficult to complete high-precision color temperature adjustment tasks. Therefore, there is an urgent need for an image color temperature adjustment method that can adaptively adjust the color temperature adjustment offset according to different brightness conditions, so as to achieve a more accurate color temperature adjustment method. Summary of the invention

[0003] Based on this, it is necessary to provide an image color temperature adjustment method, device, computer equipment, computer-readable storage medium and computer program product that can adaptively adjust the color temperature adjustment offset according to different brightness conditions to address the above technical problems.

[0004] In a first aspect, the present application provides a method for adjusting image color temperature, comprising:

[0005] Perform brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain brightness and color domain data;

[0006] Determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses;

[0007] Mapping the color difference data of the bright color domain data through the target mapping curve to obtain target color difference data;

[0008] Perform three-primary-color transformation on the bright color domain data corresponding to the target color difference data to obtain a target three-primary-color domain, and determine a target image according to the target three-primary-color domain.

[0009] In one embodiment, determining the target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table includes:

[0010] Determine the color difference offset of the bright color domain data according to the brightness data of the bright color domain data and a preset brightness offset table;

[0011] The target mapping curve is determined according to the chromatic aberration offset.

[0012] In one of the embodiments, before determining the color difference offset of the bright color domain data according to the brightness data of the bright color domain data and a preset brightness offset table, the method further includes:

[0013] Get the preset color temperature target;

[0014] The preset brightness offset table is determined according to the hue target value of the preset color temperature target.

[0015] In one embodiment, the color difference offset includes: a first component deviation and a second component deviation; and determining the target mapping curve according to the color difference offset includes:

[0016] Determine the horizontal coordinate of the mapping coordinate point according to the first component deviation;

[0017] Determine the ordinate of the mapping coordinate point according to the second component deviation; wherein the first component deviation and the second component deviation respectively represent the color difference deviation information of different colors;

[0018] The target mapping curve is constructed according to the mapping coordinate points.

[0019] In one embodiment, the color difference data includes: a first component color difference and a second component color difference; mapping the color difference data of the bright color domain data by the target mapping curve to obtain the target color difference data includes:

[0020] Accumulate and calculate the abscissa of the target mapping curve and the color difference of the first component corresponding to the abscissa to obtain a target first component;

[0021] Accumulate and calculate the ordinate of the target mapping curve and the color difference of the second component corresponding to the ordinate to obtain a target second component;

[0022] The target color difference data is constructed according to the target first component and the target second component.

[0023] In one of the embodiments, after determining the target image according to the target three primary color gamut, the method further includes:

[0024] Performing real-time rendering on the target image to obtain a real-time rendering image;

[0025] The real-time rendering image is displayed.

[0026] In a second aspect, the present application also provides an image color temperature adjustment device, comprising:

[0027] A brightness and chromaticity transformation module is used to transform the brightness and chromaticity of the three primary color domains of the image to be processed to obtain brightness and chromaticity domain data;

[0028] A curve determination module, used to determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses;

[0029] A mapping module, used for mapping the color difference data of the bright color domain data through the target mapping curve to obtain target color difference data;

[0030] The three-primary color transformation module is used to perform three-primary color transformation on the bright color domain data corresponding to the target color difference data to obtain a target three-primary color domain, and determine a target image according to the target three-primary color domain.

[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0032] Perform brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain brightness and color domain data;

[0033] Determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses;

[0034] Mapping the color difference data of the bright color domain data through the target mapping curve to obtain target color difference data;

[0035] Perform three-primary-color transformation on the bright color domain data corresponding to the target color difference data to obtain a target three-primary-color domain, and determine a target image according to the target three-primary-color domain.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0037] Perform brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain brightness and color domain data;

[0038] Determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses;

[0039] Mapping the color difference data of the bright color domain data through the target mapping curve to obtain target color difference data;

[0040] Perform three-primary-color transformation on the bright color domain data corresponding to the target color difference data to obtain a target three-primary-color domain, and determine a target image according to the target three-primary-color domain.

[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0042] Perform brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain brightness and color domain data;

[0043] Determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses;

[0044] Mapping the color difference data of the bright color domain data through the target mapping curve to obtain target color difference data;

[0045] Perform three-primary-color transformation on the bright color domain data corresponding to the target color difference data to obtain a target three-primary-color domain, and determine a target image according to the target three-primary-color domain.

[0046] The above-mentioned image color temperature adjustment method, device, computer equipment, computer-readable storage medium and computer program product obtain bright color domain data by performing brightness and chromaticity transformation on the three primary color domains of the image to be processed; determine the target mapping curve according to the brightness data of the bright color domain data and the preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data under different brightness; map the color difference data of the bright color domain data through the target mapping curve to obtain the target color difference data; perform three primary color transformation on the bright color domain data corresponding to the target color difference data to obtain the target three primary color domains, and determine the target image according to the target three primary color domains. Therefore, the target mapping curve is determined through the brightness data and the preset brightness offset table, and then the color difference data of the bright color domain data is mapped through the target mapping curve to obtain the target color difference data, thereby realizing adaptive and precise adjustment of the color difference data under different brightness conditions, so that the color temperature of the image can be adjusted more accurately to obtain a target image with more accurate color temperature and hue. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0048] FIG1 is a diagram showing an application environment of a method for adjusting image color temperature in one embodiment;

[0049] FIG2 is a schematic diagram of a flow chart of a method for adjusting image color temperature in one embodiment;

[0050] FIG3 is a schematic diagram of a method for adjusting image color temperature using different color difference offsets at different brightness levels in one embodiment;

[0051] FIG4 is a schematic diagram of coordinates corresponding to a target mapping curve of an image color temperature adjustment method according to an embodiment;

[0052] FIG5 is a schematic diagram of a flow chart of a method for adjusting image color temperature in one embodiment;

[0053] FIG6 is a structural block diagram of an image color temperature adjustment device in one embodiment;

[0054] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] The image color temperature adjustment method provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1. The terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on a cloud or other network server. The server 104 performs a brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain the brightness domain data; determines the target mapping curve according to the brightness data of the brightness domain data and the preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the brightness domain data under different brightness; maps the color difference data of the brightness domain data through the target mapping curve to obtain the target color difference data; performs a three-primary color transformation on the brightness domain data corresponding to the target color difference data to obtain the target three primary color domains, and determines the target image according to the target three primary color domains. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0057] In an exemplary embodiment, as shown in FIG2 , a method for adjusting the color temperature of an image is provided, and the method is described by taking the application of the method to the server 104 in FIG1 as an example, and includes the following steps 202 to 208. Among them:

[0058] Step 202, performing brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain brightness and color domain data.

[0059] Among them, the image to be processed can be obtained from some pre-prepared image sets, or it can be an image obtained in real time through a camera device, but it is not limited to this. The three primary color gamut refers to the RGB (including the three primary colors of red, green and blue) color space. Bright color domain data refers to the YUV color space. It should be noted that in the YUV color space, Y represents brightness data, UV represents color difference data, and U / V represents different color signals, so the R and B signals are directly used to represent the UV of the chromaticity, that is, the UV signal is used to offset the color of a pixel without changing its brightness, or the UV signal is used to make the brightness of a color offset according to a certain reference. The higher the UV value, the more saturated the color of the pixel will be. Bright chromaticity transformation refers to the transformation process of transforming the three primary color gamut into bright color domain data.

[0060] In some embodiments, the brightness and chromaticity transformation is performed on the three primary color domains of the image to be processed based on a preset conversion formula, the three primary color domains are converted into color difference signals, and then the color difference signals are re-quantized to obtain brightness and chromaticity domain data.

[0061] The conversion formula may adopt various RGB conversion formulas, for example, converting the RGB color space to the YUV color space according to the BT.601 standard, but is not limited thereto.

[0062] Step 204 , determining a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses.

[0063] The brightness data refers to the Y value in the bright color domain data YUV, and the Y value corresponding to each pixel may be different, so the target mapping curve corresponding to each pixel may be different.

[0064] In some embodiments, determining a target mapping curve based on brightness data of bright color domain data and a preset brightness offset table includes: determining a color difference offset of the bright color domain data based on the brightness data of the bright color domain data and a preset brightness offset table; and determining a target mapping curve based on the color difference offset.

[0065] The color difference offset is used to indicate the specific color value offset of the offset pixel. For example, if the color difference offset is 5, the corresponding color component of the corresponding pixel point needs to be offset by 5 bits.

[0066] In some embodiments, the color difference offset is obtained by looking up the brightness data of the bright color domain data in a preset brightness offset table. It should be noted that since the bit width of the brightness data is generally 8 bits, and the preset brightness offset table has 16 values, the brightness data needs to be shifted right by 4 bits first to obtain a lower table (index) between 0 and 15, and the last 4 bits of the brightness data are used as the interpolation weight to obtain the final color difference offset.

[0067] It should be noted that when the color difference offset is the same but the brightness data of the image is different, the color temperature change of the image is also different. Please refer to Figure 3 for details. Figure 3 shows the color plane corresponding to the color difference data corresponding to different brightness data. Therefore, for different color temperature targets, to change the hue of the image to a specific value corresponding to the color temperature target, it is necessary to look up the table for different brightness data to determine a more accurate preset brightness offset table.

[0068] Specifically, assuming that the brightness data of a pixel is 120, the value is 7 after shifting right four bits, and the remainder is 8; in the preset brightness offset table, the value with subscript 7 is (counting from 0) -13, and the number with subscript (7+1) is -15. Use 8 as the weight between -13 and -15 (note that the sum of the weights here is 16) to calculate the final offset value. The specific calculation formula is as follows: ((-13)*8+(-15)*(16-8)) / 16=-14.

[0069] The color difference offset may be an offset value of U / V, and the brightness data may be Y.

[0070] In some embodiments, the color difference offset includes: a first component deviation and a second component deviation; determining a target mapping curve based on the color difference offset includes: determining the horizontal coordinate of a mapping coordinate point based on the first component deviation; determining the vertical coordinate of the mapping coordinate point based on the second component deviation; wherein the first component deviation and the second component deviation respectively represent the color difference deviation information of different colors; and constructing a target mapping curve based on the mapping coordinate points.

[0071] The first component deviation is the deviation of U, and the second component deviation is the deviation of V.

[0072] Please refer to Figure 4, which shows an image color coordinate system constructed by the first component deviation and the second component deviation. In some embodiments, the first component deviation is used as the horizontal coordinate, and the second component deviation is used as the vertical coordinate. The horizontal coordinate of the mapping coordinate point corresponding to each pixel can be determined according to the first component deviation; the vertical coordinate of the mapping coordinate point corresponding to each pixel can be determined according to the second component deviation. After determining the specific coordinates of each mapping coordinate point, a target mapping curve is constructed according to the mapping coordinate points with determined coordinates for subsequent precise mapping of the image, thereby achieving precise control of the color temperature of the image.

[0073] It should be further explained that in Figure 4, the center point is the white point. When the values ​​of UV are all 0, the image is gray. By adding / subtracting values ​​of different sizes to the color difference data corresponding to U / V, the color temperature of the entire image can be controlled to shift. For example, if a subtraction is applied to the color difference data of U as a whole, and an addition is applied to the color difference data of V as a whole, the color center point of the image will shift to the second quadrant in the upper left corner, and the entire image will appear warm. Similarly, if an addition is applied to the color difference data of U and a subtraction is applied to the color difference data of V, the color center point of the image will move to the fourth quadrant in the lower right corner, and the image will appear cold as a whole.

[0074] In some embodiments, before determining the color difference offset of the bright color domain data according to the brightness data of the bright color domain data and a preset brightness offset table, the method further includes: obtaining a preset color temperature target; and determining a preset brightness offset table according to a hue target value of the preset color temperature target.

[0075] The preset color temperature target may be various types of color temperature styles, such as cool tones, warm tones, etc., or may be a specific color tone value, but is not limited thereto.

[0076] In some embodiments, the hue data corresponding to the preset color temperature target can be determined according to the preset hue value table, and the preset brightness offset table can be determined according to the hue data. For example, when the preset color temperature target is that the overall hue of the image is warmer, the preset brightness offset table determined is as follows:

[0077] U_offset={-1,-2,-2,-5,-7,-9,-11,-13,-15,-17,-21,-25,-26,-27,-27,-27};

[0078] V_offset={1, 3, 3, 8, 8, 10, 13, 17, 19, 22, 25, 28, 31, 31, 33, 33};

[0079] Among them, U_offset is the brightness offset table corresponding to the first component, V_offset is the brightness offset table corresponding to the second component, and the first data in the table corresponds to the color difference offset of the first component when the brightness data is equal to 0, and so on.

[0080] Among them, all the preset brightness offset tables are designed based on actual application experience, and can also be set according to specific application requirements, without limitation thereto.

[0081] In this embodiment, by determining the corresponding preset brightness offset table according to the preset color temperature target, the specific color temperature adjustment process can be effectively adjusted so that the specific color temperature adjustment is more accurate and meets the user's needs.

[0082] Step 206 , mapping the color difference data of the bright color domain data through the target mapping curve to obtain target color difference data.

[0083] The mapping process is a process of performing color shift on the color difference data according to the color difference offset in the target mapping curve.

[0084] In some embodiments, by mapping the color difference data of the bright color domain data through a target mapping curve, the color difference data can be efficiently offset and adjusted to obtain the target color difference data after color temperature adjustment, and the overall color difference data mapping through the target mapping curve can be used for the subsequent more intuitive observation of the color temperature change process.

[0085] In some embodiments, the color difference data includes: a first component color difference and a second component color difference; mapping the color difference data of the bright color domain data through a target mapping curve to obtain target color difference data, including: accumulating the abscissa of the target mapping curve with the first component color difference corresponding to the abscissa to obtain the target first component; accumulating the ordinate of the target mapping curve with the second component color difference corresponding to the ordinate to obtain the target second component; constructing the target color difference data based on the target first component and the target second component.

[0086] In some embodiments, the first component color difference and the second component color difference are mapped and calculated according to the abscissa and ordinate of the target mapping curve, so as to quickly and accurately determine the target first component and the target second component, and then determine the target color difference data.

[0087] Step 208, performing three-primary color transformation on the bright color domain data corresponding to the target color difference data to obtain the target three-primary color domain, and determining the target image according to the target three-primary color domain.

[0088] The three-primary color transformation refers to the process of transforming the bright color domain data into the three-primary color domain.

[0089] In some embodiments, the bright color domain data corresponding to the target color difference data may be transformed into three primary colors using a preset conversion formula to obtain a target three primary color domain.

[0090] The conversion formula may adopt various RGB conversion formulas, such as converting YUV color space to RGB color space according to the BT.601 standard, but is not limited thereto. However, in the conversion of the three primary colors, the same conversion formula as that of the brightness and chroma conversion is used as much as possible to avoid errors caused by different conversion situations.

[0091] In some embodiments, the image to be processed is subjected to color difference adjustment according to the target three primary color gamuts, thereby determining the target image.

[0092] In the above-mentioned image color temperature adjustment method, the bright color domain data is obtained by performing a brightness transformation on the three primary color domains of the image to be processed; the target mapping curve is determined according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data under different brightnesses; the color difference data of the bright color domain data is mapped through the target mapping curve to obtain the target color difference data; the bright color domain data corresponding to the target color difference data is transformed into the three primary colors to obtain the target three primary color domains, and the target image is determined according to the target three primary color domains. Therefore, the target mapping curve is determined through the brightness data and the preset brightness offset table, and then the color difference data of the bright color domain data is mapped through the target mapping curve to obtain the target color difference data, thereby realizing adaptive and precise adjustment of the color difference data under different brightness conditions, and therefore, the color temperature of the image can be adjusted more accurately to obtain a target image with more accurate color temperature and hue.

[0093] In an exemplary embodiment, as shown in FIG5 , after determining the target image according to the target three primary color gamut, the method further includes: steps 502 to 504. Among them:

[0094] Step 502: Render the target image in real time to obtain a real-time rendering image.

[0095] In some embodiments, during the process of color temperature adjustment of the target image, the changes in the image during each specific color temperature adjustment process are rendered in real time to obtain a real-time rendering image of the corresponding stage, thereby improving the observation details of the changes in the entire image color temperature adjustment process, and thus being more conducive to the subsequent specific judgment of further adjustment of the image color temperature.

[0096] Step 504: display the real-time rendering image.

[0097] In some embodiments, a more sophisticated real-time rendering process can be performed through third-party software. In the specific color temperature adjustment process, the corresponding color difference offset will be uploaded to the corresponding third-party software for real-time rendering to improve the real-time display accuracy of the color temperature adjustment process.

[0098] In this embodiment, by rendering the target image in real time to obtain a real-time rendering image, and displaying the real-time rendering image in real time, the observation details of the changes in the entire image color temperature adjustment process can be improved, which is more conducive to the subsequent specific judgment of further adjustment of the image color temperature.

[0099] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0100] Based on the same inventive concept, the embodiment of the present application also provides an image color temperature adjustment device for implementing the above-mentioned image color temperature adjustment method. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the image color temperature adjustment device provided below can refer to the limitations of the image color temperature adjustment method above, and will not be repeated here.

[0101] In an exemplary embodiment, as shown in FIG6 , an image color temperature adjustment device is provided, comprising: a brightness and chromaticity conversion module 601, a curve determination module 602, a mapping module 603 and a three-primary color conversion module 604, wherein:

[0102] Brightness and chroma transformation module 601, used to transform the brightness and chroma of the three primary color domains of the image to be processed to obtain brightness and chroma domain data;

[0103] The curve determination module 602 is used to determine the target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightness;

[0104] A mapping module 603 is used to map the color difference data of the bright color domain data through a target mapping curve to obtain target color difference data;

[0105] The three-primary color transformation module 604 is used to perform three-primary color transformation on the bright color domain data corresponding to the target color difference data to obtain the target three-primary color domain, and determine the target image according to the target three-primary color domain.

[0106] In some embodiments, the curve determination module 602 is further used to determine the color difference offset of the bright color domain data according to the brightness data of the bright color domain data and a preset brightness offset table; and determine the target mapping curve according to the color difference offset.

[0107] In some embodiments, before determining the color difference offset of the bright color domain data based on the brightness data of the bright color domain data and a preset brightness offset table, the device also includes: an offset table determination module for obtaining a preset color temperature target; and determining a preset brightness offset table based on a hue target value of the preset color temperature target.

[0108] In some embodiments, the color difference offset includes: a first component deviation and a second component deviation; the curve determination module 602 is also used to determine the horizontal coordinate of the mapping coordinate point according to the first component deviation; determine the vertical coordinate of the mapping coordinate point according to the second component deviation; wherein the first component deviation and the second component deviation respectively represent the color difference deviation information of different colors; and construct a target mapping curve according to the mapping coordinate points.

[0109] In some embodiments, the color difference data includes: a first component color difference and a second component color difference; the mapping module 603 is also used to accumulate the horizontal coordinate of the target mapping curve and the first component color difference corresponding to the horizontal coordinate to obtain the target first component; accumulate the vertical coordinate of the target mapping curve and the second component color difference corresponding to the vertical coordinate to obtain the target second component; construct the target color difference data according to the target first component and the target second component.

[0110] In some embodiments, after determining the target image according to the target three primary color gamut, the device further includes: a real-time rendering module, configured to perform real-time rendering on the target image to obtain a real-time rendering image; and display the real-time rendering image.

[0111] The above-mentioned image color temperature adjustment device obtains bright color domain data by performing brightness and chromaticity transformation on the three primary color domains of the image to be processed; determines the target mapping curve according to the brightness data of the bright color domain data and the preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data under different brightness; maps the color difference data of the bright color domain data through the target mapping curve to obtain the target color difference data; performs three primary color transformation on the bright color domain data corresponding to the target color difference data to obtain the target three primary color domains, and determines the target image according to the target three primary color domains. Therefore, the target mapping curve is determined through the brightness data and the preset brightness offset table, and then the color difference data of the bright color domain data is mapped through the target mapping curve to obtain the target color difference data, thereby realizing adaptive and precise adjustment of the color difference data under different brightness conditions, and therefore, the color temperature of the image can be adjusted more accurately to obtain a target image with more accurate color temperature and hue.

[0112] Each module in the above-mentioned image color temperature adjustment device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0113] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store preset brightness offset table data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for adjusting the color temperature of an image is implemented.

[0114] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0115] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0116] Perform brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain brightness and color domain data;

[0117] Determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses;

[0118] Mapping the color difference data of the bright color domain data through the target mapping curve to obtain the target color difference data;

[0119] The bright color domain data corresponding to the target color difference data is transformed into three primary colors to obtain the target three primary color domain, and the target image is determined according to the target three primary color domain.

[0120] In one embodiment, when the processor executes the computer program, the following steps are further implemented: determining the color difference offset of the bright color domain data according to the brightness data of the bright color domain data and a preset brightness offset table; and determining the target mapping curve according to the color difference offset.

[0121] In one embodiment, before determining the color difference offset of the bright color domain data based on the brightness data of the bright color domain data and a preset brightness offset table, the processor further implements the following steps when executing the computer program: obtaining a preset color temperature target; determining a preset brightness offset table based on a hue target value of the preset color temperature target.

[0122] In one embodiment, the color difference offset includes: a first component deviation and a second component deviation; when the processor executes the computer program, the following steps are also implemented: determining the horizontal coordinate of the mapping coordinate point according to the first component deviation; determining the vertical coordinate of the mapping coordinate point according to the second component deviation; wherein the first component deviation and the second component deviation respectively represent the color difference deviation information of different colors; and constructing a target mapping curve according to the mapping coordinate points.

[0123] In one embodiment, the color difference data includes: a first component color difference and a second component color difference; when the processor executes the computer program, the following steps are also implemented: the abscissa of the target mapping curve is accumulated with the first component color difference corresponding to the abscissa to obtain the target first component; the ordinate of the target mapping curve is accumulated with the second component color difference corresponding to the ordinate to obtain the target second component; and the target color difference data is constructed according to the target first component and the target second component.

[0124] In one embodiment, after determining the target image according to the target three primary color gamut, the processor further implements the following steps when executing the computer program: rendering the target image in real time to obtain a real-time rendering image; and displaying the real-time rendering image.

[0125] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0126] Perform brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain brightness and color domain data;

[0127] Determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses;

[0128] Mapping the color difference data of the bright color domain data through the target mapping curve to obtain the target color difference data;

[0129] The bright color domain data corresponding to the target color difference data is transformed into three primary colors to obtain the target three primary color domain, and the target image is determined according to the target three primary color domain.

[0130] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining the color difference offset of the bright color domain data according to the brightness data of the bright color domain data and a preset brightness offset table; and determining the target mapping curve according to the color difference offset.

[0131] In one embodiment, before determining the color difference offset of the bright color domain data based on the brightness data of the bright color domain data and a preset brightness offset table, the computer program, when executed by the processor, also implements the following steps: obtaining a preset color temperature target; determining a preset brightness offset table based on the hue target value of the preset color temperature target.

[0132] In one embodiment, the color difference offset includes: a first component deviation and a second component deviation; when the computer program is executed by a processor, the following steps are also implemented: determining the horizontal coordinate of the mapping coordinate point according to the first component deviation; determining the vertical coordinate of the mapping coordinate point according to the second component deviation; wherein the first component deviation and the second component deviation respectively represent the color difference deviation information of different colors; and constructing a target mapping curve according to the mapping coordinate points.

[0133] In one embodiment, the color difference data includes: a first component color difference and a second component color difference; when the computer program is executed by a processor, the following steps are also implemented: the abscissa of the target mapping curve is accumulated with the first component color difference corresponding to the abscissa to obtain the target first component; the ordinate of the target mapping curve is accumulated with the second component color difference corresponding to the ordinate to obtain the target second component; and the target color difference data is constructed according to the target first component and the target second component.

[0134] In one embodiment, after determining the target image according to the target three primary color gamut, the computer program further implements the following steps when executed by the processor: rendering the target image in real time to obtain a real-time rendering image; and displaying the real-time rendering image.

[0135] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0136] Perform brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain brightness and color domain data;

[0137] Determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses;

[0138] Mapping the color difference data of the bright color domain data through the target mapping curve to obtain the target color difference data;

[0139] The bright color domain data corresponding to the target color difference data is transformed into three primary colors to obtain the target three primary color domain, and the target image is determined according to the target three primary color domain.

[0140] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: determining the color difference offset of the bright color domain data according to the brightness data of the bright color domain data and a preset brightness offset table; and determining the target mapping curve according to the color difference offset.

[0141] In one embodiment, before determining the color difference offset of the bright color domain data based on the brightness data of the bright color domain data and a preset brightness offset table, the computer program, when executed by the processor, also implements the following steps: obtaining a preset color temperature target; determining a preset brightness offset table based on the hue target value of the preset color temperature target.

[0142] In one embodiment, the color difference offset includes: a first component deviation and a second component deviation; when the computer program is executed by a processor, the following steps are also implemented: determining the horizontal coordinate of the mapping coordinate point according to the first component deviation; determining the vertical coordinate of the mapping coordinate point according to the second component deviation; wherein the first component deviation and the second component deviation respectively represent the color difference deviation information of different colors; and constructing a target mapping curve according to the mapping coordinate points.

[0143] In one embodiment, the color difference data includes: a first component color difference and a second component color difference; when the computer program is executed by a processor, the following steps are also implemented: the abscissa of the target mapping curve is accumulated with the first component color difference corresponding to the abscissa to obtain the target first component; the ordinate of the target mapping curve is accumulated with the second component color difference corresponding to the ordinate to obtain the target second component; and the target color difference data is constructed according to the target first component and the target second component.

[0144] In one embodiment, after determining the target image according to the target three primary color gamut, the computer program further implements the following steps when executed by the processor: rendering the target image in real time to obtain a real-time rendering image; and displaying the real-time rendering image.

[0145] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0146] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0147] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0148] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for adjusting image color temperature, characterized in that: The method comprises: Perform brightness and chromaticity transformation on the three primary color domains of the image to be processed to obtain brightness and color domain data; Determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightness; Mapping the color difference data of the bright color domain data through the target mapping curve to obtain target color difference data; Perform three-primary-color transformation on the bright color domain data corresponding to the target color difference data to obtain a target three-primary-color domain, and determine a target image according to the target three-primary-color domain.

2. The method according to claim 1, characterized in that The determining of the target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table comprises: Determine the color difference offset of the bright color domain data according to the brightness data of the bright color domain data and a preset brightness offset table; The target mapping curve is determined according to the chromatic aberration offset.

3. The method according to claim 2, characterized in that Before determining the color difference offset of the bright color domain data according to the brightness data of the bright color domain data and a preset brightness offset table, the method further includes: Get the preset color temperature target; The preset brightness offset table is determined according to the preset color temperature target.

4. The method according to claim 2, characterized in that: The color difference offset includes: a first component deviation and a second component deviation; and determining the target mapping curve according to the color difference offset includes: Determine the horizontal coordinate of the mapping coordinate point according to the first component deviation; Determine the ordinate of the mapping coordinate point according to the second component deviation; wherein the first component deviation and the second component deviation respectively represent the color difference deviation information of different colors; The target mapping curve is constructed according to the mapping coordinate points.

5. The method according to claim 1, characterized in that The color difference data includes: a first component color difference and a second component color difference; the color difference data of the bright color domain data is mapped by the target mapping curve to obtain the target color difference data, including: Accumulate and calculate the abscissa of the target mapping curve and the color difference of the first component corresponding to the abscissa to obtain a target first component; Accumulate and calculate the ordinate of the target mapping curve and the color difference of the second component corresponding to the ordinate to obtain a target second component; The target color difference data is constructed according to the target first component and the target second component.

6. The method according to any one of claims 1 to 5, characterized in that: After determining the target image according to the target three-primary color gamut, the method further includes: Performing real-time rendering on the target image to obtain a real-time rendering image; The real-time rendering image is displayed.

7. An image color temperature adjustment device, characterized in that: The device comprises: A brightness and chromaticity transformation module is used to transform the brightness and chromaticity of the three primary color domains of the image to be processed to obtain brightness and chromaticity domain data; A curve determination module, used to determine a target mapping curve according to the brightness data of the bright color domain data and a preset brightness offset table; wherein the preset hue offset table is used to determine the color difference offset corresponding to the bright color domain data at different brightnesses; A mapping module, used for mapping the color difference data of the bright color domain data through the target mapping curve to obtain target color difference data; The three-primary color transformation module is used to perform three-primary color transformation on the bright color domain data corresponding to the target color difference data to obtain a target three-primary color domain, and determine a target image according to the target three-primary color domain.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.