| CPC G01J 1/4204 (2013.01) | 13 Claims |

|
1. A method for detecting light leakage of a screen, applied to an electronic device, comprising:
acquiring display parameters of a screen, the display parameters comprising: a brightness value of the screen and grayscale values of respective pixel points within a preset display region of the screen; wherein acquiring the display parameters of the screen comprises: reading the brightness value of the screen from an operating system of the electronic device by using a system interface; and capturing a display content within the preset display region on the screen by using a screenshot software to obtain the grayscale values of the respective pixel points within the preset display region;
inputting the display parameters into a pre-trained neural network model, to process the display parameters using the neural network model, to obtain light leakage values corresponding to the respective pixel points; wherein the pre-trained neural network model represents an internal correlation between the brightness value of the screen and the grayscale value of the respective pixel points and the light leakage values of the pixel points; and
obtaining a light leakage value of the screen based on the light leakage values corresponding to the respective pixel points, for correcting an ambient light value detected by a light sensor provided below the screen.
|