Method and device for acquiring ambient light brightness information, and terminal equipment

Image data is collected through the camera module, and the fitting equation is used to implement the virtual ambient light sensor function, which solves the problem of ambient light sensor installation difficulties and high costs, and achieves efficient ambient light brightness information acquisition and screen brightness adjustment.

CN118632133APending Publication Date: 2024-09-10SPREADTRUM SEMICON (NANJING) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410660482.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing technology, the installation location of ambient light sensors in full-screen devices is challenging and the cost is high. It is difficult to effectively reduce screen light leakage interference, leading to the problem of improved measurement accuracy but increased costs.

Method used

Collect image data through the camera module, and use the fitting equation of image brightness information and ambient light brightness information to realize the virtual ambient light sensor function and reduce hardware costs.

Benefits of technology

There is no need for a dedicated ambient light sensor to obtain ambient light brightness information, reducing hardware costs, maintaining the normal functions of the application layer software, and simplifying screen brightness adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118632133A
    Figure CN118632133A
Patent Text Reader

Abstract

The invention discloses a method and a device for acquiring ambient light brightness information, and terminal equipment. The method comprises the following steps: acquiring image data acquired by a camera module; obtaining image brightness information based on the image data; determining ambient light brightness information according to the image brightness information; and uploading the ambient light brightness information to an application layer. By means of the scheme, the environment light brightness information can be obtained without a special environment light sensor, equipment hardware is reduced, and cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sensor technology, and in particular to a method and device for acquiring ambient light brightness information, and a terminal device. Background Art

[0002] Ambient light sensors usually use internal photodiodes to convert ambient light into photoelectricity, output electrical signals, and quantify the ambient light intensity through internal amplification circuits, analog-to-digital conversion, and other processing. They are widely used in electronic devices such as mobile phones, tablets, PADs (Portable Android Devices), and laptops. In the field of handheld devices, the display screen usually consumes more than 30% of the total battery power. The ambient brightness information output by the ambient light sensor can be used to control the screen brightness, so that the screen display brightness can be automatically adjusted under different ambient brightness, thereby bringing better visual effects to users and at the same time saving screen power consumption to the maximum extent.

[0003] Usually, the ambient light sensors of handheld devices such as mobile phones and tablets are installed above the screen near the frame. However, with the popularity of full-screen phones and narrower screen frames, there are great challenges in the installation location of ambient light sensors. Under-screen ambient light sensors are also available on the market, but the ambient light sensors installed under the screen need to overcome the interference of OLED (Organic Light-Emitting Diode) screen self-luminescence on ambient light measurement. Usually, high-sensitivity, low-noise hardware IC (Integrated Circuit) processing with hardware light leakage processing function is used to effectively reduce the interference caused by screen leakage and improve the measurement accuracy of the sensor, but this also leads to an increase in the cost of ambient light sensors. Summary of the invention

[0004] The embodiments of the present invention provide a method and apparatus for obtaining ambient light brightness information, and a terminal device, so as to solve the problem of increased hardware and cost caused by the need to use an ambient light sensor to obtain ambient light brightness information in the prior art.

[0005] On the one hand, an embodiment of the present invention provides a method for obtaining ambient light brightness information, the method comprising:

[0006] Obtain image data collected by the camera module;

[0007] Obtaining image brightness information based on the image data;

[0008] Determine ambient light brightness information according to the image brightness information;

[0009] The ambient light brightness information is uploaded to the application layer.

[0010] Optionally, obtaining image brightness information based on the image data includes:

[0011] Perform automatic exposure related statistics on each frame of image data to obtain statistical information;

[0012] The image brightness information is calculated based on the statistical information.

[0013] Optionally, determining the ambient light brightness information according to the image brightness information includes: converting the image brightness information to obtain the ambient brightness information using a fitting equation of the image brightness information and the ambient light brightness information.

