CN108520727B - Screen brightness adjusting method and mobile terminal - Google Patents

Screen brightness adjusting method and mobile terminal Download PDF

Info

Publication number
CN108520727B
CN108520727B CN201810266284.7A CN201810266284A CN108520727B CN 108520727 B CN108520727 B CN 108520727B CN 201810266284 A CN201810266284 A CN 201810266284A CN 108520727 B CN108520727 B CN 108520727B
Authority
CN
China
Prior art keywords
brightness
mobile terminal
image
sub
parameter
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
CN201810266284.7A
Other languages
Chinese (zh)
Other versions
CN108520727A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810266284.7A priority Critical patent/CN108520727B/en
Publication of CN108520727A publication Critical patent/CN108520727A/en
Application granted granted Critical
Publication of CN108520727B publication Critical patent/CN108520727B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/10Intensity circuits

Abstract

The invention provides a screen brightness adjusting method and a mobile terminal, and relates to the technical field of mobile terminals, wherein the method comprises the following steps: the method comprises the steps of obtaining an environment brightness value, obtaining the number of bright pixels in an image displayed by the mobile terminal under the condition that the environment brightness value is smaller than a brightness threshold value, and adjusting the brightness of a screen of the mobile terminal according to a proportion parameter corresponding to the bright pixels. Whether the screen brightness needs to be adjusted or not is determined through the acquired environment brightness value, when the environment brightness value is smaller than the brightness threshold value, the number of bright pixels in the image displayed at present is acquired, a proportion parameter corresponding to the bright pixels is obtained by combining the number of all the pixels in the image, and finally the brightness of the screen is adjusted according to the proportion parameter, so that the brightness of the screen can be accurately adjusted, the mobile terminal can acquire a clear face image after the screen brightness is adjusted, and the accuracy and flexibility of adjusting the screen brightness are improved.

Description

