Ambient light information acquisition method, control device, storage medium and terminal equipment

By using image sensors to acquire low-resolution image data on terminal devices and calculating the ambient light brightness value, the problem of high ambient light detection power consumption in the prior art is solved, and efficient and low-power ambient light information acquisition is achieved.

CN120176831APending Publication Date: 2025-06-20WEILAI MOBILE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311756117.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

The method of detecting ambient light in the prior art has problems such as high power consumption and high CPU resource consumption.

Method used

By setting an image sensor on the terminal device, low-resolution image data are acquired, the image reference brightness value is calculated, and the ambient light brightness value is obtained based on the value and the preset mapping relationship.

Benefits of technology

It realizes the acquisition of accurate ambient brightness values ​​at lower power consumption, saves power consumption of terminal devices, and improves computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120176831A_ABST
    Figure CN120176831A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of light detection, particularly provides an ambient light information acquisition method, a control device, a storage medium and terminal equipment, and aims to solve the problem of how to acquire accurate ambient light information based on relatively low power consumption. In order to achieve the purpose, low-resolution image data are acquired through an image sensor arranged on terminal equipment, an image reference brightness value is acquired according to the low-resolution image data, and an ambient light brightness value is acquired according to the image reference brightness value and a preset mapping relation. In this way, the ambient light brightness value can be obtained only by obtaining the low-resolution image data, and the power consumption of the terminal equipment can be saved. Meanwhile, after the image reference brightness value is obtained according to the low-resolution image data, the final ambient light brightness value is obtained based on the image reference brightness value and the mapping relation, and it can be ensured that the more accurate ambient light brightness value is obtained. Therefore, the purpose of obtaining accurate ambient light brightness based on low power consumption is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical detection technology, and specifically provides a method for obtaining ambient light information, a control device, a storage medium, and a terminal device. Background Art

[0002] With the development of mobile Internet technology and mobile communication network technology, users use mobile intelligent terminals more and more frequently. The functions that mobile intelligent terminals can achieve are also increasing. For example, a mobile intelligent terminal can detect the ambient light of its environment through a camera sensor, and then adjust the brightness of its display screen according to the detection result, so that users can have a better visual experience.

[0003] However, in the prior art, most of the methods for detecting ambient light have problems such as high power consumption or high CPU resource consumption and large power consumption.

[0004] Correspondingly, there is a need in this field for a new solution for obtaining ambient light information to solve the above problems. Summary of the Invention

[0005] In order to overcome the above defects, this application is proposed to provide a solution to solve or at least partially solve the problem of how to obtain accurate ambient light information based on low power consumption.

[0006] In a first aspect, this application provides a method for obtaining ambient light information. The method is applied to a terminal device, and an image sensor is provided on the terminal device. The method includes:

[0007] Obtain low-resolution image data through the image sensor; wherein, the low-resolution image data is image data with a resolution less than the VGA standard resolution;

[0008] Obtain an image reference brightness value according to the low-resolution image data;

[0009] Obtain an ambient light brightness value according to the image reference brightness value and a preset mapping relationship.

[0010] In a technical solution of the above method for obtaining ambient light information, the obtaining of the image reference brightness value according to the low-resolution image data includes:

[0011] Extract pixel points covered by a preset shape from the low-resolution image data;

[0012] Obtain the image reference brightness value according to the pixel points.

[0013] In a technical solution of the above method for obtaining ambient light information, the obtaining of the image reference brightness value according to the pixel points includes:

[0014] For each of the pixel points, obtain the brightness value of the pixel point according to the RGB value of the pixel point;

[0015] Obtain the image reference brightness value according to the brightness value of the pixel point.

[0016] In a technical solution of the above ambient light information acquisition method, the obtaining the image reference brightness value according to the brightness value of the pixel point includes:

[0017] For each of the pixel points, set a weight for the pixel point according to the position of the pixel point in the low-resolution image data; wherein, the weight of the pixel point near the edge position of the low-resolution image data is less than the weight of the pixel point near the center position of the low-resolution image data;

[0018] Obtain the image reference brightness value according to the brightness value of the pixel point and the weight.

[0019] In a technical solution of the above ambient light information acquisition method, the preset shape is a cross shape.

[0020] In a technical solution of the above ambient light information acquisition method, the method further includes obtaining the mapping relationship according to the following steps:

[0021] Collect multiple groups of image reference brightness values and ambient light brightness values for fitting as a fitting data set;

