[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN107645606B - Screen brightness adjusting method, mobile terminal and readable storage medium - Google Patents

Screen brightness adjusting method, mobile terminal and readable storage medium Download PDF

Info

Publication number
CN107645606B
CN107645606B CN201710912884.1A CN201710912884A CN107645606B CN 107645606 B CN107645606 B CN 107645606B CN 201710912884 A CN201710912884 A CN 201710912884A CN 107645606 B CN107645606 B CN 107645606B
Authority
CN
China
Prior art keywords
brightness
pixel
interval
average value
proportion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710912884.1A
Other languages
Chinese (zh)
Other versions
CN107645606A (en
Inventor
蒋权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710912884.1A priority Critical patent/CN107645606B/en
Publication of CN107645606A publication Critical patent/CN107645606A/en
Application granted granted Critical
Publication of CN107645606B publication Critical patent/CN107645606B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephone Function (AREA)

Abstract

The invention discloses a screen brightness adjusting method, which comprises the following steps: acquiring a digital image signal through a camera; carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels; dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point; and adjusting the screen brightness according to the average value of the photosensitive brightness of the pixel points in each interval. The invention also discloses a mobile terminal and a computer readable storage medium. The invention can lead the mobile terminal not to be additionally provided with the optical sensor and reduce the cost of the mobile terminal.

Description

Screen brightness adjusting method, mobile terminal and readable storage medium
Technical Field
The invention relates to the technical field of screen adjustment, in particular to a screen brightness adjusting method, a mobile terminal and a computer readable storage medium.
Background
With the development of the internet and the mobile communication network, and the rapid development of the processing capability and the storage capability of the mobile terminal, a large amount of application programs are rapidly spread and used; the common application program is convenient for the user to work and live, and meanwhile newly developed application programs also enter the daily life of the user, so that the life quality of the user, the frequency of using the mobile terminal and the entertainment feeling in use are improved.
At present, mobile terminals such as smart phones generally sense ambient light through a built-in light sensing device to adjust screen brightness. However, in this adjustment method, the light sensing device is in a light sensing working state for a long time, which causes a large power consumption of the mobile terminal, and the mobile terminal needs to add an additional light sensor, which increases the cost.
Disclosure of Invention
The invention mainly aims to provide a screen brightness adjusting method, a mobile terminal and a computer readable storage medium, and aims to solve the technical problems of large power consumption and increased cost of the mobile terminal caused by the fact that the mobile terminal senses ambient light through a light sensing device to adjust the screen brightness of the mobile terminal.
In order to achieve the above object, the present invention provides a screen brightness adjusting method, including:
acquiring a digital image signal through a camera;
carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels;
dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point;
and adjusting the screen brightness according to the average value of the photosensitive brightness of the pixel points in each interval.
Optionally, the step of acquiring a digital image signal by a camera includes:
acquiring image data through a camera;
converting the image data into an electrical signal;
the electrical signal is converted into a digital image signal by an analog-to-digital conversion method.
Optionally, the step of calculating the average value of the sensitization brightness of the pixel points in each pixel point interval according to the ratio and the sensitization brightness value of each pixel point includes:
comparing the ratio with a preset ratio;
and deleting the pixel points in the interval with the proportion smaller than the preset proportion, and calculating the average value of the photosensitive brightness of the pixel points in the interval with the proportion larger than or equal to the preset proportion.
Optionally, the step of adjusting the screen brightness according to the average value of the sensitization brightness of the pixel points in each interval includes:
calculating the average value of the sensitization brightness of the pixel points for adjusting the screen brightness according to the average value of the sensitization brightness of the pixel points in each interval;
taking the average value of the sensitization brightness of the pixel points for adjusting the screen brightness as an environment sensitization value;
extracting a mapping table of the ambient light sensing value and the screen brightness level, and extracting the corresponding screen brightness level according to the ambient light sensing value;
and adjusting the screen brightness according to the screen brightness level.
Optionally, the step of calculating the average value of the sensitization brightness of the pixel points for adjusting the screen brightness according to the average value of the sensitization brightness of the pixel points in each interval includes:
analyzing the number of intervals with the comparison ratio being greater than or equal to the preset ratio;
if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a first preset value, extracting the average value of the photosensitive brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion, and taking the average value of the photosensitive brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion as the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness;
if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a second preset value, calculating the average value of the photosensitive brightness of the pixels for adjusting the screen brightness according to an algorithm corresponding to the second preset value of the pixel point intervals;
and if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to or larger than a third preset value, calculating the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness according to an algorithm corresponding to the pixel point intervals with the third preset value.
Optionally, the step of calculating an average value of the light-sensitive brightness of the pixels for adjusting the screen brightness according to the algorithm corresponding to the second preset pixel interval includes:
judging whether the interval of the second preset number of pixel points is a continuous interval or not;
if the average values are continuous, respectively extracting the average values of the pixel point brightness in the second preset value intervals, calculating the average value of the pixel point brightness in the second preset value intervals, and taking the average value of the pixel point brightness in the second preset value intervals as the average value of the photosensitive brightness of the pixel point for adjusting the screen brightness;
if the number of the pixels in the second preset pixel interval is not continuous, comparing the ratio of the number of the pixels in the second preset pixel interval to the total number of the pixels;
deleting the interval with low pixel point proportion and the average pixel point brightness value, obtaining the average pixel point brightness value of the interval with high pixel point proportion, and taking the average pixel point brightness value of the interval with high pixel point proportion as the average photosensitive brightness value of the pixel point for adjusting the screen brightness.
Optionally, the step of calculating an average value of the light-sensitive brightness of the pixels for adjusting the screen brightness according to the algorithm corresponding to the third preset pixel interval includes:
judging whether the third or more than third preset pixel point interval is a continuous interval or not;
if the continuous interval exists, respectively extracting the average value of the pixel brightness of each interval in the continuous interval, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
if the continuous interval exists, calculating the proportion of the total pixel points of each continuous interval, and comparing the proportion of the total pixel points of each continuous interval; extracting the average value of the pixel brightness of each interval in the continuous interval with high proportion of the total pixels, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
if the average brightness value is not continuous, comparing the ratio of the number of the pixel points in the interval of the third or more than the third preset value pixel point brightness average value to the total number of the pixel points;
and obtaining the average value of the pixel brightness of the interval with the highest pixel proportion, and taking the average value of the pixel brightness of the interval with the highest pixel proportion as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness.
In addition, in order to achieve the above object, the present invention further provides a mobile terminal, which includes a processor, a network interface, a user interface, and a memory, wherein the memory stores a screen brightness adjustment program; the processor is used for executing the screen brightness adjusting program to realize the following steps:
acquiring a digital image signal through a camera;
carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels;
dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point;
and adjusting the screen brightness according to the average value of the photosensitive brightness of the pixel points in each interval.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium having a screen brightness adjusting program stored thereon, which when executed by a processor implements the steps of the screen brightness adjusting method as described above.
According to the screen brightness adjusting method, the mobile terminal and the computer readable storage medium, the digital image signal is obtained through the camera; then, carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels; dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point; the screen brightness can be adjusted according to the average value of the photosensitive brightness of the pixel points in each interval, and an optical sensor does not need to be additionally arranged in the mobile terminal, so that the cost of the mobile terminal is reduced.
Drawings
Fig. 1 is a schematic diagram of an alternative hardware configuration of a mobile terminal implementing various embodiments of the present invention;
FIG. 2 is a diagram of a wireless communication device of the mobile terminal shown in FIG. 1;
FIG. 3 is a flowchart illustrating a first embodiment of a screen brightness adjusting method according to the present invention;
FIG. 4 is a detailed flowchart of a step of acquiring a digital image signal by a camera according to a second embodiment of the screen brightness adjusting method of the present invention;
FIG. 5 is a schematic view of a detailed flow chart of a step of calculating an average value of the sensitization brightness of the pixels in each pixel interval according to the ratio and the sensitization brightness value of each pixel in the third embodiment of the screen brightness adjustment method according to the present invention;
FIG. 6 is a schematic view illustrating a detailed flow of a step of adjusting the screen brightness according to the average value of the sensitization brightness of the pixel points in each interval in the fourth embodiment of the method for adjusting the screen brightness according to the present invention;
FIG. 7 is a schematic view of a detailed flow chart of a step of calculating an average value of the sensitization brightness of the pixels for adjusting the screen brightness according to the average value of the sensitization brightness of the pixels in each interval according to the fifth embodiment of the method for adjusting the screen brightness of the present invention;
FIG. 8 is a flowchart illustrating a detailed process of a step of calculating an average value of the luminance of the pixels with the adjusted screen luminance according to the algorithm corresponding to the interval of the second predetermined number of pixels according to the sixth embodiment of the method for adjusting the screen luminance of the present invention;
fig. 9 is a detailed flowchart of the step of calculating and adjusting the average value of the photosensitive luminance of the screen luminance pixel points according to the algorithm corresponding to the third preset pixel point interval in the seventh embodiment of the screen luminance adjusting method according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and a fixed terminal such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), 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 duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
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 Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may 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 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
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 that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the 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 having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
The main solution of the embodiment of the invention is as follows: acquiring a digital image signal through a camera; then, carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels; dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point; the screen brightness can be adjusted according to the average value of the photosensitive brightness of the pixel points in each interval, and an optical sensor does not need to be additionally arranged in the mobile terminal, so that the cost of the mobile terminal is reduced.
In the embodiment of the invention, the screen brightness of the existing mobile terminal is generally adjusted by sensing ambient light through a built-in light sensing device. However, in this adjustment method, the light sensing device is in a light sensing working state for a long time, which causes a large power consumption of the mobile terminal, and the mobile terminal needs to add an additional light sensor, which increases the cost.
Therefore, the embodiment of the invention provides a screen brightness adjusting method, which comprises the steps of acquiring a digital image signal through a camera; then, carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels; dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point; the screen brightness can be adjusted according to the average value of the photosensitive brightness of the pixel points in each interval, and an optical sensor does not need to be additionally arranged in the mobile terminal, so that the cost of the mobile terminal is reduced.
Referring to fig. 3, fig. 3 is a flowchart illustrating a screen brightness adjusting method according to a first embodiment of the present invention.
In this embodiment, the method includes:
step S1000, acquiring a digital image signal through a camera;
in the embodiment of the present invention, the mentioned camera has a light sensing function, and the camera may be a front camera or a rear camera of the mobile terminal, wherein a light sensing circuit may be disposed in the camera having the light sensing function, and the mobile terminal may sense image data of an environment where the mobile terminal is located through the light sensing circuit in the camera and convert the image data into a corresponding electrical signal, and then convert the electrical signal into a digital image signal through an analog-to-digital conversion method, so as to obtain the digital image signal. In a specific implementation process, in order to reduce power consumption of the mobile terminal, the screen image data may be sensed when the mobile terminal is in an awake state. In contrast to digital-to-analog conversion, analog-to-digital conversion converts continuous analog quantities (such as gray scale, voltage, current, etc. of a pixel) into discrete digital quantities by sampling. For example, after scanning the image, an array of pixels is formed, and the brightness (gray level) of each pixel is converted into a corresponding digital representation, i.e., analog-to-digital conversion, to form a digital image. There are generally two types of electronic analog-to-digital conversion and electromechanical analog-to-digital conversion. It is common in remote sensing to transmit, store and convert image forms into digital form. For example: digitization of the image, etc.
Step S2000, carrying out pixel photosensitive value processing on the digital image signal to obtain photosensitive brightness values of all pixels;
after the screen digital image signal is acquired, pixel photosensitive value processing is carried out on the digital image signal, and then the photosensitive brightness value of each pixel can be acquired. The digital image signal is decoded to obtain RGB component data of the screen digital image signal, and then the RGB component data is analyzed by an image processing CPU, so that a photosensitive luminance value Y of each pixel of the digital image signal can be obtained, and a specific algorithm may be that Y is 0.299R +0.587G + 0.114B.
Step S300, dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point;
after obtaining the photosensitive brightness values of the pixel points, dividing the pixel points according to a preset rule, where the preset rule may be that 50cd/m2 is used as an interval, for example, the pixel points are classified according to seven intervals, namely 0-50 cd/m2, 50-100 cd/m2, 100-150 cd/m2, 150-200 cd/m2, 200-250 cd/m2, 250-300 cd/m2, and >300cd/m2, in a specific implementation process, the interval is not limited to 50cd/m2, and may be other integer values, which is not limited herein. And then calculating the proportion of the number of the pixels in each section to the total number of the pixels, wherein if the total number of the pixels is 2000 and the number of the pixels between 0 and 50cd/m2 is 100, the proportion of the number of the pixels between 0 and 50cd/m2 to the total number of the pixels is 100/2000 which is 5%. Then, the proportion of the pixel points in each interval to the total number of the pixel points is calculated in sequence according to the example method, and then the average value of the photosensitive brightness of the pixel points in each pixel point interval is calculated according to the proportion and the photosensitive brightness value of each pixel point. Specifically, in this embodiment, only the average value of the sensitization brightness of the pixels in the interval in which the ratio of the number of pixels in the interval to the total number of pixels exceeds the preset ratio is calculated, so that the interval in which the average value of the sensitization brightness of the pixels is calculated is first screened according to the ratio of the number of pixels in each interval to the total number of pixels, and then the average value of the sensitization brightness of the pixels in each interval is calculated according to the sensitization brightness of each pixel in the interval.
And step S4000, adjusting the screen brightness according to the average value of the photosensitive brightness of the pixel points in each interval.
After the average value of the pixel brightness is obtained, the screen brightness can be adjusted according to the average value of the pixel photosensitive brightness of each interval, specifically, the screen brightness level can be extracted according to the mapping relation between the average value of the pixel brightness and the screen brightness level, and then the screen brightness can be adjusted according to the extracted screen brightness level.
In the method for adjusting the screen brightness provided by the embodiment, a digital image signal of a screen is acquired through a camera; then, carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels; dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point; the screen brightness can be adjusted according to the average value of the photosensitive brightness of the pixel points in each interval, and an optical sensor does not need to be additionally arranged in the mobile terminal, so that the cost of the mobile terminal is reduced.
Further, referring to fig. 4, a second embodiment of the screen brightness adjusting method of the present invention is provided based on the first embodiment of the screen brightness adjusting method of the present invention.
In this embodiment, the step S1000 includes:
step S1100, acquiring image data through a camera;
step S1200, converting the image data into an electrical signal;
step S1300, converting the electrical signal into a digital image signal by an analog-to-digital conversion method.
In this embodiment, in order to obtain a digital image signal, image data needs to be obtained through a camera, that is, an optical signal of an environment where the mobile terminal is located is acquired, the image data is converted into an electrical signal, and the electrical signal is converted into the digital image signal through an analog-to-digital conversion method, where the analog-to-digital conversion is also called conversion between an analog signal and a digital signal, and the analog-to-digital conversion is a conversion of a continuous analog quantity (such as a gray scale of a pixel, a voltage, a current, and the like) into a discrete digital quantity through sampling. For example, after scanning the image, an array of pixels is formed, and the brightness (gray level) of each pixel is converted into a corresponding digital representation, i.e., analog-to-digital conversion, to form a digital image. There are generally two types of electronic analog-to-digital conversion and electromechanical analog-to-digital conversion. It is common in remote sensing to transmit, store and convert image forms into digital form. For example: digitization of the image, etc. Analog-to-digital conversion is performed by an analog-to-digital converter, i.e. an a/D converter, or ADC for short, which generally refers to an electronic component for converting an analog signal into a digital signal. A typical analog-to-digital converter converts an input voltage signal into an output digital signal. Since digital signals do not have practical significance per se, only one relative magnitude is represented. Any analog-to-digital converter needs a reference analog quantity as a conversion standard, and a common reference standard is the maximum convertible signal size. And the output digital quantity represents the magnitude of the input signal relative to the reference signal.
Further, referring to fig. 5, a third embodiment of the screen brightness adjusting method of the present invention is provided based on the first embodiment of the screen brightness adjusting method of the present invention.
In this embodiment, the step S3000 includes:
step S3100, comparing the proportion with a preset proportion;
step S3200, deleting the pixels in the interval in which the proportion is smaller than the preset proportion, and calculating the average value of the sensitization brightness of the pixels in the interval in which the proportion is greater than or equal to the preset proportion.
In this embodiment, after the ratio of the number of pixels in each interval to the total number of pixels is obtained through calculation, the ratio of the number of pixels in each interval to the total number of pixels needs to be compared with a preset ratio, pixels in an interval with a ratio smaller than the preset ratio are deleted, and then the average value of the sensitization brightness of the pixels in an interval with a ratio greater than or equal to the preset ratio is calculated. For example, deleting the pixels in the interval less than ten percent, and calculating the average value of the sensitization brightness of the pixels in the interval greater than or equal to ten percent. It is understood that the preset ratio is not limited to ten percent, but may be five percent, and the like, which are not listed herein.
Further, referring to fig. 6, a fourth embodiment of the screen brightness adjusting method of the present invention is provided based on the first embodiment of the screen brightness adjusting method of the present invention.
In this embodiment, the step S4000 includes:
step S4100, calculating and adjusting the average value of the sensitization brightness of the pixel points of the screen brightness according to the average value of the sensitization brightness of the pixel points of each interval;
step S4200, taking the average value of the sensitization brightness of the pixel points for adjusting the screen brightness as an environment sensitization value;
step S4300, extracting an environment photosensitive value and screen brightness level mapping table, and extracting a corresponding screen brightness level according to the environment photosensitive value;
and step S4400, adjusting the screen brightness according to the screen brightness level.
In this embodiment, adjusting the screen brightness according to the average value of the pixel photosensitive brightness specifically may be: firstly, calculating the average value of the sensitization brightness of the pixel points for adjusting the screen brightness according to the average value of the sensitization brightness of the pixel points in each interval, taking the average value of the sensitization brightness of the pixel points for adjusting the screen brightness as an environment sensitization value, then extracting a mapping table of the environment sensitization value and the screen brightness grade, extracting the corresponding screen brightness grade according to the environment sensitization value, and then adjusting the screen brightness according to the screen brightness grade. Specifically, the ambient light level-to-screen brightness level mapping table may be:
ambient light sensitivity value Screen brightness level
0~1cd/m2 1
0~2cd/m2 2
…… ……
>300cd/m2 255
Further, referring to fig. 7, a fifth embodiment of the screen brightness adjusting method of the present invention is proposed based on the fourth embodiment of the screen brightness adjusting method of the present invention.
In this embodiment, the step S4100 includes:
step S4110, analyzing the number of intervals with the proportion larger than or equal to the preset proportion;
step S4120, if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a first preset value, extracting the average value of the sensitization brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion, and taking the average value of the sensitization brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion as the average value of the sensitization brightness of the pixel points for adjusting the screen brightness;
step S4130, if the number of pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a second preset value, calculating and adjusting the average value of the photosensitive brightness of the screen brightness pixel points according to an algorithm corresponding to the second preset pixel point intervals;
step S4140, if the number of pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a third preset value, calculating and adjusting the average value of the photosensitive brightness of the screen brightness pixel points according to the algorithm corresponding to the third preset pixel point intervals.
In this embodiment, after the interval with the proportion greater than or equal to the preset proportion is obtained through calculation, the number of the intervals with the proportion greater than or equal to the preset proportion is firstly analyzed, if the number of the intervals with the proportion greater than or equal to the preset proportion is equal to a first preset value, the average value of the sensitization brightness of the pixels in the interval of the first preset value is extracted, and the average value of the sensitization brightness of the pixels in the interval of the first preset value is used as the average value of the sensitization brightness of the pixels for adjusting the screen brightness; in this embodiment, the first preset value may be 1, that is, when the number of the intervals with the proportion greater than or equal to the preset proportion is 1, directly extracting the average value of the sensitization brightness of the pixels with the proportion greater than or equal to the preset proportion, and taking the average value of the sensitization brightness of the pixels with the proportion greater than or equal to the preset proportion as the average value of the sensitization brightness of the pixels with the adjusted screen brightness. If the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a second preset value, calculating the average value of the photosensitive brightness of the pixels for adjusting the screen brightness according to an algorithm corresponding to the second preset value of the pixel point intervals; and if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a third preset value, calculating the average value of the photosensitive brightness of the pixels for adjusting the screen brightness according to an algorithm corresponding to the pixel point intervals with the third preset value.
Further, referring to fig. 8, a sixth embodiment of the screen brightness adjusting method of the present invention is proposed based on the fourth embodiment of the screen brightness adjusting method of the present invention.
In this embodiment, the step S4130 includes:
step S4131, determining whether the second preset pixel point interval is a continuous interval;
step S4132, if the average value of the pixel brightness of the second preset value interval is continuous, respectively extracting the average value of the pixel brightness of the second preset value interval, calculating the average value of the pixel brightness of the second preset value interval, and taking the average value of the pixel brightness of the second preset value interval as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
step S4133, if not, comparing the ratio of the number of the pixels in the second preset pixel interval to the total number of the pixels;
step S4134, delete the interval with low pixel point proportion and the average pixel point brightness value, obtain the average pixel point brightness value in the interval with high pixel point proportion, and use the average pixel point brightness value in the interval with high pixel point proportion as the average photosensitive brightness value of the pixel point for adjusting the screen brightness.
In this embodiment, if the number of pixel point intervals with the ratio greater than or equal to the preset ratio is equal to a second preset value, first, whether the pixel point intervals with the second preset value are continuous intervals is determined; specifically, in this embodiment, the second preset value may be 2, if 2 pixel intervals are continuous intervals, extracting the average luminance values of the pixels in the 2 intervals respectively, calculating the average luminance values of the pixels in the 2 intervals, and taking the average luminance values of the pixels in the 2 intervals as the average value of the photosensitive luminance of the pixels for adjusting the screen luminance; the method for calculating the average value of the pixel brightness between 2 intervals may specifically be: multiplying the average value of the pixel brightness of the first interval by the number of the pixels of the first interval to obtain a first product, then multiplying the average value of the pixel brightness of the second interval by the number of the pixels of the second interval to obtain a second product, adding the first product and the second product to obtain a total product, and then dividing the total product by the total number of the pixels of the first interval and the second interval to obtain the average value of the pixel brightness between the first interval and the second interval.
If the 2 pixel point intervals are discontinuous intervals, comparing the proportion of the number of the pixel points in the 2 pixel point intervals to the total number of the pixel points; deleting the interval with low pixel point proportion and the average pixel point brightness value, obtaining the average pixel point brightness value of the interval with high pixel point proportion, and taking the average pixel point brightness value of the interval with high pixel point proportion as the average photosensitive brightness value of the pixel point for adjusting the screen brightness.
Further, referring to fig. 9, a seventh embodiment of the screen brightness adjusting method of the present invention is proposed based on the fourth embodiment of the screen brightness adjusting method of the present invention.
In this embodiment, the step S4140 includes:
step S4141, judging whether the third or more than third preset pixel point interval is a continuous interval;
step S4142, if the continuous interval exists and only one continuous interval exists, respectively extracting the average value of the brightness of the pixel points in each interval in the continuous interval, calculating the average value of the brightness of the pixel points between each interval in the continuous interval, and taking the average value of the brightness of the pixel points between the continuous intervals as the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness;
step S4143, if the continuous interval exists, calculating the total pixel point proportion of each continuous interval, and comparing the total pixel point proportion of each continuous interval; extracting the average value of the pixel brightness of each interval in the continuous interval with high proportion of the total pixels, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
step S4144, if the average brightness value is not continuous, comparing the ratio of the number of the pixels in the interval of the third or more than the third preset pixel brightness average value to the total number of the pixels;
step S4145, obtaining the average value of the brightness of the pixel points in the interval with the highest pixel point proportion, and taking the average value of the brightness of the pixel points in the interval with the highest pixel point proportion as the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness.
In this embodiment, if the number of pixel point intervals with the ratio greater than or equal to the preset ratio is equal to or greater than a third preset value, in this embodiment, the third preset value may be 3, first, it is determined whether the pixel point intervals with the ratio greater than or equal to the third preset value are consecutive intervals; judging whether 3 or more than 3 pixel point intervals with the proportion larger than or equal to the preset proportion are continuous intervals or not, if the pixel point intervals with the proportion larger than or equal to the preset proportion are continuous intervals and only one continuous interval exists, respectively extracting the pixel point brightness average value of each interval in the continuous intervals, calculating the pixel point brightness average value of each interval in the continuous intervals, taking the pixel point brightness average value of each interval in the continuous intervals as the photosensitive brightness average value of the pixel point for adjusting the screen brightness, and if a plurality of continuous intervals exist, calculating the total pixel point proportion of each continuous interval and comparing the total pixel point proportion of each continuous interval; extracting the average value of the pixel brightness of each interval in the continuous interval with high proportion of the total pixels, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness; the specific algorithm calculates the average value of the brightness of the pixel points between 2 continuous intervals as above, and is not repeated herein. Then taking the average value of the brightness of the pixel points between 3 or more than 3 intervals as the average value of the photosensitive brightness of the pixel points for adjusting the brightness of the screen; if all the pixel point intervals with the proportion of more than 3 or more than 3 being greater than or equal to the preset proportion are discontinuous intervals, comparing the proportion of the number of the pixel points in the pixel point intervals with the proportion of more than 3 or more than 3 being greater than or equal to the preset proportion to the total number of the pixel points; and obtaining the average value of the pixel brightness of the interval with the highest pixel proportion, and taking the average value of the pixel brightness of the interval with the highest pixel proportion as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness.
The invention further provides a mobile terminal.
In the mobile terminal 100 shown in fig. 1, the processor 110 may be configured to execute the screen brightness adjustment program stored in the memory 109 to implement the following steps:
acquiring a digital image signal through a camera;
carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels;
dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point;
and adjusting the screen brightness according to the average value of the photosensitive brightness of the pixel points in each interval.
Further, the processor 110 may also execute the screen brightness adjustment program stored in the memory 109 to implement the following steps:
acquiring image data through a camera;
converting the image data into an electrical signal;
the electrical signal is converted into a digital image signal by an analog-to-digital conversion method.
Further, the processor 110 may also execute the screen brightness adjustment program stored in the memory 109 to implement the following steps:
comparing the ratio with a preset ratio;
and deleting the pixel points in the interval with the proportion smaller than the preset proportion, and calculating the average value of the photosensitive brightness of the pixel points in the interval with the proportion larger than or equal to the preset proportion.
Further, the processor 110 may also execute the screen brightness adjustment program stored in the memory 109 to implement the following steps:
calculating the average value of the sensitization brightness of the pixel points for adjusting the screen brightness according to the average value of the sensitization brightness of the pixel points in each interval;
taking the average value of the sensitization brightness of the pixel points for adjusting the screen brightness as an environment sensitization value;
extracting a mapping table of the ambient light sensing value and the screen brightness level, and extracting the corresponding screen brightness level according to the ambient light sensing value;
and adjusting the screen brightness according to the screen brightness level.
Further, the processor 110 may also execute the screen brightness adjustment program stored in the memory 109 to implement the following steps:
analyzing the number of intervals with the comparison ratio being greater than or equal to the preset ratio;
if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a first preset value, extracting the average value of the photosensitive brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion, and taking the average value of the photosensitive brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion as the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness;
if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a second preset value, calculating the average value of the photosensitive brightness of the pixels for adjusting the screen brightness according to an algorithm corresponding to the second preset value of the pixel point intervals;
and if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to or larger than a third preset value, calculating the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness according to an algorithm corresponding to the pixel point intervals with the third preset value.
Further, the processor 110 may also execute the screen brightness adjustment program stored in the memory 109 to implement the following steps:
judging whether the interval of the second preset number of pixel points is a continuous interval or not;
if the average values are continuous, respectively extracting the average values of the pixel point brightness in the second preset value intervals, calculating the average value of the pixel point brightness in the second preset value intervals, and taking the average value of the pixel point brightness in the second preset value intervals as the average value of the photosensitive brightness of the pixel point for adjusting the screen brightness;
if the number of the pixels in the second preset pixel interval is not continuous, comparing the ratio of the number of the pixels in the second preset pixel interval to the total number of the pixels;
deleting the interval with low pixel point proportion and the average pixel point brightness value, obtaining the average pixel point brightness value of the interval with high pixel point proportion, and taking the average pixel point brightness value of the interval with high pixel point proportion as the average photosensitive brightness value of the pixel point for adjusting the screen brightness.
Further, the processor 110 may also execute the screen brightness adjustment program stored in the memory 109 to implement the following steps:
judging whether the third or more than third preset pixel point interval is a continuous interval or not;
if the continuous interval exists, respectively extracting the average value of the pixel brightness of each interval in the continuous interval, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
if the continuous interval exists, calculating the proportion of the total pixel points of each continuous interval, and comparing the proportion of the total pixel points of each continuous interval; extracting the average value of the pixel brightness of each interval in the continuous interval with high proportion of the total pixels, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
if the average brightness value is not continuous, comparing the ratio of the number of the pixel points in the interval of the third or more than the third preset value pixel point brightness average value to the total number of the pixel points;
and obtaining the average value of the pixel brightness of the interval with the highest pixel proportion, and taking the average value of the pixel brightness of the interval with the highest pixel proportion as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness.
The specific embodiment of the mobile terminal of the present invention is basically the same as the embodiments of the screen brightness adjusting method, and is not described herein again.
The present invention also provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of:
acquiring a digital image signal through a camera;
carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels;
dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point;
and adjusting the screen brightness according to the average value of the photosensitive brightness of the pixel points in each interval.
Further, the one or more programs are executable by the one or more processors to also implement the steps of:
acquiring image data through a camera;
converting the image data into an electrical signal;
the electrical signal is converted into a digital image signal by an analog-to-digital conversion method.
Further, the one or more programs are executable by the one or more processors to also implement the steps of:
comparing the ratio with a preset ratio;
and deleting the pixel points in the interval with the proportion smaller than the preset proportion, and calculating the average value of the photosensitive brightness of the pixel points in the interval with the proportion larger than or equal to the preset proportion.
Further, the one or more programs are executable by the one or more processors to also implement the steps of:
calculating the average value of the sensitization brightness of the pixel points for adjusting the screen brightness according to the average value of the sensitization brightness of the pixel points in each interval;
taking the average value of the sensitization brightness of the pixel points for adjusting the screen brightness as an environment sensitization value;
extracting a mapping table of the ambient light sensing value and the screen brightness level, and extracting the corresponding screen brightness level according to the ambient light sensing value;
and adjusting the screen brightness according to the screen brightness level.
Further, the one or more programs are executable by the one or more processors to also implement the steps of:
analyzing the number of intervals with the comparison ratio being greater than or equal to the preset ratio;
if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a first preset value, extracting the average value of the photosensitive brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion, and taking the average value of the photosensitive brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion as the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness;
if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a second preset value, calculating the average value of the photosensitive brightness of the pixels for adjusting the screen brightness according to an algorithm corresponding to the second preset value of the pixel point intervals;
and if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to or larger than a third preset value, calculating the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness according to an algorithm corresponding to the pixel point intervals with the third preset value.
Further, the one or more programs are executable by the one or more processors to also implement the steps of:
judging whether the interval of the second preset number of pixel points is a continuous interval or not;
if the average values are continuous, respectively extracting the average values of the pixel point brightness in the second preset value intervals, calculating the average value of the pixel point brightness in the second preset value intervals, and taking the average value of the pixel point brightness in the second preset value intervals as the average value of the photosensitive brightness of the pixel point for adjusting the screen brightness;
if the number of the pixels in the second preset pixel interval is not continuous, comparing the ratio of the number of the pixels in the second preset pixel interval to the total number of the pixels;
deleting the interval with low pixel point proportion and the average pixel point brightness value, obtaining the average pixel point brightness value of the interval with high pixel point proportion, and taking the average pixel point brightness value of the interval with high pixel point proportion as the average photosensitive brightness value of the pixel point for adjusting the screen brightness.
Further, the one or more programs are executable by the one or more processors to also implement the steps of:
judging whether the third or more than third preset pixel point interval is a continuous interval or not;
if the continuous interval exists, respectively extracting the average value of the pixel brightness of each interval in the continuous interval, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
if the continuous interval exists, calculating the proportion of the total pixel points of each continuous interval, and comparing the proportion of the total pixel points of each continuous interval; extracting the average value of the pixel brightness of each interval in the continuous interval with high proportion of the total pixels, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
if the average brightness value is not continuous, comparing the ratio of the number of the pixel points in the interval of the third or more than the third preset value pixel point brightness average value to the total number of the pixel points;
and obtaining the average value of the pixel brightness of the interval with the highest pixel proportion, and taking the average value of the pixel brightness of the interval with the highest pixel proportion as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the screen brightness adjusting method and the mobile terminal, and is not described herein again.
It should also be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A screen brightness adjusting method is applied to a mobile terminal and is characterized by comprising the following steps:
acquiring a digital image signal through a camera;
carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels;
dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point;
adjusting the screen brightness according to the average value of the photosensitive brightness of the pixel points in each interval;
the step of calculating the average value of the sensitization brightness of the pixel points in each pixel point interval according to the proportion and the sensitization brightness value of each pixel point comprises the following steps:
comparing the ratio with a preset ratio;
and deleting the pixel points in the interval with the proportion smaller than the preset proportion, and calculating the average value of the photosensitive brightness of the pixel points in the interval with the proportion larger than or equal to the preset proportion.
2. The screen brightness adjustment method of claim 1, wherein the step of acquiring the digital image signal by the camera comprises:
acquiring image data through a camera;
converting the image data into an electrical signal;
the electrical signal is converted into a digital image signal by an analog-to-digital conversion method.
3. The method for adjusting the brightness of a screen according to claim 1, wherein the step of adjusting the brightness of the screen according to the average value of the brightness of the light-sensitive pixels in each interval comprises:
calculating the average value of the photosensitive brightness of the brightness pixel points of the adjusting screen according to the average value of the photosensitive brightness of the pixel points in each interval;
taking the average value of the sensitization brightness of the pixel points for adjusting the screen brightness as an environment sensitization value;
extracting a mapping table of the ambient light sensing value and the screen brightness level, and extracting the corresponding screen brightness level according to the ambient light sensing value;
and adjusting the screen brightness according to the screen brightness level.
4. The method for adjusting screen brightness according to claim 3, wherein the step of calculating the average value of the brightness pixel photosensitive brightness of the adjusted screen according to the average value of the pixel photosensitive brightness of each interval comprises:
analyzing the number of intervals with the comparison ratio being greater than or equal to the preset ratio;
if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a first preset value, extracting the average value of the photosensitive brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion, and taking the average value of the photosensitive brightness of the pixel points in the pixel point intervals with the proportion larger than or equal to the preset proportion as the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness;
if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to a second preset value, calculating the average value of the photosensitive brightness of the pixels for adjusting the screen brightness according to an algorithm corresponding to the second preset value of the pixel point intervals;
and if the number of the pixel point intervals with the proportion larger than or equal to the preset proportion is equal to or larger than a third preset value, calculating the average value of the photosensitive brightness of the pixel points for adjusting the screen brightness according to an algorithm corresponding to the pixel point intervals with the third preset value.
5. The method for adjusting screen brightness according to claim 4, wherein the step of calculating the average value of the photosensitive brightness of the pixels for adjusting screen brightness according to the algorithm corresponding to the second predetermined number of pixel intervals comprises:
judging whether the interval of the second preset number of pixel points is a continuous interval or not;
if the average values are continuous, respectively extracting the average values of the pixel point brightness in the second preset value intervals, calculating the average value of the pixel point brightness in the second preset value intervals, and taking the average value of the pixel point brightness in the second preset value intervals as the average value of the photosensitive brightness of the pixel point for adjusting the screen brightness;
if the number of the pixels in the second preset pixel interval is not continuous, comparing the ratio of the number of the pixels in the second preset pixel interval to the total number of the pixels;
deleting the interval with low pixel point proportion and the average pixel point brightness value, obtaining the average pixel point brightness value of the interval with high pixel point proportion, and taking the average pixel point brightness value of the interval with high pixel point proportion as the average photosensitive brightness value of the pixel point for adjusting the screen brightness.
6. The method for adjusting screen brightness according to claim 4, wherein the step of calculating the average value of the photosensitive brightness of the pixels for adjusting screen brightness according to the algorithm corresponding to the third predetermined pixel interval comprises:
judging whether the third or more than third preset pixel point interval is a continuous interval or not;
if the continuous interval exists, respectively extracting the average value of the pixel brightness of each interval in the continuous interval, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
if the continuous interval exists, calculating the proportion of the total pixel points of each continuous interval, and comparing the proportion of the total pixel points of each continuous interval; extracting the average value of the pixel brightness of each interval in the continuous interval with high proportion of the total pixels, calculating the average value of the pixel brightness between each interval in the continuous interval, and taking the average value of the pixel brightness between the continuous intervals as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness;
if the average brightness value is not continuous, comparing the ratio of the number of the pixel points in the interval of the third or more than the third preset value pixel point brightness average value to the total number of the pixel points;
and obtaining the average value of the pixel brightness of the interval with the highest pixel proportion, and taking the average value of the pixel brightness of the interval with the highest pixel proportion as the average value of the photosensitive brightness of the pixel for adjusting the screen brightness.
7. A mobile terminal is characterized in that the mobile terminal comprises a processor, a network interface, a user interface and a memory, wherein a screen brightness adjusting program is stored in the memory; the processor is used for executing the screen brightness adjusting program to realize the following steps:
acquiring a digital image signal through a camera;
carrying out pixel sensitization value processing on the digital image signal to obtain sensitization brightness values of all pixels;
dividing the pixel points according to a preset rule, calculating the proportion of the divided pixel points in each interval to the total number of the pixel points, and calculating the average value of the photosensitive brightness of the pixel points in each pixel point interval according to the proportion and the photosensitive brightness value of each pixel point;
adjusting the screen brightness according to the average value of the photosensitive brightness of the pixel points in each interval;
the step of calculating the average value of the sensitization brightness of the pixel points in each pixel point interval according to the proportion and the sensitization brightness value of each pixel point comprises the following steps:
comparing the ratio with a preset ratio;
and deleting the pixel points in the interval with the proportion smaller than the preset proportion, and calculating the average value of the photosensitive brightness of the pixel points in the interval with the proportion larger than or equal to the preset proportion.
8. The mobile terminal of claim 7, wherein the processor is further configured to execute the screen brightness adjustment program to perform the steps of:
acquiring image data through a camera;
converting the image data into an electrical signal;
the electrical signal is converted into a digital image signal by an analog-to-digital conversion method.
9. A computer-readable storage medium having a screen brightness adjustment program stored thereon, the screen brightness adjustment program when executed by a processor implementing the steps of the screen brightness adjustment method according to any one of claims 1 to 6.
CN201710912884.1A 2017-09-29 2017-09-29 Screen brightness adjusting method, mobile terminal and readable storage medium Active CN107645606B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710912884.1A CN107645606B (en) 2017-09-29 2017-09-29 Screen brightness adjusting method, mobile terminal and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710912884.1A CN107645606B (en) 2017-09-29 2017-09-29 Screen brightness adjusting method, mobile terminal and readable storage medium

Publications (2)

Publication Number Publication Date
CN107645606A CN107645606A (en) 2018-01-30
CN107645606B true CN107645606B (en) 2021-02-05

Family

ID=61111765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710912884.1A Active CN107645606B (en) 2017-09-29 2017-09-29 Screen brightness adjusting method, mobile terminal and readable storage medium

Country Status (1)

Country Link
CN (1) CN107645606B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11250813B2 (en) 2018-04-04 2022-02-15 Huawei Technologies Co., Ltd. Ambient light detection method and terminal
CN109088983A (en) * 2018-07-12 2018-12-25 奇酷互联网络科技(深圳)有限公司 Screen backlight adjusting method, device, readable storage medium storing program for executing and mobile terminal
CN110956938A (en) * 2018-09-26 2020-04-03 北京小米移动软件有限公司 Screen brightness adjusting method and device, electronic equipment and readable storage medium
CN109947228A (en) * 2019-03-27 2019-06-28 努比亚技术有限公司 A kind of display panel control method, device and computer readable storage medium
CN109947230A (en) * 2019-03-29 2019-06-28 广东小天才科技有限公司 Screen brightness adjusting method and device of terminal equipment and terminal equipment
CN110189692B (en) * 2019-05-31 2023-07-04 京东方科技集团股份有限公司 Pixel circuit, pixel driving method, display panel and display device
CN110855827A (en) * 2019-09-27 2020-02-28 珠海格力电器股份有限公司 Brightness adjusting method and device, terminal and storage medium
CN111402121A (en) * 2020-03-20 2020-07-10 上海眼控科技股份有限公司 Image style conversion method and device, computer equipment and storage medium
CN117116203A (en) * 2022-08-29 2023-11-24 深圳市Tcl云创科技有限公司 Screen brightness adjustment method and device, storage medium and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8103118B2 (en) * 2004-12-21 2012-01-24 Motorola Mobility, Inc. Electronic device with optoelectronic input/output compensation function for a display
CN1856028A (en) * 2005-04-28 2006-11-01 明基电通股份有限公司 Camera and method for taking picture compensation
CN103165103A (en) * 2011-12-12 2013-06-19 深圳富泰宏精密工业有限公司 Brightness adjustment system of electronic device display screen and brightness adjustment method of electronic device display screen
CN104113617A (en) * 2013-04-16 2014-10-22 深圳富泰宏精密工业有限公司 Backlight brightness adjusting system and backlight brightness adjusting method
CN104184958B (en) * 2014-09-17 2017-07-11 中国科学院光电技术研究所 Automatic exposure control method and device based on FPGA (field programmable Gate array) and suitable for space detection imaging
CN106131412B (en) * 2016-07-12 2019-04-30 浙江宇视科技有限公司 A kind of image processing method, system and electronic equipment
CN106952244B (en) * 2017-03-28 2020-05-05 中航视嘉(北京)技术有限公司 Automatic image brightness adjusting method and device

Also Published As

Publication number Publication date
CN107645606A (en) 2018-01-30

Similar Documents

Publication Publication Date Title
CN107645606B (en) Screen brightness adjusting method, mobile terminal and readable storage medium
CN107731199B (en) Screen color temperature adjusting method, terminal and computer readable storage medium
CN107506163B (en) Method for adjusting screen display, terminal and computer readable storage medium
CN107295270B (en) Image brightness value determination method and device, terminal and computer-readable storage medium
CN107067842B (en) Color value adjusting method, mobile terminal and storage medium
CN108198150B (en) Method for eliminating image dead pixel, terminal and storage medium
CN112822538A (en) Screen projection display method, screen projection device, terminal and storage medium
CN109151216B (en) Application starting method, mobile terminal, server and computer readable storage medium
CN110955397A (en) Method for setting frame rate of game terminal, game terminal and storage medium
CN110069122B (en) Screen control method, terminal and computer readable storage medium
CN109491577B (en) Holding interaction method and device and computer readable storage medium
CN112437472B (en) Network switching method, equipment and computer readable storage medium
CN111381762A (en) Double-screen switching method and device and computer readable storage medium
CN113222850A (en) Image processing method, device and computer readable storage medium
CN109375979B (en) Flow control method, terminal and readable storage medium
CN109710168B (en) Screen touch method and device and computer readable storage medium
CN108196924B (en) Brightness adjusting method, terminal and computer readable storage medium
CN107844353B (en) Display method, terminal and computer readable storage medium
CN108183833B (en) Response processing method and device and computer readable storage medium
CN108037959B (en) Intelligent interface merging method, mobile terminal and computer readable storage medium
CN108040330B (en) WiFi directional transmission method, mobile terminal and readable storage medium
CN107155008B (en) A kind of display methods of communications records, terminal and computer readable storage medium
CN112203022B (en) Electrochromic control method and device and computer readable storage medium
CN111476231B (en) Image area identification method, device and computer readable storage medium
CN107742279A (en) A kind of image processing method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant