Image compensation method, electronic device, and storage medium

By collecting environmental and reflectance spectral data and combining them with painting style data to generate an RGB compensation matrix, the problem of color distortion in art gallery mode of electronic devices was solved, achieving high-fidelity color reproduction and improving image quality.

CN122269141APending Publication Date: 2026-06-23SHENZHEN ZHIXIAN VISION SOFTWARE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN ZHIXIAN VISION SOFTWARE TECHNOLOGY CO LTD
Filing Date
2026-03-16
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technology cannot effectively adapt to changes in ambient lighting and unknown painting styles in the art gallery mode of electronic devices, resulting in color distortion and failing to meet users' demand for high fidelity.

Method used

By collecting environmental and reflectance spectral data, the overall reflectance is determined, and an RGB compensation matrix is ​​generated in conjunction with the painting style data to compensate the image and correct the influence of ambient light and spatial reflection on color.

Benefits of technology

It significantly improves the accuracy and realism of color reproduction, making it particularly suitable for high-fidelity display of artworks and enhancing the image quality of electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122269141A_ABST
    Figure CN122269141A_ABST
Patent Text Reader

Abstract

The application discloses an image compensation method, an electronic device and a storage medium, relates to the technical field of image processing, and comprises the following steps: collecting ambient spectrum data and reflection spectrum data of an environment in which the electronic device is located; determining comprehensive reflectivity of the electronic device in a spatial dimension according to the reflection spectrum data; determining picture style data of a first image to be displayed by the electronic device at a current moment; generating an RGB compensation matrix according to the ambient spectrum data, the comprehensive reflectivity and the picture style data; and performing image compensation on the first image according to the RGB compensation matrix. The application improves the image effect displayed by the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to image compensation methods, electronic devices, and storage media. Background Technology

[0002] With the development of display technology, especially the widespread adoption of ultra-high-definition display panels, the application scenarios of electronic devices (such as televisions) have expanded from simple audio-visual playback to home decoration. Many high-end televisions are equipped with art or gallery modes, which can loop world-famous paintings while in standby mode, making the television a piece of furniture that blends technology and art. Users have increasingly higher demands for the realism and artistry of the paintings displayed in these art or gallery modes. To improve the display effect, current methods include static PQ (Picture Quality) adjustment, fixed painting optimization, and linear brightness compensation. However, these methods all have various shortcomings. For example, they fail to comprehensively consider the combined effects of direct ambient light, spatial reflection pollution, and the characteristics of the image medium itself on the displayed colors, resulting in inaccurate color reproduction. This is especially true for scenarios with high color fidelity requirements, such as artwork, making it difficult to meet user needs. Consequently, the image effect displayed on the television does not meet the ideal requirements.

[0003] Therefore, improving the image quality displayed on electronic devices has become an urgent problem to be solved.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this application is to provide an image compensation method, an electronic device, and a storage medium, aiming to solve the technical problem of how to improve the image display effect of an electronic device.

[0006] To achieve the above objectives, this application proposes an image compensation method, comprising the following steps: Collect environmental spectral data and reflectance spectral data of the environment in which the electronic device is located, and determine the comprehensive reflectance of the electronic device in the spatial dimension based on the reflectance spectral data; Determine the art style data of the first image to be displayed by the electronic device at the current moment; An RGB compensation matrix is ​​generated based on environmental spectral data, comprehensive reflectance, and painting style data. Image compensation is performed on the first image based on the RGB compensation matrix.

[0007] In addition, to achieve the above objectives, this application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the image compensation method described above.

[0008] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the image compensation method described above.

[0009] One or more technical solutions proposed in this application have at least the following technical effects: In this application, by collecting environmental spectral data and reflectance spectral data of an electronic device, the comprehensive reflectance in the spatial dimension is determined. Simultaneously, the painting style data of the first image to be displayed is identified. An RGB compensation matrix is ​​generated by integrating the environmental spectral data, comprehensive reflectance, and painting style data. Image compensation is then performed on the first image based on this RGB compensation matrix. This enables precise perception of ambient light and spatial reflectance. Combined with painting style recognition, a targeted RGB compensation matrix is ​​generated, effectively correcting color deviations caused by ambient light interference, spatial reflectance contamination, and differences in image media. This significantly improves the accuracy and realism of color reproduction, making it particularly suitable for high-fidelity display of artistic paintings, thereby enhancing the image quality displayed on electronic devices. Attached Figure Description

[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic diagram of a system architecture of an electronic device in an embodiment of this application; Figure 2 This is a schematic diagram of the system architecture workflow of the electronic device in the embodiments of this application; Figure 3 A flowchart is provided in the first embodiment of the image compensation method of this application; Figure 4 This is another flowchart illustrating the image compensation method in this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the image compensation method in the embodiments of this application.

[0013] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0014] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0015] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0016] Optionally, the image compensation method provided in this application embodiment can be applied to an electronic device, which can be a display device, terminal, etc., such as a television or computer. The following example uses a television as the electronic device.

[0017] Alternatively, taking television as an example, currently, televisions use static PQ (Picture Quality) adjustment when displaying images. For instance, some televisions allow users to manually or automatically select preset picture quality modes in art mode, such as "oil painting mode" or "watercolor mode." These modes simulate the visual effects of different paintings by adjusting a fixed set of parameters (such as contrast, saturation, and sharpness). However, this adjustment is static and will not change once set, making it unable to adapt to real-time changes in ambient lighting conditions during viewing. In addition, fixed painting optimization is used, but this method cannot adapt to unknown paintings displayed on the television; linear brightness compensation is also used, but this method suffers from the defect of distorting the warm tones of oil paintings.

[0018] Therefore, this application provides an image compensation method to solve the color distortion problem caused by ambient light interference, spatial reflection pollution, and unknown painting style adaptation in electronic devices, such as television art gallery mode, thereby improving the image display effect of electronic devices. Furthermore, when setting the image compensation method in this application embodiment, spatial reflection pollution (such as secondary color shift of the image caused by the material of the mural), art style adaptation (to avoid color distortion caused by unknown painting style adaptation, such as avoiding the deficiency of digital art paintings lacking spectral compensation basis), and real-time performance are comprehensively considered.

[0019] Optionally, the system architecture diagram corresponding to the electronic device in the embodiments of this application can be referred to Figure 1The electronic device can incorporate a sensor suite, integrating a hardware module with a multispectral sensor and LiDAR (Light Detection and Ranging); a preprocessor, such as a preprocessing unit for noise reduction / spectral separation of raw sensor data (e.g., environmental spectral data, reflectance spectral data); a control chip (containing a main processor to execute compensation algorithms, such as executing steps S10-S40); an AI engine, which can be a computing unit for running a CNN (Convolutional Neural Network) style recognition model; a two-factor compensator, which can be a core component for performing matrix operations; and a display driver unit, which can be an IC for converting the RGB (red, green, blue) signals of the compensated image into driving signals for the electronic device screen.

[0020] Optionally, the raw sensor data collected by the sensor suite within the electronic device may include environmental spectral data (containing the wavelength distribution of different lights) and reflectance spectral data, such as wall reflectance, which can be represented by a LiDAR-scanned thermal map. The AI ​​engine within the electronic device can perform art style recognition on the image to be displayed by the electronic device to obtain art style data.

[0021] Optionally, refer to Figure 2 The electronic device includes LiDAR (Light Detection and Ranging), a control chip, a light sensor, an AI engine, a compensator (such as a two-factor compensator), and a display driver unit. The LiDAR can collect the reflectance spectrum data of the environment in which the electronic device is located, such as the wall reflectance spectrum (10Hz). Its data structure can include the reflectance distribution of different areas of the wall, such as [[0.82, 0.78, ..., 0.75], [...], ...]. Its numerical value ranges from 0 to 1. It then sends the wall reflectance spectrum (10Hz) to the control chip. The light sensor can collect the ambient spectral data of the environment in which the electronic device is located, such as the ambient spectral data (5Hz). Its data structure can include light intensity, color temperature, and RGB spectral distribution, such as light intensity: 350; color temperature: 4500k; RGB spectral distribution: [R:0.4, G:0.3, B:0.3]. It then sends the ambient spectral data (5Hz) to the control chip. The AI ​​engine can identify the style of an image to be displayed on an electronic device, obtaining style data such as the material spectrum of the image, and then send it to the control chip. The control chip can combine all the received data to generate a compensation matrix. This compensation matrix can be an RGB compensation matrix, such as a 3×3 color transformation matrix, for example: .

[0022] The compensation matrix is ​​then sent to the compensator, which generates RGB adjustment commands. These commands are then sent to the display driver unit to adjust the RGB signals of the image to be displayed, thereby completing the image compensation. This allows for the integration of LiDAR spatial scanning, multispectral sensing, and AI art style recognition into display compensation.

[0023] Based on this, embodiments of this application provide an image compensation method, referring to... Figure 3 , Figure 3 This is a flowchart illustrating the first embodiment of the image compensation method of this application.

[0024] In this embodiment, the image compensation method includes steps S10 to S40.

[0025] Step S10: Collect environmental spectral data and reflectance spectral data of the environment in which the electronic device is located, and determine the comprehensive reflectance of the electronic device in the spatial dimension based on the reflectance spectral data; Alternatively, the electronic device may be a playback terminal, such as a smart TV, an art display, or a monitor.

[0026] Optionally, a sensor suite, including multispectral sensors and LiDAR, can be integrated into the electronic device. The multispectral sensor is used to collect environmental spectral data of the environment in which the electronic device is located, such as ambient light information illuminating the screen of the electronic device.

[0027] Optionally, the environmental spectral data includes, but is not limited to, light intensity, color temperature, and the spectral distribution ratio of the RGB three channels. For example, the environmental spectral data can be expressed as light intensity: 350, color temperature: 4500K, and the spectral distribution ratio of the RGB three channels as R: 0.4, G: 0.3, B: 0.3.

[0028] Optionally, reflectance spectral data can be acquired using LiDAR, such as by scanning to obtain spatial distribution data of wall and furniture reflectance. The LiDAR in the electronic device emits laser pulses, calculates reflectance and distance based on the intensity and duration of the reflected light, and can scan various areas of the environment where the electronic device is located with an accuracy of 0.1°, such as wall and furniture areas, and acquire the laser reflection intensity of each area. The reflectance of each area is then calculated based on the laser reflection and emission intensity, such as wall and furniture reflectance. Furthermore, the reflectance of each area can be represented in the form of a heat map, with high reflectance areas displayed as warm colors (e.g., red) and low reflectance areas displayed as cool colors (e.g., blue).

[0029] Optionally, the overall reflectance may include the reflectance of the walls and furniture in the spatial dimension.

[0030] Optionally, the wall reflectivity can be the ratio of the intensity of the laser reflected from the wall area illuminated by the LiDAR-emitted laser to the intensity of the incident laser. The furniture reflectivity can be the ratio of the intensity of the laser reflected from the furniture area illuminated by the LiDAR-emitted laser to the intensity of the incident laser.

