A method, device and computer-readable storage medium for optical data stabilization.

By combining the global brightness configuration status and system time difference when acquiring light sensor values, light sensor stabilization is performed, which solves the problem of inaccurate data from the under-display light sensor, achieves stable adjustment of screen brightness, and improves the user experience.

CN116204150BActive Publication Date: 2025-10-28NUBIA TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211648414.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-10-28
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

In existing technologies, the data collected by under-display light sensors is easily affected by the screen, causing the screen brightness to fluctuate repeatedly, which affects the accuracy and stability of the automatic backlight function.

Method used

When acquiring light sensor values, the system selects between brightness configuration processing or temporary variable initialization based on the global brightness configuration status. It then combines real-time light sensor data and system time difference to perform light sensor anti-shake configuration processing, and finally performs brightness conversion to obtain a stable screen brightness configuration value.

Benefits of technology

It achieves more accurate and stable light-sensing data processing, improves the precision of screen brightness adjustment, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116204150B_ABST
    Figure CN116204150B_ABST
Patent Text Reader

Abstract

This invention discloses a method, device, and computer-readable storage medium for optical data stabilization. The method includes: when acquiring the current optical sensor value, selecting either a preset first brightness configuration or a preset temporary variable initialization based on the acquired global brightness configuration state; when performing the temporary variable initialization, performing the preset first optical sensor stabilization configuration based on real-time optical sensor data and the difference between the current system time and the system time at the previous brightness configuration; performing the preset second optical sensor stabilization configuration based on the optical sensor data at the previous brightness configuration and the optical sensor data at the current brightness configuration; and performing a preset brightness conversion on the processed optical sensor value to obtain the final screen brightness configuration value. This invention achieves a more accurate optical data stabilization scheme, making the feedback optical sensor data more accurate and stable, and enhancing the adaptive brightness control experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile communications, and more particularly to a method, device, and computer-readable storage medium for optical data stabilization. Background Technology

[0002] In current technology, with the continuous development of smart terminal devices, users' demands for device screen displays are also increasing. Specifically, devices typically have built-in light sensors to adjust screen display parameters in real time based on ambient light. These light sensors, also known as ambient light sensors, are sensors that detect visible light intensity and adjust screen brightness according to the ambient light level. They are widely used in devices such as mobile phones. Light sensors operate based on the photoelectric effect. Conventional light sensors are usually located in the earpiece, microphone, flash, etc., and are less affected by screen brightness. The technology is also relatively mature, so the ambient brightness they collect is quite accurate.

[0003] However, with the increasing screen-to-body ratio of mobile phones and other devices, placing the light sensor below the screen now makes the data collected by the light sensor inaccurate due to the influence of the screen. In particular, if the screen image changes rapidly, the collected data will fluctuate frequently, thus affecting the automatic backlight function of mobile phones and other devices, causing the screen brightness to fluctuate repeatedly.

[0004] Therefore, improving the accuracy and stability of under-display light sensor data processing has become an urgent technical problem to be solved. Summary of the Invention

[0005] To address the aforementioned technical deficiencies in the prior art, this invention proposes a method for stabilizing optically sensed data, comprising:

[0006] When acquiring the current light sensor value, the system selects to perform either the preset first brightness configuration or the preset temporary variable initialization, based on the acquired global brightness configuration status.

[0007] When performing the temporary variable initialization, the preset first light-sensing anti-shake configuration is executed based on the real-time light-sensing data and the difference between the current system time and the system time at the previous brightness configuration.

[0008] Based on the light sensing data during the previous brightness configuration and the light sensing data during the current brightness configuration, a preset second light sensing anti-shake configuration process is executed;

[0009] The processed light-sensing values ​​are subjected to a preset brightness conversion to obtain the final screen brightness configuration value.

[0010] Optionally, when acquiring the current light sensing value, selecting to perform a preset first brightness configuration or perform a preset temporary variable initialization based on the acquired global brightness configuration state includes:

[0011] Listen to the light sensor to obtain the current light value mlux, and obtain the current global brightness configuration status mForceUpdate of the system;