[0014] Optionally, the method further comprises: performing a calibration process in a standard environment to obtain a fitting equation of the image brightness information and the ambient light brightness information.

[0015] On the other hand, an embodiment of the present invention further provides a device for obtaining ambient light brightness information, the device comprising:

[0016] A camera hardware module, used to obtain image data collected by the camera module, and obtain image brightness information based on the image data;

[0017] The image sensor module is used to obtain the image brightness information obtained by the camera hardware module frame by frame, determine the ambient light brightness information according to the image brightness information, and upload the ambient light brightness information to the application layer.

[0018] Optionally, the device further comprises:

[0019] An image processor, used to process each frame of image data collected by the camera module;

[0020] The camera hardware module includes:

[0021] A statistical unit, used for performing automatic exposure related statistics on each frame of image data processed by the image processor to obtain statistical information;

[0022] A calculation unit, used to calculate image brightness information according to the statistical information;

[0023] The encapsulation unit is used to encapsulate the image brightness information calculated by the calculation unit into a protocol standard format to obtain an image brightness package corresponding to each frame.

[0024] Optionally, the camera hardware module further includes: a memory unit;

[0025] The statistical unit is further used to store the statistical information in the memory unit;

[0026] The calculation unit is used to calculate the image brightness information according to the statistical information in the memory unit.

[0027] Optionally, the image sensor module includes:

[0028] An interface calling unit, used to call the camera hardware module through a camera standard interface, control the camera hardware module to open, and obtain the image brightness package frame by frame;

[0029] an information conversion unit, configured to determine ambient light brightness information according to the image brightness information in the image brightness package;

[0030] The uploading unit is used to upload the ambient light brightness information to the application layer.

[0031] Optionally, the information conversion unit is used to convert the image brightness information into ambient brightness information by using a fitting equation between the image brightness information and the ambient light brightness information.

[0032] Optionally, the device further includes: a calibration module, configured to perform a calibration process in a standard environment, and obtain a fitting equation of the image brightness information and the ambient light brightness information according to the calibration result.

[0033] On the other hand, an embodiment of the present invention further provides a terminal device, comprising: a camera module, an application module, a display screen, and the aforementioned device for obtaining ambient light brightness information;

[0034] The camera module is used to collect image data;

[0035] The device for obtaining ambient light brightness information is used to obtain ambient light brightness information based on the image data collected by the camera module;

[0036] The application module is used to adjust the brightness of the screen according to the ambient light brightness information.

[0037] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, which is a non-volatile storage medium or a non-transient storage medium, on which a computer program is stored, and is characterized in that when the computer program is executed by a processor, the steps of the method for obtaining ambient light brightness information described above are executed.

[0038] On the other hand, an embodiment of the present invention further provides a terminal device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and is characterized in that when the processor runs the computer program, the steps of the method for obtaining ambient light brightness information described above are executed.

[0039] The method and device for obtaining ambient light brightness information provided by the embodiments of the present invention obtain image brightness information by utilizing image data collected by a camera module, determine ambient light brightness information based on the image brightness information, and upload the ambient light brightness information to an application layer, thereby realizing the function of a virtual ambient light sensor, that is, the ambient light brightness information can be obtained without an ambient light sensor, effectively saving hardware costs; moreover, the application layer software can also obtain ambient light brightness information normally, and will not have any perception of the hardware difference of the underlying camera module replacing the ambient light sensor to achieve virtual light perception.

[0040] Furthermore, by determining the fitting equation of the image brightness information and the ambient light brightness information in a pre-calibrated manner, after obtaining the image brightness information, the corresponding ambient light brightness information can be simply and efficiently calculated using the fitting equation. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a flow chart of a method for obtaining ambient light brightness information provided by an embodiment of the present invention;

[0042] Figure 2 It is a schematic diagram of a logical architecture for implementing the method for obtaining ambient light brightness information of the present invention;

[0043] Figure 3 is a structural schematic diagram of a device for obtaining ambient light brightness information provided by an embodiment of the present invention;