[0022] Based on the fitting data set, obtain the mapping relationship between the image reference brightness value and the ambient light brightness value by the least squares method.

[0023] In a technical solution of the above ambient light information acquisition method, the obtaining the low-resolution image data through the image sensor includes:

[0024] Collect, through the image sensor, an image with the lowest resolution supported by the image sensor as the low-resolution image data.

[0025] In a technical solution of the above ambient light information acquisition method, the low-resolution image data is an image with a QQVGA specification resolution.

[0026] In a second aspect, a control device is provided, which includes at least one processor and at least one storage device. The storage device is adapted to store multiple program codes, and the program codes are adapted to be loaded and run by the processor to execute the ambient light information acquisition method described in any one of the technical solutions of the above ambient light information acquisition method.

[0027] In one technical solution of the above control device, the processor is a low-power processor.

[0028] In a third aspect, a computer-readable storage medium is provided, which stores multiple program codes. The program codes are adapted to be loaded and run by a processor to execute the ambient light information acquisition method described in any one of the technical solutions of the above ambient light information acquisition method.

[0029] In a fourth aspect, a terminal device is provided. An image sensor is provided on the terminal device, and the terminal device includes the control device described in any one of the technical solutions of the above control device.

[0030] One or more of the above technical solutions of the present application have at least one or more of the following Beneficial effects:

[0031] In implementing the technical solutions of the present application, the present application obtains low-resolution image data through an image sensor provided on a terminal device, obtains an image reference brightness value according to the low-resolution image data, and obtains an ambient light brightness value according to the image reference brightness value and a preset mapping relationship. Through the above configuration method, the present application only needs to obtain low-resolution image data to obtain the ambient light brightness value, which can save the power consumption of the terminal device. At the same time, after the present application obtains the image reference brightness value according to the low-resolution image data, it will obtain the final ambient light brightness value based on the image reference brightness value and the mapping relationship, which can ensure that a more accurate ambient light brightness value is obtained. Thus, the purpose of obtaining accurate ambient light brightness based on lower power consumption can be achieved.

[0032] Further, the present application extracts pixel points covered by a preset shape from the low-resolution image data, and obtains the image reference brightness value according to the extracted pixel points. That is, it is not necessary to calculate the image reference brightness value based on all pixel points in the low-resolution image, which can further save the power consumption of the terminal device while reducing the calculation amount.

[0033] Further, the present application extracts pixel points covered in a cross shape from the low-resolution image data, and obtains the image reference brightness value according to the extracted pixel points. Extracting pixel points in a cross shape can ensure that the extracted pixel points cover the low-resolution image data more comprehensively while having a smaller calculation amount, and can further save the power consumption of the terminal device.

[0034] Further, the processor for loading and running the ambient light information acquisition method of the present application is a low-power processor, which can further save the power consumption of the terminal device.

[0035] Solution 1. An ambient light information acquisition method, characterized in that the method is applied to a terminal device, and an image sensor is provided on the terminal device, and the method includes:

[0036] Acquire low-resolution image data through the image sensor; wherein, the low-resolution image data is image data with a resolution less than the VGA standard resolution;

[0037] Obtain an image reference brightness value according to the low-resolution image data;

[0038] Obtain an ambient light brightness value according to the image reference brightness value and a preset mapping relationship.

[0039] Solution 2. The ambient light information acquisition method according to Solution 1, characterized in that

[0040] The obtaining of the image reference brightness value according to the low-resolution image data includes:

[0041] Extract the pixel points covered by a preset shape from the low-resolution image data;

[0042] Obtain the image reference brightness value according to the pixel points.

[0043] Solution 3. The ambient light information acquisition method according to Solution 2, characterized in that

[0044] The obtaining of the image reference brightness value according to the pixel points includes:

[0045] For each of the pixel points, obtain the brightness value of the pixel point according to the RGB value of the pixel point;

[0046] Obtain the image reference brightness value according to the brightness value of the pixel points.

[0047] Solution 4. The ambient light information acquisition method according to Solution 3, characterized in that

[0048] The obtaining of the image reference brightness value according to the brightness value of the pixel points includes:

[0049] For each of the pixel points, set a weight for the pixel point according to the position of the pixel point in the low-resolution image data; wherein, the weight of the pixel point near the edge position of the low-resolution image data is less than the weight of the pixel point near the center position of the low-resolution image data;

[0050] Obtain the image reference brightness value according to the brightness value of the pixel point and the weight.

[0051] Solution 5. The method for obtaining ambient light information according to any one of Solutions 2 to 4, characterized in that the preset shape is a cross shape.

[0052] Solution 6. The method for obtaining ambient light information according to Solution 1, characterized in that

[0053] The method further includes obtaining the mapping relationship according to the following steps:

[0054] Collect multiple groups of image reference luminance values and ambient light luminance values for fitting as a fitting data set;

[0055] Based on the fitting data set, obtain the mapping relationship between the image reference luminance value and the ambient light luminance value by the least squares method.

[0056] Solution 7. The method for obtaining ambient light information according to Solution 1, characterized in that

[0057] The obtaining of the low-resolution image data by the image sensor includes:

[0058] Collect, by the image sensor, an image with the lowest resolution supported by the image sensor as the low-resolution image data.

[0059] Solution 8. The method for obtaining ambient light information according to any one of Solutions 1 to 7, characterized in that the low-resolution image data is an image with a QQVGA specification resolution.

[0060] Solution 9. A control device, including at least one processor and at least one storage device, the storage device being adapted to store multiple program codes, characterized in that the program codes are adapted to be loaded and run by the processor to execute the method for obtaining ambient light information according to any one of Solutions 1 to 8.

[0061] Solution 10. The control device according to Solution 9, characterized in that the processor is a low-power processor.

[0062] Solution 11. A computer-readable storage medium, in which multiple program codes are stored, characterized in that the program codes are adapted to be loaded and run by a processor to execute the method for obtaining ambient light information according to any one of Solutions 1 to 8.

[0063] Solution 12. A terminal device, characterized in that an image sensor is provided on the terminal device, and the terminal device includes the control device according to Solution 9 or 10. Description of the Drawings

[0064] Referring to the accompanying drawings, the disclosure of the present application will become more readily understandable. It is readily understandable to those skilled in the art that these drawings are merely for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them:

[0065] Figure 1 is a schematic diagram of the main steps of an ambient light information acquisition method according to an embodiment of the present application;

[0066] Figure 2 is a schematic diagram of the main steps of an ambient light information acquisition method according to an implementation manner of an embodiment of the present application;

[0067] Figure 3 is a schematic diagram of the result of extracting pixel points from low-resolution image data in a cross shape according to an example of an embodiment of the present application;

[0068] Figure 4 is a schematic diagram of the main component structure of an ambient light information acquisition system according to an embodiment of the present application. Specific Embodiments

[0069] The following describes some implementation manners of the present application with reference to the accompanying drawings. It should be understood by those skilled in the art that these implementation manners are merely for explaining the technical principles of the present application and are not intended to limit the scope of protection of the present application.

[0070] In the description of the present application, "module" and "processor" may include hardware, software, or a combination of both. A module may include a hardware circuit, various suitable sensors, communication ports, memory, and may also include a software part, such as program code, or a combination of software and hardware. A processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, in hardware, or in a combination of both. A non-transitory computer-readable storage medium includes any suitable medium for storing program code, such as a magnetic disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, and so on. The term "A and / or B" represents all possible combinations of A and B, such as only A, only B, or A and B. The term "at least one A or B" or "at least one of A and B" has a meaning similar to "A and / or B" and may include only A, only B, or A and B. The singular terms "a" and "this" may also include the plural form.

[0071] Refer to the attached Figure 1 , Figure 1 is a schematic diagram of the main steps of an ambient light information acquisition method according to an embodiment of the present application. As Figure 1As shown in the figure, the ambient light information acquisition method in the embodiment of the present application is applied to a terminal device. An image sensor is provided on the terminal device. The ambient light information acquisition method mainly includes the following steps S101 - step S103.

[0072] Step S101: Obtain low - resolution image data through the image sensor; wherein, the low - resolution image data is image data with a resolution less than the VGA standard resolution.

[0073] In this embodiment, low - resolution image data can be collected through the image sensor provided on the terminal device. Among them, the VGA (Video Graphics Array) standard resolution is 640 pixels × 480 pixels. That is, the low - resolution image data is image data with a resolution lower than 640 pixels × 480 pixels.

[0074] In one embodiment, the terminal device can be a smart phone, a tablet computer, a smart controller and other devices.

[0075] In one embodiment, the image acquisition sensor can be a camera provided on the terminal device.

