Color adjusting method and device, electronic equipment and computer readable storage medium
By acquiring environmental and user color temperatures, matching and weighting a 3D lookup table, the limitations of display devices in color adjustment are solved, enabling delicate color adjustment and brightness management, and improving visual comfort and personalized experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-13
- Publication Date
- 2026-04-17
AI Technical Summary
Existing display devices have limitations in color adjustment, making it difficult to achieve delicate and dynamic environmental scene adaptation within a limited range. They also fail to deeply integrate the user's subjective choice of color temperature, resulting in a disconnect between color presentation and real-world environmental experience, especially with weak color consistency when switching between multiple scenes.
By acquiring the ambient color temperature and the user's color temperature, multiple three-dimensional lookup tables are matched. The first and second three-dimensional lookup tables are determined based on color temperature similarity. The target three-dimensional lookup table is generated by weighted fusion using environmental weights and user weights to achieve color adjustment.
It enhances visual comfort and personalized experience, taking into account both environmental adaptability and user preferences. It achieves delicate and adaptive color adjustment, optimizes color performance, and coordinates the control of brightness and power consumption, thus achieving a two-way balance between energy-saving needs and visual experience.
Smart Images

Figure CN121884744A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display technology, specifically to a color adjustment method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Users increasingly demand higher color accuracy and comfort from display devices, and most display devices can adjust screen color temperature to meet user needs. Three-dimensional look-up tables (3D LUTs), as a standard feature in professional color calibration, are widely used in high-end display devices for color mapping, calibration, and space conversion, enabling accurate color reproduction and style transformation across multiple color gamuts and color temperatures. However, current screen color temperature adjustment technologies often rely on single-channel or backlight current regulation, which has limitations. It only supports manual switching of preset levels within a limited range, lacking finesse and dynamism, and failing to fully meet users' advanced color experience requirements. Summary of the Invention
[0003] This application provides a color adjustment method, apparatus, electronic device, and computer-readable storage medium that can adjust color temperature in combination with environment and user preferences.
[0004] In a first aspect, embodiments of this application provide a color adjustment method, including:
[0005] Obtain ambient color temperature and user color temperature; Obtain multiple three-dimensional lookup tables, each corresponding to a different color temperature; The first three-dimensional lookup table is determined based on the similarity of the ambient color temperature and the color temperature corresponding to each of the multiple three-dimensional lookup tables. The second three-dimensional lookup table is determined based on the similarity between the user's color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables. The first three-dimensional lookup table and the second three-dimensional lookup table are merged to obtain a target three-dimensional lookup table, and color adjustment is performed based on the target three-dimensional lookup table.
[0006] In one embodiment, the step of fusing the first three-dimensional lookup table and the second three-dimensional lookup table to obtain the target three-dimensional lookup table includes: Obtain environmental weights and user weights; Based on the environmental weights and the user weights, the first three-dimensional lookup table and the second three-dimensional lookup table are weighted and fused to obtain the target three-dimensional lookup table.
[0007] In one embodiment, the step of weighted fusion of the first three-dimensional lookup table and the second three-dimensional lookup table based on the environment weight and the user weight to obtain the target three-dimensional lookup table includes: Determine the color values of each sampling point in the first three-dimensional lookup table and the color values of each sampling point in the second three-dimensional lookup table; Samples with the same color value are obtained from the first three-dimensional lookup table and the second three-dimensional lookup table, respectively. Based on the environmental weight and the user weight, the color mapping values of the sampling points with the same color value in the first three-dimensional lookup table and the second three-dimensional lookup table are weighted and fused to obtain the target color mapping value of each color value. The target three-dimensional lookup table is generated based on the target color mapping values of each of the color values.
[0008] In one embodiment, determining the first three-dimensional lookup table based on the similarity of the ambient color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables includes: Determine the similarity between the ambient color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables; When the similarity between the color temperature corresponding to any of the three-dimensional lookup tables and the ambient color temperature is greater than the similarity between the color temperature corresponding to the other three-dimensional lookup tables and the ambient color temperature, the three-dimensional lookup table is determined as the first three-dimensional lookup table. When there are multiple three-dimensional lookup tables whose color temperatures are equal to or greater than the similarity between the color temperatures of the other three-dimensional lookup tables and the ambient color temperature, linear interpolation is performed on the multiple three-dimensional lookup tables to obtain the first three-dimensional lookup table.
[0009] In one embodiment, the method further includes: Save the target 3D lookup table; Color adjustment is performed based on the target 3D lookup table before updating the target 3D lookup table.
[0010] In one embodiment, obtaining the user's color temperature includes: Obtain the color temperature option selected by the user, and determine the color temperature corresponding to the color temperature option as the user's color temperature; Alternatively, obtain the user's color temperature setting.
[0011] In one embodiment, obtaining the user's color temperature includes: Obtain the user's historical color adjustment data; Based on the historical color adjustment data, the user's preferred color temperature is determined.
[0012] Secondly, embodiments of this application provide a color adjustment device, including: The color temperature acquisition module is used to acquire the ambient color temperature and the user's color temperature; The lookup table acquisition module is used to acquire multiple three-dimensional lookup tables, each of which corresponds to a different color temperature. The first determining module is used to determine the first three-dimensional lookup table based on the similarity of the ambient color temperature and the color temperature corresponding to each of the multiple three-dimensional lookup tables. The second determining module is used to determine a second three-dimensional lookup table based on the similarity between the user's color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables. The lookup table fusion module is used to fuse the first three-dimensional lookup table and the second three-dimensional lookup table to obtain a target three-dimensional lookup table, and to perform color adjustment based on the target three-dimensional lookup table.
[0013] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the color adjustment method described above.
[0014] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the color adjustment method described above.
[0015] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application.
[0016] The embodiments of this application have the following beneficial effects: By acquiring both ambient color temperature and user color temperature, this approach overcomes the limitations of color adjustment based on a single environmental parameter or fixed user preferences. By matching corresponding 3D lookup tables, it ensures visual harmony between screen color and ambient light while also aligning with individual user color preferences, significantly improving visual comfort and personalized experience across different scenarios. Furthermore, by matching corresponding 3D lookup tables based on color temperature similarity and generating a target 3D lookup table through a fusion algorithm, it balances environmental adaptability with user preferences, achieving stylistic adjustments while maintaining color accuracy. The ambient color temperature-based adjustment logic optimizes color performance while simultaneously managing screen brightness and power consumption. Finally, the user color temperature-based adjustment logic avoids sacrificing user experience by forcibly adapting to the environment, achieving a balance between energy efficiency and visual enjoyment. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the steps of a color adjustment method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the architecture of a color adjustment method provided in an embodiment of this application; Figure 3 This is an interactive schematic diagram of a color adjustment method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a color adjustment device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] In related technologies, screen color temperature adjustment methods mainly employ single-channel or simple red-green-blue (RGB) gain adjustment and backlight current adjustment. These methods are limited, allowing only manual switching of a few preset levels within a limited range, and cannot achieve nuanced and dynamic adaptation to environmental scenes. Some devices support ambient color temperature detection and automatically adjust the screen color temperature based on the ambient light, but they fail to deeply integrate with the user's subjective color temperature selection to achieve bidirectional adjustment and intelligent mapping between "user customization and ambient light sensing." Once the ambient color temperature conflicts with the user's preference, the system often fails to provide ideal color display effects.
[0021] Most applications fail to dynamically adjust color curve lookup tables, such as 3D lookup tables, based on real-time ambient color temperature changes and user settings, resulting in a disconnect between color presentation and the real-world experience. This is especially true when switching between multiple scenes (e.g., from indoor warm white light to outdoor natural light), where color consistency is weak.
[0022] Related technologies propose static or semi-dynamic color correction based on 3D lookup tables. Some studies propose weighted averaging or interpolation algorithms to adapt to multiple color temperature levels, but most neglect the flexibility and real-time nature of the "user-defined - real-world environment" secondary mapping. Some environmental sensing solutions focus on backlight brightness adjustment or coarse white balance, lacking intelligent control logic for multi-dimensional, high-order LUT data; they also fail to address how to dynamically manage and select multiple LUTs and efficiently interpolate to optimize the overall color effect.
[0023] To solve or partially solve the above-mentioned technical problems, one embodiment of this application proposes the following... Figure 1 The color adjustment method shown herein, although illustrating a logical sequence of steps, may in some cases be performed in a different order than that shown in the accompanying drawings. Specifically, this color adjustment method can be applied to display devices, which may include, but are not limited to, one or more of televisions, mobile phones, projectors, computers, and tablets.
[0024] In one embodiment, the display device has a built-in environmental sensing system, such as a light sensor or an RGB color temperature sensor, to automatically adjust the screen brightness and color temperature, improve visual comfort, and support some power saving requirements.
[0025] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.
[0026] according to Figure 1 The color adjustment method shown includes at least steps S110 to S150, which are described in detail below: In step S110, the ambient color temperature and the user color temperature are obtained.
[0027] Ambient color temperature refers to the visual color temperature of one or more light sources in an environment, measured in Kelvin (K). Common examples include 6500K (daylight white) and 3500K (warm white). User color temperature can be actively selected by the user through the interface, or it can be a color temperature inferred from the user's historical color adjustment data. User color temperature can express a user's personal visual preferences.
[0028] The ambient color temperature can be obtained based on the display device's built-in ambient sensing system. Optionally, it can be obtained based on a two-dimensional light sensor. The two-dimensional light sensor can be one or more of the following: a 2D photodiode array, a CMOS image sensor, and a CCD image sensor. The two-dimensional light sensor can collect color data such as the two-dimensional brightness distribution and RGB color information of ambient light, overcoming the limitation of single-point light sensing which can only detect brightness. Based on the collected color data, the ambient color temperature can be calculated using algorithms such as grayscale world algorithms or white point detection algorithms.
[0029] In step S120, multiple three-dimensional lookup tables are obtained, and each of the multiple three-dimensional lookup tables corresponds to a different color temperature.
[0030] Multiple 3D lookup tables, either pre-installed on the display device or obtained through factory calibration, correspond to different color temperatures and standard color gamut scenarios (such as 2800K, 3500K, 4000K, 5000K, 6500K, etc.). The lookup table format is generally a 17x17x17 or higher resolution 3D lookup table, with each point mapping to the target color space.
[0031] Display devices contain multiple pre-built or factory-calibrated 3D lookup tables that correspond to different color temperatures (e.g., 2800K, 3500K, 4000K, 5000K, 6500K, etc.) and standard color gamut scenarios. These lookup tables typically employ a 17×17×17 or higher resolution 3D data structure, with each sampling point precisely mapped to its corresponding coordinates in the target color space. The target color space is the color gamut and color definition system that the display device ultimately outputs, conforming to specific standards; it serves as the final reference for the 3D lookup table to complete color mapping.
[0032] In step S130, a first three-dimensional lookup table is determined based on the similarity of the ambient color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables.
[0033] The similarity between the ambient color temperature and the corresponding color temperature in the 3D lookup table can be determined by calculating the Euclidean distance or absolute color temperature distance between the ambient color temperature and the color temperature in the 3D lookup table. The similarity between the ambient color temperature and the color temperature in each of the multiple 3D lookup tables is calculated separately, and the 3D lookup table with the highest similarity is determined as the first 3D lookup table.
[0034] In step S140, a second three-dimensional lookup table is determined based on the similarity between the user's color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables.
[0035] The similarity between the user's color temperature and the corresponding color temperature in the 3D lookup table can be determined by calculating the Euclidean distance or absolute color temperature distance between the user's color temperature and the color temperature in the 3D lookup table. The similarity between the user's color temperature and the color temperatures in each of the multiple 3D lookup tables is calculated separately, and the 3D lookup table with the highest similarity is determined as the second 3D lookup table.
[0036] In step S150, the first three-dimensional lookup table and the second three-dimensional lookup table are merged to obtain a target three-dimensional lookup table, and color adjustment is performed based on the target three-dimensional lookup table.
[0037] By integrating the first and second 3D lookup tables and calculating the color mapping data of corresponding coordinate points in the two 3D lookup tables, a target 3D lookup table can be obtained. The target 3D lookup table combines environmental adaptability with the user's personalized preferences.
[0038] After obtaining the target 3D lookup table, the color driving module of the display device can call the target 3D lookup table and map the color values of each screen pixel to the mapped color values based on the target 3D lookup table, thereby displaying the mapped color values corresponding to each screen pixel. This ensures that the screen output color maintains visual coordination with the current ambient light color temperature and matches the user's subjective color preferences, ultimately achieving a delicate and adaptive color adjustment effect.
[0039] The technical solution adopted in this application obtains two parameters: ambient color temperature and user color temperature. This overcomes the limitations of color adjustment based on a single environmental parameter or fixed user preferences. By matching the corresponding three-dimensional lookup tables, it ensures both the visual coordination of screen color and external ambient light and aligns with the user's personal color preferences, significantly improving visual comfort and personalized experience in different scenarios. Matching the corresponding three-dimensional lookup table based on color temperature similarity and generating the target three-dimensional lookup table through a fusion algorithm balances the dual needs of environmental adaptability and user preferences, achieving stylistic adjustments while ensuring color accuracy. The adjustment logic based on ambient color temperature can optimize color performance while simultaneously achieving reasonable control over screen brightness and power consumption. The adjustment logic based on user color temperature avoids sacrificing the user's subjective experience due to forced environmental adaptation, achieving a two-way balance between energy-saving needs and visual experience.
[0040] Based on the above technical solution, as an embodiment, after obtaining the target three-dimensional lookup table, the target three-dimensional lookup table can be saved; and before updating the target three-dimensional lookup table, color adjustment can be performed based on the target three-dimensional lookup table.
[0041] The generated target 3D lookup table can be cached in local random access memory (RAM). Color adjustments can be performed based on this target 3D lookup table before updating it. After updating the target 3D lookup table, the updated target 3D lookup table overwrites the one stored in RAM, and color adjustments are then performed based on the updated target 3D lookup table.
[0042] In one embodiment, the target 3D lookup table may be updated upon receiving a new ambient color temperature and / or user color temperature, or upon triggering a preset lookup table update cycle. The update method involves recalculating based on the new ambient color temperature and user color temperature to obtain the updated target 3D lookup table.
[0043] Optionally, the preset lookup table update cycle can be triggered by timed calibration. The system presets the update interval or update time point (such as once per hour or when it is used for the first time after powering on each day). When the preset update interval or update time point is reached, the lookup table update process is automatically started to obtain the latest ambient color temperature and user color temperature to redetermine the target three-dimensional lookup table, ensuring that the target three-dimensional lookup table is always compatible with the color decay characteristics of the device after long-term use and the long-term change trend of ambient light.
[0044] Optionally, the preset lookup table update cycle can be triggered by a scene switching threshold. The system monitors the changes in ambient color temperature and user color temperature in real time. When the ambient color temperature fluctuation exceeds the preset threshold (e.g., ±300K) or the user switches color preference mode, the update process is triggered immediately.
[0045] The two triggering mechanisms, timed calibration trigger and scene switching threshold trigger, can work alone or in combination, ensuring the timeliness of lookup table updates while avoiding waste of system resources and degradation of color stability caused by excessively frequent updates.
[0046] By caching the target 3D lookup table in local RAM, the high-speed reading and calling of the target 3D lookup table can be achieved, significantly shortening the loading time of color adjustment parameters and ensuring real-time dynamic response of screen colors. Before the target 3D lookup table is updated, color adjustment is continuously performed based on the target 3D lookup table, which can avoid color jumps caused by instantaneous fluctuations in the environment or user parameters, thereby improving visual comfort and stability.
[0047] Based on the above technical solution, as an embodiment, a color temperature selection user interface can be displayed. This user interface can include multiple color temperature options, such as "cool white," "neutral," and "warm yellow," each corresponding to a preset color temperature. The color temperature option selected by the user in this user interface can be obtained, thereby determining the color temperature corresponding to that option as the user's color temperature.
[0048] In one embodiment, a color temperature input user interface can be displayed, where the user can set a custom color temperature, thereby automatically determining the color temperature as the user's color temperature.
[0049] The technical solution adopted in this application significantly improves the convenience and personalized experience of user operation by providing a variety of color temperature interactive interfaces; multiple preset color temperature options allow users to select their preferred color temperature with one click, quickly matching their needs without professional knowledge; and it supports custom color temperature input function to meet the precise control needs of professional users for specific color temperature parameters.
[0050] Based on the above technical solution, as an example, the user's historical color adjustment data can be obtained; based on the historical color adjustment data, the user's preferred color temperature can be determined.
[0051] Historical color adjustment data is a collection of user operation information recorded during the past use of display devices, including manual selection, custom settings, or mode switching of color parameters such as screen color temperature, color gamut, and color saturation. Historical color adjustment data can reflect users' long-term color preferences and includes records of users' color adjustment behaviors in different environmental scenarios and at different times of use.
[0052] It can automatically collect and store historical color adjustment data from users in different usage periods and environmental scenarios. Optionally, it can extract high-frequency adjustment features from the historical color adjustment data, such as statistically analyzing the frequency of color temperature selection in typical scenarios like daily office work, audio-visual entertainment, and outdoor browsing, and calculating the average value of the user's long-term preferred color temperature range. Combined with the user's coordinated adjustment patterns of color saturation and brightness, it filters out atypical adjustment data from accidental touches or temporary scenarios. Based on the above multi-dimensional data analysis results, it accurately determines the user's preferred color temperature that matches their usage habits, automatically adapting to personalized color needs without requiring repeated manual settings, thus achieving a more user-friendly color adjustment experience.
[0053] Optionally, a color temperature preference prediction model can be pre-trained. This model can be obtained through supervised training based on a large number of historical color adjustment data samples and corresponding user preference color temperature samples. By inputting the user's historical color adjustment data into the color temperature preference prediction model, the model can determine the user's preferred color temperature based on this data.
[0054] The technical solution adopted in this application automatically determines the user's preferred color temperature based on historical color adjustment data. It can automatically match the user's long-term color usage habits without requiring the user to manually set it repeatedly, making the color performance of the display device more in line with personal subjective visual preferences and significantly reducing the cumbersomeness of operation.
[0055] Based on the above technical solution, as an embodiment, determining the first three-dimensional lookup table according to the similarity between the ambient color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables may include: determining the similarity between the ambient color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables; when the similarity between the color temperature corresponding to any three-dimensional lookup table and the ambient color temperature is greater than the similarity between the color temperature corresponding to the color temperature of the other three-dimensional lookup tables and the ambient color temperature, determining the three-dimensional lookup table as the first three-dimensional lookup table; when there are multiple three-dimensional lookup tables whose color temperatures have the same similarity to the ambient color temperature, and the similarity is greater than the similarity between the color temperature corresponding to the color temperature of the other three-dimensional lookup tables and the ambient color temperature, performing linear interpolation on the multiple three-dimensional lookup tables to obtain the first three-dimensional lookup table.
[0056] The similarity between the user's color temperature and the corresponding color temperature in the 3D lookup table can be determined by calculating the Euclidean distance or absolute color temperature distance between the user's color temperature and the color temperature in the 3D lookup table. The similarity between the user's color temperature and the color temperatures in each of the multiple 3D lookup tables is calculated separately. If the similarity between the color temperature in any 3D lookup table and the ambient color temperature is greater than the similarity between the color temperatures in all other 3D lookup tables and the ambient color temperature, then that 3D lookup table can be directly identified as the first 3D lookup table. In other words, the 3D lookup table with the highest and unique similarity among the multiple 3D lookup tables can be directly identified as the second 3D lookup table.
[0057] If at least two 3D lookup tables have the same color temperature as the ambient color temperature, and this similarity value is higher than the corresponding similarity values of all other 3D lookup tables, then linear interpolation can be performed on these 3D lookup tables with the same similarity. Based on the interpolation weights (the weights of the 3D lookup tables with the same similarity can be the same), the color mapping data of each table is merged to obtain the first 3D lookup table. For example, when the ambient color temperature is 4000K, if there are two 3D lookup tables with the same and highest similarity corresponding to color temperatures of 4500K and 3500K respectively, then linear interpolation can be performed on these two 3D lookup tables to obtain a new 3D lookup table, and this new 3D lookup table is determined as the first 3D lookup table.
[0058] Similarly, determining the second three-dimensional lookup table based on the similarity between the user's color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables may include: determining the similarity between the user's color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables; determining the three-dimensional lookup table as the second three-dimensional lookup table when the similarity between the color temperature corresponding to any three-dimensional lookup table and the user's color temperature is greater than the similarity between the color temperatures corresponding to the other three-dimensional lookup tables and the user's color temperature; and performing linear interpolation on the multiple three-dimensional lookup tables to obtain the second three-dimensional lookup table when there are multiple three-dimensional lookup tables whose color temperatures have equal similarity to the user's color temperature and whose similarity is greater than the similarity between the color temperatures corresponding to the other three-dimensional lookup tables and the user's color temperature.
[0059] The technical solution of this application uses a similarity metric comparison method to filter three-dimensional lookup tables, which can accurately determine the three-dimensional lookup table that best matches the current ambient color temperature, providing basic data support for subsequent color adjustment that conforms to the characteristics of ambient light. For special scenarios where multiple three-dimensional lookup tables have the same similarity to the ambient color temperature, a first three-dimensional lookup table is generated by linear interpolation fusion, which can connect the color parameters of three-dimensional lookup tables corresponding to adjacent color temperatures, avoiding color abrupt changes caused by color temperature jumps, achieving smooth color transitions within the ambient color temperature range, further reducing visual fatigue, and improving the color experience in dynamic scenes.
[0060] Based on the above technical solution, as an embodiment, the step of fusing the first three-dimensional lookup table and the second three-dimensional lookup table to obtain the target three-dimensional lookup table may include: obtaining environmental weights and user weights; and performing weighted fusion of the first three-dimensional lookup table and the second three-dimensional lookup table based on the environmental weights and the user weights to obtain the target three-dimensional lookup table.
[0061] In one embodiment, the environmental weights and user weights can be preset by the system or preset by the user.
[0062] In another embodiment, the environment weights and user weights can be generated adaptively.
[0063] It can monitor ambient light parameters in real time, including but not limited to the fluctuation range of ambient color temperature and / or the level of light intensity. When the ambient light is in a complex scene with strong direct light and drastic fluctuations in color temperature, the ambient weight can be dynamically increased (e.g., adjusted to 0.6~0.7) to prioritize the coordination between screen color and environment and avoid color distortion under strong light. When the ambient light is stable and the lighting is soft, the ambient weight can be decreased (e.g., adjusted to 0.3~0.4) while increasing the user weight to enhance the presentation of personalized color preferences.
[0064] It can analyze users' historical color adjustment data and real-time operation behavior. If a user adjusts the color temperature mode more times per unit time than the preset number, it indicates a strong demand for personalization. In this case, the user's weight can be dynamically increased (e.g., adjusted to 0.6~0.7). If a user does not manually intervene in color parameters for a long time, it indicates a preference for automatic adjustment to adapt to the environment. In this case, the environment weight can be appropriately increased.
[0065] It can also be combined with usage scenario tags (such as office, audio-visual, gaming) to adapt weights. For example, in audio-visual scenarios, increase user weight to ensure that the color style matches the user's viewing habits; in outdoor navigation scenarios, increase environmental weight to ensure screen visibility.
[0066] The first three-dimensional lookup table is weighted using environmental weights, and the second three-dimensional lookup table is weighted using user weights. The weighted first and second three-dimensional lookup tables are then summed to obtain the target three-dimensional lookup table.
[0067] By employing the technical solution of this application embodiment, two three-dimensional lookup tables are weighted and fused through environmental weight and user weight to generate a target three-dimensional lookup table that combines environmental adaptability and personalized preferences. This can significantly improve the flexibility and adaptability of color adjustment, taking into account both the objectivity of environmental adaptability and the subjectivity of user preferences, and achieving an intelligent and humanized color output effect.
[0068] Based on the above technical solution, as an embodiment, to avoid color shift, the step of weighted fusion of the first three-dimensional lookup table and the second three-dimensional lookup table based on the environment weight and the user weight to obtain the target three-dimensional lookup table may include: determining the color value of each sampling point in the first three-dimensional lookup table and the color value of each sampling point in the second three-dimensional lookup table; obtaining sampling points with the same color value from the first three-dimensional lookup table and the second three-dimensional lookup table respectively; weighted fusion of the color mapping values of the sampling points with the same color value in the first three-dimensional lookup table and the second three-dimensional lookup table based on the environment weight and the user weight to obtain the target color mapping value of each color value; and generating the target three-dimensional lookup table according to the target color mapping values of each color value.
[0069] It can extract the color data of the sampling points from the first and second 3D lookup tables. It can traverse the full data structure of the first and second 3D lookup tables to determine the original color value corresponding to each sampling point in each table. This color value is presented in the form of a combination of RGB three-color channel parameters.
[0070] The system compares the sampling points of the first and second 3D lookup tables one by one, accurately selecting groups of sampling points whose original color values match those in both tables. Each group includes two sampling points with the same color value, one from the first lookup table and the other from the second. For approximate color values with minor errors, the system can use a preset threshold (e.g., the difference between RGB channel parameters ≤ 1) for fault-tolerant matching to avoid missing valid sampling points due to differences in data precision.
[0071] For each group of sampling points, the environment weight and user weight are invoked to perform a weighted calculation on the color mapping values (i.e., coordinate parameters of the target color space) corresponding to the two sampling points. The target color mapping value is calculated as follows: (Color mapping value of the sampling point in the first 3D lookup table × Environment weight) + (Color mapping value of the sampling point in the second 3D lookup table × User weight). The sum of the environment weight and user weight is 1 to ensure the numerical reasonableness of the fusion result.
[0072] The target color mapping values of all sampling points with the same color value are archived one by one according to their corresponding three-dimensional coordinate positions. At the same time, for a small number of special sampling points that do not match the same source color value, the target mapping value is generated by linear interpolation. Finally, the data is integrated to form a complete target three-dimensional lookup table, ensuring the continuity and integrity of the data in the table and providing a precise and unified data benchmark for subsequent color adjustment.
[0073] By employing the technical solution of this application embodiment, the sampling point group is first screened and then weighted fusion is performed. This ensures that the fusion operation is carried out only on sampling points with the same original color reference, avoiding color shift caused by cross-fusion of different color value data. Weighted calculation is performed on the sampling point group, and at the same time, through fault-tolerant matching and interpolation supplementation mechanism, the target mapping value after fusion is ensured to be continuous, avoiding color banding, jump and other problems caused by data omission, and significantly improving the smoothness and visual coordination of screen color output.
[0074] Figure 2 This is a schematic diagram of the architecture of a color adjustment method provided in an embodiment of this application; as shown Figure 2 As shown, ambient light parameters can be acquired using a two-dimensional light sensor module, and the ambient color temperature estimation module can estimate the ambient color temperature based on these parameters. User color temperature, environmental weight, and user weight can be obtained. A first 3D lookup table and a second 3D lookup table can be retrieved from a 3D LUT preset database based on the ambient and user color temperatures. Then, a weighted calculation is performed on the first and second 3D lookup tables based on the environmental and user weights to obtain the target 3D LUT. Optionally, this 3D LUT preset database can be updated via OTA.
[0075] Figure 3 This is an interactive schematic diagram of a color adjustment method provided in an embodiment of this application; as shown... Figure 3 As shown, users can input their color temperature through the user interface provided by the interface module, which then transmits this color temperature to the LUT processing engine. The light sensor module can periodically report the ambient color temperature. The LUT processing engine can match the first and second 3D lookup tables from the preset 3D LUT database based on the ambient and user color temperatures. It then performs a weighted calculation on the first and second 3D lookup tables based on environmental and user weights to obtain the target 3D lookup table. The LUT processing engine pushes the target 3D lookup table to the display output module, which can directly adjust the colors based on this target 3D lookup table. Users can directly experience real-time color changes.
[0076] The technical solution adopted in this application introduces user color temperature, enabling the color adjustment scheme to adapt to the objective parameters of ambient color temperature while also considering users' subjective color preferences, visual health needs, and long-term usage habits. It pioneers a "human-machine collaborative color temperature adjustment" technical architecture, breaking the limitations of traditional technologies that only focus on single-dimensional adjustment. Through a multi-point dynamic lookup table and interpolation fusion method using multiple sets of three-dimensional lookup tables, based on configurable environmental and user weight parameters, and combined with a preset weighted fusion algorithm, it flexibly integrates data from multiple sets of three-dimensional lookup tables, achieving high-precision color reproduction across color temperature ranges and multiple application scenarios. A real-time interpolation calculation and smooth transition mechanism for the three-dimensional lookup table is constructed. Through precise matching of source sampling points, linear interpolation data supplementation, and weighted fusion calculation, it effectively solves the technical defects of traditional three-dimensional lookup table switching processes, such as color jumps, response delays, and discontinuous color output, achieving seamless switching of display screen color adjustment and improving the smoothness and stability of the visual experience.
[0077] To facilitate better implementation of the color adjustment method of this application, this application also provides a color adjustment device based on the above-described color adjustment method. The meanings of the terms used are the same as in the color adjustment method described above, and specific implementation details can be found in the description of the method embodiments.
[0078] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of the color adjustment device provided in the embodiments of this application, wherein the color adjustment device includes: Color temperature acquisition module 401 is used to acquire ambient color temperature and user color temperature; The lookup table acquisition module 402 is used to acquire multiple three-dimensional lookup tables, each of which corresponds to a different color temperature. The first determining module 403 is used to determine the first three-dimensional lookup table based on the similarity of the ambient color temperature and the color temperature corresponding to each of the multiple three-dimensional lookup tables. The second determining module 404 is used to determine a second three-dimensional lookup table based on the similarity of the user color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables. The lookup table fusion module 405 is used to fuse the first three-dimensional lookup table and the second three-dimensional lookup table to obtain a target three-dimensional lookup table, and to perform color adjustment based on the target three-dimensional lookup table.
[0079] In one embodiment, the lookup table fusion module 405 is specifically used to perform: Obtain environmental weights and user weights; Based on the environmental weights and the user weights, the first three-dimensional lookup table and the second three-dimensional lookup table are weighted and fused to obtain the target three-dimensional lookup table.
[0080] In one embodiment, the step of weighted fusion of the first three-dimensional lookup table and the second three-dimensional lookup table based on the environment weight and the user weight to obtain the target three-dimensional lookup table includes: Determine the color values of each sampling point in the first three-dimensional lookup table and the color values of each sampling point in the second three-dimensional lookup table; Samples with the same color value are obtained from the first three-dimensional lookup table and the second three-dimensional lookup table, respectively. Based on the environmental weight and the user weight, the color mapping values of the sampling points with the same color value in the first three-dimensional lookup table and the second three-dimensional lookup table are weighted and fused to obtain the target color mapping value of each color value. The target three-dimensional lookup table is generated based on the target color mapping values of each of the color values.
[0081] In one embodiment, the first determining module 403 is specifically configured to perform: Determine the similarity between the ambient color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables; When the similarity between the color temperature corresponding to any of the three-dimensional lookup tables and the ambient color temperature is greater than the similarity between the color temperature corresponding to the other three-dimensional lookup tables and the ambient color temperature, the three-dimensional lookup table is determined as the first three-dimensional lookup table. When there are multiple three-dimensional lookup tables whose color temperatures are equal to or greater than the similarity between the color temperatures of the other three-dimensional lookup tables and the ambient color temperature, linear interpolation is performed on the multiple three-dimensional lookup tables to obtain the first three-dimensional lookup table.
[0082] In one embodiment, the device further includes: A storage module is used to store the target three-dimensional lookup table; An adjustment module is used to perform color adjustment based on the target 3D lookup table before updating the target 3D lookup table.
[0083] In one embodiment, the color temperature acquisition module 401 is specifically used to perform: Obtain the color temperature option selected by the user, and determine the color temperature corresponding to the color temperature option as the user's color temperature; Alternatively, obtain the user's color temperature setting.
[0084] In one embodiment, the color temperature acquisition module 401 is specifically used to perform: Obtain the user's historical color adjustment data; Based on the historical color adjustment data, the user's preferred color temperature is determined.
[0085] The technical solution adopted in this application obtains two parameters: ambient color temperature and user color temperature. This overcomes the limitations of color adjustment based on a single environmental parameter or fixed user preferences. By matching the corresponding three-dimensional lookup tables, it ensures both the visual coordination of screen color and external ambient light and aligns with the user's personal color preferences, significantly improving visual comfort and personalized experience in different scenarios. Matching the corresponding three-dimensional lookup table based on color temperature similarity and generating the target three-dimensional lookup table through a fusion algorithm balances the dual needs of environmental adaptability and user preferences, achieving stylistic adjustments while ensuring color accuracy. The adjustment logic based on ambient color temperature can optimize color performance while simultaneously achieving reasonable control over screen brightness and power consumption. The adjustment logic based on user color temperature avoids sacrificing the user's subjective experience due to forced environmental adaptation, achieving a two-way balance between energy-saving needs and visual experience.
[0086] For specific limitations regarding the color adjustment device, please refer to the limitations on the color adjustment method above, which will not be repeated here. Each module in the aforementioned color adjustment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0087] In addition, this application also provides an electronic device, such as Figure 5 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically: The electronic device may include components such as a processor 501 with one or more processing cores and a memory 502 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 501 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 502, and by calling data stored in the memory 502, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 501.
[0088] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
[0089] In one embodiment, the electronic device further includes a power supply 503 that supplies power to the various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 503 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0090] In one embodiment, the electronic device may further include an input unit 504, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0091] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 runs the applications stored in the memory 502, thereby implementing the steps in any of the color adjustment methods provided in the embodiments of this application.
[0092] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0093] In one embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the methods described in any embodiment of this application.
[0094] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of this application.
[0095] In some embodiments, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the methods described in any embodiment of this application.
[0096] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0097] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0098] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the color adjustment methods provided in this application.
[0099] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0100] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0101] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the color adjustment methods provided in this application, the beneficial effects that any of the color adjustment methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0102] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0103] The above provides a detailed description of a color adjustment method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A color adjustment method, characterized in that, include: Obtain ambient color temperature and user color temperature; Obtain multiple three-dimensional lookup tables, each corresponding to a different color temperature; The first three-dimensional lookup table is determined based on the similarity of the ambient color temperature and the color temperature corresponding to each of the multiple three-dimensional lookup tables. The second three-dimensional lookup table is determined based on the similarity between the user's color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables. The first three-dimensional lookup table and the second three-dimensional lookup table are merged to obtain a target three-dimensional lookup table, and color adjustment is performed based on the target three-dimensional lookup table.
2. The method according to claim 1, characterized in that, The process of fusing the first three-dimensional lookup table and the second three-dimensional lookup table to obtain the target three-dimensional lookup table includes: Obtain environmental weights and user weights; Based on the environmental weights and the user weights, the first three-dimensional lookup table and the second three-dimensional lookup table are weighted and fused to obtain the target three-dimensional lookup table.
3. The method according to claim 2, characterized in that, The step of weightedly fusing the first three-dimensional lookup table and the second three-dimensional lookup table based on the environmental weight and the user weight to obtain the target three-dimensional lookup table includes: Determine the color values of each sampling point in the first three-dimensional lookup table and the color values of each sampling point in the second three-dimensional lookup table; Samples with the same color value are obtained from the first three-dimensional lookup table and the second three-dimensional lookup table, respectively. Based on the environmental weight and the user weight, the color mapping values of the sampling points with the same color value in the first three-dimensional lookup table and the second three-dimensional lookup table are weighted and fused to obtain the target color mapping value of each color value. The target three-dimensional lookup table is generated based on the target color mapping values of each of the color values.
4. The method according to claim 1, characterized in that, The step of determining the first three-dimensional lookup table based on the similarity of the ambient color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables includes: Determine the similarity between the ambient color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables; When the similarity between the color temperature corresponding to any of the three-dimensional lookup tables and the ambient color temperature is greater than the similarity between the color temperature corresponding to the other three-dimensional lookup tables and the ambient color temperature, the three-dimensional lookup table is determined as the first three-dimensional lookup table. When there are multiple three-dimensional lookup tables whose color temperatures are equal to or greater than the similarity between the color temperatures of the other three-dimensional lookup tables and the ambient color temperature, linear interpolation is performed on the multiple three-dimensional lookup tables to obtain the first three-dimensional lookup table.
5. The method according to claim 1, characterized in that, The method further includes: Save the target 3D lookup table; Color adjustment is performed based on the target 3D lookup table before updating the target 3D lookup table.
6. The method according to claim 1, characterized in that, Obtain the user's color temperature, including: Obtain the color temperature option selected by the user, and determine the color temperature corresponding to the color temperature option as the user's color temperature; Alternatively, obtain the user's color temperature setting.
7. The method according to claim 1, characterized in that, Obtain the user's color temperature, including: Obtain the user's historical color adjustment data; Based on the historical color adjustment data, the user's preferred color temperature is determined.
8. A color adjustment device, characterized in that, include: The color temperature acquisition module is used to acquire the ambient color temperature and the user's color temperature; The lookup table acquisition module is used to acquire multiple three-dimensional lookup tables, each of which corresponds to a different color temperature. The first determining module is used to determine the first three-dimensional lookup table based on the similarity of the ambient color temperature and the color temperature corresponding to each of the multiple three-dimensional lookup tables. The second determining module is used to determine a second three-dimensional lookup table based on the similarity between the user's color temperature and the color temperatures corresponding to the multiple three-dimensional lookup tables. The lookup table fusion module is used to fuse the first three-dimensional lookup table and the second three-dimensional lookup table to obtain a target three-dimensional lookup table, and to perform color adjustment based on the target three-dimensional lookup table.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the color adjustment method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the color adjustment method as described in any one of claims 1 to 7.