IP Library › Granted Patent US 11,076,041
Granted Patent B2
US 11,076,041 · App. 16/885,470 · Granted Jul 27, 2021

Ambient light detection method and apparatus, and storage medium

Inventor: Chaoxi Chen (Beijing, CN)
Assignee: BEIJING XIAOMI MOBILE SOFTWARE CO., LTD.
H04M1/72454G09G3/3225G09G3/3413G09G5/10G09G2320/0233G09G2320/0626G09G2360/144
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,076,041
App. No.
16/885,470
Granted
Jul 27, 2021
Kind
B2
Abstract

An ambient light detection method includes: in response to monitoring that a current backlight level of a display screen exceeds a preset backlight level threshold, acquiring an image grayscale value sent by a driving portion in the display screen; compensating a first gray level value collected by a light sensor by using the image grayscale value to obtain a current gray level value, the current gray level value being configured to represent a gray level corresponding to current external ambient light detected by the light sensor; and acquiring illumination intensity of the current external ambient light based on the current gray level value, the illumination intensity being used as a basis for adjusting backlight brightness of the display screen.

Claims (55)

1. An ambient light detection method, applied to an electronic device with a light sensor arranged under a display screen, comprising:

in response to monitoring that a current backlight level of the display screen exceeds a preset backlight level threshold, acquiring an image grayscale value sent by a driving portion in the display screen, wherein the image grayscale value represents an average value of grayscale values of respective pixels in a specified area, and the image grayscale value and gray level value of an image displayed in the specified area are combined to form image sample data;

compensating a first gray level value collected by the light sensor by using the image grayscale value to obtain a current gray level value, the current gray level value being configured to represent a gray level corresponding to current external ambient light detected by the light sensor; and

acquiring illumination intensity of the current external ambient light based on the current gray level value, the illumination intensity being used as a basis for adjusting backlight brightness of the display screen.

2. The ambient light detection method of claim 1 , wherein the compensating the first gray level value collected by the light sensor by using the image grayscale value to obtain the current gray level value comprises:

acquiring the first gray level value collected by the light sensor, the first gray level value being configured to represent a gray level obtained after the light sensor detects backlight of the display screen and the external ambient light;

converting the image grayscale value to obtain a second gray level value, the second gray level value being configured to represent a gray level obtained after the light sensor detects the backlight of the display screen; and

acquiring a difference between the first gray level value and the second gray level value, and determining the difference as the current gray level value.

3. The ambient light detection method of claim 2 , wherein the converting the image grayscale value to obtain the second gray level value comprises:

acquiring a corresponding relation between a grayscale value and a gray level value set in advance; and

acquiring the second gray level value based on the image grayscale value and the corresponding relation.

4. The ambient light detection method of claim 3 , wherein the corresponding relation is acquired by:

acquiring image sample data of a preset number of images, the image sample data comprising an image grayscale value of an image displayed in a specified area of the display screen and an actual gray level value detected by the light sensor in a dark enclosure environment, and the specified area referring to an overlapping area of an optical view angle of the light sensor and the display screen; and

training a prediction model by using the image sample data, and stopping training until an error between a predicted gray level value of the prediction model and the actual gray level value is less than a preset error threshold so as to obtain the trained prediction model, the prediction model representing the corresponding relation between the grayscale value and the gray level value.

5. The ambient light detection method of claim 1 , further comprising:

in response to monitoring that the current backlight level of the display screen is less than the preset backlight level threshold, acquiring the first gray level value collected by the light sensor in a preset time slot, and determining the first gray level value as the current gray level value.

6. A mobile terminal implementing the method of claim 1 , comprising the display screen and the light sensor arranged under the display screen.

7. The mobile terminal of claim 6 , wherein the display screen is an organic light-emitting diode (OLED) display screen.

8. The mobile terminal of claim 7 , wherein the mobile terminal is configured to compensate the gray level value collected by the light sensor based on the image grayscale value to thereby reduce or eliminate influence of backlight on the illumination intensity, and improve accuracy of the illumination intensity detected.

9. The mobile terminal of claim 8 , wherein the mobile terminal is configured to match the backlight of the OLED display screen with an external environment, unaffected by light leakage from the display screen.

10. The mobile terminal of claim 9 , wherein the OLED display screen is a full screen of the mobile terminal.

11. The mobile terminal of claim 10 , wherein the mobile terminal is further configured to:

acquire the first gray level value collected by the light sensor, the first gray level value being configured to represent a gray level obtained after the light sensor detects backlight of the display screen and the external ambient light;

convert the image grayscale value to obtain a second gray level value, the second gray level value being configured to represent a gray level obtained after the light sensor detects the backlight of the display screen; and

acquire a difference between the first gray level value and the second gray level value, and determining the difference as the current gray level value.