[0076] In one embodiment, images with the lowest resolution supported by the image sensor can be collected through the image acquisition sensor as low - resolution image data.

[0077] In one embodiment, the low - resolution image data can be image data with QVGA (Quarter Video Graphics Array) or QQVGA (Quarter Quarter Video Graphics Array) standard resolution; among them, the QVGA standard resolution is 320 pixels × 240 pixels, and the QQVGA resolution is 120 pixels × 160 pixels. It should be noted that the above resolutions are only exemplary, and the present application is not limited to the above resolutions.

[0078] Step S102: Obtain the image reference brightness value according to the low - resolution image data.

[0079] In this embodiment, the image reference brightness value can be obtained according to the low - resolution image data.

[0080] In one embodiment, since the photosensitive sensitivities of pixel points at different positions of the image are different, different weights can be applied to pixel points at different positions. The image reference brightness value of the low - resolution image data can be calculated according to the brightness value of each pixel point of the low - resolution image data and the corresponding weight.

[0081] Step S103: Obtain the ambient light brightness value according to the image reference brightness value and the preset mapping relationship.

[0082] In this embodiment, the ambient light luminance value can be obtained according to the image reference luminance value and a preset mapping relationship. The mapping relationship is a one-to-one correspondence between the image reference luminance value and the ambient light luminance value.

[0083] Based on the above steps S101 - S103, in the embodiment of the present application, the low-resolution image data is obtained through an image sensor provided on the terminal device. According to the low-resolution image data, the image reference luminance value is obtained. And according to the image reference luminance value and the preset mapping relationship, the ambient light luminance value is obtained. Through the above configuration method, in the embodiment of the present application, only the low-resolution image data needs to be obtained to obtain the ambient light luminance value, which can save the power consumption of the terminal device. At the same time, after the image reference luminance value is obtained according to the low-resolution image data in the embodiment of the present application, the final ambient light luminance value is obtained based on the image reference luminance value and the mapping relationship, which can ensure a more accurate ambient light luminance value. Thus, the purpose of obtaining an accurate ambient light luminance based on lower power consumption can be achieved.

[0084] The following further describes step S102.

[0085] In an implementation manner of the embodiment of the present application, step S102 may further include the following steps S1021 and S1022:

[0086] Step S1021: Extract the pixel points covered by a preset shape from the low-resolution image data.

[0087] In this implementation manner, the pixel points covered by a preset shape can be extracted from the low-resolution image data. That is, in the process of obtaining the image reference luminance value, not all pixel points in the low-resolution image data are required, and only some pixel points need to be extracted, which can reduce the calculation amount and further save the power consumption of the terminal device.

[0088] In one implementation manner, the preset shape can be a cross shape. Extracting pixel points from the low-resolution image data according to the cross shape can ensure that pixel points at different positions in the low-resolution image data are evenly extracted, can cover the features of the low-resolution image data to the greatest extent, and has a lower calculation amount.

[0089] Step S1022: Obtain the image reference luminance value according to the pixel points covered by the preset shape.

[0090] In this implementation manner, step S1022 may further include the following steps S10221 and S10222:

[0091] Step S10221: For each extracted pixel, obtain the brightness value of the pixel according to the RGB values of the pixel.

[0092] In this embodiment, the brightness value of the pixel can be obtained according to the following formula (1):

[0093] Y = 0.299×R + 0.587×G + 0.114×B (1)

[0094] Wherein, Y is the brightness value, and R, G, and B are the RGB values of the pixel respectively.

[0095] Step S10222: Obtain the image reference brightness value according to the brightness values of the pixels covered by the preset shape.

[0096] In this embodiment, step S10222 may further include the following steps S102221 and S102222:

[0097] Step S102221: For each pixel, set a weight for the pixel according to the position of the pixel in the low-resolution image data; wherein, the weight of the pixel near the edge position of the low-resolution image data is less than the weight of the pixel near the center position of the low-resolution image data.

[0098] In this embodiment, since the photosensitivity of the pixels at different positions of the image is different, the photosensitivity of the pixels near the edge is less than the photosensitivity of the pixels near the center. Therefore, the weight of the pixel can be set according to the position of the pixel in the low-resolution image data. The weight of the pixel near the edge position of the low-resolution image data is less than the weight of the pixel near the center position.

