Image color cast detection model generation method and device and electronic equipment
By collecting the value of the light sensor when displaying the image in the dark environment, determine the color of the mixed color image and train the detection model, solve the problem of the light and brightness deviation of the light leakage caused by the light leakage when the electronic device is automatically adjusted. The accurate determination of color leakage and the improvement of the screen display effect.
Patent Information
- Application Number
- CN202310936590.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-27
- Publication Date
- 2025-01-28
AI Technical Summary
When electronic devices automatically adjust the screen brightness, due to the light leakage problem of the screen itself, the perceived ambient light brightness is deviated, affecting the screen display effect.
By displaying solid and mixed images in the dark environment, collect the value of the light sensor, determine the color of the biased color of the mixed color image, and accurately determine the light leakage of the display device when displaying the mixed color image based on this training image color detection model quantity.
The accurate testing of the color of the mixed color image is achieved, and the accurate light leakage data is provided to help improve the screen display effect.
Smart Images

Figure CN119379817A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of display devices, and in particular to a method and device for generating an image color cast detection model, and an electronic device. Background Art
[0002] With the widespread use of electronic devices, people have higher and higher requirements for the screen display of electronic devices, such as requiring automatic adjustment of screen brightness. When the screen automatically adjusts the brightness, it generally senses the ambient light brightness and adjusts the screen display brightness according to the ambient light brightness. For example, when the ambient light brightness is high, the screen display brightness is also increased accordingly to ensure the screen display effect.
[0003] However, the brightness of ambient light perceived by electronic devices is often disturbed by the light leakage of the screen itself, resulting in deviations in the perceived brightness of ambient light, thereby affecting the screen display effect.
[0004] In related technologies, the color cast of the grayscale of an image (e.g., reddish, bluish, or greenish) can be combined to determine the amount of light leakage corresponding to an electronic device when displaying an image. However, since different light sensors respond differently to different color channels, the color cast based on the grayscale of the image may result in a large error in the determined amount of light leakage. Summary of the invention
[0005] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.
[0006] The first embodiment of the present disclosure provides a method for generating an image color cast detection model, comprising:
[0007] Acquire a first value corresponding to each of the CRGB channels collected by the first light sensor in the sample display device and a second value corresponding to each of the channels collected by the second light sensor in the reference display device when displaying each pure color image in a dark environment;
[0008] Acquire, when a mottled image is displayed in a dark environment, a third value corresponding to each of the channels collected by the first light sensor and a fourth value corresponding to each of the channels collected by the second light sensor;
[0009] Determine a color cast result corresponding to the mottled image according to the first value, the second value, the third value, and the fourth value;
[0010] Based on the mottled image and the corresponding color cast result, the model to be trained is trained to obtain an image color cast detection model.
[0011] The second aspect of the present disclosure provides a method for determining the amount of light leakage from a screen, including:
[0012] In a case where the image currently displayed by the target display device is a mottled image, inputting the image into a preset image color cast detection model to obtain a target color cast result corresponding to the image, wherein the preset image color cast detection model is generated based on the method proposed in the embodiment of the first aspect;
[0013] Based on the target color cast result, query the correction coefficient mapping table to obtain the target correction coefficient corresponding to each channel in each CRGB channel;
[0014] Acquire a reference light leakage amount corresponding to each of the channels when a reference display device displays the image in a dark environment;
[0015] According to the reference light leakage amount corresponding to each of the channels and the target correction coefficient, a target light leakage amount corresponding to each of the channels when the target display device displays the image is determined.
[0016] The third aspect of the present disclosure provides a device for generating an image color cast detection model, including:
[0017] A first acquisition module is used to acquire, when displaying each pure color image in a dark environment, a first value corresponding to each of the CRGB channels acquired by the first light sensor in the sample display device and a second value corresponding to each of the channels acquired by the second light sensor in the reference display device;
[0018] A second acquisition module, configured to obtain, when displaying a mottled image in a dark environment, a third value corresponding to each of the channels acquired by the first light sensor and a fourth value corresponding to each of the channels acquired by the second light sensor;
[0019] a determination module, configured to determine a color cast result corresponding to the mottled image according to the first value, the second value, the third value, and the fourth value;
[0020] The training module is used to train the model to be trained based on the mottled image and the corresponding color cast result to obtain an image color cast detection model.
[0021] The fourth aspect of the present disclosure provides a device for determining the amount of light leakage from a screen, comprising:
[0022] A first acquisition module is used for inputting the image into a preset image color cast detection model to obtain a target color cast result corresponding to the image when the image currently displayed by the target display device is a mottled image, wherein the preset image color cast detection model is generated based on the device proposed in the embodiment of the third aspect;
[0023] A query module, used to query a correction coefficient mapping table based on the target color cast result to obtain a target correction coefficient corresponding to each channel in each CRGB channel;
[0024] A second acquisition module, used for acquiring a reference light leakage amount corresponding to each of the channels when a reference display device displays the image in a dark environment;
[0025] The determination module is used to determine the target light leakage amount corresponding to each of the channels when the target display device displays the image according to the reference light leakage amount corresponding to each of the channels and the target correction coefficient.
[0026] The fifth aspect embodiment of the present disclosure proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method for generating an image color cast detection model as proposed in the first aspect embodiment of the present disclosure, or implements the method for determining the amount of screen light leakage as proposed in the second aspect embodiment of the present disclosure.
[0027] The sixth aspect embodiment of the present disclosure proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the method for generating an image color cast detection model as proposed in the first aspect embodiment of the present disclosure, or implements the method for determining the amount of screen light leakage as proposed in the second aspect embodiment of the present disclosure.
[0028] The seventh aspect embodiment of the present disclosure proposes a computer program product, including a computer program. When the computer program is executed by a processor, it implements the method for generating an image color cast detection model as proposed in the first aspect embodiment of the present disclosure, or implements the method for determining the amount of screen light leakage as proposed in the second aspect embodiment of the present disclosure.
[0029] The method, device and electronic device for generating an image color cast detection model provided by the present disclosure have the following beneficial effects:
[0030] In the disclosed embodiment, firstly, the first numerical value corresponding to each channel of each CRGB channel collected by the first light sensor in the sample display device and the second numerical value corresponding to each channel collected by the second light sensor in the reference display device are obtained when each pure color image is displayed in a dark environment; the third numerical value corresponding to each channel collected by the first light sensor and the fourth numerical value corresponding to each channel collected by the second light sensor are obtained when a mottled color image is displayed in a dark environment, and then the color cast result corresponding to the mottled color image is determined according to the first numerical value, the second numerical value, the third numerical value, and the fourth numerical value, and the model to be trained is trained based on the mottled color image and the corresponding color cast result to obtain an image color cast detection model. Thus, the color cast result of the mottled color image can be accurately determined according to the numerical values corresponding to each CRGB channel when the reference display device and the sample display device display the pure color image and the mottled color image, so as to obtain the image color cast detection model based on the training model of the mottled color image and the corresponding color cast result, and provide support for determining the light leakage amount of the display device when displaying the mottled color image based on the color cast corresponding to the mottled color image.
[0031] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0033] Figure 1 A schematic diagram of a flow chart of a method for generating an image color cast detection model provided by an embodiment of the present disclosure;
[0034] Figure 2 A schematic flow chart of a method for generating an image color cast detection model provided by another embodiment of the present disclosure;
[0035] Figure 2A A schematic diagram of a process for determining a color cast result provided by an embodiment of the present disclosure;
[0036] Figure 3 A flowchart of a method for determining screen light leakage amount provided by an embodiment of the present disclosure;
[0037] Figure 4 A schematic diagram of the structure of a device for generating an image color cast detection model provided by another embodiment of the present disclosure;
[0038] Figure 5 A schematic diagram of the structure of a device for determining screen light leakage amount provided by another embodiment of the present disclosure;
[0039] Figure 6A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0040] Embodiments of the present disclosure are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0041] The following describes a method, device, and electronic device for generating an image color cast detection model according to an embodiment of the present disclosure with reference to the accompanying drawings.
[0042] The disclosed embodiment takes the method for generating the image color cast detection model as an example in which the method is configured in a device for generating the image color cast detection model. The device for generating the image color cast detection model can be applied to any electronic device so that the electronic device can perform the function of generating the image color cast detection model.
[0043] Figure 1 A schematic flow chart of a method for generating an image color cast detection model provided in an embodiment of the present disclosure.
[0044] like Figure 1 As shown, the method for generating the image color cast detection model may include the following steps:
[0045] Step 101, obtaining a first value corresponding to each CRGB channel collected by a first light sensor in a sample display device and a second value corresponding to each channel collected by a second light sensor in a reference display device when displaying each pure color image in a dark environment.
[0046] It should be noted that in the embodiment of the present disclosure, by collecting the first value corresponding to each channel of the CRGB channels collected by the first light sensor in the sample display device in a dark environment and the second value corresponding to each channel collected by the second light sensor in the reference display device, the influence of other light on the collected data can be avoided.
[0047] For example, the sample display device and the reference display device can be placed in a dark box respectively, and the sample display device and the reference display device can be controlled to display pure color images to obtain a first value corresponding to each channel of each CRGB channel collected by the first light sensor in the sample display device and a second value corresponding to each channel collected by the second light sensor in the reference display device.
[0048] Among them, pure color images may include pure white, pure red, pure green, and pure blue images.
[0049] The sample display device may be a display device used to collect training data required by the image color cast detection model, for example, a display device whose light leakage is to be calibrated before leaving the factory.
[0050] The reference display device may be a reference object of the sample display device, that is, when the sample display device and the reference display device display the same image, the light leakage amount of the sample display device may be determined based on the light leakage amount of the reference display device. In some embodiments, the reference display device may also be called a gold machine display device.
[0051] Among them, the light sensor can be used to detect the surrounding light and then adjust the display brightness of the display device. Specifically, the light sensor obtains color information by collecting light and converting it into electrical signals. CRGB refers to the three channels of brightness, red, green, and blue. The light collected by the light sensor will undergo signal processing and obtain the values of the three channels of brightness, red, green, and blue respectively. These values represent the intensity of light in different channels.
[0052] Step 102 , when displaying a mottled image in a dark environment, obtaining a third value corresponding to each channel collected by the first light sensor and a fourth value corresponding to each channel collected by the second light sensor.
[0053] The mixed color image may be any image except a pure color image, for example, a pure yellow or pure cyan image, or an image of two or more colors.
[0054] The third value corresponding to each channel collected by the first light sensor and the fourth value corresponding to each channel collected by the second light sensor are obtained in the same manner as the above-mentioned manner of obtaining the first value and the second value, which will not be described in detail here.
[0055] Specifically, the sample display device displays a mottled image in a dark environment, and the third value corresponding to each channel collected by the first light sensor in the sample display device is obtained. The reference display device displays a mottled image in a dark environment, and the fourth value corresponding to each channel collected by the second light sensor in the reference display device is obtained.
[0056] Step 103, determining a color cast result corresponding to the noise image according to the first value, the second value, the third value, and the fourth value.
[0057] In the disclosed embodiment, after obtaining the first value, the second value, the third value, and the fourth value, the first ratio between the first value and the second value corresponding to each channel under the same pure color image, and the second ratio between the third value and the fourth value of each channel can be determined first, and then the target pure color image corresponding to the noisy image is determined based on the similarity between the second ratio corresponding to each channel and the first ratio corresponding to the same channel under each pure color image, and the color corresponding to the target pure color image is determined as the color cast result corresponding to the noisy image.
[0058] For example, in a pure red image, the first ratio between the first value and the second value is as follows:
[0059] Coef_C_red=C1 red / C2_red
[0060] Coef_R_red=R1 red / R2 red
[0061] Coef_G_red=G1 red / G2 red
[0062] Coef_B_red=B1 red / B2 red
[0063] Among them, Coef_C_red, Coef_R_red, Coef_G_red, and Coef_B_red are the first ratio corresponding to the C channel, the first ratio corresponding to the R channel, the first ratio corresponding to the G channel, and the first ratio corresponding to the B channel in the pure red image, respectively: C1 red, R1 red, G1 red, and B1 red are the first value corresponding to the C channel, the first value corresponding to the R channel, the first value corresponding to the G channel, and the first value corresponding to the B channel in the pure red image, respectively; C2_red, R2 red, G2 red, and B2 red are the second value corresponding to the C channel, the second value corresponding to the R channel, the second value corresponding to the G channel, and the second value corresponding to the B channel in the pure red image, respectively.
[0064] In the case of a pure green image, a first ratio between the first value and the second value is as follows:
[0065] Coef_C_green=C1 green / C2_green
[0066] Coef_R_green=R1 green / R2 green
[0067] Coef_G_green=G1 green / G2 green
[0068] Coef_B_green=B1 green / B2 green
[0069] Among them, Coef_C_green, Coef_R_green, Coef_G_green, and Coef_B_green are the first ratio corresponding to the C channel, the first ratio corresponding to the R channel, the first ratio corresponding to the G channel, and the first ratio corresponding to the B channel under the pure green image respectively; C1 green, R1 green, G1 green, and B1 green are the first value corresponding to the C channel, the first value corresponding to the R channel, the first value corresponding to the G channel, and the first value corresponding to the B channel under the pure green image respectively; C2_green, R2green, G2 green, and B2 green are the second value corresponding to the C channel, the second value corresponding to the R channel, the second value corresponding to the G channel, and the second value corresponding to the B channel under the pure green image respectively.
[0070] In the case of a pure blue image, a first ratio between the first value and the second value is as follows:
[0071] Coef_C_blue=C1 blue / C2_blue
[0072] Coef_R_blue=R1 blue / R2 blue
[0073] Coef_G_blue=G1 blue / G2 blue
[0074] Coef_B_blue=B1 blue / B2 blue
[0075] Among them, Coef_C_blue, Coef_R_blue, Coef_G_blue, and Coef_B_blue are the first ratio corresponding to the C channel, the first ratio corresponding to the R channel, the first ratio corresponding to the G channel, and the first ratio corresponding to the B channel under the pure blue image respectively; C1 blue, R1 blue, G1 blue, and B1 blue are the first value corresponding to the C channel, the first value corresponding to the R channel, the first value corresponding to the G channel, and the first value corresponding to the B channel under the pure blue image respectively; C2_blue, R2 blue, G2blue, and B2 blue are the second value corresponding to the C channel, the second value corresponding to the R channel, the second value corresponding to the G channel, and the second value corresponding to the B channel under the pure blue image respectively.
[0076] Under the pure white image, the first ratio between the first value and the second value is as follows:
[0077] Coef_C_white=C1 white / C2_white
[0078] Coef_R_white=R1 white / R2 white
[0079] Coef_G_white=G1 white / G2 white
[0080] Coef_B_white=B1 white / B2 white
[0081] Among them, Coef_C_white, Coef_R_white, Coef_G_white, and Coef_B_white are the first ratio corresponding to the C channel, the first ratio corresponding to the R channel, the first ratio corresponding to the G channel, and the first ratio corresponding to the B channel under the pure white image, respectively: C1 white, R1 white, G1 white, and B1 white are the first value corresponding to the C channel, the first value corresponding to the R channel, the first value corresponding to the G channel, and the first value corresponding to the B channel under the pure white image, respectively; C2_white, R2white, G2 white, and B2 white are the second value corresponding to the C channel, the second value corresponding to the R channel, the second value corresponding to the G channel, and the second value corresponding to the B channel under the pure white image, respectively.
[0082] In the case of a noisy image, the second ratio between the third value and the fourth value of each channel is as follows:
[0083] Coef_C_color=C1 color / C2 color
[0084] Coef_R_color=R1 color / R2 color
[0085] Coef_G_color=G1 color / G2 color
[0086] Coef_B_color=B1 color / B2 color
[0087] Among them, Coef_C_noise, Coef_R_noise, Coef_G_noise, and Coef_B_noise are the second ratio of the C channel, the second ratio of the R channel, the second ratio of the G channel, and the second ratio of the B channel under the pure white image; C1 noise, R1 noise, G1 noise, and B1 noise are the third values corresponding to the C channel, the third value corresponding to the R channel, the third value corresponding to the G channel, and the third value corresponding to the B channel under the pure white image; C2_noise, R2 noise, G2 noise, and B2 noise are the fourth values corresponding to the C channel, the fourth value corresponding to the R channel, the fourth value corresponding to the G channel, and the fourth value corresponding to the B channel under the pure white image.
[0088] In some embodiments, the first similarity between the second ratios [Coef_C_noise, Coef_R_noise, Coef_G_noise, Coef_Bnoise] corresponding to each channel of the noisy image and the first ratios [Coef_C_red, Coef_R_red, Coef_G_red, Coef_B_red] corresponding to each channel of the pure red image can be calculated in sequence; the second similarity between the first ratios [Coef_C_green, Coef_R_green, Coef_G_green, Coef_B_green] corresponding to each channel of the pure green image can be calculated in sequence; the third similarity between the first ratios [Coef_C_blue, Coef_R_blue, Coef_G_blue, Coef_B_blue] corresponding to each channel of the pure blue image can be calculated in sequence; and the fourth similarity between the first ratios [Coef_C_white, Coef_R_white, Coef_G_white, Coef_B_white] corresponding to each channel of the pure white image can be calculated in sequence.
[0089] Optionally, the first similarity, the second similarity, the third similarity, and the fourth similarity may be determined by using cosine similarity, Euclidean distance, etc. The present disclosure does not limit this.
[0090] Finally, the color corresponding to the pure color image with the largest similarity can be determined as the color cast result of the mixed color image. For example, if the first similarity is the largest, the color cast result corresponding to the mixed color image is determined to be red.
[0091] Step 104: Based on the noisy image and the corresponding color cast result, the model to be trained is trained to obtain an image color cast detection model.
[0092] Finally, after obtaining the noise image and the corresponding color cast result, they are used as training data to train the training model to obtain the image color cast detection model.
[0093] Among them, in the embodiments of the present disclosure, there is no specific limitation on the structure of the training model, which can be a convolutional neural network (CNN) or a recurrent neural network (RNN).
[0094] Specifically, a noise image is input into the model to be trained to obtain a predicted color cast result output by the model to be trained, and based on the difference between the predicted color cast result and the color cast result, the model to be trained is corrected to obtain an image color cast detection model.
[0095] In the disclosed embodiment, firstly, the first numerical value corresponding to each channel of each CRGB channel collected by the first light sensor in the sample display device and the second numerical value corresponding to each channel collected by the second light sensor in the reference display device are obtained when each pure color image is displayed in a dark environment; the third numerical value corresponding to each channel collected by the first light sensor and the fourth numerical value corresponding to each channel collected by the second light sensor are obtained when a mottled color image is displayed in a dark environment, and then the color cast result corresponding to the mottled color image is determined according to the first numerical value, the second numerical value, the third numerical value, and the fourth numerical value, and the model to be trained is trained based on the mottled color image and the corresponding color cast result to obtain an image color cast detection model. Thus, the color cast result of the mottled color image can be accurately determined according to the numerical values corresponding to each CRGB channel when the reference display device and the sample display device display the pure color image and the mottled color image, so as to obtain the image color cast detection model based on the training model of the mottled color image and the corresponding color cast result, and provide support for determining the light leakage amount of the display device when displaying the mottled color image based on the color cast corresponding to the mottled color image.
[0096] Figure 2 A schematic diagram of a process for generating an image color cast detection model provided by an embodiment of the present disclosure is shown in FIG. Figure 2 As shown, the method for generating the image color cast detection model may include the following steps:
[0097] Step 201, obtaining a first value corresponding to each CRGB channel collected by a first light sensor in a sample display device and a second value corresponding to each channel collected by a second light sensor in a reference display device when displaying each pure color image in a dark environment.
[0098] Step 202 , when displaying a mottled image in a dark environment, obtain a third value corresponding to each channel collected by the first light sensor and a fourth value corresponding to each channel collected by the second light sensor.
[0099] Step 203, determining a first ratio between the first value and the second value corresponding to each channel under the same pure color image.
[0100] Step 204, determining a second ratio between the third value and the fourth value of each channel.
[0101] The specific implementation forms of step 201 to step 202 can refer to the detailed descriptions in other embodiments of the present disclosure, and will not be described in detail here.
[0102] Step 205: determine a first difference between a second ratio corresponding to each channel and a first ratio corresponding to the same channel in each pure color image.
[0103] For example, the first difference between the second ratio corresponding to each channel and the first ratio corresponding to the same channel in each pure color image may be as follows:
[0104] Error C red=Coef_C_color-Coef_C_red
[0105] Error R red=Coef_R_color-Coef_R_red
[0106] Error G red=Coef_G_color-Coef_G_red
[0107] Error B red = Coef_B_color-Coef_B_red
[0108] Error C green = Coef_C_color-Coef_C_green
[0109] Error R green = Coef_R_color-Coef_R_green
[0110] Error G green = Coef_G_color-Coef_G_green
[0111] Error B green = Coef_B_color-Coef_B_green
[0112] Error C blue=Coef_C_color-Coef_C_blue
[0113] Error R blue = Coef_R_color-Coef_R_blue
[0114] Error G blue = Coef_G_color-Coef_G_blue
[0115] Error B blue=Coef_B_color-Coef_B_blue
[0116] Error C white=Coef_C_color-Coef_C_white
[0117] Error R white=Coef_R_color-Coef_R_white
[0118] Error G white=Coef_G_various-Coef_G_white
[0119] Error B white=Coef_B_color-Coef_B_white
[0120] Among them, Error C red, Error R red, Error G red, and Error B red are respectively the first differences between the second ratio and the first ratio of each CRGB channel in a pure red image, Error C green, Error R green, Error G green, and Error B green are respectively the first differences between the second ratio and the first ratio of each CRGB channel in a pure green image, Error C blue, Error R blue, Error G blue, and Error B blue are respectively the first differences between the second ratio and the first ratio of each CRGB channel in a pure blue image, and Error C white, Error Rwhite, Error G white, and Error B white are respectively the first differences between the second ratio and the first ratio of each CRGB channel in a pure white image.
[0121] Step 206 : Determine a target pure color image corresponding to the mixed color image according to the first difference values corresponding to the CRGB channels under each pure color image.
[0122] Optionally, determine the total number of first difference values less than a threshold value among the first difference values corresponding to the CRGB channels of each pure color image, then determine the number of reference pure color images with the smallest corresponding total number, and determine the target pure color image from the reference pure color images based on the number of reference pure color images.
[0123] The threshold is a preset value and can be set as needed during implementation.
[0124] Optionally, when there is only one reference pure color image, the reference pure color image is determined as the target pure color image.
[0125] For example, among the first differences corresponding to the CRGB channels under the pure red image, the total number of first differences less than the threshold is 3, among the first differences corresponding to the CRGB channels under the pure green image, the total number of first differences less than the threshold is 2, among the first differences corresponding to the CRGB channels under the pure blue image, the total number of first differences less than the threshold is 3, and among the first differences corresponding to the CRGB channels under the pure white image, the total number of first differences less than the threshold is 1, then the reference pure color image is a pure white image, and the number is 1, that is, the pure white image is the target pure color image.
[0126] Optionally, when there are multiple reference pure color images, the threshold is lowered to determine the target number of first difference values corresponding to the CRGB channels of each reference image that are less than the lowered threshold value. When there are multiple pure color images with the smallest corresponding target number, return to the operation of lowering the threshold until there is only one pure color image with the smallest corresponding target number.
[0127] It should be noted that the color cast result of a noisy image can only be one color. Therefore, when there are multiple reference pure color images, the threshold can be further lowered to determine the target pure color image. Similarly, when the reference pure color image is 0, the threshold can be further increased to determine the target pure color image.
[0128] Optionally, the threshold value may be lowered based on a preset adjustment range.
[0129] For example, if there are two reference sample images, namely a pure red image and a pure blue image, the threshold is lowered based on a preset adjustment amplitude, and then the number of targets of the first difference values corresponding to the CRGB channels of the pure red image and the pure blue image, which are less than the lowered threshold value, is determined respectively; if the number of targets corresponding to the pure red image is the same as that corresponding to the pure blue image, the threshold is continued to be lowered until the number of targets corresponding to the pure red image is the smallest, or the number of targets corresponding to the pure white image is the smallest, and the pure red image or pure white image with the smallest number of targets is determined as the target pure color image.
[0130] Step 207: determine the color corresponding to the target pure color image as the color cast result corresponding to the mixed color image.
[0131] After the target pure color image is determined, the color cast result of the mixed color image is explained as the color corresponding to the target pure color image.
[0132] Figure 2A A schematic diagram of a process for determining a color cast result provided by an embodiment of the present disclosure is shown in FIG. Figure 2A As shown, the reference display device and the sample display device display a mottled color image and each pure color image in a dark environment respectively;
[0133] Obtaining the first light sensor in the sample display device to collect the first values corresponding to each CRGB channel when displaying each pure color image, and the third values corresponding to each CRGB channel when displaying a mixed color image;
[0134] Obtain the second light sensor in the reference display device to collect the second values corresponding to each CRGB channel when displaying each pure color image; and the fourth values corresponding to each CRGB channel when displaying a mixed color image;
[0135] Determine a first ratio between a first value and a second value corresponding to each CRGB channel under the same pure color image;
[0136] Determine a second ratio between the third value and the fourth value corresponding to each channel of CRGB in the noisy image;
[0137] Determine a first difference between a second ratio corresponding to each channel and a first ratio corresponding to the same channel in each pure color image;
[0138] Determine a target pure color image corresponding to the mixed color image according to the first difference values corresponding to the CRGB channels under each pure color image;
[0139] The color corresponding to the target pure color image is determined as the color cast result corresponding to the noise color image.
[0140] Step 208: Based on the noisy image and the corresponding color cast result, the model to be trained is trained to obtain an image color cast detection model.
[0141] In the disclosed embodiment, firstly, when each pure color image is displayed in a dark environment, a first value corresponding to each channel in each CRGB channel collected by the first light sensor in the sample display device and a second value corresponding to each channel collected by the second light sensor in the reference display device are obtained; when a mottled color image is displayed in a dark environment, a third value corresponding to each channel collected by the first light sensor and a fourth value corresponding to each channel collected by the second light sensor are obtained; then, a first ratio between the first value and the second value corresponding to each channel under the same pure color image is determined; a second ratio between the third value and the fourth value of each channel is determined, and then a first difference between the second ratio corresponding to each channel and the first ratio corresponding to the same channel under each pure color image is determined; and according to the first differences respectively corresponding to the CRGB channels under each pure color image, a target pure color image corresponding to the mottled color image is determined, and the color corresponding to the target pure color image is determined as the color cast result corresponding to the mottled color image; finally, based on the mottled color image and the corresponding color cast result, the to-be-trained model is trained to obtain an image color cast detection model. Therefore, based on the relationship between the second ratio corresponding to each channel and the first difference between the first ratio corresponding to the same channel under each pure color image and the threshold, the color cast result corresponding to the noise image can be accurately determined, thereby improving the accuracy of the image color cast detection model in detecting the color cast result of the noise image.
[0142] Figure 3 A flow chart of a method for determining screen light leakage provided by an embodiment of the present disclosure is shown as follows: Figure 3 As shown, the method for determining the screen light leakage amount may include the following steps:
[0143] Step 301: When the image currently displayed by the target display device is a mixed color image, the image is input into a preset image color cast detection model to obtain a target color cast result corresponding to the image.
[0144] The preset image color cast detection model may be an image color cast detection model generated by training based on the generation method of the image color cast detection model in other embodiments.
[0145] The target display device may be a display device of the same model as the sample display device.
[0146] It should be noted that there are many kinds of noisy images, and it is difficult to determine the correction coefficient corresponding to each noisy image one by one. In the embodiment of the present disclosure, the noisy images can be divided into four categories based on the color cast results corresponding to the noisy images, and then the target correction coefficient corresponding to the color image can be determined based on the correction coefficient corresponding to each color cast result. Therefore, when the image currently displayed by the target display device is a noisy image, it is necessary to first input the image into a preset image color cast detection model to obtain the target color cast result corresponding to the image.
[0147] The target color cast result corresponding to the image may be red, green, blue or white.
[0148] Step 302 : Based on the target color cast result, query the correction coefficient mapping table to obtain the target correction coefficient corresponding to each channel in each CRGB channel.
[0149] The correction coefficient mapping table may be pre-generated, and then based on the target color cast result, the correction coefficient mapping table may be queried to obtain the target correction coefficient corresponding to each channel in each CRGB channel.
[0150] In some embodiments, a first value corresponding to each channel of each CRGB channel collected by a first light sensor in a sample display device and a second value corresponding to each channel collected by a second light sensor in a reference display device when displaying each pure color image in a dark environment can be first obtained, and then a first ratio between the first value and the second value corresponding to each channel under the same pure color image is determined, and the first ratio corresponding to each channel under each pure color image is determined as a correction coefficient corresponding to each channel under each pure color image. Finally, a correction coefficient mapping table is generated according to the color corresponding to each pure color image and the correction coefficient corresponding to each channel under each pure color image.
[0151] Among them, the detailed steps of determining the first ratio between the first value and the second value corresponding to each channel under the same pure color image can refer to the detailed description in other embodiments of the present disclosure, and will not be repeated here.
[0152] Step 303: Obtain a reference light leakage amount corresponding to each channel when a reference display device displays an image in a dark environment.
[0153] In some possible implementations, the expected light leakage amount may be input into a light leakage amount prediction model corresponding to a pre-generated reference display device to obtain a reference light leakage amount corresponding to a channel.
[0154] The light leakage prediction model may be generated based on the light leakage corresponding to each CRGB channel collected when a reference display device displays a variety of mottled images.
[0155] Specifically, a mottled image is displayed in a reference display device, and the light leakage amounts corresponding to each CRGB channel collected by the second light sensor in the reference display device are obtained. The mottled image is then input into a light leakage prediction model to be trained to obtain predicted light leakage amounts corresponding to each CRGB channel predicted by the light leakage prediction model. Based on the difference between the predicted light leakage amounts and the collected light leakage amounts, the light leakage prediction model to be trained is trained to obtain a light leakage prediction model.
[0156] Step 304 , determining a target light leakage amount corresponding to each channel when the target display device displays an image according to the reference light leakage amount corresponding to each channel and the target correction coefficient.
[0157] In the disclosed embodiment, after obtaining the reference light leakage amount corresponding to each channel and the target correction coefficient, the product of the reference light leakage amount corresponding to each channel and the target correction coefficient can be determined as the target light leakage amount corresponding to each channel.
[0158] In some embodiments, after determining the target light leakage amount corresponding to each channel, the ambient light brightness can be accurately determined based on the difference between the numerical values corresponding to each channel collected by the light sensor in the target display device and the light leakage amount, and then based on the ambient light brightness, the display brightness of the target display device can be accurately adjusted.
[0159] The method for determining the amount of screen light leakage in the embodiment of the present disclosure can be applied to scenarios such as traditional light sensing, slit light sensing, and under-screen light sensing.
[0160] In the disclosed embodiment, when the image currently displayed by the target display device is a mottled image, the image is input into a preset image color cast detection model to obtain a target color cast result corresponding to the image, and then based on the target color cast result, a correction coefficient mapping table is queried to obtain a target correction coefficient corresponding to each channel in each CRGB channel, and then a reference light leakage amount corresponding to each channel when the reference display device displays the image in a dark environment is obtained, and finally, based on the reference light leakage amount corresponding to each channel and the target correction coefficient, the target light leakage amount corresponding to each channel when the target display device displays the image is determined. Thus, the color cast result of the mottled image can be accurately determined based on the image color cast detection model, and then based on the target correction coefficient and the reference light leakage amount corresponding to the color cast result, the target light leakage amount of the target display device when displaying the image can be accurately determined, providing reliable data for further determining the ambient light brightness of the target display device.
[0161] In order to implement the above embodiment, the present disclosure also proposes a device for generating an image color cast detection model.
[0162] Figure 4 A schematic diagram of the structure of a device for generating an image color cast detection model provided in an embodiment of the present disclosure.
[0163] like Figure 4 As shown, the image color cast detection model generation device 400 may include:
[0164] A first acquisition module 410 is used to acquire, when displaying each pure color image in a dark environment, a first value corresponding to each channel of each CRGB channel acquired by a first light sensor in a sample display device and a second value corresponding to each channel acquired by a second light sensor in a reference display device;
[0165] A second acquisition module 420 is used for obtaining, when displaying a mottled image in a dark environment, a third value corresponding to each channel acquired by the first light sensor and a fourth value corresponding to each channel acquired by the second light sensor;
[0166] A determination module 430, configured to determine a color cast result corresponding to the mottled image according to the first value, the second value, the third value, and the fourth value;
[0167] The training module 440 is used to train the model to be trained based on the noisy image and the corresponding color cast result to obtain an image color cast detection model.
[0168] In some embodiments, the determination module 430 is configured to:
[0169] Determine a first ratio between a first value and a second value corresponding to each channel under the same pure color image;
[0170] determining a second ratio between the third value and the fourth value for each channel;
[0171] Determine a first difference between a second ratio corresponding to each channel and a first ratio corresponding to the same channel in each pure color image;
[0172] Determine a target pure color image corresponding to the mixed color image according to the first difference values corresponding to the CRGB channels under each pure color image;
[0173] The color corresponding to the target pure color image is determined as the color cast result corresponding to the noise color image.
[0174] In some embodiments, the determination module 430 is configured to:
[0175] Determine the total number of first difference values that are less than a threshold value among the first difference values corresponding to the CRGB channels of each pure color image;
[0176] Determine the number of reference pure color images corresponding to the smallest total number;
[0177] According to the number of reference solid color images, a target solid color image is determined from the reference solid color images.
[0178] In some embodiments, the determination module 430 is further configured to:
[0179] When there is only one reference solid color image, the reference solid color image is determined as the target solid color image.
[0180] In some embodiments, the determination module 430 is further configured to:
[0181] When there are multiple reference pure color images, lower the threshold;
[0182] Determine a target number of first difference values that are less than the lowered threshold value among the first difference values corresponding to the CRGB channels of each reference pure color image;
[0183] In the case that there are multiple pure-color images with the smallest corresponding target number, the operation of lowering the threshold is returned until there is only one pure-color image with the smallest corresponding target number.
[0184] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.
[0185] The device for generating the image color cast detection model of the disclosed embodiment first obtains the first value corresponding to each channel of each CRGB channel collected by the first light sensor in the sample display device and the second value corresponding to each channel collected by the second light sensor in the reference display device when each pure color image is displayed in a dark environment; obtains the third value corresponding to each channel collected by the first light sensor and the fourth value corresponding to each channel collected by the second light sensor when a mixed color image is displayed in a dark environment, and then determines the color cast result corresponding to the mixed color image according to the first value, the second value, the third value, and the fourth value, and trains the model to be trained based on the mixed color image and the corresponding color cast result to obtain the image color cast detection model. Thus, the color cast result of the mixed color image can be accurately determined according to the values corresponding to each CRGB channel when the reference display device and the sample display device display the pure color image and the mixed color image, so as to obtain the image color cast detection model based on the mixed color image and the corresponding color cast result training model, and provide support for determining the light leakage amount of the display device when displaying the mixed color image based on the color cast corresponding to the mixed color image.
[0186] Figure 5 A schematic diagram of the structure of a device for determining the amount of screen light leakage provided by an embodiment of the present disclosure.
[0187] A first acquisition module 510 is used to input the image into a preset image color cast detection model to obtain a target color cast result corresponding to the image when the image currently displayed by the target display device is a mottled image, wherein the preset image color cast detection model is generated based on the image color cast detection model generation device 400 in the above embodiment;
[0188] A query module 520 is used to query a correction coefficient mapping table based on the target color cast result to obtain a target correction coefficient corresponding to each channel in each CRGB channel;
[0189] The second acquisition module 530 is used to acquire a reference light leakage amount corresponding to each channel when a reference display device displays an image in a dark environment;
[0190] The determination module 540 is used to determine the target light leakage amount corresponding to each channel when the target display device displays an image according to the reference light leakage amount corresponding to each channel and the target correction coefficient.
[0191] In some embodiments, a generating module is further included for:
[0192] Acquire a first value corresponding to each of the CRGB channels collected by the first light sensor in the sample display device and a second value corresponding to each of the channels collected by the second light sensor in the reference display device when each pure color image is displayed in a dark environment;
[0193] Determine a first ratio between a first value and a second value corresponding to each channel under the same pure color image;
[0194] Determine the first ratio corresponding to each channel under each pure color image as a correction coefficient corresponding to each channel under each pure color image;
[0195] A correction coefficient mapping table is generated according to the color corresponding to each pure color image and the correction coefficient corresponding to each channel under each pure color image.
[0196] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.
[0197] In the disclosed embodiment, when the image currently displayed by the target display device is a mottled image, the image is input into a preset image color cast detection model to obtain a target color cast result corresponding to the image, and then based on the target color cast result, a correction coefficient mapping table is queried to obtain a target correction coefficient corresponding to each channel in each CRGB channel, and then a reference light leakage amount corresponding to each channel when the reference display device displays the image in a dark environment is obtained, and finally, based on the reference light leakage amount corresponding to each channel and the target correction coefficient, the target light leakage amount corresponding to each channel when the target display device displays the image is determined. Thus, the color cast result of the mottled image can be accurately determined based on the image color cast detection model, and then based on the target correction coefficient and the reference light leakage amount corresponding to the color cast result, the target light leakage amount of the target display device when displaying the image can be accurately determined, providing reliable data for further determining the ambient light brightness of the target display device.
[0198] In order to implement the above embodiments, the present disclosure further proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for generating an image color cast detection model proposed in the above embodiments of the present disclosure is implemented, and the method for determining the amount of screen light leakage proposed in the above embodiments of the present disclosure is implemented.
[0199] In order to implement the above-mentioned embodiments, the present disclosure also proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the method for generating an image color cast detection model as proposed in the above-mentioned embodiments of the present disclosure, and implements the method for determining the amount of screen light leakage as proposed in the above-mentioned embodiments of the present disclosure.
[0200] In order to implement the above-mentioned embodiments, the present disclosure also proposes a computer program product, including a computer program. When the computer program is executed by a processor, it implements the method for generating an image color cast detection model as proposed in the above-mentioned embodiments of the present disclosure, and implements the method for determining the amount of screen light leakage as proposed in the above-mentioned embodiments of the present disclosure.
[0201] Figure 6 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 6 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0202] like Figure 6 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0203] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.
[0204] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0205] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present disclosure.
[0206] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0207] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0208] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the above embodiments.
[0209] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0210] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0211] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.
[0212] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0213] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0214] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0215] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0216] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.
Claims
1. A method for generating an image color cast detection model, characterized in that: include: Acquire a first value corresponding to each of the CRGB channels collected by the first light sensor in the sample display device and a second value corresponding to each of the channels collected by the second light sensor in the reference display device when displaying each pure color image in a dark environment; Acquire, when a mottled image is displayed in a dark environment, a third value corresponding to each of the channels collected by the first light sensor and a fourth value corresponding to each of the channels collected by the second light sensor; Determine a color cast result corresponding to the mottled image according to the first value, the second value, the third value, and the fourth value; Based on the mottled image and the corresponding color cast result, the model to be trained is trained to obtain an image color cast detection model.
2. The method according to claim 1, characterized in that Determining the color cast result corresponding to the mottled image according to the first value, the second value, the third value, and the fourth value includes: Determine a first ratio between a first value and a second value corresponding to each of the channels under the same pure color image; determining a second ratio between the third value and the fourth value for each of the channels; Determine a first difference between a second ratio corresponding to each of the channels and a first ratio corresponding to the same channel in each of the pure color images; Determine a target pure color image corresponding to the mottled image according to the first difference values respectively corresponding to the CRGB channels under each of the pure color images; The color corresponding to the target pure color image is determined as the color cast result corresponding to the mixed color image.
3. The method according to claim 2, characterized in that The step of determining the target pure color image corresponding to the mixed color image according to the first difference values respectively corresponding to the CRGB channels under each of the pure color images comprises: Determine the total number of first difference values that are less than a threshold value among the first difference values respectively corresponding to the CRGB channels under each of the pure color images; Determine the number of reference pure color images corresponding to the smallest total number; The target pure color image is determined from the reference pure color images according to the number of the reference pure color images.
4. The method according to claim 3, characterized in that The step of determining the target pure color image from the reference pure color images according to the number of the reference pure color images comprises: In the case that there is only one reference pure color image, the reference pure color image is determined as the target pure color image.
5. The method according to claim 3, characterized in that: The step of determining the target pure color image from the reference pure color images according to the number of the reference pure color images comprises: When there are multiple reference pure color images, lowering the threshold; Determine a target number of first difference values that are less than the lowered threshold value among the first difference values respectively corresponding to the CRGB channels of each of the reference pure color images; In the case that there are multiple pure-color images with the smallest corresponding target number, the operation of lowering the threshold is returned to be executed until there is only one pure-color image with the smallest corresponding target number.
6. A method for determining the amount of screen light leakage, characterized in that: include: In the case where the image currently displayed by the target display device is a mottled image, inputting the image into a preset image color cast detection model to obtain a target color cast result corresponding to the image, wherein the preset image color cast detection model is generated based on the method according to any one of claims 1 to 5; Based on the target color cast result, query the correction coefficient mapping table to obtain the target correction coefficient corresponding to each channel in each CRGB channel; Acquire a reference light leakage amount corresponding to each of the channels when a reference display device displays the image in a dark environment; According to the reference light leakage amount corresponding to each of the channels and the target correction coefficient, a target light leakage amount corresponding to each of the channels when the target display device displays the image is determined.
7. The method according to claim 6, characterized in that Before querying the correction coefficient mapping table based on the target color cast result to obtain the target correction coefficient corresponding to each channel in each CRGB channel, the method further includes: Acquire a first value corresponding to each of the CRGB channels collected by the first light sensor in the sample display device and a second value corresponding to each of the channels collected by the second light sensor in the reference display device when displaying each pure color image in a dark environment; Determine a first ratio between a first value and a second value corresponding to each of the channels under the same pure color image; Determine the first ratio corresponding to each of the channels under each of the pure color images as a correction coefficient corresponding to each of the channels under each of the pure color images; The correction coefficient mapping table is generated according to the color corresponding to each of the pure color images and the correction coefficient corresponding to each of the channels under each of the pure color images.
8. A device for generating an image color cast detection model, characterized in that: The device comprises: A first acquisition module is used to acquire, when displaying each pure color image in a dark environment, a first value corresponding to each of the CRGB channels acquired by the first light sensor in the sample display device and a second value corresponding to each of the channels acquired by the second light sensor in the reference display device; A second acquisition module, configured to obtain, when displaying a mottled image in a dark environment, a third value corresponding to each of the channels acquired by the first light sensor and a fourth value corresponding to each of the channels acquired by the second light sensor; a determination module, configured to determine a color cast result corresponding to the mottled image according to the first value, the second value, the third value, and the fourth value; The training module is used to train the model to be trained based on the mottled image and the corresponding color cast result to obtain an image color cast detection model.
9. A device for determining the amount of screen light leakage, characterized in that: include: A first acquisition module is used for inputting the image into a preset image color cast detection model to obtain a target color cast result corresponding to the image when the image currently displayed by the target display device is a mottled image, wherein the preset image color cast detection model is generated based on the apparatus according to claim 8; A query module, used to query a correction coefficient mapping table based on the target color cast result to obtain a target correction coefficient corresponding to each channel in each CRGB channel; A second acquisition module, used for acquiring a reference light leakage amount corresponding to each of the channels when a reference display device displays the image in a dark environment; The determination module is used to determine the target light leakage amount corresponding to each of the channels when the target display device displays the image according to the reference light leakage amount corresponding to each of the channels and the target correction coefficient.
10. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for generating an image color cast detection model as described in any one of claims 1 to 5 is implemented, or the method for determining the amount of screen light leakage as described in any one of claims 6 to 7 is implemented.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the method for generating an image color cast detection model as described in any one of claims 1 to 5, or implements the method for determining the screen light leakage amount as described in any one of claims 6 to 7.
12. A computer program product, characterized in that It includes a computer program, which, when executed by a processor, implements the method for generating an image color cast detection model as described in any one of claims 1 to 5, or implements the method for determining the screen light leakage amount as described in any one of claims 6 to 7.