[0012] When the global brightness configuration state mForceUpdate is true, all preset temporary state flags are reset, and the previous light sensing value mlastlux is used as the current light sensing value mlux. The brightness configuration processing of the first brightness configuration is then performed on the current light sensing value mlux.

[0013] Optionally, when initializing the temporary variable, the preset first light-sensing stabilization configuration process is executed based on real-time light-sensing data and the difference between the current system time and the system time at the previous brightness configuration, including:

[0014] When the global brightness configuration state mForceUpdate is false, it is determined to initialize temporary variables, including a first temporary variable updateBrightness and a second temporary variable luxdiff.

[0015] When the current light sensitivity value mlux is greater than the preset first light sensitivity value, the minimum ambient light brightness configuration message is removed.

[0016] When the light sensitivity value mlux is greater than the first light sensitivity value and less than the preset second light sensitivity value, the time difference between the current system time and the system time at the previous brightness configuration is obtained.

[0017] Optionally, the step of performing a preset first light-sensing image stabilization configuration process based on real-time light-sensing data and the difference between the current system time and the system time at the previous brightness configuration during the initialization of the temporary variable further includes:

[0018] When the time difference is less than or equal to a preset first time, the light-sensing value mlux is accumulated, and the number of accumulations is recorded.

[0019] When the time difference is greater than the first time, the accumulated value and the number of times the accumulation is performed, and the average value of the accumulated value with the number of times the accumulation is taken as the current light sensitivity value mlux.

[0020] Optionally, the step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration includes:

[0021] When the light sensitivity value mlux is greater than the first light sensitivity value and less than or equal to the preset third light sensitivity value, the light sensitivity difference between the light sensitivity value mlux in the previous configuration and the light sensitivity value mlux in the current configuration is obtained, and the light sensitivity difference is assigned to the second temporary variable luxdiff, wherein the third light sensitivity value is less than the second light sensitivity value;

[0022] When the absolute value of the second temporary variable luxdiff is greater than the fourth light-sensing value, the first temporary variable updateBrightness is set to true; when the absolute value of the second temporary variable luxdiff is less than or equal to the fourth light-sensing value, the first temporary variable updateBrightness is set to false, wherein the fourth light-sensing value is less than the third light-sensing value.

[0023] Optionally, the step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration further includes:

[0024] The second temporary variable luxdiff is accumulated, and the accumulated result is used as the global variable mSumlux;

[0025] When the absolute value of the global variable mSumlux is greater than the fourth light-sensing value, the first temporary variable updateBrightness is set to true; when the first temporary variable updateBrightness is true, the global variable mSumlux is reset to 0.

[0026] Optionally, the step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration further includes:

[0027] When the light sensitivity value mlux is greater than the third light sensitivity value, the light sensitivity difference is obtained and the light sensitivity difference is assigned to the second temporary variable luxdiff;

[0028] When the absolute value of the second temporary variable luxdiff is greater than the fifth light-sensing value, the first temporary variable updateBrightness is set to true; when the absolute value of the second temporary variable luxdiff is less than or equal to the fifth light-sensing value, the first temporary variable updateBrightness is set to false, wherein the fifth light-sensing value is less than the second light-sensing value and greater than the fourth light-sensing value.

[0029] Optionally, the step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration further includes:

[0030] The second temporary variable luxdiff is accumulated, and the accumulated result is used as the global variable mSumlux;

[0031] When the absolute value of the global variable mSumlux is greater than the fifth light-sensing value, the first temporary variable updateBrightness is set to true; when the first temporary variable updateBrightness is true, the global variable mSumlux is reset to 0.

[0032] The present invention also proposes an optical data stabilization processing device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the optical data stabilization processing method as described in any of the preceding claims.

[0033] The present invention also proposes a computer-readable storage medium storing an optical data stabilization processing program, which, when executed by a processor, implements the steps of the optical data stabilization processing method as described in any of the preceding claims.