[0099] Among them, it can be determined whether the pixel is a pixel near the edge position and a pixel near the center position according to whether the pixel is within the preset range of the low-resolution image data, where the preset range is a range obtained by reducing the size of the low-resolution image data by a preset ratio with the center point of the low-resolution image data as the center. If it is within the preset range, it is considered a pixel near the center position; if it is outside the preset range, it can be considered a pixel near the edge position.

[0100] In one embodiment, the preset ratio can be 50%. Reference can be made to the attached Figure 3 , Figure 3 is a schematic diagram of the result of extracting pixels from the low-resolution image data in a cross shape according to an example of the embodiment of the present application. As Figure 3As shown, the dashed box therein is the preset range, the pixel points within the dashed box are the pixel points close to the central position, and the pixel points outside the dashed box are the pixel points close to the edge position.

[0101] Step S102222: Obtain the image reference luminance value according to the luminance values and weights of the pixel points covered by the preset shape.

[0102] In this embodiment, the image reference luminance value can be calculated according to the luminance values and weights of the pixel points covered by the preset shape.

[0103] In one embodiment, as Figure 3 shown, the preset shape is a cross shape, that is, the weights of 50% of the pixel points close to the edge position of the low-resolution image data are set to 0.2, and the weights of 50% of the pixel points close to the central position of the low-resolution image data are set to 0.8. Assume that the luminance value of 50% of the pixel points close to the edge position of the low-resolution image data is Y1, and the luminance value of 50% of the pixel points close to the central position of the low-resolution image data is Y2. Then the image reference luminance value can be obtained according to the following formula (2):

[0104] A = Y1×0.2 + Y2×0.8 (2)

[0105] Wherein, A is the image reference luminance value.

[0106] The process of obtaining the mapping relationship between the image reference luminance value and the ambient light luminance value will be described below.

[0107] In one embodiment of the embodiments of the present application, the mapping relationship between the image reference luminance value and the ambient light luminance value can be obtained according to the following Step S201 and Step S202:

[0108] Step S201: Collect multiple groups of image reference luminance values and ambient light luminance values for fitting as a fitting data set.

[0109] In this embodiment, multiple groups of image reference luminance values and ambient light luminance values for fitting can be collected to construct a fitting data set.

[0110] For example, a special test instrument - a light box can be used to collect multiple groups of image reference luminance values and ambient light luminance values for fitting. That is, low-resolution image data is collected in the light box, and the image reference luminance value is calculated based on the low-resolution image data. At the same time, the light box luminance set by the light box when collecting the low-resolution image data is obtained, and the light box luminance is used as the ambient light luminance value, so as to obtain the corresponding image reference luminance value and ambient light luminance value one by one. Multiple groups of image reference luminance values and ambient light luminance values are obtained to construct a fitting data set.

[0111] Step S202: Based on the fitting data set, obtain the mapping relationship between the image reference brightness value and the ambient light brightness value through the least squares method.

[0112] In this embodiment, based on the fitting data set, the least squares method can be applied to obtain the mapping relationship between the image reference brightness value and the ambient light brightness value, that is, based on the fitting data set, curve fitting is performed on the image reference brightness value and the ambient light brightness value to obtain the mapping relationship between the image reference brightness value and the ambient light brightness value.

[0113] For example, there is a linear relationship between the image reference brightness value and the ambient light brightness value, that is, it satisfies the relationship shown in the following formula (3):

[0114] B = a×A + b (3)

[0115] Where, B is the ambient light brightness value, and a and b are coefficients.

[0116] The values of a and b can be calculated through the least squares method according to the fitting data set, so as to obtain the mapping relationship between A and B.

[0117] In one embodiment, in order to improve the accuracy of the mapping relationship, the ambient light brightness value can be segmented, and for each segment of the ambient light brightness value, curve fitting is performed respectively to obtain the mapping relationship between the image reference brightness value and the ambient light brightness value of each segment.

[0118] In one embodiment, reference can be made to the attached Figure 2 , Figure 2 is a schematic diagram of the main step flow of the ambient light information acquisition method according to an embodiment of the present application. As Figure 2 shown, in this embodiment, the camera can be set to the low-power mode, and the resolution specification can be set to QQVGA. The camera is used to collect and output the RGB image with the QQVGA specification resolution as the low-resolution image data. Through the low-power processor, an N-pixel three-dimensional array composed of the RGB values of the N pixels covered in a cross shape is taken from the RGB image with the QQVGA specification resolution. According to the rgb2yuv conversion formula (formula (1)), the brightness value Y of the pixel points on the cross diagonal of the picture (low-resolution image data) is obtained to form a one-dimensional array; the one-dimensional array of brightness values is filtered to obtain the ambient brightness value (image reference brightness value) A represented by the picture; through the mapping relationship, A is converted into the actual ambient light brightness value B. The ambient light brightness value is sent to the main processor so that the main processor can implement functions such as screen brightness adjustment according to the ambient light brightness value.