[0044] Figure 4 is another structural schematic diagram of the device for obtaining ambient light brightness information provided by an embodiment of the present invention;

[0045] Figure 5 is a structural schematic diagram of a terminal device provided by an embodiment of the present invention;

[0046] Figure 6 It is a schematic diagram of a hardware architecture of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the above-mentioned objects, features and beneficial effects of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0048] It should be noted that the terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit this specification. The singular forms of "a", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. In addition, the "plurality" appearing in the embodiments of the present invention refers to two or more.

[0049] In view of the hardware and cost increase problems caused by the need to configure ambient light sensors to sense ambient light in some existing screen display devices, an embodiment of the present invention provides a method and device for obtaining ambient light brightness information, which uses image data collected by a camera module to obtain image brightness information, determines the ambient light brightness information based on the image brightness information, and uploads the ambient light brightness information to the application layer.

[0050] like Figure 1 FIG. 1 is a flow chart of a method for obtaining ambient light brightness information provided by an embodiment of the present invention, comprising the following steps:

[0051] Step 101, obtaining image data collected by a camera module.

[0052] Step 102: Obtain image brightness information based on the image data.

[0053] Usually, the ISP (Image Signal Processor) will process the image data collected by the camera accordingly, for example, it can perform processing such as AEC (Automatic Exposure Control), AGC (Automatic Gain Control), AWB (Auto White Balance), color correction, Lens Shading, Gamma correction, bad pixel removal, Auto Black Level, Auto White Level, etc.

[0054] Among them, AEC refers to automatically configuring the aperture of the lens, the shutter and gain of the image sensor according to the exposure of the current image to obtain the best image quality. Exposure in the camera system can be understood as the process of light emitted by the photographed object being projected onto the image sensor through the lens to form the original image. Therefore, AEC mainly obtains brightness information directly from the image signal output by the image sensor, analyzes the current scene, and adjusts exposure parameters such as sensitivity, aperture and shutter to obtain an image signal with moderate brightness. Generally speaking, AEC mainly involves exposure statistics, exposure measurement, exposure convergence and exposure decomposition.

[0055] Exposure statistics are usually performed in the RAW domain of the ISP-Pipeline. Generally, brightness statistics and histogram statistics are performed on image data after the AWB operation is completed. When counting brightness information, the image needs to be converted to the YUV color space to obtain the Y component related to the image brightness.

[0056] In the solution of the embodiment of the present invention, the AEC function in the existing ISP can be used to perform automatic exposure related statistics on each frame of image data to obtain statistical information, and the image brightness information can be calculated based on the statistical information.

[0057] In specific implementation, the statistical results may be output to a pre-configured statistical information memory block, and the corresponding calculation module extracts the statistical information from the memory block, and calculates the image brightness information based on the statistical information.

[0058] Step 103: Determine ambient light brightness information according to the image brightness information.

[0059] In a specific embodiment, a calibration process can be performed in advance in a standard environment, and a fitting equation of image brightness information and ambient light brightness information can be obtained according to the calibration result. Usually, the fitting equation shows a logarithmic relationship between the image brightness information Bv and the ambient brightness information Lux.

[0060] The fitting equation between the image brightness BV and the ambient light brightness lux can be expressed as:

[0061] lux=c*2 (a*BV) (1)

[0062] Among them, parameters a and c are parameters to be calibrated.

[0063] After transforming the above formula (1), we get the following formula:

[0064] log2lux=a*BV+log2c (2)

[0065] The specific calibration process is as follows:

[0066] Fix the standard light box test environment in a certain color temperature scene, take pictures at different brightness, and since BV and lux are known, a set of parameters a and c can be solved. Based on these parameters, a corresponding fitting equation can be obtained.

[0067] By changing the color temperature scene and performing the above calibration process, a set of parameters a and c under different color temperatures can be obtained, thereby obtaining the fitting equations under different color temperatures.