[0034] The optical image stabilization method, device, and computer-readable storage medium of the present invention, when acquiring the current optical image value, select either to perform a preset first brightness configuration or to perform a preset temporary variable initialization based on the acquired global brightness configuration state; when performing the temporary variable initialization, perform the preset first optical image stabilization configuration based on real-time optical image data and the difference between the current system time and the system time at the time of the previous brightness configuration; perform the preset second optical image stabilization configuration based on the optical image data at the time of the previous brightness configuration and the optical image data at the time of the current brightness configuration; and perform a preset brightness conversion on the processed optical image value to obtain the final screen brightness configuration value. This achieves a more accurate optical image stabilization scheme, making the optical image data used to control screen brightness more accurate and stable, greatly enhancing the user experience. Attached Figure Description

[0035] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0036] Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal according to the present invention;

[0037] Figure 2This is the first flowchart of the optical data stabilization processing method of the present invention;

[0038] Figure 3 This is the second flowchart of the optical data stabilization processing method of the present invention;

[0039] Figure 4 This is the third flowchart of the optical data stabilization processing method of the present invention;

[0040] Figure 5 This is the fourth flowchart of the optical data stabilization processing method of the present invention;

[0041] Figure 6 This is the fifth flowchart of the optical data stabilization processing method of the present invention;

[0042] Figure 7 This is the sixth flowchart of the optical data stabilization processing method of the present invention;

[0043] Figure 8 This is the seventh flowchart of the optical data stabilization processing method of the present invention;

[0044] Figure 9 This is the eighth flowchart of the optical data stabilization processing method of the present invention;

[0045] Figure 10 This is the ninth flowchart of the optical data stabilization processing method of the present invention. Detailed Implementation

[0046] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0047] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0048] Terminals can be implemented in various forms. For example, the terminals described in this invention may include mobile terminals such as mobile phones, tablets, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.

[0049] The following description will use a mobile terminal as an example. Those skilled in the art will understand that, apart from components specifically designed for mobile purposes, the construction according to embodiments of the present invention can also be applied to fixed-type terminals.

[0050] Please see Figure 1 This is a schematic diagram of the hardware structure of a mobile terminal implementing various embodiments of the present invention. The mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an A / V (Audio / Video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111, etc. Those skilled in the art will understand that... Figure 1 The mobile terminal structure shown does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0051] The following is combined Figure 1 A detailed introduction to each component of the mobile terminal:

[0052] The radio frequency unit 101 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with the processor 110; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, and a duplexer. Furthermore, the radio frequency unit 101 can also communicate wirelessly with networks and other devices. The aforementioned wireless communications may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution).

[0053] WiFi is a short-range wireless transmission technology. Mobile terminals, through the WiFi module 102, can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 1 WiFi module 102 is shown, but it is understood that it is not a necessary component of a mobile terminal and can be omitted as needed without changing the nature of the invention.

[0054] The audio output unit 103 can convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into audio signals and output them as sound when the mobile terminal 100 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the audio output unit 103 can also provide audio output related to specific functions performed by the mobile terminal 100 (e.g., call signal receiving sound, message receiving sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.

[0055] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 106. The image frames processed by the GPU 1041 can be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) in operating modes such as telephone call mode, recording mode, and voice recognition mode, and can process such sound into audio data. The processed audio (voice) data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 101 in telephone call mode. The microphone 1042 can implement various types of noise cancellation (or suppression) algorithms to eliminate (or suppress) noise or interference generated during the reception and transmission of audio signals.

[0056] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 1061 according to the ambient light level, and the proximity sensor can turn off the display panel 1061 and / or backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition-related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0057] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0058] User input unit 107 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, user input unit 107 may include touch panel 1071 and other input devices 1072. Touch panel 1071, also known as touch screen, can collect touch operations on or near the user (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 1071), and drive corresponding connection devices according to a pre-set program. Touch panel 1071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to processor 110, and can receive and execute commands from processor 110. In addition, touch panel 1071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc., without being limited here.

[0059] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of touch event. Subsequently, the processor 110 provides corresponding visual output on the display panel 1061 based on the type of touch event. Although in Figure 1 In this embodiment, the touch panel 1071 and the display panel 1061 are two independent components to realize the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the mobile terminal. The specific implementation is not limited here.

[0060] Interface unit 108 serves as an interface through which at least one external device can connect to mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 108 may be used to receive input (e.g., data, power, etc.) from the external device and transmit the received input to one or more elements within mobile terminal 100, or it may be used to transmit data between mobile terminal 100 and the external device.