[0119] It should be noted that although the above embodiments describe the various steps in a specific order, those skilled in the art can understand that in order to achieve the effects of the present application, it is not necessary for different steps to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders, and these variations are all within the protection scope of the present application.

[0120] Furthermore, the present application also provides an ambient light information acquisition system.

[0121] Refer to the appendix Figure 4 , Figure 4 is the main structural block diagram of the ambient light information acquisition system according to an embodiment of the present application. As Figure 4 shown, the ambient light information acquisition system in the embodiment of the present application is applied to a terminal device, and an image sensor is provided on the terminal device. The ambient light information acquisition system mainly includes an image data acquisition module, an image reference brightness value acquisition module, and an ambient light brightness value acquisition module. In this embodiment, the image data acquisition module can be configured to acquire low-resolution image data through the image sensor. The image reference brightness value acquisition module can be configured to acquire an image reference brightness value according to the low-resolution image data. The ambient light brightness value acquisition module can be configured to acquire an ambient light brightness value according to the image reference brightness value and a preset mapping relationship.

[0122] The above ambient light information acquisition system is used to execute Figure 1 the ambient light information acquisition method embodiment shown. The technical principles, the technical problems solved, and the technical effects produced by the two are similar. Those skilled in the art of this technology can clearly understand that for the convenience and brevity of description, the specific working process and related descriptions of the ambient light information acquisition system can refer to the content described in the embodiment of the ambient light information acquisition method, and will not be elaborated here.

[0123] Those skilled in the art can understand that all or part of the processes in the method of the above-mentioned embodiment of the present application can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned method embodiments can be realized. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable storage medium can include: any entity or device, medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium that can carry the computer program code. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0124] Furthermore, the present application also provides a control device. In an embodiment of the control device according to the present application, the control device includes a processor and a storage device. The storage device can be configured to store a program for executing the ambient light information acquisition method of the above-mentioned method embodiment. The processor can be configured to execute the program in the storage device, and the program includes, but is not limited to, the program for executing the ambient light information acquisition method of the above-mentioned method embodiment. For the sake of convenience of description, only the parts related to the embodiments of the present application are shown. For the specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The control device can be a control device formed by various electronic devices.

[0125] In the embodiment of the present application, the control device can be a control device formed by various electronic devices. In some possible implementation manners, the control device can include multiple storage devices and multiple processors. The program for executing the ambient light information acquisition method of the above-mentioned method embodiment can be divided into multiple sub-programs, and each sub-program can be loaded and run by the processor respectively to execute different steps of the ambient light information acquisition method of the above-mentioned method embodiment. Specifically, each sub-program can be stored in different storage devices respectively, and each processor can be configured to execute the program in one or more storage devices to jointly realize the ambient light information acquisition method of the above-mentioned method embodiment, that is, each processor respectively executes different steps of the ambient light information acquisition method of the above-mentioned method embodiment to jointly realize the ambient light information acquisition method of the above-mentioned method embodiment.

[0126] The above-mentioned multiple processors may be processors deployed on the same device. For example, the above-mentioned control device may be a high-performance device composed of multiple processors, and the above-mentioned multiple processors may be the processors configured on the high-performance device. In addition, the above-mentioned multiple processors may also be processors deployed on different devices. For example, the above-mentioned control device may be a server cluster, and the above-mentioned multiple processors may be the processors on different servers in the server cluster.

[0127] In one embodiment, the processor in the control device may be a low-power processor.

[0128] Furthermore, the present application also provides a computer-readable storage medium. In an embodiment of the computer-readable storage medium according to the present application, the computer-readable storage medium may be configured to store a program for executing the ambient light information acquisition method in the above method embodiment. This program can be loaded and run by a processor to implement the above ambient light information acquisition method. For the sake of convenience of description, only the parts related to the embodiments of the present application are shown. For the specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The computer-readable storage medium may be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiments of the present application is a non-transitory computer-readable storage medium.