[0068] Accordingly, for the ambient light brightness information of each frame of image, it can be converted according to the fitting equation to obtain the corresponding ambient light brightness information, so that the conversion calculation is simple and efficient.

[0069] Step 104: Upload the ambient light brightness information to the application layer.

[0070] The method for obtaining ambient light brightness information provided by the embodiment of the present invention obtains image brightness information using image data collected by the camera module, determines ambient light brightness information based on the image brightness information, and uploads the ambient light brightness information to the application layer, thereby obtaining ambient light brightness information without the need for an ambient light sensor, effectively reducing hardware costs. For the application layer software, there will be no perception of the hardware difference of the underlying camera module replacing the ambient light sensor to achieve virtual light perception, and therefore it will not affect the functions and effects of the application layer software.

[0071] The method of the present invention can be applied to terminal devices such as cameras and mobile phones. Moreover, based on the operating system adopted by the terminal device, the corresponding functions can be realized by different logical layers in the terminal device.

[0072] Taking the Android operating system as an example, Figure 2 FIG. 1 is a schematic diagram showing a logical architecture for implementing the method for acquiring ambient light brightness information of the present invention.

[0073] The Framework layer is a software architecture between the operating system and the application. It usually includes libraries, services, and system APIs provided by the operating system, as well as frameworks, tools, and APIs for application development. Its role is to simplify the application development process, improve development efficiency, and improve code maintainability. Different operating systems and coding languages ​​usually have different Framework layers.

[0074] HAL (Hardware Abstraction Layer) mainly calls the driver interface, obtains the data transmitted from the sensor driver, provides it to the upper-layer interface, shields the details of the underlying layer, and plays a connecting role. It divides the operating system into two parts: user space and kernel space. The HAL layer runs in the user space, and the sensor's HAL program runs in the kernel space.

[0075] Kernel (operating system kernel) is mainly responsible for hardware operations, also known as the driver layer.

[0076] exist Figure 2 In the example shown, SensorHAL needs to call the Camera through the CameraNDK standard interface to control the opening and closing of the Camera.

[0077] exist Figure 2 Under the software framework shown, the specific implementation process of the method for obtaining ambient light brightness information of the present invention is as follows:

[0078] (1) The Sensor HAL layer calls the Camera based on the CameraNDK (Native Developer Kits) interface, opens the Camera device, configures the preview stream, and sends a preview request so that the Camera device can be powered on normally and start preview;

[0079] (2) The ISP processes each frame of image data and reports the automatic exposure statistics to the Camera HAL layer. The Camera HAL layer distributes the automatic exposure statistics to the corresponding algorithm module to calculate the output image brightness information;

[0080] (3) The Camera HAL layer packages the image brightness information of the current frame into the metaData parameter frame corresponding to the frame according to the tag and reports it to the Camera Framework layer;

[0081] (4) After the Sensor HAL layer obtains the entire package of metaData parameters of the current frame, it parses the image brightness information of the current frame;

[0082] (5) Based on the image brightness information of the Nth frame, the SensorHAL layer obtains the corresponding ambient brightness information through the calibration result table lookup and reports it to the application layer;

[0083] By repeating the above steps (2) to (5), the ambient brightness information based on the N+1, N+2, N+3, ... frames of images can be obtained in turn and reported to the application layer. In this way, the application layer can obtain the ambient brightness information in real time. The frequency of obtaining the ambient brightness information is related to the frame rate of the camera's sensor. Usually, the camera's sensor preview mode operates at a frame rate of 30fps, which can fully meet the application layer's requirement for obtaining the brightness information frequency.

[0084] It should be noted that when SensorHAL does not need to obtain brightness information, it can call the CameraNDK interface to turn off the camera.

[0085] As can be seen from the example in the figure, the way and interface of SensorHAL reporting ambient brightness information to the application layer have not changed. Therefore, the application layer does not need to make any adaptation to obtain ambient light brightness information, that is, the application layer does not need to care whether the underlying Sensor Hal obtains brightness information through the ambient light sensor or the camera.