[0031] Optionally, the overall reflectivity can be used to quantify the degree of reflection interference of the spatial environment on the displayed image. Furthermore, when the environment in which the electronic device is located includes not only furniture and walls but also other objects (such as clothing, ceramic pieces, etc.), the overall reflectivity can include the reflectivity of the furniture, the reflectivity of the walls, and the reflectivity of the other objects.

[0032] Alternatively, if the environment in which the electronic device is located contains no furniture and only walls, then the overall reflectivity can be determined to include only the wall reflectivity.

[0033] Optionally, in step S10, the step of determining the comprehensive reflectance of the electronic device in the spatial dimension based on the reflectance spectral data includes: if the reflectance spectral data includes the reflectance of the wall and the reflectance of the furniture in the spatial dimension, then the reflectance of the wall and the reflectance of the furniture are input into a preset reflectance fusion model for fusion processing to obtain the comprehensive reflectance.

[0034] Optionally, the preset reflectivity fusion model can be a spatial reflectivity fusion model, as shown in Formula 1 below.

[0035] Formula 1; in, It can be the overall reflectivity, representing the overall spatial reflectivity after weighted calculation. N can be the total number of sampling areas participating in the calculation within the space where the electronic device is located, such as the spatial region where the electronic device is located. i represents the index number of the sampling area, ranging from 1 to N, where N is a positive integer. This is the wall reflection weighting coefficient, for example, 0.7, which represents the proportion of wall reflection's contribution to the overall space reflection. This is the furniture reflection weighting coefficient, for example, 0.3, which represents the proportion of furniture reflection to the overall space reflection. The wall reflectance of the i-th sampling region can be obtained by LiDAR scanning. This represents the average reflectance of the furniture in the space (i.e., furniture reflectance).

[0036] Optionally, the wall reflection weighting coefficient in the reflectivity fusion model and furniture reflection weighting coefficient The wall reflectance weighting coefficient can be determined based on the proportion of space. For example, if the visible area of ​​the wall accounts for about 70% and the furniture accounts for about 30% in a typical home environment, then the wall reflectance weighting coefficient can be determined. The furniture reflection weighting coefficient is 0.7. It is 0.3. It can also be determined based on the degree of reflection influence. and Experimental calibration shows that the secondary reflection interference from the wall surface to the artwork contributes approximately 2-3 times more than that from the furniture. Furthermore, LiDAR scanning can be used to calculate the actual area ratio of the wall surface to the furniture in real time, dynamically adjusting the α and β values.

[0037] Optionally, the preset reflectivity fusion model can be a reflectivity-material relationship model. The materials in the reflectivity-material relationship model can be wall materials and furniture materials, i.e., materials of the spatial environment. The preset reflectivity fusion model is used to quantify the color interference of the spatial environment on the display of the painting in the first image. By calculating the combined reflectivity of the walls and furniture, it provides environmental correction parameters for subsequent color compensation, eliminating secondary color shifts in the painting caused by spatial reflection pollution.

[0038] Step S20: Determine the painting style data of the first image to be displayed by the electronic device at the current moment; Optionally, the first image may be an image to be displayed on an electronic device, or it may be a digital painting.

[0039] Optionally, the painting style data may include material spectral characteristics related to the image art style of the first image, such as the reflectance coefficient of the painting material.

[0040] Optionally, in step S20, the step of determining the painting style data of the first image to be displayed by the electronic device at the current moment includes: performing style recognition on the first image according to a preset neural network to obtain a style recognition result; querying the painting material type corresponding to the style recognition result in a preset material spectrum database according to the style recognition result, and determining the painting material reflectance coefficient corresponding to the painting material type as the painting style data.

[0041] Optionally, the preset neural network can be a pre-trained neural network model, such as the VGG19 convolutional neural network model.

[0042] Optionally, when performing style analysis on the first image to obtain painting style data, an AI engine can be used for style analysis. A pre-trained neural network model (such as a VGG19 convolutional neural network model) can be loaded first. The weight parameters of this neural network model are stored in a dedicated art style recognition model file, and this model has been trained on a large number of art painting samples, possessing the ability to recognize different art movements. The first image is input as the painting image into this neural network model. The model performs forward inference calculations and outputs the probability distribution vector of the first image belonging to various art movements (such as Impressionism, Post-Impressionism, Classicism, etc.). The art movement with the highest probability distribution vector can be selected as the recognition result, i.e., the art style to which the first image belongs. Furthermore, a preset material spectral database can be used to query the painting material type (hereinafter referred to as the first painting material type) corresponding to the art style to which the first image belongs, such as burlap, fine linen, and wood paneling. The spectral reflectance characteristics parameters of the first painting material type are calculated and returned, including the reflectance coefficients of the RGB three channels.

[0043] For example, if the first image is an artwork, its image format is RGB three-channel, and its image size is pre-processed to meet the requirements of the pre-trained neural network model, such as 224×224 pixels. The first image is input into a pre-set neural network, and the output is a probability distribution vector indicating whether the first image belongs to a particular art movement. For example, Impressionism: 0.85, Post-Impressionism: 0.10, Classicism: 0.03, etc. At this point, Impressionism can be determined as the art style to which the first image belongs, i.e., the style recognition result. This style recognition result can then be input into a pre-set material spectrum database for retrieval, obtaining the painting material type corresponding to the style recognition result. The painting material reflectance coefficient corresponding to the painting material type is then determined as the painting style data and output. For example, the painting material reflectance coefficient includes RGB three-channel reflectance coefficients {R: 0.21, G: 0.18, B: 0.16}.