Screen brightness adjusting method and mobile terminal
Technical Field
The embodiment of the invention relates to the technical field of mobile terminals, in particular to a screen brightness adjusting method and a mobile terminal.
Background
With the continuous development of the mobile terminal, the mobile terminal can not only shoot an object or a landscape image through the rear camera, but also can acquire a face image of a user through the front camera so as to meet different requirements of the user, such as self-shooting, mobile terminal unlocking, quick payment and the like.
In the related art, under the condition that the mobile terminal is in an environment with a low brightness degree, that is, under the condition that the mobile terminal is in a dark environment, if the mobile terminal needs to collect a face image of a user, the screen brightness of the mobile terminal can be adjusted, so that the brightness degree of the current environment is improved, and a clear face image is obtained.
However, the existing method for adjusting the screen brightness still has the problem of being inaccurate, such as too dark or too bright screen.
Disclosure of Invention
The embodiment of the invention provides a screen brightness adjusting method and a mobile terminal, and aims to solve the problem that screen brightness is not accurately adjusted in the prior art.
In order to solve the technical problem, the invention is realized as follows: a method of screen brightness adjustment, comprising:
acquiring an environment brightness value; the environment brightness value is used for representing the brightness degree of the current environment of the mobile terminal;
under the condition that the environmental brightness value is smaller than a brightness threshold value, acquiring the number of bright pixels in an image displayed by the mobile terminal; the bright pixels are pixels with the brightness parameter value larger than the brightness threshold value;
adjusting the brightness of a screen of the mobile terminal according to the proportional parameter corresponding to the bright pixel; the scaling parameter is derived from the number of bright pixels and the number of all pixels in the image.
An embodiment of the present invention further provides a mobile terminal, where the mobile terminal includes:
the first acquisition module is used for acquiring an environment brightness value; the environment brightness value is used for representing the brightness degree of the current environment of the mobile terminal;
the second acquisition module is used for acquiring the number of bright pixels in an image displayed by the mobile terminal under the condition that the environmental brightness value is smaller than a brightness threshold value; the bright pixels are pixels with the brightness parameter value larger than the brightness threshold value;
the adjusting module is used for adjusting the brightness of the screen of the mobile terminal according to the proportional parameter corresponding to the bright pixel; the scaling parameter is derived from the number of bright pixels and the number of all pixels in the image.
The embodiment of the invention provides a mobile terminal, which comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the screen brightness adjusting method are realized.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the screen brightness adjusting method according to any one of the above screen brightness adjusting methods.
In the embodiment of the invention, whether the mobile terminal needs to adjust the screen brightness is determined through the acquired environment brightness value, when the environment brightness value is smaller than the brightness threshold value, the screen brightness needs to be adjusted by the mobile terminal can be determined, the number of bright pixels in the currently displayed image is acquired, the proportion parameter corresponding to the bright pixels is obtained by combining the number of all pixels in the image, and finally the brightness of the screen is adjusted according to the proportion parameter corresponding to the bright pixels, so that the brightness of the screen can be accurately adjusted, the mobile terminal can acquire a clear face image after the screen brightness is adjusted, and the accuracy and the flexibility of adjusting the screen brightness are improved.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for adjusting screen brightness according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a method for adjusting brightness of a screen according to an embodiment of the present invention;
fig. 3 is a block diagram of a mobile terminal according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a mobile terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart illustrating steps of a screen brightness adjusting method according to an embodiment of the present invention is shown, which may specifically include the following steps:
step 101, obtaining an environment brightness value.
When the mobile terminal is in an environment with a dark and dark degree, if the mobile terminal needs to acquire a face image through the front camera, the brightness of the screen of the mobile terminal needs to be adjusted according to the light and dark degree of the current environment.
Therefore, the mobile terminal may acquire the ambient brightness value before adjusting the brightness of the screen, so as to adjust the brightness of the screen according to the ambient brightness value in a subsequent step. The environment brightness value is used for representing the brightness degree of the environment where the mobile terminal is located currently.
Specifically, when the mobile terminal detects that a face image is acquired through the front camera, the brightness of the current environment can be detected through the preset photosensitive sensor, so that the environment brightness value of the current environment can be acquired.
And 102, acquiring the number of bright pixels in the image displayed by the mobile terminal under the condition that the environmental brightness value is smaller than the brightness threshold value.
When the ambient brightness value acquired by the mobile terminal through the photosensitive sensor is smaller than the preset brightness threshold, it is indicated that the mobile terminal is currently located in a darker environment and cannot acquire a clear face image, and therefore, the number of bright pixels in an image displayed by the mobile terminal needs to be acquired, so that in the subsequent steps, the screen brightness of the mobile terminal can be adjusted by combining the acquired bright pixels in the image.
Wherein the bright pixel may be a pixel having a shading parameter value greater than a shading threshold value. Moreover, the brightness parameter Value may be a color level, may also be a luminance in an HSV (Hue-Saturation-Value) color space, and may also be another type of parameter, and the embodiment of the present invention does not limit the brightness parameter Value.
Specifically, when the ambient brightness value is smaller than the brightness threshold, the currently displayed image on the screen of the mobile terminal may be captured to obtain the currently displayed image, the obtained image is analyzed to determine a brightness parameter value of each pixel in the image, and then the pixels with the brightness parameter value larger than the brightness threshold are counted, that is, the bright pixels are counted to obtain the number of the bright pixels.
The brightness threshold may be determined according to an environment where the mobile terminal is located, such as a time, a date, a geographic location, and the like, which is not limited in the embodiment of the present invention.
And 103, adjusting the brightness of the screen of the mobile terminal according to the proportional parameter corresponding to the bright pixel.
The scaling parameter may be obtained according to the number of bright pixels and the number of all pixels in the image, for example, a quotient between the number of bright pixels and the total number of pixels included in the image may be used as the scaling parameter.
After the mobile terminal obtains the number of the bright pixels in the image, the proportion parameters corresponding to the bright pixels can be determined according to the number of the bright pixels, so that the brightness of the image displayed by the mobile terminal is determined, and finally, the brightness of the screen is adjusted according to the brightness of the displayed image.
Specifically, the mobile terminal can calculate a proportion parameter corresponding to the bright pixels according to the number of the bright pixels and the total number of all pixels in the image, compare the proportion parameter with a preset threshold value, determine the brightness of the image displayed by the mobile terminal according to a comparison result, and adjust the screen brightness of the mobile terminal according to the brightness of the displayed image and the brightness required by obtaining a clear face image, so that the clear face image can be obtained.
For example, if the total number of all pixels in the image is 100 and the number of bright pixels is 63, it may be determined that the ratio parameter corresponding to the bright pixels is 63/100 × 100 — 63%, and then the ratio parameter 63% corresponding to the bright pixels is compared with a preset threshold 60%, and it is determined that the ratio parameter corresponding to the bright pixels is greater than the preset threshold, it may be determined that the image currently displayed by the mobile terminal belongs to a bright color system image, and finally, the screen brightness of the mobile terminal is adjusted according to the brightness adjustment interval corresponding to the bright color system image.
In summary, the screen brightness adjusting method provided in the embodiment of the present invention determines whether the mobile terminal needs to adjust the screen brightness through the obtained environment brightness value, when the environment brightness value is smaller than the brightness threshold, it may determine that the mobile terminal needs to adjust the screen brightness, then obtain the number of bright pixels in the currently displayed image, and obtain the ratio parameter corresponding to the bright pixels by combining the number of all pixels in the image, and finally adjust the brightness of the screen according to the ratio parameter corresponding to the bright pixels, so that the brightness of the screen can be accurately adjusted, so that the mobile terminal can obtain a clear face image after adjusting the screen brightness, and the accuracy and flexibility of adjusting the screen brightness are improved.
Referring to fig. 2, a flowchart illustrating steps of a screen brightness adjusting method according to an embodiment of the present invention is shown, which may specifically include the following steps:
step 201, judging whether the camera is used for collecting a face image or not, and obtaining a judgment result.
The mobile terminal can start the camera according to the operation of a user, shoot images through the camera, shoot scenery and collect face images. However, in the process of acquiring the face image, the mobile terminal needs to adjust the brightness of the screen according to the brightness of the current environment so as to acquire a clear face image and meet the corresponding requirements of the user.
Therefore, in order to avoid that the mobile terminal adjusts the screen brightness when the face image does not need to be acquired, whether the camera of the mobile terminal is used for acquiring the face image or not can be judged first, and a judgment result is obtained, so that whether the screen brightness needs to be adjusted or not can be determined according to the judgment result in the subsequent steps.
Optionally, the state of the camera of the mobile terminal can be monitored, and when the mobile terminal monitors that the camera is in an open state, whether the camera is used for acquiring a face image can be judged to obtain a judgment result.
Specifically, the mobile terminal can monitor whether the user opens the camera in real time, and when the situation that the camera of the mobile terminal is changed from a closed state to an open state is monitored, whether the camera is used for acquiring the face image or not can be judged according to the current state of the mobile terminal, an application program for acquiring the image through the camera, a function corresponding to the operation of opening the camera triggered by the user and the like, so that a judgment result is obtained.
For example, if the mobile terminal monitors that the user opens the front-facing camera, the current state of the mobile terminal may be acquired. If the mobile terminal is in a screen locking state and the camera opening operation triggered by the user corresponds to unlocking the function of the mobile terminal, the camera can be determined to be used for collecting the face image, and therefore a judgment result is obtained.
And step 202, acquiring an environment brightness value when the judgment result indicates that the camera is used for acquiring the face image.
This step 202 is similar to step 101 and will not be described herein again.
Step 203, a brightness threshold is obtained.
Due to the influences of time, seasons and geographical positions, the brightness degrees of the environments of the mobile terminal at different moments, different seasons and different geographical positions are different, and therefore the brightness threshold corresponding to the current environment can be obtained according to the environment of the mobile terminal.
Optionally, the mobile terminal may obtain an environmental parameter, and determine a brightness threshold corresponding to the environmental parameter according to a preset corresponding relationship. Wherein the environment parameter may include at least one of a geographical location of the mobile terminal, a current date, and a current time of day.
Specifically, the mobile terminal may obtain a current date, that is, a date corresponding to the current year, month, and day, according to the system parameters, and determine a current season; the geographic position can also be obtained according to the system parameters, and the longitude and latitude where the mobile terminal is located are determined; the current time can be obtained according to the system parameters, and whether the mobile terminal is in a daytime environment or a nighttime environment is determined by combining the current date and the geographic position. And then searching for a brightness threshold corresponding to the acquired environment parameter in a preset corresponding relation, thereby obtaining the brightness threshold corresponding to the current environment.
It should be noted that step 203 may be executed before step 202, that is, step 203 is executed after step 201 determines that the camera needs to capture a face image, and step 203 may also be executed simultaneously with step 202, which is not limited in the embodiment of the present invention.
And 204, acquiring the number of bright pixels in the image displayed by the mobile terminal under the condition that the environmental brightness value is smaller than the brightness threshold value.
Wherein the bright pixel is a pixel with a shading parameter value greater than a shading threshold value.
If the mobile terminal determines that the environment brightness value is smaller than the brightness threshold after comparing the environment brightness value with the brightness threshold, it indicates that the mobile terminal needs to adjust the brightness of the screen to enhance the brightness of the current environment.
Moreover, in order to accurately adjust the screen brightness of the mobile terminal, the mobile terminal can also acquire the brightness of the currently displayed image, so as to adjust the brightness of the screen according to the brightness of the image. Thus, step 204 may include either of steps 204a and 204b to determine the shading of the currently displayed image.
And 204a, determining a brightness parameter value of each pixel in the image displayed by the mobile terminal, and counting the pixels with the brightness parameter value larger than a brightness threshold value to obtain the number of bright pixels.
Specifically, when the mobile terminal determines that the environmental brightness value is smaller than the brightness threshold, the image currently displayed by the mobile terminal may be captured, the captured image may be analyzed to obtain a brightness parameter value of each pixel in the image, the brightness parameter value of each pixel may be compared with a preset brightness threshold, and a pixel whose brightness parameter value is greater than the brightness threshold may be used as a bright pixel according to a comparison result.
After determining the bright pixels in the image, the mobile terminal may count the determined bright pixels, and finally obtain the number of the bright pixels, so as to adjust the brightness of the screen according to the number of the bright pixels in the subsequent step.
For example, when the mobile terminal displays an image of a night scene, the number of bright pixels in the image is small; however, if the image displayed by the mobile terminal is an image of a daytime scene, the number of bright pixels in the image is large.
And 204b, dividing the image displayed by the mobile terminal to obtain at least two sub-images, analyzing each sub-image to obtain a brightness and darkness parameter value of each pixel in each sub-image, and counting the pixels of which the brightness and darkness parameter values are greater than a brightness and darkness threshold value in each sub-image to obtain the number of the bright pixels corresponding to each sub-image.
The mobile terminal can divide the displayed image into a plurality of areas, and the image displayed in each area is used as a sub-image to obtain a plurality of sub-images. Since the content displayed by each sub-image may be different, and the number of bright pixels included in each sub-image may also be different, the mobile terminal may adjust the brightness of the screen corresponding to the area where each sub-image is located according to the number of bright pixels in each sub-image in the subsequent steps.
Specifically, the mobile terminal may divide the displayed image into at least two sub-images, analyze each pixel in each sub-image to obtain a brightness parameter value of each pixel in each sub-image, and compare the brightness parameter value of each pixel with a preset brightness threshold value to obtain the number of bright pixels corresponding to each sub-image.
Similar to step 204a, the mobile terminal may further obtain a brightness parameter value of each pixel in the image, so as to determine the bright pixels in the image, determine the sub-images to which the bright pixels belong according to the coordinate information corresponding to each bright pixel, and finally determine the number of the bright pixels corresponding to each sub-image.
Of course, the number of bright pixels corresponding to each sub-image may also be determined in other manners, which is not limited in the embodiment of the present invention.
Step 205, adjusting the brightness of the screen of the mobile terminal according to the proportional parameter corresponding to the bright pixel.
Wherein the scaling parameter is derived from the number of bright pixels and the number of all pixels in the image.
After the number of bright pixels in the displayed image is determined, the mobile terminal can calculate the proportion parameter corresponding to the bright pixels according to the number of the bright pixels, and finally adjust the brightness of the screen according to the proportion parameter, so that the mobile terminal can collect clear face images.
Since the number of bright pixels can be obtained in different ways in step 204, the brightness of the screen can also be adjusted in different ways in this step 205. Therefore, step 205 may also include any one of step 205a and step 205b, corresponding to step 204:
step 205a, when the ratio parameter corresponding to the bright pixel is greater than the preset threshold, adjusting the brightness of the screen of the mobile terminal according to the brightness adjustment parameter in the first brightness interval, and/or when the ratio parameter corresponding to the bright pixel is not greater than the preset threshold, adjusting the brightness of the screen of the mobile terminal according to the brightness adjustment parameter in the second brightness interval.
And the maximum brightness adjusting parameter value of the first brightness interval is smaller than the minimum brightness adjusting parameter value of the second brightness interval. For example, the brightness adjustment parameter corresponding to the first brightness interval may be (0, 30%), and the brightness adjustment parameter corresponding to the second brightness interval may be [ 30%, 1 ].
The mobile terminal can calculate according to the number of the bright pixels and the number of all pixels in the currently displayed image to obtain a proportion parameter corresponding to the bright pixels, and then compares the proportion parameter with a preset threshold value to determine the brightness degree of the currently displayed image. When the ratio parameter corresponding to the bright pixel is greater than the preset threshold, which indicates that the currently displayed image belongs to an image of a bright color system, the mobile terminal may perform a small amount of adjustment on the brightness of the screen of the mobile terminal according to the brightness adjustment parameter included in the first brightness interval.
However, if the ratio parameter corresponding to the bright pixel is less than or equal to the preset threshold, which indicates that the currently displayed image belongs to a dark image, the mobile terminal may perform a large amount of adjustments on the screen brightness of the mobile terminal according to the brightness adjustment parameter included in the second brightness interval, so as to improve the brightness of the current environment, so as to obtain a clear face image.
It should be noted that the brightness of the environment required by the mobile terminal to acquire a clear face image is not changed, but the brightness of the image currently displayed by the mobile terminal is different. Therefore, the brightness adjustment parameter corresponding to the current environment can be selected from the first brightness interval or the second brightness interval according to the brightness required by the mobile terminal and the brightness of the currently displayed image, and the adjustment of the screen brightness is completed.
Step 205b, selecting a first sub-image and a second sub-image from the at least two sub-images, and adjusting the brightness of the screen corresponding to the area where each first sub-image of the at least two sub-images is located according to the brightness adjustment parameter in the first brightness interval; and adjusting the brightness of the screen corresponding to the area where each second sub-image in the at least two sub-images is located according to the brightness adjustment parameter in the second brightness interval.
The proportion parameter corresponding to the bright pixel in the first sub-image is larger than a preset threshold value, and the proportion parameter corresponding to the bright pixel in the second sub-image is not larger than the preset threshold value.
The mobile terminal can calculate according to the number of bright pixels of each sub-image in at least two sub-images, determine the proportion of the bright pixels in each sub-image in the corresponding sub-image, obtain the proportion parameter corresponding to the bright pixels of each sub-image, compare the proportion parameter with a preset threshold value, determine whether each sub-image belongs to a bright color system image or a dark color system image, thereby dividing each sub-image into a first sub-image and a second sub-image, finally adjust the screen brightness of the area to which each first sub-image belongs according to the brightness adjustment parameter in the first brightness interval, and adjust the screen brightness of the area to which each second sub-image belongs according to the brightness adjustment parameter in the second brightness interval.
It should be noted that, the brightness adjustment parameter in the first brightness interval or the second brightness interval of the mobile terminal adjusts the brightness of the screen corresponding to the area where each sub-image is located, similar to step 205a, and is not described herein again.
In summary, the screen brightness adjusting method provided in the embodiment of the present invention determines whether the mobile terminal needs to adjust the screen brightness through the obtained environment brightness value, when the environment brightness value is smaller than the brightness threshold, it may determine that the mobile terminal needs to adjust the screen brightness, then obtain the number of bright pixels in the currently displayed image, and obtain the ratio parameter corresponding to the bright pixels by combining the number of all pixels in the image, and finally adjust the brightness of the screen according to the ratio parameter corresponding to the bright pixels, so that the brightness of the screen can be accurately adjusted, so that the mobile terminal can obtain a clear face image after adjusting the screen brightness, and the accuracy and flexibility of adjusting the screen brightness are improved.
Further, the image displayed by the mobile terminal is obtained and analyzed to obtain the bright pixels with the brightness parameter value larger than the brightness threshold value, the number of the bright pixels is determined, and the number of the bright pixels in the image currently displayed by the mobile terminal can be determined by analyzing the image currently displayed by the mobile terminal, so that the brightness of the screen can be accurately adjusted according to the number of the bright pixels, and the accuracy of adjusting the brightness is improved.
Furthermore, the brightness adjustment parameters in different brightness intervals are adopted to adjust the screen brightness in different size relations through the size relation between the proportional parameter corresponding to the bright pixel and the preset threshold value, so that the adjustment intensity of the screen displaying the dark color system image is always higher than that of the screen displaying the bright color system image, and the accuracy of adjusting the screen brightness is improved.
Furthermore, at least two sub-images are obtained by dividing the currently displayed image, so that the screen brightness corresponding to each sub-image is respectively adjusted according to the bright pixel in each sub-image, the brightness of the corresponding screen can be adjusted according to the content displayed by different sub-images, and the accuracy of adjusting the brightness can be improved.
Further, by monitoring the state of the camera, when the camera is monitored to be in an open state, whether the camera needs to collect a face image or not is judged, if the face image needs to be collected, an environment brightness value can be obtained and subsequent steps can be executed, however, if the camera does not need to collect the face image, the subsequent steps can not be executed, the condition that the screen brightness is still adjusted without collecting the face image is avoided, and the operation cost for shooting the image is saved.
Further, according to the environment parameters of the environment where the mobile terminal is located, the brightness threshold corresponding to the environment parameters is obtained, the environment parameters may include at least one of a geographic position, a current date and a current time, and different brightness thresholds are determined through different environment parameters, so that whether the mobile terminal needs to adjust the screen brightness is judged more accurately, and the accuracy of adjusting the screen brightness is improved.
Referring to fig. 3, a block diagram of a mobile terminal according to an embodiment of the present invention is shown, which may specifically include:
a first obtaining module 301, configured to obtain an environment brightness value; the environment brightness value is used for representing the brightness degree of the current environment of the mobile terminal;
a second obtaining module 302, configured to obtain the number of bright pixels in the image displayed by the mobile terminal when the ambient brightness value is smaller than a brightness threshold; the bright pixel is a pixel with a brightness parameter value larger than a brightness threshold value;
an adjusting module 303, configured to adjust the brightness of the screen of the mobile terminal according to the proportional parameter corresponding to the bright pixel; the scaling parameter is derived from the number of bright pixels and the number of all pixels in the image.
Optionally, the second obtaining module 302 may include:
the parameter determination submodule is used for determining the brightness parameter value of each pixel in the image displayed by the mobile terminal;
and the counting submodule is used for counting the pixels of which the brightness parameter values are larger than the brightness threshold value to obtain the number of the bright pixels.
Optionally, the adjusting module 303 may include:
the first adjusting submodule is used for adjusting the brightness of the screen of the mobile terminal according to the brightness adjusting parameter in the first brightness interval when the proportion parameter corresponding to the bright pixel is larger than the preset threshold value; and/or
And the second adjusting submodule is used for adjusting the brightness of the screen of the mobile terminal according to the brightness adjusting parameter in a second brightness interval when the proportion parameter corresponding to the bright pixel is not greater than the preset threshold, and the maximum brightness adjusting parameter value of the first brightness interval is smaller than the minimum brightness adjusting parameter value of the second brightness interval.
Optionally, the second obtaining module 302 may include:
the image dividing submodule is used for dividing the image displayed by the mobile terminal to obtain at least two sub-images;
the image analysis submodule is used for analyzing each sub-image to obtain a brightness parameter value of each pixel in each sub-image;
and the counting submodule is used for counting the pixels of which the brightness parameter values are larger than the brightness threshold value in each sub-image to obtain the number of the bright pixels corresponding to each sub-image.
Optionally, the adjusting module 303 may include:
a selecting sub-module, configured to select a first sub-image and a second sub-image from the at least two sub-images, where a ratio parameter corresponding to a bright pixel in the first sub-image is greater than a preset threshold, and a ratio parameter corresponding to a bright pixel in the second sub-image is not greater than the preset threshold;
the first adjusting submodule is used for adjusting the brightness of the screen corresponding to the area where each first sub-image of the at least two sub-images is located according to the brightness adjusting parameter in the first brightness interval;
and the second adjusting submodule is used for adjusting the brightness of the screen corresponding to the area where each second sub-image of the at least two sub-images is located according to the brightness adjusting parameter in the second brightness interval.
Optionally, the mobile terminal may further include:
the monitoring module is used for monitoring the state of a camera of the mobile terminal;
the judging module is used for judging whether the camera needs to acquire a face image or not when the camera is monitored to be in an open state, and obtaining a judging result;
the first obtaining module 301 may include:
and the obtaining submodule is used for obtaining the environment brightness value when the judgment result indicates that the camera needs to collect a face image.
Optionally, the mobile terminal may further include:
a third obtaining module, configured to obtain an environmental parameter, where the environmental parameter includes at least one of a geographic location, a current date, and a current time of the mobile terminal;
and the threshold value determining module is used for determining the brightness threshold value corresponding to the environment parameter according to the preset corresponding relation.
The mobile terminal provided in the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
In summary, the mobile terminal provided in the embodiment of the present invention determines whether the mobile terminal needs to adjust the screen brightness through the obtained environment brightness value, when the environment brightness value is smaller than the brightness threshold, it may determine that the mobile terminal needs to adjust the screen brightness, then obtain the number of bright pixels in the currently displayed image, and obtain the proportion parameter corresponding to the bright pixels by combining the number of all pixels in the image, and finally adjust the brightness of the screen according to the proportion parameter corresponding to the bright pixels, so that the brightness of the screen can be accurately adjusted, so that the mobile terminal can obtain a clear face image after adjusting the screen brightness, and the accuracy and flexibility of adjusting the screen brightness are improved.
Fig. 4 is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, where the mobile terminal 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The sensor 405 is configured to acquire an environment brightness value; the environment brightness value is used for representing the brightness degree of the current environment of the mobile terminal;
a processor 410, configured to obtain the number of bright pixels in an image displayed by the mobile terminal if the ambient brightness value is less than a brightness threshold; the bright pixels are pixels with the brightness parameter value larger than the brightness threshold value;
the processor 410 is further configured to adjust the brightness of the screen of the mobile terminal according to the proportional parameter corresponding to the bright pixel; the scaling parameter is derived from the number of bright pixels and the number of all pixels in the image.
In summary, the mobile terminal provided in the embodiment of the present invention determines whether the mobile terminal needs to adjust the screen brightness through the obtained environment brightness value, when the environment brightness value is smaller than the brightness threshold, it may determine that the mobile terminal needs to adjust the screen brightness, then obtain the number of bright pixels in the currently displayed image, and obtain the proportion parameter corresponding to the bright pixels by combining the number of all pixels in the image, and finally adjust the brightness of the screen according to the proportion parameter corresponding to the bright pixels, so that the brightness of the screen can be accurately adjusted, so that the mobile terminal can obtain a clear face image after adjusting the screen brightness, and the accuracy and flexibility of adjusting the screen brightness are improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 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. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the mobile terminal 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The mobile terminal 400 also includes at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 4061 and/or the backlight when the mobile terminal 400 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), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 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 407 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 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, 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 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 408 is an interface through which an external device is connected to the mobile terminal 400. 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 408 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 400 or may be used to transmit data between the mobile terminal 400 and external devices.
The memory 409 may be used to store software programs as well as various data. The memory 409 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 409 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 410 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 409 and calling data stored in the memory 409, thereby integrally monitoring the mobile terminal. Processor 410 may include one or more processing units; preferably, the processor 410 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 410.
The mobile terminal 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 400 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 410, a memory 409, and a computer program stored in the memory 409 and capable of running on the processor 410, and when being executed by the processor 410, the computer program implements each process of the above-mentioned screen brightness adjusting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned screen brightness adjustment method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should 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 (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.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (7)

1. A screen brightness adjusting method is applied to a mobile terminal, and is characterized by comprising the following steps:
acquiring an environment brightness value; the environment brightness value is used for representing the brightness degree of the current environment of the mobile terminal;
under the condition that the environmental brightness value is smaller than a brightness threshold value, acquiring the number of bright pixels in an image displayed by the mobile terminal; the bright pixels are pixels with the brightness parameter value larger than the brightness threshold value;
adjusting the brightness of a screen of the mobile terminal according to the proportional parameter corresponding to the bright pixel; the scale parameter is obtained according to the number of the bright pixels and the number of all pixels in the image;
the brightness threshold is determined according to the current environment parameters of the mobile terminal, the environment parameters comprise at least one of the geographic position, the current date and the current time of the mobile terminal, and the brightness threshold and the environment parameters have a preset corresponding relation;
the acquiring the number of bright pixels in the image displayed by the mobile terminal comprises:
dividing the image displayed by the mobile terminal to obtain at least two sub-images;
analyzing each sub-image to obtain a brightness parameter value of each pixel in each sub-image;
counting pixels of which the brightness parameter values are larger than the brightness threshold value in each sub-image to obtain the number of bright pixels corresponding to each sub-image;
the adjusting the brightness of the screen of the mobile terminal according to the proportional parameter corresponding to the bright pixel includes:
selecting a first sub-image and a second sub-image from the at least two sub-images, wherein the proportion parameter corresponding to the bright pixel in the first sub-image is larger than a preset threshold value, and the proportion parameter corresponding to the bright pixel in the second sub-image is not larger than the preset threshold value;
adjusting the brightness of a screen corresponding to the area where each first sub-image of the at least two sub-images is located according to the brightness adjustment parameter in the first brightness interval;
and adjusting the brightness of the screen corresponding to the area where each second sub-image in the at least two sub-images is located according to the brightness adjustment parameter in the second brightness interval.
2. The method according to claim 1, wherein said obtaining the number of bright pixels in the image displayed by the mobile terminal comprises:
determining a brightness and darkness parameter value of each pixel in an image displayed by the mobile terminal;
and counting the pixels with the brightness parameter values larger than the brightness threshold value to obtain the number of the bright pixels.
3. The method according to claim 1, wherein the adjusting the brightness of the screen of the mobile terminal according to the scaling parameter corresponding to the bright pixel comprises:
when the proportion parameter corresponding to the bright pixel is larger than a preset threshold value, adjusting the brightness of the screen of the mobile terminal according to a brightness adjustment parameter in a first brightness interval; and/or
And when the proportion parameter corresponding to the bright pixel is not greater than the preset threshold, adjusting the brightness of the screen of the mobile terminal according to a brightness adjustment parameter in a second brightness interval, wherein the maximum brightness adjustment parameter value of the first brightness interval is smaller than the minimum brightness adjustment parameter value of the second brightness interval.
4. A mobile terminal, characterized in that the mobile terminal comprises:
the first acquisition module is used for acquiring an environment brightness value; the environment brightness value is used for representing the brightness degree of the current environment of the mobile terminal;
the second acquisition module is used for acquiring the number of bright pixels in an image displayed by the mobile terminal under the condition that the environmental brightness value is smaller than a brightness threshold value; the bright pixels are pixels with the brightness parameter value larger than the brightness threshold value;
the adjusting module is used for adjusting the brightness of the screen of the mobile terminal according to the proportional parameter corresponding to the bright pixel; the scale parameter is obtained according to the number of the bright pixels and the number of all pixels in the image;
the brightness threshold is determined according to the current environment parameters of the mobile terminal, the environment parameters comprise at least one of the geographic position, the current date and the current time of the mobile terminal, and the brightness threshold and the environment parameters have a preset corresponding relation;
the second acquisition module includes:
the image dividing submodule is used for dividing the image displayed by the mobile terminal to obtain at least two sub-images;
the image analysis submodule is used for analyzing each sub-image to obtain a brightness parameter value of each pixel in each sub-image;
the counting submodule is used for counting the pixels of which the brightness parameter values are larger than the brightness threshold value in each sub-image to obtain the number of the bright pixels corresponding to each sub-image;
the adjustment module includes:
the selecting sub-module is used for selecting a first sub-image and a second sub-image from the at least two sub-images, the proportion parameter corresponding to the bright pixel in the first sub-image is larger than a preset threshold value, and the proportion parameter corresponding to the bright pixel in the second sub-image is not larger than the preset threshold value;
the first adjusting submodule is used for adjusting the brightness of the screen corresponding to the area where each first sub-image of the at least two sub-images is located according to the brightness adjusting parameter in the first brightness interval;
and the second adjusting submodule is used for adjusting the brightness of the screen corresponding to the area where each second sub-image of the at least two sub-images is located according to the brightness adjusting parameter in the second brightness interval.
5. The mobile terminal of claim 4, wherein the second obtaining module comprises:
the parameter determination submodule is used for determining the brightness and darkness parameter value of each pixel in the image displayed by the mobile terminal;
and the counting submodule is used for counting the pixels with the brightness parameter values larger than the brightness threshold value to obtain the number of the bright pixels.
6. The mobile terminal of claim 4, wherein the adjusting module comprises:
the first adjusting submodule is used for adjusting the brightness of the screen of the mobile terminal according to the brightness adjusting parameter in the first brightness interval when the proportion parameter corresponding to the bright pixel is larger than the preset threshold value; and/or
And the second adjusting submodule is used for adjusting the brightness of the screen of the mobile terminal according to the brightness adjusting parameter in a second brightness interval when the proportion parameter corresponding to the bright pixel is not greater than the preset threshold, wherein the maximum brightness adjusting parameter value of the first brightness interval is smaller than the minimum brightness adjusting parameter value of the second brightness interval.
7. A mobile terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the screen brightness adjustment method according to any one of claims 1 to 3.
CN201810266284.7A 2018-03-28 2018-03-28 Screen brightness adjusting method and mobile terminal Active CN108520727B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810266284.7A CN108520727B (en) 2018-03-28 2018-03-28 Screen brightness adjusting method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810266284.7A CN108520727B (en) 2018-03-28 2018-03-28 Screen brightness adjusting method and mobile terminal

Publications (2)

Publication Number Publication Date
CN108520727A CN108520727A (en) 2018-09-11
CN108520727B true CN108520727B (en) 2020-09-25

Family

ID=63430769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810266284.7A Active CN108520727B (en) 2018-03-28 2018-03-28 Screen brightness adjusting method and mobile terminal

Country Status (1)

Country Link
CN (1) CN108520727B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124534A (en) * 2019-12-05 2020-05-08 深圳智锐通科技有限公司 Intelligent eye protection computer
CN112201202A (en) * 2020-10-30 2021-01-08 联想(北京)有限公司 Brightness adjusting method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010097909A (en) * 2008-10-20 2010-04-30 Panasonic Corp Backlight and liquid crystal display device
CN102129840B (en) * 2010-01-15 2013-02-13 胜华科技股份有限公司 Backlight modulating system and method
JP5683745B2 (en) * 2012-03-22 2015-03-11 富士フイルム株式会社 Image display apparatus and method
CN103220421B (en) * 2013-04-03 2015-01-14 广东欧珀移动通信有限公司 Method and device for using mobile terminal to carry out self photographing
CN103617792B (en) * 2013-11-14 2015-09-09 天津三星电子有限公司 A kind of regulate display terminal picture to show method and display terminal
CN105047140A (en) * 2015-07-06 2015-11-11 西安交通大学 Self-adapting dynamic backlight control system and method based on image content
CN106231187A (en) * 2016-07-29 2016-12-14 维沃移动通信有限公司 A kind of method shooting image and mobile terminal
CN107645609B (en) * 2017-10-18 2020-01-07 维沃移动通信有限公司 Brightness adjusting method and mobile terminal
CN107799093A (en) * 2017-12-08 2018-03-13 深圳市金立通信设备有限公司 Adjust method, terminal and the computer-readable recording medium of screen luminance of terminal

Also Published As

Publication number Publication date
CN108520727A (en) 2018-09-11

Similar Documents

Publication Publication Date Title
CN109361865B (en) Shooting method and terminal
CN107977144B (en) Screen capture processing method and mobile terminal
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN110177221B (en) Shooting method and device for high dynamic range image
CN107623818B (en) Image exposure method and mobile terminal
CN108513067B (en) Shooting control method and mobile terminal
CN108307106B (en) Image processing method and device and mobile terminal
CN110969981A (en) Screen display parameter adjusting method and electronic equipment
CN109104578B (en) Image processing method and mobile terminal
CN110930329A (en) Starry sky image processing method and device
CN110868546B (en) Shooting method and electronic equipment
CN107730460B (en) Image processing method and mobile terminal
CN109639981B (en) Image shooting method and mobile terminal
CN109819166B (en) Image processing method and electronic equipment
CN109151348B (en) Image processing method, electronic equipment and computer readable storage medium
CN110807405A (en) Detection method of candid camera device and electronic equipment
CN108520727B (en) Screen brightness adjusting method and mobile terminal
CN110636225A (en) Photographing method and electronic equipment
CN107807488B (en) Camera assembly, aperture adjusting method and mobile terminal
CN107734269B (en) Image processing method and mobile terminal
CN111601063B (en) Video processing method and electronic equipment
CN110602384B (en) Exposure control method and electronic device
CN111401463A (en) Method for outputting detection result, electronic device, and medium
CN111479068A (en) Photographing method, electronic device, and computer-readable storage medium
CN109859718B (en) Screen brightness adjusting method and terminal equipment

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