[0061] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0062] The processor 110 is the control center of the mobile terminal. It connects various parts of the mobile terminal via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 109, and by calling data stored in the memory 109, it performs various functions and processes data of the mobile terminal, thereby providing overall monitoring of the mobile terminal. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 110.

[0063] The mobile terminal 100 may also include a power supply 111 (such as a battery) that supplies power to various components. Preferably, the power supply 111 can be logically connected to the processor 110 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0064] although Figure 1 As not shown, the mobile terminal 100 may also include a Bluetooth module, etc., which will not be described in detail here.

[0065] Based on the above-described mobile terminal hardware structure, various embodiments of the method of the present invention are proposed.

[0066] Figure 2 This is a first flowchart of the optical data stabilization processing method of the present invention. This embodiment proposes an optical data stabilization processing method, which includes:

[0067] S1. When obtaining the current light sensing value, select to perform the preset first brightness configuration brightness configuration processing or perform the preset temporary variable initialization according to the obtained global brightness configuration status.

[0068] S2. When performing the temporary variable initialization, based on the real-time light sensing data and the difference between the current system time and the system time at the previous brightness configuration, the preset first light sensing anti-shake configuration processing is performed.

[0069] S3. Based on the light sensing data during the previous brightness configuration and the light sensing data during the current brightness configuration, perform a preset second light sensing anti-shake configuration process;

[0070] S4. Perform a preset brightness conversion on the processed light-sensing value to obtain the final screen brightness configuration value.

[0071] In this embodiment, considering that the backlight brightness adjustment of the device after the automatic backlight function is enabled depends on the currently reported ambient light brightness, this embodiment optimizes and processes the reported light-sensing data based on the current brightness configuration curve. Firstly, jitter removal is performed on frequently reported light-sensing data; secondly, continuously jittered light-sensing data is processed; and thirdly, the lowest light-sensing data undergoes special processing. For details, please refer to... Figure 10When acquiring the current light sensor value, the system selects to perform either a preset first brightness configuration or a preset temporary variable initialization based on the acquired global brightness configuration status. Then, when performing the temporary variable initialization, the system performs a preset first light sensor anti-shake configuration based on the real-time light sensor data and the difference between the current system time and the system time during the previous brightness configuration. Next, the system performs a preset second light sensor anti-shake configuration based on the light sensor data during the previous brightness configuration and the light sensor data during the current brightness configuration. Finally, the processed light sensor value is subjected to a preset brightness conversion to obtain the final screen brightness configuration value.

[0072] Please refer to Figure 3 In this embodiment, when acquiring the current light sensing value, selecting to perform a preset first brightness configuration or perform a preset temporary variable initialization based on the acquired global brightness configuration state includes:

[0073] S11. Monitor the light sensor to obtain the current light value mlux, and obtain the current global brightness configuration status mForceUpdate of the system;

[0074] S12. When the global brightness configuration state mForceUpdate is true, reset all preset temporary state flags, and use the previous light sensing value mlastlux as the current light sensing value mlux, and perform the brightness configuration processing of the first brightness configuration on the current light sensing value mlux.

[0075] Please refer to Figure 4 In this embodiment, when initializing the temporary variable, the preset first light-sensing stabilization configuration process is executed based on real-time light-sensing data and the difference between the current system time and the system time at the previous brightness configuration, including:

[0076] S21. When the global brightness configuration state mForceUpdate is false, determine the initialization of temporary variables, including the first temporary variable updateBrightness and the second temporary variable luxdiff.

[0077] S22. When the current light sensitivity value mlux is greater than the preset first light sensitivity value, remove the minimum ambient light brightness configuration message;

[0078] S23. When the light sensing value mlux is greater than the first light sensing value and less than the preset second light sensing value, obtain the time difference between the current system time and the system time at the previous brightness configuration.

[0079] Please refer to Figure 5In this embodiment, the step of performing a preset first light-sensing image stabilization configuration based on real-time light-sensing data and the difference between the current system time and the system time at the previous brightness configuration during the initialization of the temporary variable further includes:

[0080] S24. When the time difference is less than or equal to a preset first time, the light-sensing value mlux is accumulated, and the number of accumulations is recorded.

[0081] S25. When the time difference is greater than the first time, the accumulated value and the number of times the accumulation is performed, and the average value of the accumulated value with the number of times the accumulation is taken as the current light sensitivity value mlux.

[0082] Please refer to Figure 6 In this embodiment, the step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration includes:

[0083] S31. When the light sensing value mlux is greater than the first light sensing value and less than or equal to the preset third light sensing value, obtain the light sensing difference between the light sensing value mlux in the previous configuration and the light sensing value mlux in the current configuration, and assign the light sensing difference to the second temporary variable luxdiff, wherein the third light sensing value is less than the second light sensing value.

[0084] S32. When the absolute value of the second temporary variable luxdiff is greater than the fourth light-sensing value, the first temporary variable updateBrightness is set to true; when the absolute value of the second temporary variable luxdiff is less than or equal to the fourth light-sensing value, the first temporary variable updateBrightness is set to false, wherein the fourth light-sensing value is less than the third light-sensing value.

[0085] Please refer to Figure 7 In this embodiment, the step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration further includes:

[0086] S33. Accumulate the second temporary variable luxdiff and use the accumulated result as the global variable mSumlux;

[0087] S34. When the absolute value of the global variable mSumlux is greater than the fourth light-sensing value, the first temporary variable updateBrightness is set to true. When the first temporary variable updateBrightness is true, the global variable mSumlux is reset to 0.

[0088] Please refer to Figure 8 In this embodiment, the step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration further includes:

[0089] S35. When the light sensitivity value mlux is greater than the third light sensitivity value, the light sensitivity difference is obtained, and the light sensitivity difference is assigned to the second temporary variable luxdiff.

[0090] S36. When the absolute value of the second temporary variable luxdiff is greater than the fifth light-sensing value, the first temporary variable updateBrightness is set to true; when the absolute value of the second temporary variable luxdiff is less than or equal to the fifth light-sensing value, the first temporary variable updateBrightness is set to false, wherein the fifth light-sensing value is less than the second light-sensing value and greater than the fourth light-sensing value.

[0091] Please refer to Figure 9 In this embodiment, the step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration further includes:

[0092] The second temporary variable luxdiff is accumulated, and the accumulated result is used as the global variable mSumlux;

[0093] When the absolute value of the global variable mSumlux is greater than the fifth light-sensing value, the first temporary variable updateBrightness is set to true; when the first temporary variable updateBrightness is true, the global variable mSumlux is reset to 0.

[0094] Please continue to refer to this. Figure 10 This embodiment illustrates the process through a specific example of image stabilization.

[0095] Step 1. Obtain the current light sensitivity value.

[0096] Specifically, the software listens to the light sensor reports the light values ​​and saves the obtained light values ​​as light sensor values ​​mlux.

[0097] Step 2. Obtain the global brightness configuration status and perform brightness configuration processing as needed.

[0098] Specifically, obtain the global brightness configuration status mForceUpdate. If it is true, reset all temporary status flags and record mlastlux as the current mlux.

[0099] Next, proceed directly to brightness configuration, i.e. Figure 10 Brightness configuration 1.

[0100] If mForceUpdate is false, proceed to step 3 for further processing.

[0101] Step 3. Initialize temporary variables and configure optical image stabilization 1.

[0102] Specifically, initialize temporary variables: the first temporary variable is updateBrightness, and the second temporary variable is luxdiff.

[0103] When the real-time light sensor data is greater than 0 (i.e., the first light sensor value), remove the minimum ambient light brightness configuration message and proceed to the next step.

[0104] When the ambient light is greater than 0 and less than 100 (i.e., the second light sensitivity value), obtain the difference between the current system time and the system time when the brightness was configured last time. When the difference is less than 5 seconds (i.e., the first time), accumulate the light sensitivity value and record the number of accumulations, and then return to step 1.

[0105] If the difference is greater than 5 seconds, the accumulated value and the number of accumulations are calculated, and the average value is taken as the current ambient light.

[0106] Step 4. Based on the ambient light obtained in Step 3, configure light-sensing image stabilization 2.