[0044] Step S30: Generate an RGB compensation matrix based on environmental spectral data, comprehensive reflectance, and painting style data; Optionally, the RGB compensation matrix can be a 3×3 color compensation transformation matrix used to linearly transform the RGB values ​​of each pixel in the first image to correct color deviations caused by environment, reflection, and material.

[0045] Alternatively, in one implementation of generating the RGB compensation matrix, a base matrix can be constructed first based on the identity matrix (where the diagonal lines are 1s and the rest are 0s). Then, the elements in the diagonal of the base matrix are adjusted according to environmental spectral data (such as the color temperature offset between the color temperature and the preset standard color temperature), for example, enhancing the B channel in a warm light environment. Then, the off-diagonal elements of the base matrix are adjusted using comprehensive reflectance, such as the wall color, to obtain the RGB compensation matrix.

[0046] Alternatively, in one implementation of generating the RGB compensation matrix, a first basic matrix can be generated based on environmental spectral data, and the first basic matrix can be updated based on comprehensive reflectance and painting style data to obtain the RGB compensation matrix.

[0047] Optionally, the specific method for generating the RGB compensation matrix based on environmental spectral data, comprehensive reflectance, and painting style data is not specifically limited here. For example, a lookup table can be used, that is, the compensation matrix that corresponds to the environmental spectral data, comprehensive reflectance, and painting style data can be found in the lookup table as the current RGB compensation matrix.

[0048] Optionally, the RGB compensation matrix can be updated in real time based on data collected by the sensor suite of the electronic device. For example, the RGB compensation matrix can be updated every 200ms.

[0049] Step S40: Perform image compensation on the first image based on the RGB compensation matrix.

[0050] Optionally, pixels from at least one frame of the first image can be input into the RGB compensation matrix for image compensation to obtain the pixels after image compensation.

[0051] Optionally, a specific image region in the first image that needs image compensation can be determined, and image compensation can be performed on the pixels of that specific image region according to the RGB compensation matrix.

[0052] Optionally, the specific image region can be the middle or edge region of the first image, or it can be the image region where the person or animal in the first image is located, etc.

[0053] Optionally, image compensation includes RGB channel compensation.

[0054] Optionally, in step S40, the step of generating an RGB compensation matrix based on environmental spectral data, comprehensive reflectance, and painting style data includes: performing RGB channel compensation on the pixels of the first image based on the RGB compensation matrix to obtain a compensated image.

[0055] Optionally, each frame pixel in the first image can be input into the RGB compensation matrix for calculation to obtain the image-compensated pixels, and the first image containing the image-compensated pixels can be used as the compensated image.

[0056] Optionally, after step S40, which involves performing image compensation on the first image based on the RGB compensation matrix, the process includes: performing color difference verification on the compensated image; if the color difference verification passes, then outputting and displaying the compensated image.

[0057] Optionally, when performing color difference verification on the compensated image, the color value or color deviation value corresponding to the compensated image can be determined, as follows: Provide a characterization description. It can characterize the degree of visual difference between two colors. The smaller the value, the closer the colors are and the more accurate the color reproduction.

[0058] Optionally, the compensated image can be calculated based on the CIE Lab color space. .

[0059] Optionally, the compensated image can be... The image is compared to a preset threshold, which can be set to 0.8. The compensated image is then... When the value is ≤0.8, the color difference verification of the compensated image is confirmed to be passed.

[0060] Alternatively, referring to Table 1, different... The range corresponds to different levels of human visual perception.

[0061] Table 1:

[0062] Optionally, since the display of artworks requires extremely high color reproduction, it needs to reach a level that is "imperceptible to the human eye." Therefore, in this embodiment, a preset threshold of 0.8 can be set, or a value smaller than 0.8 can be set.

[0063] In this embodiment, by collecting environmental spectral data and reflectance spectral data of the electronic device, the comprehensive reflectance in the spatial dimension is determined. Simultaneously, the painting style data of the first image to be displayed is identified. An RGB compensation matrix is ​​generated by integrating the environmental spectral data, comprehensive reflectance, and painting style data. Image compensation is then performed on the first image based on this RGB compensation matrix. This enables precise perception of ambient light and spatial reflectance. Combined with painting style recognition, a targeted RGB compensation matrix is ​​generated, effectively correcting color deviations caused by ambient light interference, spatial reflectance contamination, and differences in image media. This significantly improves the accuracy and realism of color reproduction, making it particularly suitable for high-fidelity display of artistic paintings, thereby enhancing the image quality displayed on the electronic device.

[0064] Based on the first embodiment of this application, a second embodiment of this application is proposed. In the second embodiment of this application, the same or similar contents as those in the above embodiment can be referred to the above description, and will not be repeated hereafter.

[0065] Optionally, the RGB compensation matrix is ​​a two-factor dynamic compensation matrix.

[0066] For example, the two-factor dynamic compensation matrix can be represented by the following formula 2.

[0067] Formula 2; , , These represent the red, green, and blue channel color values ​​output after compensation. , , These represent the original input color values ​​for the red, green, and blue channels, respectively.

[0068] Optionally, It can be a 3×3 matrix, such as a 3×3 color transformation matrix, and can also be a color transformation base matrix, used to adjust the color mapping relationship between RGB channels. Each element in this matrix represents the influence coefficient of the input channel on the output channel.

[0069] Optionally, It can represent the wall reflectance factor, which can be calculated based on the wall reflectance obtained from LiDAR scanning, and is used to compensate for the color interference of wall reflection on the display of the painting in the first image. It can represent style and material factors, which can be calculated by the AI ​​engine based on the artistic style and material characteristics of the painting, and used to adapt to the color expression needs of different painting schools.