12. The mobile terminal of claim 11 , wherein the mobile terminal is further configured to:

acquire a corresponding relation between a grayscale value and a gray level value set in advance; and

acquire the second gray level value based on the image grayscale value and the corresponding relation.

13. The mobile terminal of claim 12 , wherein the corresponding relation is acquired by:

acquiring image sample data of a preset number of images, the image sample data comprising an image grayscale value of an image displayed in a specified area of the display screen and an actual gray level value detected by the light sensor in a dark enclosure environment, and the specified area referring to an overlapping area of an optical view angle of the light sensor and the display screen; and

training a prediction model by using the image sample data, and stopping training until an error between a predicted gray level value of the prediction model and the actual gray level value is less than a preset error threshold so as to obtain the trained prediction model, the prediction model representing the corresponding relation between the grayscale value and the gray level value.

14. The mobile terminal of claim 13 , wherein the mobile terminal is further configured to:

in response to monitoring that the current backlight level of the display screen is less than the preset backlight level threshold, acquire the first gray level value collected by the light sensor in a preset time slot, and determining the first gray level value as the current gray level value.

15. An ambient light detection apparatus, applied to an electronic device with a light sensor arranged under a display screen, comprising:

one or more processors;

a memory device storing instructions executable by the one or more processors;

wherein the one or more processors are configured to:

in response to monitoring that a current backlight level of the display screen exceeds a preset backlight level threshold, acquire an image grayscale value sent by a driving portion in the display screen, wherein the image grayscale value represents an average value of grayscale values of respective pixels in a specified area, and the image grayscale value and gray level value of an image displayed in the specified area are combined to form image sample data;

compensate a first gray level value collected by the light sensor by using the image grayscale value to obtain a current gray level value, the current gray level value being configured to represent a gray level corresponding to current external ambient light detected by the light sensor; and

acquire illumination intensity of the current external ambient light based on the current gray level value, the illumination intensity being used as a basis for adjusting backlight brightness of the display screen.

16. The ambient light detection apparatus of claim 15 , wherein the one or more processors are configured to:

acquire the first gray level value collected by the light sensor, the first gray level value being configured to represent a gray level obtained after the light sensor detects backlight of the display screen and the external ambient light;

convert the image grayscale value to obtain a second gray level value, the second gray level value being configured to represent a gray level obtained after the light sensor detects the backlight of the display screen; and

acquire a difference between the first gray level value and the second gray level value, and to determine the difference as the current gray level value.

17. The ambient light detection apparatus of claim 16 , wherein the one or more processors are configured to:

acquire a corresponding relation between a grayscale value and a gray level value set in advance; and

acquire the second gray level value based on the image grayscale value and the corresponding relation.

18. The ambient light detection apparatus of claim 17 , wherein the one or more processors are configured to:

acquire image sample data of a preset number of images, the image sample data comprising an image grayscale value of an image displayed in a specified area of the display screen and an actual gray level value detected by the light sensor in a dark enclosure environment, and the specified area referring to an overlapping area of an optical view angle of the light sensor and the display screen; and

train a prediction model by using the image sample data, and to stop training until an error between a predicted gray level value of the prediction model and the actual gray level value is less than a preset error threshold so as to obtain the trained prediction model, the prediction model representing the corresponding relation between the grayscale value and the gray level value.

19. The ambient light detection apparatus of claim 15 , wherein the one or more processors are configured to, in response to monitoring that the current backlight level of the display screen is less than the preset backlight level threshold, acquire the first gray level value collected by the light sensor in a preset time slot, and determine the first gray level value as the current gray level value.

20. A non-transitory computer-readable storage medium having instructions stored thereon for execution by a processing circuit to implement operations of an ambient light detection method applied to an electronic device with a light sensor arranged under a display screen, the method comprising:

in response to monitoring that a current backlight level of the display screen exceeds a preset backlight level threshold, acquiring an image grayscale value sent by a driving portion in the display screen, wherein the image grayscale value represents an average value of grayscale values of respective pixels in a specified area, and the image grayscale value and gray level value of an image displayed in the specified area are combined to form image sample data;

compensating a first gray level value collected by the light sensor by using the image grayscale value to obtain a current gray level value, the current gray level value being configured to represent a gray level corresponding to current external ambient light detected by the light sensor; and

acquiring illumination intensity of the current external ambient light based on the current gray level value, the illumination intensity being used as a basis for adjusting backlight brightness of the display screen.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 28, 2020
From: CHEN, CHAOXI
To: BEIJING XIAOMI MOBILE SOFTWARE CO., LTD.
Reel/Frame 052772/0347 →
Priority Claims (1)
CN 201911294297.6 · Dec 16, 2019 · national
Continuity (1)
Related Publication 20210185167A1 · Jun 17, 2021