[0107] First, when the ambient light is greater than 0 and less than 40 (i.e., the third light sensitivity value), the light sensitivity value configured previously is subtracted from the current light sensitivity value, and the difference is assigned to luxdiff. If the absolute value of luxdiff is greater than 20 (i.e., the fourth light sensitivity value), updateBrightness is assigned the value true; otherwise, it is false. Next, luxdiff is incremented, and the result is mSumlux. When updateBrightness is true, the global variable mSumlux is reset to 0. If the absolute value of mSumlux is greater than 20, updateBrightness is assigned the value true, and the global variable mSumlux is reset to 0.

[0108] Second, when the ambient light is greater than or equal to 40 lux, the previous brightness setting is subtracted from the current brightness setting, and the difference is assigned to luxdiff. If the absolute value of luxdiff is greater than 60 (i.e., the fifth brightness setting), updateBrightness is set to true; otherwise, it is set to false. Next, luxdiff is incremented, and the result is mSumlux. When updateBrightness is true, the global variable mSumlux is reset to 0. If the absolute value of mSumlux is greater than 60, updateBrightness is set to true, and the global variable mSumlux is reset to 0.

[0109] Then, the current system time is assigned to mlasttime as the previous system time for future use.

[0110] Step 5. Perform special processing on data where the light sensitivity value mlux is 0.

[0111] After the above steps, perform basic judgment 2.

[0112] If the ambient light brightness is 0, an asynchronous processing message is sent and the process returns immediately.

[0113] The asynchronous message reads: After 5 seconds, reset all temporary state flags, record mlastlux as the current mlux, and then configure the system brightness to the lowest brightness (i.e., brightness configuration 2).

[0114] Step 6. Brightness Configuration 3.

[0115] The final light sensitivity value mlux and updateBrightness flag are obtained by following the steps above.

[0116] If updateBrightnes is true, reset all temporary state flags and record mlastlux as the current mlux.

[0117] Then, the final screen brightness configuration value is obtained through a preset brightness conversion formula.

[0118] Configure the final screen brightness value into the screen driver so that the screen displays the required brightness.

[0119] If updateBrightnes is false, it will return directly.

[0120] The beneficial effect of this embodiment is that, when acquiring the current light-sensing value, it selects between performing a preset first brightness configuration or performing a preset temporary variable initialization based on the acquired global brightness configuration state; when performing the temporary variable initialization, it performs a preset first light-sensing anti-shake configuration based on real-time light-sensing data and the difference between the current system time and the system time at the time of the previous brightness configuration; it performs a preset second light-sensing anti-shake configuration based on the light-sensing data at the time of the previous brightness configuration and the light-sensing data at the time of the current brightness configuration; and it performs a preset brightness conversion on the processed light-sensing value to obtain the final screen brightness configuration value. This achieves a more accurate light-sensing data anti-shake processing scheme, making the light-sensing data used to control screen brightness more accurate and stable, greatly enhancing the user experience.

[0121] Based on the above embodiments, the present invention also proposes an optical data stabilization processing device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the optical data stabilization processing method as described in any of the above embodiments.

[0122] It should be noted that the above-described device embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the device embodiments, which will not be repeated here.

[0123] Based on the above embodiments, the present invention also proposes a computer-readable storage medium storing an optical data stabilization processing program, which, when executed by a processor, implements the steps of the optical data stabilization processing method as described in any of the above embodiments.

[0124] It should be noted that the above-described medium embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the medium embodiments, which will not be repeated here.