[0070] Optionally, wall reflectivity It can be determined based on the following formula 3.

[0071] Formula 3; in, This is the wall interference suppression coefficient, for example, 0.3-0.5. This refers to the overall reflectivity.

[0072] Optionally, style material factor It can be determined based on the following formula 4.

[0073] Formula 4; in, The standard is used to display the reference value for reflection. Data on the style of the artwork identified by the AI ​​engine, such as the reflectivity of the artwork's materials.

[0074] Optionally, step S30, which generates an RGB compensation matrix based on environmental spectral data, comprehensive reflectance, and painting style data, includes steps a10-a40.

[0075] Step a10: Construct the wall reflection factor based on the preset wall interference suppression coefficient and comprehensive reflectivity; Optionally, the wall reflectance factor can be a factor characterizing the spatial environment dimension, and may include wall reflectance spectrum data and furniture reflectance, etc.

[0076] Optionally, different wall reflectance factors can be generated for different wall materials. For example, for a white wall, if the overall reflectance of a white wall is 0.8, then the wall reflectance factor can be 0.68. For a dark wall, if the overall reflectance of a dark wall is 0.2, then the wall reflectance factor can be 0.92.

[0077] Optionally, the wall reflectance factor can be determined or obtained according to Formula 3. For example, the preset wall interference suppression coefficient and comprehensive reflectance can be input into Formula 3 for calculation to obtain the wall reflectance factor.

[0078] Alternatively, the wall reflectivity factor can be determined by using a lookup table. For example, a preset index (hereinafter referred to as the first index) can be determined that corresponds to both the wall interference suppression coefficient and the overall reflectivity. The first index is then entered into a lookup table containing all wall reflectivity factors to obtain the wall reflectivity factor corresponding to the first index, which is then used as the current wall reflectivity factor.

[0079] Step a20: Construct style material factors based on preset standard display reflection reference values ​​and painting style data; Optionally, the style material factor can be a factor representing the dimension of the image, and can include painting style data recognized by the AI ​​engine, such as the material spectral reflectance characteristics corresponding to the painting's artistic style.

[0080] Optionally, different style material factors can be generated for different painting style data.

[0081] Optionally, for Impressionist burlap, if the painting style data corresponding to Impressionist burlap, such as the painting material reflectance coefficient, is 0.21, then the style material factor can be 0.95.

[0082] For classical oil painting panels, if the painting style data corresponding to the classical oil painting panel, such as the painting material reflectance coefficient, is 0.15, then the style material factor can be 1.33.

[0083] Optionally, the style material factor can be determined or obtained according to Formula 4. For example, the preset standard display reflection reference value and painting style data can be input into Formula 4 for calculation to obtain the style material factor.

[0084] Alternatively, the style material factor can be determined by using a lookup table. For example, a second index (hereinafter referred to as the second index) can be determined by using a preset standard display reflection reference value and painting style data. The second index is then entered into a lookup table containing various style material factors to obtain the style material factor corresponding to the second index, which is then used as the current style material factor.

[0085] Step a30: Update the preset first identity matrix based on the environmental spectral data to obtain the basic transformation matrix; Optionally, the environmental spectral data may include light intensity, color temperature, and the spectral distribution ratio of the RGB three channels.

[0086] Optionally, the first identity matrix can be a pre-set 3×3 matrix, and the diagonal of the first identity matrix can represent the gain position of the RGB three channels, which can be set to 1. The off-diagonal of the first identity matrix can represent the corresponding position of the cross-channel compensation of the RGB three channels, which can be set to 0.

[0087] Optionally, the first identity matrix can be adjusted in real time based on environmental spectral data to obtain the basic transformation matrix.

[0088] For example, let's take color temperature as an example. If the color temperature is warm (<5000K), increase the B channel gain. This can be done by increasing the value of the element representing the B channel gain in the first identity matrix. For instance, if the element representing the B channel gain is located at the bottom right diagonal of the first identity matrix and its value is 0.1, it can be increased to 0.2. If the color temperature is cool (>6500K), increase the R channel gain. This can be done by increasing the value of the element representing the R channel gain in the first identity matrix. For instance, if the element representing the G channel gain is located at the top left diagonal of the first identity matrix and its value is 0.1, it can be increased to 0.2.

[0089] Step a40: Construct a two-factor dynamic compensation matrix based on the wall reflection factor, style material factor, and basic transformation matrix.

[0090] The wall reflectivity factor, style material factor, and basic transformation matrix can be aggregated, or the basic transformation matrix can be updated based on the wall reflectivity factor and style material factor, to obtain a two-factor dynamic compensation matrix, which can then be used as the RGB compensation matrix. The function formula for the two-factor dynamic compensation matrix can be found in Formula 2.

[0091] Optionally, after obtaining the function formula corresponding to the two-factor dynamic compensation matrix, the RGB values ​​corresponding to the pixels in the first image can be used as the original input red, green and blue three-channel color values, and input into formula 2. Combined with the wall reflection factor and style material factor corresponding to the first image, the compensated red, green and blue three-channel color values ​​are calculated and used to update the corresponding pixels in the first image to obtain the image-compensated pixels. The same image compensation operation can be performed on each pixel in the first image to obtain the image-compensated pixels.

[0092] In this embodiment, by determining the wall reflectance factor and style material factor, and determining the basic transformation matrix based on the environmental spectral data and the first identity matrix, a two-factor dynamic compensation matrix is ​​constructed based on the wall reflectance factor, style material factor and basic transformation matrix, thereby obtaining the RGB compensation matrix, which can ensure the effectiveness of the obtained RGB compensation matrix.