[0086] Considering that the camera's sensor usually consumes more power than the ambient light sensor, for handheld devices that are more sensitive to power consumption, the SensorHAL can add corresponding strategies to save power consumption as much as possible when controlling the CameraHAL to obtain image brightness information, such as combining the lock screen state of the screen, and turning off the camera immediately after querying the image brightness information by timing, etc., which is not limited in this embodiment of the present invention.

[0087] In addition, for some scenarios, the camera is occupied by other applications, such as taking photos or recording videos. In such scenarios, the Sensor HAL layer operates the Camera device through the NDK interface. Due to the priority configuration of the application, it may not be able to preempt the Camera hardware device. This will cause the SensorHAL to be unable to obtain brightness information in time and need to wait for other applications to use the Camera before obtaining brightness information. If the camera is preempted by other applications, you can adjust the brightness information manually if you need to. Usually, this situation rarely occurs, and even if it does, it has little impact on the customer experience.

[0088] It should be noted that the above Figure 2 The example shown is only a specific implementation example of the method of the present invention. There may be other specific implementation methods under different operating systems and software architectures, which are not limited to the embodiments of the present invention.

[0089] Accordingly, an embodiment of the present invention also provides a device for obtaining ambient light brightness information, such as Figure 3 Shown is a structural schematic diagram of the device.

[0090] The device 300 for acquiring ambient light brightness information includes: a camera hardware module 301 and an image sensor module 302. Among them:

[0091] The camera hardware module 301 is used to obtain image data collected by the camera module and obtain image brightness information based on the image data;

[0092] The image sensor module 302 is used to obtain the image brightness information obtained by the camera hardware module 301 frame by frame, determine the ambient light brightness information according to the image brightness information, and upload the ambient light brightness information to the application layer.

[0093] like Figure 4 As shown, another specific structure of the device 300 for acquiring ambient light brightness information may further include: an image processor 303, which is used to process each frame of image data collected by the camera module.

[0094] Accordingly, in this embodiment, the camera hardware module 301 may include: a statistical unit 311, a calculation unit 312, and a packaging unit 313. Among them:

[0095] A statistical unit 311 is used to perform automatic exposure related statistics on each frame of image data processed by the image processor to obtain statistical information;

[0096] A calculation unit 312, configured to calculate image brightness information according to the statistical information;

[0097] The encapsulation unit 313 is used to encapsulate the image brightness information calculated by the calculation unit 312 into a protocol standard format to obtain an image brightness package corresponding to each frame.

[0098] In a specific implementation, the camera hardware module 301 may further include: a memory unit (not shown). Accordingly, the statistical unit 311 may store the statistical information in the memory unit; the calculation unit 312 calculates the image brightness information according to the statistical information in the memory unit, which can effectively improve processing efficiency and reduce delay.

[0099] Continue to refer to Figure 4 In this embodiment, the image sensor module 302 may include: an interface calling unit 321, an information conversion unit 322, and an uploading unit 323. Among them:

[0100] The interface calling unit 321 is used to call the camera hardware module 301 through the camera standard interface, control the camera hardware module 301 to open, and obtain the image brightness package frame by frame;

[0101] The information conversion unit 322 is used to determine the ambient light brightness information according to the image brightness information in the image brightness package;

[0102] The uploading unit 323 is used to upload the ambient light brightness information to the application layer.

[0103] In a non-limiting embodiment, the information conversion unit 322 can convert the image brightness information into the ambient brightness information using a fitting equation of the image brightness information and the ambient light brightness information. The fitting equation can be obtained by a corresponding calibration module performing a calibration process under a standard environment and based on the calibration result.

[0104] It should be noted that the calibration module can be a part of the device for obtaining ambient light brightness information of the present invention, or can be independent of the device. For example, a camera or other device with the same model of device can be used for calibration, and the fitting equation can be obtained according to the calibration result.