[0129] Furthermore, the present application also provides a terminal device. In an embodiment of the terminal device according to the present application, an image sensor may be provided on the terminal device, and the terminal device may include the control device in the embodiment of the control device.

[0130] Furthermore, it should be understood that since the setting of each module is only for explaining the functional units of the device of the present application, the physical devices corresponding to these modules may be the processor itself, or a part of the software in the processor, a part of the hardware, or a part of the combination of software and hardware. Therefore, the number of each module in the figure is only illustrative.

[0131] Those skilled in the art can understand that the various modules in the device can be adaptively split or combined. Such splitting or combination of specific modules will not cause the technical solution to deviate from the principle of the present application. Therefore, the technical solutions after splitting or combination will all fall within the protection scope of the present application.

[0132] For the relevant user personal information that may be involved in the embodiments of the present application, it is all processed in strict accordance with the requirements of laws and regulations, following the principles of legality, legitimacy, and necessity, for reasonable purposes based on business scenarios, and is the personal information actively provided by the user during the use of the product / service or generated due to the use of the product / service, as well as the personal information obtained with the user's authorization.

[0133] The user personal information processed in this application may vary depending on the specific product / service scenario. It shall be subject to the specific scenario of the user using the product / service and may involve the user's account information, device information, driving information, vehicle information or other relevant information. The applicant will treat the user's personal information and its processing with a high degree of diligence.

[0134] This application attaches great importance to the security of user personal information and has taken security protection measures that meet industry standards and are reasonable and feasible to protect the user's information and prevent personal information from being accessed, publicly disclosed, used, modified, damaged or lost without authorization.

[0135] So far, the technical solution of this application has been described in combination with the preferred embodiments shown in the drawings. However, it is easy for those skilled in the art to understand that the protection scope of this application is obviously not limited to these specific embodiments. Without departing from the principle of this application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of this application.

Claims

1. An ambient light information acquisition method, characterized in that, The method is applied to a terminal device, and an image sensor is provided on the terminal device. The method includes: Obtaining low-resolution image data through the image sensor; wherein, the low-resolution image data is image data with a resolution lower than the VGA standard resolution; Obtaining an image reference luminance value according to the low-resolution image data; Obtaining an ambient light luminance value according to the image reference luminance value and a preset mapping relationship.

2. The ambient light information acquisition method according to claim 1, characterized in that, The obtaining the image reference luminance value according to the low-resolution image data includes: Extracting pixel points covered by a preset shape from the low-resolution image data; Obtaining the image reference luminance value according to the pixel points.

3. The ambient light information acquisition method according to claim 2, characterized in that, The obtaining the image reference luminance value according to the pixel points includes: For each of the pixel points, obtaining the luminance value of the pixel point according to the RGB value of the pixel point; Obtaining the image reference luminance value according to the luminance values of the pixel points.

4. The ambient light information acquisition method according to claim 3, characterized in that, The obtaining the image reference luminance value according to the luminance values of the pixel points includes: For each of the pixel points, setting a weight for the pixel point according to the position of the pixel point in the low-resolution image data; wherein, the weight of the pixel point near the edge position of the low-resolution image data is less than the weight of the pixel point near the center position of the low-resolution image data; Obtaining the image reference luminance value according to the luminance value and the weight of the pixel point.

5. The ambient light information acquisition method according to any one of claims 2 to 4, characterized in that, The preset shape is a cross shape.

6. The ambient light information acquisition method according to claim 1, characterized in that, The method further includes obtaining the mapping relationship according to the following steps: Collecting multiple groups of image reference luminance values and ambient light luminance values for fitting as a fitting data set; Based on the fitting data set, obtaining the mapping relationship between the image reference luminance value and the ambient light luminance value through the least squares method.

7. The ambient light information acquisition method according to claim 1, characterized in that, The obtaining the low-resolution image data through the image sensor includes: Collecting, through the image sensor, an image with the lowest resolution supported by the image sensor as the low-resolution image data.

8. The ambient light information acquisition method according to any one of claims 1 to 7, characterized in that, The low-resolution image data is an image with a QQVGA standard resolution.

9. A control device, comprising at least one processor and at least one storage device, the storage device being adapted to store a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by the processor to execute the ambient light information obtaining method according to any one of claims 1 to 8.

10. The control device according to claim 9, characterized in that, The processor is a low-power processor.