[0093] Optionally, the RGB compensation matrix is ​​the first compensation matrix.

[0094] Optionally, step S30, which generates an RGB compensation matrix based on environmental spectral data, comprehensive reflectance, and painting style data, includes steps b10-b20.

[0095] Step b10: Determine the ambient light offset corresponding to the environmental spectral data, determine the wall reflection offset corresponding to the comprehensive reflectivity, and determine the material compensation coefficient corresponding to the painting style data. Optionally, the ambient light offset may include the ambient light offsets corresponding to the R channel, G channel, and B channel, respectively. The wall reflection offset may include the wall reflection offsets corresponding to the R channel, G channel, and B channel, respectively. The material compensation coefficient may include the material compensation coefficients corresponding to the R channel, G channel, and B channel, respectively.

[0096] Optionally, the ambient light offset can be calculated based on a preset standard light source, such as the D65 standard light source, whose corresponding RGB uniform distribution is 0.33.

[0097] Therefore, the ambient light offset can be calculated using the following formula 5.

[0098] Formula 5; in, This is the ambient light offset. This refers to environmental spectral data, such as the spectral distribution ratio of the RGB three channels. It is a preset standard light source.

[0099] For example, if the ambient spectral data shows an illuminance of 350 lux, a color temperature of 3500K (warm white), and an RGB spectral distribution ratio of [R: 0.45, G: 0.32, B: 0.23], then... =[0.45-0.33, 0.32-0.33, 0.23-0.33]=[+0.12, -0.01, -0.10], which means that the ambient light is reddish (+0.12), slightly lacking in green (-0.01), and significantly lacking in blue (-0.10).

[0100] Optionally, the wall reflection offset can be calculated using a neutral wall as the reference wall, with the RGB equalization reflection corresponding to the neutral wall being 0.5.

[0101] Therefore, the wall reflection offset can be calculated using the following formula 6.

[0102] Formula 6; in, This represents the wall reflection offset. (Based on overall reflectivity) When relying solely on wall reflectivity, it can be directly used as the overall reflectivity, i.e. This refers to the overall reflectivity. The reflectance is the reflectance corresponding to the reference wall surface, such as the reflectance corresponding to the neutral wall surface. When the overall reflectance is obtained based on the combined reflectance of the wall surface and the furniture, the wall reflectance offset can be the difference between the overall reflectance and the preset reference reflectance (e.g., the reflectance corresponding to the reference wall surface and the reflectance corresponding to the reference furniture).

[0103] For example, if the overall reflectance is 0.75, representing a light yellow wall surface, its corresponding RGB channel reflectance is [R: 0.82, G: 0.78, B: 0.65]. Then... =[0.82-0.5, 0.78-0.5, 0.65-0.5]=[+0.32, +0.28, +0.15], which means that the wall surface is yellowish (high red and green reflection, relatively low blue reflection).

[0104] Optionally, when determining the material compensation coefficient corresponding to the painting style data, the material compensation coefficient can be determined by referring to Formula 4 above. For example, the material compensation coefficient can be used as the style material factor.

[0105] For example, if the painting style data corresponding to the first image includes: school: Impressionism; material: burlap; material reflectance coefficient: [R: 0.21, G: 0.18, B: 0.16]. If the standard display reflectance reference value is 0.20, then the material compensation coefficient corresponding to the R channel can be calculated according to Formula 4 above. Material compensation coefficient corresponding to G channel Material compensation coefficient corresponding to channel B The corresponding meaning is that the blue reflection of the painting material in the first image is weak, and the B channel needs to be enhanced for compensation.

[0106] Step b20: Based on the ambient light offset, wall reflection offset, and material compensation coefficient, update the preset second identity matrix to obtain the first compensation matrix.

[0107] Optionally, the preset second identity matrix can be a pre-set 3×3 matrix, which can be similar to the first identity matrix, for example, all diagonal elements are 1 and all off-diagonal elements are 0.

[0108] Optionally, the elements in the second identity matrix can be updated using the ambient light offset, wall reflection offset, and material compensation coefficient to obtain the first compensation matrix, and the first compensation matrix can be used as the RGB compensation matrix.

[0109] In this embodiment, the second identity matrix is ​​updated based on the ambient light offset corresponding to the environmental spectral data, the wall reflection offset corresponding to the comprehensive reflectivity, and the material compensation coefficient corresponding to the painting style data to obtain the first compensation matrix, which is then used as the RGB compensation matrix, thereby ensuring the effectiveness of the obtained RGB compensation matrix.

[0110] Optionally, step b20, which involves updating the preset second identity matrix based on the ambient light offset, wall reflection offset, and material compensation coefficient to obtain the first compensation matrix, includes steps c10-c30.

[0111] Step c10: Based on the first product between the preset ambient light suppression coefficient and the ambient light offset, and the second product between the preset wall reflection suppression coefficient and the wall reflection offset, calculate the element values ​​of the diagonal elements in the preset second identity matrix. Optionally, RGB main channel gain processing can be performed on the second identity matrix, and the element values ​​of the diagonal elements in the second identity matrix can be calculated using the following formula 7.

[0112] Formula 7.

[0113] in, The values ​​of the diagonal elements in the second identity matrix. This is the ambient light suppression coefficient, for example, 0.4. The result is the first product between the ambient light suppression coefficient and the ambient light offset. This is the wall reflection suppression coefficient, for example, 0.3. The result is the second product between the wall reflection suppression coefficient and the wall reflection offset.