[0105] The method and device for obtaining ambient light brightness information provided by the embodiments of the present invention can be applicable to devices with cameras that need to adjust screen brightness based on ambient light brightness, such as mobile phones, cameras, vehicle-mounted terminals and other devices.

[0106] Accordingly, an embodiment of the present invention further provides a terminal device, such as Figure 5 The figure shows a structural diagram of the terminal device.

[0107] The terminal device 500 includes: a camera module 501, an application module 502, a display screen 503, and the above-mentioned device 300 for obtaining ambient light brightness information.

[0108] The camera module 501 is used to collect image data;

[0109] The device 300 for obtaining ambient light brightness information is used to obtain ambient light brightness information according to the image data collected by the camera module;

[0110] The application module 502 is used to adjust the brightness of the display screen 503 according to the ambient light brightness information.

[0111] The terminal device does not need to be equipped with a dedicated ambient light sensor. The device for obtaining ambient light brightness information uses the image data collected by the camera module to obtain image brightness information, and then converts the image brightness information to obtain ambient light brightness information. The screen brightness is then adjusted according to the ambient light brightness information, thereby completing automatic adjustment of the screen brightness and saving device hardware and costs.

[0112] The terminal device may be a mobile phone, a camera, a vehicle-mounted terminal or the like.

[0113] Regarding the various modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, or hardware modules / units, or they can be partially software modules / units and partially hardware modules / units. For example, for various devices and products applied to or integrated in a chip, the various modules / units included therein can all be implemented in the form of hardware such as circuits, or at least some of the modules / units can be implemented in the form of software programs, which run on a processor integrated inside the chip, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in a chip module, the various modules / units included therein can all be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component of the chip module (such as a chip, circuit module, etc.) or in different components, or at least some of the modules / units can be implemented in the form of software programs. It is implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in hardware such as circuits; for various devices and products applied to or integrated in the terminal equipment, the various modules / units contained therein can be implemented in hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal equipment, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal equipment, and the remaining (if any) modules / units can be implemented in hardware such as circuits.

[0114] The present application also discloses a storage medium, which is a computer-readable storage medium and stores a computer program. When the computer program is executed, Figure 1 All or part of the steps of the method shown in . The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. The storage medium may also include a non-volatile memory (non-volatile) or a non-transitory memory, etc.

[0115] The embodiment of the present invention further provides a terminal device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor executes Figure 1 All or part of the steps of the method.

[0116] The first, second, etc. descriptions appearing in the embodiments of the present application are only used for illustration and distinction of the description objects. There is no order, nor do they indicate any special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.

[0117] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means.

[0118] Please refer to Figure 6 The embodiment of the present invention further provides a hardware structure diagram of a terminal device. The terminal device includes a processor 601, a memory 602 and a transceiver 603.

[0119] Processor 601 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application. Processor 601 may also include multiple CPUs, and processor 601 may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, or processing cores for processing data (such as computer program instructions).

[0120] The memory 602 may be a ROM or other types of static storage devices that can store static information and instructions, a RAM or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, and the embodiment of the present invention does not impose any restrictions on this. The memory 602 may exist independently (in this case, the memory 502 may be located outside the device or inside the device), or it may be integrated with the processor 601. Among them, the memory 602 may contain a computer program code. The processor 601 is used to execute the computer program code stored in the memory 602, thereby realizing the method provided in the embodiment of the present application.

[0121] The processor 601, the memory 602 and the transceiver 603 are connected via a bus. The transceiver 603 is used to communicate with other devices or a communication network. Optionally, the transceiver 603 may include a transmitter and a receiver. The device used to implement the receiving function in the transceiver 603 can be regarded as a receiver, and the receiver is used to perform the receiving steps in the embodiment of the present application. The device used to implement the sending function in the transceiver 603 can be regarded as a transmitter, and the transmitter is used to perform the steps in the method embodiment of the present application.

[0122] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0123] In the several embodiments provided in the present application, it should be understood that the disclosed methods, devices and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0125] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0126] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present application.

[0127] Although the present application is disclosed as above, the present application is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application shall be subject to the scope defined by the claims.

Claims

1. A method for obtaining ambient light brightness information, It is characterized in that The method comprises: Obtain image data collected by the camera module; Obtaining image brightness information based on the image data; Determine ambient light brightness information according to the image brightness information; The ambient light brightness information is uploaded to the application layer.

2. The method according to claim 1, It is characterized in that The obtaining of image brightness information based on the image data comprises: Perform automatic exposure related statistics on each frame of image data to obtain statistical information; The image brightness information is calculated based on the statistical information.

3. The method according to claim 1, It is characterized in that Determining the ambient light brightness information according to the image brightness information comprises: The image brightness information is converted into the ambient brightness information using a fitting equation of the image brightness information and the ambient light brightness information.

4. The method according to claim 3, It is characterized in that The method further comprises: A calibration process is performed under a standard environment to obtain a fitting equation of the image brightness information and the ambient light brightness information.

5. A device for obtaining ambient light brightness information, It is characterized in that The device comprises: A camera hardware module, used to obtain image data collected by the camera module, and obtain image brightness information based on the image data; The image sensor module is used to obtain the image brightness information obtained by the camera hardware module frame by frame, determine the ambient light brightness information according to the image brightness information, and upload the ambient light brightness information to the application layer.

6. The device according to claim 5, It is characterized in that The device also includes: An image processor, used to process each frame of image data collected by the camera module; The camera hardware module includes: A statistical unit, used for performing automatic exposure related statistics on each frame of image data processed by the image processor to obtain statistical information; A calculation unit, used to calculate image brightness information according to the statistical information; The encapsulation unit is used to encapsulate the image brightness information calculated by the calculation unit into a protocol standard format to obtain an image brightness package corresponding to each frame.

7. The device according to claim 6, It is characterized in that The camera hardware module also includes: a memory unit; The statistical unit is further used to store the statistical information in the memory unit; The calculation unit is used to calculate the image brightness information according to the statistical information in the memory unit.

8. The device according to claim 6, It is characterized in that The image sensor module comprises: An interface calling unit, used to call the camera hardware module through a camera standard interface, control the camera hardware module to open, and obtain the image brightness package frame by frame; an information conversion unit, configured to determine ambient light brightness information according to the image brightness information in the image brightness package; The uploading unit is used to upload the ambient light brightness information to the application layer.

9. The device according to claim 8, It is characterized in that The information conversion unit is used to convert the image brightness information into the ambient brightness information by using a fitting equation between the image brightness information and the ambient light brightness information.

10. The device according to claim 9, It is characterized in that The device also includes: The calibration module is used to perform a calibration process in a standard environment and obtain a fitting equation of the image brightness information and the ambient light brightness information according to the calibration result.

11. A terminal device, It is characterized in that include: A camera module, an application module, a display screen, and a device for obtaining ambient light brightness information as claimed in any one of claims 5 to 10; The camera module is used to collect image data; The device for obtaining ambient light brightness information is used to obtain ambient light brightness information based on the image data collected by the camera module; The application module is used to adjust the brightness of the screen according to the ambient light brightness information.

12. A computer-readable storage medium, the computer-readable storage medium being a non-volatile storage medium or a non-transient storage medium, on which a computer program is stored, It is characterized in that When the computer program is executed by a processor, the steps of the method for obtaining ambient light brightness information according to any one of claims 1 to 4 are executed.

13. A terminal device, It is characterized in that It comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and is characterized in that when the processor runs the computer program, the steps of the method for obtaining ambient light brightness information according to any one of claims 1 to 4 are executed.

Citation Information

Cited By

  • Environment illumination sensing method, vehicle lamp control method, intelligent equipment and medium

    CN119550987A