[0125] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0126] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0127] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0128] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A method for stabilizing optically sensed data, characterized in that, The method includes: When acquiring the current light sensor value, the system selects to perform either the preset first brightness configuration or the preset temporary variable initialization based on the acquired global brightness configuration status. When performing the temporary variable initialization, the preset first light-sensing anti-shake configuration is executed based on the real-time light-sensing data and the difference between the current system time and the system time at the previous brightness configuration. Based on the light sensing data during the previous brightness configuration and the light sensing data during the current brightness configuration, a preset second light sensing image stabilization configuration is executed; The processed light-sensing values ​​are subjected to a preset brightness conversion to obtain the final screen brightness configuration value; When acquiring the current light sensing value, the step of selecting between performing a preset first brightness configuration or performing a preset temporary variable initialization based on the acquired global brightness configuration state includes: Listen to the light sensor to obtain the current light value mlux, and obtain the current global brightness configuration status mForceUpdate of the system; When the global brightness configuration state mForceUpdate is true, all preset temporary state flags are reset, and the previous light sensing value mlastlux is used as the current light sensing value mlux. The brightness configuration processing of the first brightness configuration is then performed on the current light sensing value mlux. When initializing the temporary variable, the preset first light-sensing stabilization configuration is executed based on real-time light-sensing data and the difference between the current system time and the system time at the time of the previous brightness configuration, including: When the global brightness configuration state mForceUpdate is false, it is determined to initialize temporary variables, including a first temporary variable updateBrightness and a second temporary variable luxdiff. When the current light sensitivity value mlux is greater than the preset first light sensitivity value, the minimum ambient light brightness configuration message is removed. When the light sensitivity value mlux is greater than the first light sensitivity value and less than the preset second light sensitivity value, the time difference between the current system time and the system time at the previous brightness configuration is obtained. When the time difference is less than or equal to a preset first time, the light-sensing value mlux is accumulated, and the number of accumulations is recorded. When the time difference is greater than the first time, the accumulated value and the number of times the accumulation is performed, and the average value of the accumulated value with the number of times the accumulation is taken as the current light sensitivity value mlux.

2. The optical data stabilization method according to claim 1, characterized in that, The step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration includes: When the light sensitivity value mlux is greater than the first light sensitivity value and less than or equal to the preset third light sensitivity value, the light sensitivity difference between the light sensitivity value mlux in the previous brightness configuration and the light sensitivity value mlux in the current brightness configuration is obtained, and the light sensitivity difference is assigned to the second temporary variable luxdiff, wherein the third light sensitivity value is less than the second light sensitivity value; When the absolute value of the second temporary variable luxdiff is greater than the fourth light-sensing value, the first temporary variable updateBrightness is set to true; when the absolute value of the second temporary variable luxdiff is less than or equal to the fourth light-sensing value, the first temporary variable updateBrightness is set to false, wherein the fourth light-sensing value is less than the third light-sensing value.

3. The optical data stabilization method according to claim 2, characterized in that, The step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration further includes: The second temporary variable luxdiff is accumulated, and the accumulated result is used as the global variable mSumlux; When the absolute value of the global variable mSumlux is greater than the fourth light-sensing value, the first temporary variable updateBrightness is set to true; when the first temporary variable updateBrightness is true, the global variable mSumlux is reset to 0.

4. The optical data stabilization method according to claim 3, characterized in that, The step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration further includes: When the light sensitivity value mlux is greater than the third light sensitivity value, the light sensitivity difference is obtained and the light sensitivity difference is assigned to the second temporary variable luxdiff; When the absolute value of the second temporary variable luxdiff is greater than the fifth light-sensing value, the first temporary variable updateBrightness is set to true; when the absolute value of the second temporary variable luxdiff is less than or equal to the fifth light-sensing value, the first temporary variable updateBrightness is set to false, wherein the fifth light-sensing value is less than the second light-sensing value and greater than the fourth light-sensing value.

5. The optical data stabilization method according to claim 4, characterized in that, The step of performing a preset second light-sensing image stabilization configuration based on the light-sensing data during the previous brightness configuration and the light-sensing data during the current brightness configuration further includes: The second temporary variable luxdiff is accumulated, and the accumulated result is used as the global variable mSumlux; When the absolute value of the global variable mSumlux is greater than the fifth light-sensing value, the first temporary variable updateBrightness is set to true; when the first temporary variable updateBrightness is true, the global variable mSumlux is reset to 0.

6. A light-sensitive data stabilization processing device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the optical data stabilization processing method as described in any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an optical data stabilization processing program, which, when executed by a processor, implements the steps of the optical data stabilization processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for adjusting screen brightness and device thereof

    CN104916270A

  • Intelligent screen brightness adjusting method and device, storage medium and mobile terminal

    CN109951594A