[0114] The element values ​​of the three diagonal elements in the second identity matrix can be calculated using Formula 7, as shown in Table 2 below.

[0115] Table 2:

[0116] Step c20: Based on the first sum between the ambient light offset and the wall reflection offset, and the preset cross-channel compensation coefficient, calculate the element values ​​of the off-diagonal elements in the preset second identity matrix. Optionally, RGB cross-channel compensation can be performed on the second identity matrix to cancel out color crosstalk between channels. The element values ​​of the off-diagonal elements in the second identity matrix can be calculated using the following formula 8.

[0117] Formula 8; in, The values ​​of the off-diagonal elements in the second identity matrix. This is the first sum between the ambient light offset and the wall reflection offset. This is the cross-channel compensation coefficient, for example, 0.15.

[0118] The element values ​​of each off-diagonal element of the second identity matrix can be calculated using Formula 8, as shown in Table 3 below.

[0119] Table 3:

[0120] Optionally, by calculating the element values ​​at each position in the second identity matrix according to Formulas 7 and 8, a second identity matrix with element values ​​can be obtained, for example: .

[0121] Step c30: Determine the first compensation matrix based on the second identity matrix with element values ​​according to the material compensation coefficient.

[0122] Optionally, after obtaining the second identity matrix with element values, the element values ​​in the second identity matrix with element values ​​can be updated and adjusted according to the material compensation coefficient to obtain the first compensation matrix.

[0123] In this embodiment, the element values ​​of the diagonal elements and the element values ​​of the off-diagonal elements in the second identity matrix are determined by different strategies based on the ambient light offset and the wall reflection offset. Then, the matrix elements are updated according to the material compensation coefficient to obtain the first compensation matrix, which is used as the RGB compensation matrix, thereby ensuring the effectiveness of the obtained RGB compensation matrix.

[0124] Optionally, step c30, which involves determining the first compensation matrix based on the material compensation coefficient for the second identity matrix with element values, includes steps d10-d40.

[0125] Step d10: Determine the first element value representing the R channel among the diagonal elements of the second identity matrix with element values, and update the first element value according to the material compensation coefficients belonging to the R channel in the material compensation coefficients. Step d20: Determine the second element value representing the G channel among the diagonal elements of the second identity matrix with element values, and update the second element value according to the material compensation coefficients belonging to the G channel in the material compensation coefficients. Step d30: Determine the value of the third element representing the B channel in the diagonal elements of the second identity matrix with element values, and update the value of the third element according to the material compensation coefficients belonging to the B channel in the material compensation coefficients. Step d40: Use the second identity matrix containing the updated first element value, the updated second element value, and the updated third element value as the first compensation matrix.

[0126] Optionally, if the material compensation coefficient includes the material compensation coefficient corresponding to the R channel... Material compensation coefficient corresponding to G channel Material compensation coefficient corresponding to channel B .

[0127] If the second identity matrix with element values ​​is: ; Then the first compensation matrix can be calculated, that is: ; .

[0128] in, This is the first compensation matrix.

[0129] Optionally, after determining the first compensation matrix, the first compensation matrix can be used as the RGB compensation matrix, and the RGB compensation matrix can be used to perform image compensation on the pixels of the first image.

[0130] For example, if the RGB values ​​corresponding to a pixel in the first image are: The pixel compensation calculation process using the first compensation matrix can be described as follows: =0.81×200+(-0.04)×180+(-0.01)×150=162-7.2-1.5≈153; = (-0.07)×200+1.02×180+(-0.01)×150=-14+183.6-1.5≈168; = (-0.07)×200+(-0.04)×180+1.24×150=-14-7.2+186≈165.

[0131] in, , , This refers to the RGB values ​​of the pixels after image compensation, for example, [153, 168, 165]. The corresponding effects can be described as follows: R channel reduction: offsetting the reddish environment and excessive red reflection from the wall; G channel slight reduction: slightly compensating for green reflection from the wall; B channel enhancement: compensating for the combined effects of insufficient blue in the environment, low blue reflection from the wall, and weak blue reflection from the artwork's texture.

[0132] In this embodiment, the first compensation matrix is ​​obtained by updating the element values ​​representing the RGB three channels in the second identity matrix according to the material compensation coefficient, and this first compensation matrix is ​​used as the RGB compensation matrix, thereby ensuring the effectiveness of the obtained RGB compensation matrix.

[0133] Furthermore, to aid in understanding the principle of image compensation performed by the electronic device in this embodiment, examples will be provided below.

[0134] For example, such as Figure 4 As shown, in the data acquisition layer of electronic devices, environmental spectral data, including light intensity / color temperature / RGB spectral distribution, can be collected through multispectral sensors. Reflectance spectral data from walls and furniture can be collected through LiDAR. In the data processing layer, reflectance-material relationship models are used to perform weighted fusion of reflectance data to obtain a comprehensive reflectance, for example... ×wall reflectivity+ × Furniture reflectance. An AI recognition engine can also be used to identify the painting style data of the first image, including style type / material type / RGB reflectance coefficient. In the compensation matrix generation layer, an RGB compensation matrix is ​​generated based on environmental spectral data, comprehensive reflectance, and painting style data. In the image processing layer, frame-by-frame pixel RGB compensation is performed on the image to be displayed, such as the first image, to obtain the compensated image. Then, color difference verification is performed on the compensated image in the verification output layer to determine... If yes, output and display the compensated image; otherwise, perform iterative optimization, updating the RGB compensation matrix until... .

[0135] Furthermore, this application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the image compensation method in Embodiment 1 above.

[0136] The following is for reference. Figure 5 The figure illustrates a structural diagram of an electronic device suitable for implementing embodiments of this application. The electronic devices in the embodiments of this application may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. The devices shown in the figure are merely examples and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0137] The electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for device operation. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0138] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0139] The electronic device provided in this application, employing the image compensation method described in the above embodiments, can solve the technical problem of how to improve the image display effect of the electronic device. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the image compensation method provided in the above embodiments, and other technical features of the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0140] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0141] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0142] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to perform the image compensation method described in the above embodiments.

[0143] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0144] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.

[0145] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by an electronic device, enable the electronic device to perform the steps in the aforementioned image compensation method.

[0146] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0148] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0149] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for performing the above-described image compensation method, thereby solving the technical problem of how to improve the image display effect of electronic devices. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the image compensation method provided in the above embodiments, and will not be repeated here.

[0150] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the image compensation method described above.

[0151] The computer program product provided in this application can solve the technical problem of how to improve the image display effect of electronic devices. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the image compensation method provided in the above embodiments, and will not be repeated here.

[0152] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. An image compensation method, characterized in that, The image compensation method includes the following steps: Collect environmental spectral data and reflectance spectral data of the environment in which the electronic device is located, and determine the comprehensive reflectance of the electronic device in the spatial dimension based on the reflectance spectral data; Determine the art style data of the first image to be displayed by the electronic device at the current moment; An RGB compensation matrix is ​​generated based on the environmental spectral data, the comprehensive reflectance, and the painting style data; Image compensation is performed on the first image based on the RGB compensation matrix.

2. The image compensation method as described in claim 1, characterized in that, The RGB compensation matrix is ​​a two-factor dynamic compensation matrix. The step of generating an RGB compensation matrix based on the environmental spectral data, the comprehensive reflectance, and the painting style data includes: A wall reflectance factor is constructed based on a preset wall interference suppression coefficient and the overall reflectance. A style material factor is constructed based on a preset standard display reflection reference value and the painting style data; The preset first identity matrix is ​​updated based on the environmental spectral data to obtain the basic transformation matrix; A two-factor dynamic compensation matrix is ​​constructed based on the wall reflectivity factor, the style material factor, and the basic transformation matrix.

3. The image compensation method as described in claim 1, characterized in that, The RGB compensation matrix includes a first compensation matrix. The step of generating an RGB compensation matrix based on the environmental spectral data, the comprehensive reflectance, and the painting style data includes: Determine the ambient light offset corresponding to the environmental spectral data, determine the wall reflection offset corresponding to the comprehensive reflectivity, and determine the material compensation coefficient corresponding to the painting style data; Based on the ambient light offset, the wall reflection offset, and the material compensation coefficient, the preset second identity matrix is ​​updated to obtain the first compensation matrix.

4. The image compensation method as described in claim 3, characterized in that, The step of updating the preset second identity matrix based on the ambient light offset, the wall reflection offset, and the material compensation coefficient to obtain the first compensation matrix includes: Based on the first product between the preset ambient light suppression coefficient and the ambient light offset, and the second product between the preset wall reflection suppression coefficient and the wall reflection offset, calculate the element values ​​of the diagonal elements in the preset second identity matrix; Based on the first sum between the ambient light offset and the wall reflection offset, and the preset cross-channel compensation coefficient, calculate the element values ​​of the off-diagonal elements in the preset second identity matrix; The first compensation matrix is ​​determined based on the material compensation coefficient and the second identity matrix with element values.

5. The image compensation method as described in claim 4, characterized in that, The step of determining the first compensation matrix based on the second identity matrix having element values ​​according to the material compensation coefficient includes: Determine the first element value representing the R channel among the diagonal elements of the second identity matrix with element values, and update the first element value according to the material compensation coefficients belonging to the R channel in the material compensation coefficients; Determine the second element value representing the G channel among the diagonal elements of the second identity matrix with element values, and update the second element value according to the material compensation coefficients belonging to the G channel in the material compensation coefficients; Determine the third element value representing the B channel among the diagonal elements of the second identity matrix with element values, and update the third element value according to the material compensation coefficients belonging to the B channel in the material compensation coefficients; The second identity matrix, which contains the updated first element value, the updated second element value, and the updated third element value, is used as the first compensation matrix.

6. The image compensation method as described in claim 1, characterized in that, The step of determining the overall reflectivity of the electronic device in the spatial dimension based on the reflectance spectral data includes: If the reflectance spectral data includes wall reflectance and furniture reflectance in the spatial dimension, then the wall reflectance and furniture reflectance are input into a preset reflectance fusion model for fusion processing to obtain the comprehensive reflectance.

7. The image compensation method as described in claim 1, characterized in that, The step of determining the painting style data of the first image to be displayed by the electronic device at the current moment includes: The first image is style-recognized based on a preset neural network to obtain style recognition results; Based on the style recognition result, the painting material type corresponding to the style recognition result is queried in the preset material spectrum database, and the painting material reflectance coefficient corresponding to the painting material type is determined as the painting style data.

8. The image compensation method as described in claim 1, characterized in that, The image compensation includes RGB channel compensation, and the step of performing image compensation on the first image based on the RGB compensation matrix includes: The pixels of the first image are compensated for RGB channels according to the RGB compensation matrix to obtain the compensated image; After the step of performing image compensation on the first image based on the RGB compensation matrix, the following steps are included: The compensated image is subjected to color difference verification. If the color difference verification passes, the compensated image is output and displayed.

9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the image compensation method as described in any one of claims 1 to 8.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the image compensation method as described in any one of claims 1 to 8.