CN108234893B - Brightness adjusting method, brightness adjusting equipment and computer readable storage medium - Google Patents

Brightness adjusting method, brightness adjusting equipment and computer readable storage medium Download PDF

Info

Publication number
CN108234893B
CN108234893B CN201810002653.1A CN201810002653A CN108234893B CN 108234893 B CN108234893 B CN 108234893B CN 201810002653 A CN201810002653 A CN 201810002653A CN 108234893 B CN108234893 B CN 108234893B
Authority
CN
China
Prior art keywords
image
processed
brightness
pixel points
brightness value
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
CN201810002653.1A
Other languages
Chinese (zh)
Other versions
CN108234893A (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 CN201810002653.1A priority Critical patent/CN108234893B/en
Publication of CN108234893A publication Critical patent/CN108234893A/en
Application granted granted Critical
Publication of CN108234893B publication Critical patent/CN108234893B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation

Abstract

The embodiment of the invention discloses a brightness adjusting method, which is characterized by comprising the following steps: acquiring a brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed; determining the number of pixel points corresponding to each brightness value based on the brightness value of each pixel point; and adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed. The embodiment of the invention also discloses a brightness adjusting device and a computer readable storage medium, which solve the problem of uneven brightness distribution of the picture in the prior art.

Description

Brightness adjusting method, brightness adjusting equipment and computer readable storage medium
Technical Field
The present invention relates to image processing technology in the field of communications, and in particular, to a brightness adjustment method, device, and computer-readable storage medium.
Background
With the development of science and technology, the functions of the intelligent terminal are more and more powerful; in addition, along with the improvement of the living standard of people, the use of the intelligent terminal is more and more popular. The photographing function of a smart terminal, such as a smart phone, is most commonly used for users.
However, the distribution of the brightness values of the pixel points of the picture shot by the existing intelligent terminal is not uniformly distributed; the distribution of the brightness value of the pixel points of some pictures is concentrated in one or two intervals, so that the brightness degree of the whole picture is not obvious, and the definition of the picture is influenced.
Disclosure of Invention
In view of this, embodiments of the present invention are intended to provide a brightness adjustment method, a device, and a computer-readable storage medium, which solve the problem in the prior art that a picture has uneven brightness distribution, and ensure that the brightness of the picture is bright and dark; meanwhile, the definition of the picture is improved, and the quality of the picture is ensured.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method of brightness adjustment, the method comprising:
acquiring a brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed;
determining the number of pixel points corresponding to each brightness value based on the brightness value of each pixel point;
and adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed.
Optionally, the adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed includes:
acquiring brightness distribution information of the pixel points in the image to be processed based on the number of the pixel points corresponding to each brightness value;
and adjusting the brightness value of the pixel points of the image to be processed based on the brightness distribution information and the total number of the pixel points in the image to be processed.
Optionally, the obtaining the brightness distribution information of the pixels in the image to be processed based on the number of the pixels corresponding to each brightness value includes:
and analyzing the number of the pixel points corresponding to each brightness value based on the reference brightness value to obtain the brightness distribution information of the pixel points in the image to be processed.
Optionally, the adjusting the brightness value of the pixel point of the image to be processed based on the brightness distribution information and the total number of the pixel points in the image to be processed includes:
detecting whether the brightness value of the pixel point of the image to be processed meets a preset condition or not based on the brightness distribution information;
if the brightness value of the pixel point of the image to be processed does not meet the preset condition, the brightness value of the pixel point of the image to be processed is adjusted based on the brightness information and the total number of the pixel points in the image to be processed.
Optionally, the detecting, based on the brightness distribution information, whether the brightness value of the pixel point of the image to be processed meets a preset condition includes:
analyzing the brightness distribution information, and detecting whether the brightness values of the pixel points of the image to be processed are uniformly distributed;
if the brightness values of the pixel points of the image to be processed are not uniformly distributed, detecting whether the quantity of the brightness values of the pixel points of the image to be processed distributed in a first interval meets a preset quantity or not;
and if the number of the brightness values of the pixel points of the image to be processed distributed in the first interval meets the preset number, determining that the brightness values of the pixel points of the image to be processed do not meet the preset condition.
Optionally, the detecting whether the number of the luminance values of the pixels of the image to be processed distributed in the first interval meets a preset number includes:
if the brightness values of the pixel points of the image to be processed are not uniformly distributed, determining the quantity of the brightness values of the pixel points of the image to be processed distributed in a first interval;
calculating the proportion of the number of the brightness value distributions of the pixel points of the image to be processed in a first interval to the total number;
and if the ratio of the number of the pixel points of the image to be processed distributed in the first interval to the total number is smaller than a preset ratio, determining that the number of the pixel points of the image to be processed distributed in the first interval meets the preset number.
Optionally, if the brightness value of the pixel point of the image to be processed does not satisfy the preset condition, adjusting the brightness value of the pixel point of the image to be processed based on the brightness information and the total number of the pixel points in the image to be processed includes:
if the brightness value of the pixel point of the image to be processed does not meet the preset condition, obtaining an adjustment proportion relation;
adjusting the brightness value of the pixel point of the image to be processed in a second interval according to the adjustment proportion relation; and the second interval is an interval in which brightness values except the brightness value in the first interval in the reference brightness value are located.
Optionally, the obtaining of the adjustment proportional relationship includes:
acquiring a minimum brightness value and a maximum brightness value of the second interval;
acquiring a current brightness value of a pixel point to be adjusted and a maximum brightness value in a reference brightness value;
and determining the adjustment proportional relation based on the minimum brightness value of the second interval, the maximum brightness value of the second interval, the current brightness value of the pixel point to be adjusted and the maximum brightness value in the reference brightness value.
A brightness adjustment apparatus, the apparatus comprising: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the brightness adjusting program stored in the memory so as to realize the following steps:
acquiring a brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed;
determining the number of pixel points corresponding to each brightness value based on the brightness value of each pixel point;
and adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed.
A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of the brightness adjustment method as described above.
The brightness adjusting method, the brightness adjusting device and the computer readable storage medium provided by the embodiment of the invention are used for acquiring the brightness value corresponding to each pixel point in the image to be processed and the total number of the pixel points in the image to be processed, determining the number of the pixel points corresponding to each brightness value based on the brightness value of each pixel point, and adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed, so that the brightness of the pixel points of the image to be processed can be automatically adjusted by the brightness adjusting device according to the brightness value of each pixel point of the image, the problem of uneven brightness distribution of the image in the prior art is solved, and the brightness of the image are ensured to be clear; meanwhile, the definition of the picture is improved, and the quality of the picture is ensured.
Drawings
Fig. 1 is a schematic hardware configuration diagram of an alternative mobile terminal implementing various embodiments of the present invention;
fig. 2 is a schematic structural diagram of a communication system in which a mobile terminal according to an embodiment of the present invention can operate;
fig. 3 is a schematic flowchart of a brightness adjustment method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another brightness adjustment method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of another brightness adjustment method according to an embodiment of the present invention;
fig. 6 is a schematic diagram of luminance distribution of pixel points in an image to be processed according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating a brightness adjustment method according to another embodiment of the present invention;
FIG. 8 is a schematic diagram of an image provided by an embodiment of the present invention;
FIG. 9 is a schematic view of another image provided by an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a luminance adjusting apparatus according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
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: a Radio Frequency (RF) unit 101, a Wi-Fi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. 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 Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access 2000(Code Division Multiple Access 2000, CDMA2000), Wideband Code Division Multiple Access (WCDMA), Time Division-Synchronous Code Division Multiple Access (TD-SCDMA), Frequency Division duplex Long Term Evolution (FDD-LTE), and Time Division duplex Long Term Evolution (TDD-LTE), etc.
Wi-Fi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to receive and send emails, browse webpages, access streaming media and the like through a Wi-Fi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the Wi-Fi 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 Wi-Fi 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 graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the Wi-Fi 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 User Equipment (UE) 201, Evolved UMTS Terrestrial Radio Access Network (E-UTRAN) 202, Evolved Packet Core Network (EPC) 203, and 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 a Mobility Management Entity (MME) 2031, a Home Subscriber Server (HSS) 2032, other MMEs 2033, a Serving Gateway (SGW) 2034, a packet data network gateway (PDN Gate Way, PGW)2035, and a Policy and Charging Rules Function (PCRF) 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, IP Multimedia Subsystem (IMS) or other IP services, and the like.
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 system, various embodiments of the present invention are proposed.
An embodiment of the present invention provides a brightness adjusting method, which is shown in fig. 3 and includes the following steps:
301, obtaining a brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed.
The step 301 of obtaining the brightness value corresponding to each pixel point in the image to be processed and the total number of the pixel points in the image to be processed may be implemented by a brightness adjusting device; the brightness adjustment device may be a terminal having a function of displaying an image, and preferably may be a mobile terminal having a display screen and capable of displaying an image. For example, the terminal may include: cell phones, cameras, computers, tablets, notebooks, etc.
The image to be processed can be an image locally stored by the terminal, or an image received by the terminal from other terminals or a server and the like; of course, if there is an image collector in the image to be processed, the image to be processed may be an image collected by the terminal through the image collector; the image collector can refer to a camera on the terminal, and specifically can be a front camera or a rear camera. The total number of the pixel points of the image to be processed refers to all the number of the pixel points included in the image to be processed, and the total number of the pixel points of the image to be processed can be calculated according to the resolution of the image to be processed.
Before acquiring the brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed, whether the terminal is in a working state needs to be detected; whether the terminal is in the working state can be detected by detecting whether the terminal is currently in the starting state, and if the terminal is currently in the starting state, the terminal is currently in the working state.
The pixel point is the minimum luminous unit of the display picture of the display, and is composed of three pixel units of red, green and blue, in the color picture tube, the electron gun is usually composed of three monochromatic electron guns arranged in a triangle, which is called delta configuration, and the fluorescent layer of the display also adopts a three-in-one phosphor, namely, the phosphor contains red, green and blue phosphors, the arrangement mode of the phosphors is the same as that of the electron gun, and the three primary colors can generate various colors through different brightness combinations. The more pixel points in the screen, the higher the resolution of the picture, and the finer and more vivid the image. Pixels are defined by tiles of the image, so-called pixels (pixels), which have a specific position and assigned color value, and the color and position of the tiles determine the appearance of the image. A pixel can be considered to be an indivisible unit or element in the entire image, indivisible meaning that it cannot be cut into smaller units or elements again, which exist as a single color cell. Each dot matrix image contains a certain number of pixels that determine the size of the image to be presented on the screen. Pixels, also called resolutions, refer to an array of horizontal and vertical pixels that can be displayed, the values of which generally correspond to several display modes. When the resolution is 1366 × 768, 1366 pixel points are divided in the horizontal direction and 768 pixel points are divided in the vertical direction of the plasma screen. The higher the resolution, the larger the range of receivable resolution, and the wider the signal reception range of the plasma.
Step 302, determining the number of pixels corresponding to each brightness value based on the brightness value of each pixel.
Step 302, determining the number of pixels corresponding to each brightness value based on the brightness value of each pixel, wherein the number of pixels corresponding to each brightness value can be realized by a brightness adjusting device; after the terminal obtains the brightness value of each pixel point, the number of the pixel points corresponding to each brightness value can be obtained to obtain the number of the pixel points corresponding to each brightness value. The brightness value of the pixel point in the image to be processed can be any value which can define the brightness from 0 to 255; for example, the brightness value corresponding to each pixel point in the image to be processed may be a value from 10 to 250, and the like.
And 303, adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed.
In step 303, based on the number of pixels corresponding to each brightness value and the total number of pixels in the image to be processed, adjusting the brightness of the pixels in the image to be processed may be implemented by a brightness adjusting device; after the brightness adjusting device obtains the number of the pixel points corresponding to each brightness value in the image to be processed and the total number of the pixel points included in the image to be processed, the brightness distribution condition of the pixel points in the image to be processed can be obtained according to the brightness adjusting device, and the brightness values of the pixel points in the image to be processed are adjusted according to the brightness distribution condition of the pixel points in the image to be processed, so that the brightness of the image to be processed is adjusted.
The brightness adjusting method provided by the embodiment of the invention comprises the steps of obtaining the brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed, determining the number of the pixel points corresponding to each brightness value based on the brightness value of each pixel point, and adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed, so that the equipment can automatically obtain the number of the pixel points corresponding to each brightness value according to the brightness value of each pixel point of the image and adjust the brightness of the pixel points of the image according to the number of the pixel points corresponding to each brightness value, the problem of uneven brightness distribution of the image in the prior art is solved, and the brightness; meanwhile, the definition of the picture is improved, and the quality of the picture is ensured.
Based on the foregoing embodiments, an embodiment of the present invention provides a brightness adjustment method, which is shown in fig. 4 and includes the following steps:
step 401, the brightness adjusting device obtains a brightness value corresponding to each pixel point in the image to be processed and the total number of the pixel points in the image to be processed.
Step 402, the brightness adjusting device determines the number of pixels corresponding to each brightness value based on the brightness value of each pixel.
Step 403, the brightness adjusting device obtains the brightness distribution information of the pixels in the image to be processed based on the number of the pixels corresponding to each brightness value.
The brightness distribution information may refer to brightness distribution conditions of all pixel points included in the image to be processed; specifically, the luminance value corresponding to each pixel point in the image to be processed, the distribution interval in the luminance interval corresponding to the reference luminance value, and the number of pixel points included in each luminance distribution interval may be included.
And step 404, the brightness adjusting device adjusts the brightness value of the pixel points of the image to be processed based on the brightness distribution information and the total number of the pixel points in the image to be processed.
After the terminal obtains the brightness distribution information of the pixel points in the image to be processed, the brightness values of the pixel points in the image to be processed can be adjusted according to the relation between the brightness distribution information of the pixel points in the image to be processed and the total number of the pixel points in the image to be processed.
It should be noted that, for the explanation of the same steps or related concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments, and details are not described herein again.
The brightness adjusting method provided by the embodiment of the invention comprises the steps of obtaining the brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed, determining the number of the pixel points corresponding to each brightness value based on the brightness value of each pixel point, and adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed, so that the equipment can automatically obtain the number of the pixel points corresponding to each brightness value according to the brightness value of each pixel point of the image and adjust the brightness of the pixel points of the image according to the number of the pixel points corresponding to each brightness value, the problem of uneven brightness distribution of the image in the prior art is solved, and the brightness; meanwhile, the definition of the picture is improved, and the quality of the picture is ensured.
Based on the foregoing embodiments, an embodiment of the present invention provides a brightness adjustment method, as shown in fig. 5, including the following steps:
step 501, the brightness adjusting device obtains a brightness value corresponding to each pixel point in the image to be processed and the total number of the pixel points in the image to be processed.
Step 502, the brightness adjusting device determines the number of pixels corresponding to each brightness value based on the brightness value of each pixel.
Step 503, the brightness adjusting device analyzes the number of the pixel points corresponding to each brightness value based on the reference brightness value to obtain the brightness distribution information of the pixel points in the image to be processed.
The terminal obtains the brightness distribution information of the pixel points in the image to be processed, and the brightness distribution information can be obtained by analyzing the number of the pixel points corresponding to each brightness value according to the reference brightness value; the base luminance value may be a luminance value between 0-255. For example, the distribution information of the pixel points of the image to be processed may be as shown in fig. 6, and the distribution interval is 10 to 230, that is, the luminance values of the pixel points of the image to be processed are distributed between 10 and 230. It should be noted that, the distribution information of the pixel points of the image to be processed may be identified in a manner of a coordinate curve as shown in fig. 6, where an abscissa represents luminance, and an ordinate identifies the number of pixels; of course, it may also be represented in other forms.
Step 504, the brightness adjusting device detects whether the brightness value of the pixel point of the image to be processed meets a preset condition based on the brightness distribution information.
The preset condition may be a preset condition that the brightness value of the corresponding pixel point needs to be adjusted.
Step 504 is to detect whether the brightness value of the pixel point of the image to be processed meets the preset condition based on the brightness distribution information, and may be implemented in the following manner:
step 504a, the brightness adjusting device analyzes the brightness distribution information and detects whether the brightness values of the pixel points of the image to be processed are uniformly distributed.
The terminal can be implemented by detecting whether the number of the pixel points corresponding to each reference brightness value in the brightness distribution information of the pixel points of the image to be processed is the same or whether the difference value between the pixel points is smaller than a preset difference value, or can be implemented by detecting whether the distribution of the brightness values of the pixel points of the image to be processed in the interval corresponding to the reference brightness value extends over the whole interval. For example, if the brightness distribution information of the image to be processed is as shown in fig. 6, and the whole brightness value distribution is between 10 and 230, it indicates that the brightness value distribution of the pixel points of the image to be processed is not uniform.
Step 504b, if the brightness values of the pixel points of the image to be processed are not uniformly distributed, the brightness adjusting device detects whether the quantity of the brightness values of the pixel points of the image to be processed distributed in the first interval meets a preset quantity.
Whether the number of the luminance values of the pixel points of the image to be processed distributed in the first interval meets the preset number or not can be realized by detecting the ratio of the number of the luminance values of the pixel points of the image to be processed distributed in the first interval to the total number of the pixel points of the image to be processed and the preset ratio.
Step 504c, if the number of the luminance values of the pixel points of the image to be processed distributed in the first interval meets the preset number, the luminance adjusting device determines that the luminance values of the pixel points of the image to be processed do not meet the preset condition.
And 505, if the brightness values of the pixel points of the image to be processed do not meet the preset condition, adjusting the brightness values of the pixel points of the image to be processed by the brightness adjusting device based on the brightness information and the total number of the pixel points in the image to be processed.
After the brightness values of the pixel points of the image to be processed do not meet the preset condition, the brightness distribution information of the pixel points of the image to be processed and the total number of the pixel points in the image to be processed can be obtained. The brightness value of the pixel point of the image to be processed is adjusted, and the adjustment can be carried out according to a certain adjustment proportion in the specific adjustment.
It should be noted that, for the explanation of the same steps or related concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments, and details are not described herein again.
According to the brightness adjusting method provided by the embodiment of the invention, the device can automatically obtain the number of the pixel points corresponding to each brightness value according to the brightness value of each pixel point of the image, and adjust the brightness of the pixel points of the image according to the number of the pixel points corresponding to each brightness value, so that the problem of uneven brightness distribution of the image in the prior art is solved, and the brightness of the image is ensured to be clear; meanwhile, the definition of the picture is improved, and the quality of the picture is ensured.
Based on the foregoing embodiments, an embodiment of the present invention provides a brightness adjustment method, as shown in fig. 7, including the following steps:
step 601, the brightness adjusting device obtains a brightness value corresponding to each pixel point in the image to be processed and the total number of the pixel points in the image to be processed.
Step 602, the brightness adjusting device determines the number of pixels corresponding to each brightness value based on the brightness value of each pixel.
Step 603, the brightness adjusting device analyzes the number of the pixel points corresponding to each brightness value based on the reference brightness value to obtain the brightness distribution information of the pixel points in the image to be processed.
Step 604, the brightness adjusting device analyzes the brightness distribution information and detects whether the brightness values of the pixel points of the image to be processed are uniformly distributed.
Step 605, if the brightness values of the pixel points of the image to be processed are not uniformly distributed, the brightness adjusting device determines the number of the brightness values of the pixel points of the processed image distributed in the first interval.
The first interval may be one interval in an interval range corresponding to the reference luminance value, and may be, for example, 0-10 and 230-255; in a possible implementation manner, the minimum value of one interval of the first interval may be 0, and the maximum value may be a value that is different from 0 by 10 or more; the minimum value of the other interval may be a value having a difference of 10 or more from 255, and the maximum value may be 255.
Step 606, the brightness adjusting device calculates the ratio of the number of the brightness value distributions of the pixel points of the processed image in the first interval to the total number.
Step 607, if the ratio of the number of the pixel points of the processed image distributed in the first interval to the total number is smaller than the preset ratio, the brightness adjusting device obtains the adjusting ratio relationship.
The preset proportion may be preset, and a numerical value that can indicate that the number of the pixel points is too small may be a numerical value interval, for example, may be 3% to 5%. If the ratio of the number of the pixel points in any one of the first intervals to the total number is smaller than the preset ratio, the brightness of the pixel points of the image to be processed can be considered to be required to be adjusted.
It should be noted that, the step 607 of obtaining the adjustment ratio relationship may be implemented by:
step 607a, the brightness adjusting device obtains the minimum brightness value and the maximum brightness value of the second interval.
Step 607b, the brightness adjusting device obtains the current brightness value of the pixel point to be adjusted and the maximum brightness value in the reference brightness value.
Step 607c, the brightness adjusting device determines the adjusting proportion relation based on the minimum brightness value of the second interval, the maximum brightness value of the second interval, the current brightness value of the pixel point to be adjusted and the maximum brightness value of the reference brightness value.
If the second interval is 10-230, the minimum brightness value of the second interval is 10, the maximum brightness value of the second interval is 230, the current brightness value of the pixel point to be adjusted is a, and the maximum brightness value in the reference brightness value is 255, then the obtained adjustment proportional relationship may be represented as: a-10/X-230-10/255; where X indicates that a is to be adjusted to the target brightness value, i.e., brightness value a is adjusted to brightness value X.
And 608, adjusting the brightness value of the pixel point of the image to be processed in the second interval by the brightness adjusting device according to the adjustment proportional relation.
The second interval is an interval in which brightness values except the brightness value in the first interval in the standard brightness value are located.
If the first interval is 0-10 and 230-255, as shown in FIG. 6, the second interval is 10-230; at this time, the distribution curve of the pixel points of the image to be processed may be stretched, that is, the values in the second interval 10-230 are stretched until the interval range becomes 0-255, so as to obtain the graph shown by the dotted line in fig. 6.
The following description will be given taking an image to be processed as a photograph of a woman wearing a hat captured by a camera in a terminal as an example: as shown in fig. 8, the initial photo has a bright point as shown by a, which indicates that the brightness value of the pixel point at that position is too large; at this time, the terminal may adjust the brightness of the photo by using the brightness adjustment method provided in the embodiment of the present invention, and the photo shown in fig. 9 may be obtained after the adjustment, where the distribution of the brightness in the photo is uniform and each part in the photo is clearly visible.
It should be noted that, for the explanation of the same steps or related concepts in the present embodiment as in the other embodiments, reference may be made to the description in the other embodiments, and details are not described herein again.
The brightness adjusting method provided by the embodiment of the invention comprises the steps of obtaining the brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed, determining the number of the pixel points corresponding to each brightness value based on the brightness value of each pixel point, and adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed, so that the equipment can automatically obtain the number of the pixel points corresponding to each brightness value according to the brightness value of each pixel point of the image and adjust the brightness of the pixel points of the image according to the number of the pixel points corresponding to each brightness value, the problem of uneven brightness distribution of the image in the prior art is solved, and the brightness; meanwhile, the definition of the picture is improved, and the quality of the picture is ensured.
Based on the foregoing embodiments, an embodiment of the present invention provides a brightness adjustment apparatus, which may be applied to a brightness adjustment method provided in the embodiments corresponding to fig. 3 to 5 and 7, and as shown in fig. 10, the brightness adjustment apparatus 7 may include: a processor 71, a memory 72, and a communication bus 73;
the communication bus 73 is used for realizing communication connection between the processor 71 and the memory 72;
the processor 71 is configured to execute the brightness adjustment program stored in the memory 72 to implement the following steps:
acquiring a brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed;
determining the number of pixel points corresponding to each brightness value based on the brightness value of each pixel point;
and adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed.
In other embodiments of the present invention, the processor 71 is configured to execute the brightness adjustment program stored in the memory 72 to adjust the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed, so as to implement the following steps:
acquiring brightness distribution information of pixel points in the image to be processed based on the number of the pixel points corresponding to each brightness value;
and adjusting the brightness value of the pixel points of the image to be processed based on the brightness distribution information and the total number of the pixel points in the image to be processed.
In other embodiments of the present invention, the processor 71 is configured to execute the brightness adjustment program stored in the memory 72, based on the number of pixel points corresponding to each brightness value, to obtain the brightness distribution information of the pixel points in the image to be processed, so as to implement the following steps:
and analyzing the number of pixel points corresponding to each brightness value based on the reference brightness value to obtain the brightness distribution information of the pixel points in the image to be processed.
In other embodiments of the present invention, the processor 71 is configured to execute a brightness adjustment program stored in the memory 72 to adjust the brightness values of the pixels in the image to be processed based on the brightness distribution information and the total number of pixels in the image to be processed, so as to implement the following steps:
detecting whether the brightness value of a pixel point of the image to be processed meets a preset condition or not based on the brightness distribution information;
and if the brightness value of the pixel point of the image to be processed does not meet the preset condition, adjusting the brightness value of the pixel point of the image to be processed based on the brightness information and the total number of the pixel points in the image to be processed.
In other embodiments of the present invention, the processor 71 is configured to execute the brightness distribution information of the brightness adjustment program stored in the memory 72, and detect whether the brightness values of the pixel points of the image to be processed satisfy the preset condition, so as to implement the following steps:
analyzing brightness distribution information, and detecting whether the brightness values of pixel points of the image to be processed are uniformly distributed;
if the brightness values of the pixel points of the image to be processed are not uniformly distributed, detecting whether the quantity of the brightness values of the pixel points of the image to be processed distributed in the first interval meets a preset quantity or not;
and if the number of the brightness values of the pixel points of the image to be processed distributed in the first interval meets the preset number, determining that the brightness values of the pixel points of the image to be processed do not meet the preset condition.
In another embodiment of the present invention, the processor 71 is configured to execute the brightness adjustment program stored in the memory 72, and if the brightness values of the pixels of the image to be processed are not uniformly distributed, detect whether the number of the brightness value distributions of the pixels of the image to be processed in the first interval satisfies a preset number, so as to implement the following steps:
if the brightness values of the pixel points of the image to be processed are not uniformly distributed, determining the quantity of the brightness values of the pixel points of the processed image distributed in a first interval;
calculating the proportion of the number of the brightness value distributions of the pixel points of the image to be processed in the first interval to the total number;
and if the ratio of the number of the pixel points of the image to be processed distributed in the first interval to the total number is smaller than the preset ratio, determining that the number of the pixel points of the image to be processed distributed in the first interval meets the preset number.
In other embodiments of the present invention, the processor 71 is configured to execute the brightness adjustment program stored in the memory 72, and if the brightness value of the pixel point of the image to be processed does not satisfy the preset condition, adjust the brightness value of the pixel point of the image to be processed based on the brightness information and the total number of the pixel points in the image to be processed, so as to implement the following steps:
if the brightness value of the pixel point of the image to be processed does not meet the preset condition, obtaining an adjustment proportion relation;
adjusting the brightness value of the pixel point of the image to be processed in the second interval according to the adjustment proportion relation;
the second interval is an interval in which brightness values except the brightness value in the first interval in the standard brightness value are located.
In other embodiments of the present invention, processor 71 is configured to execute the obtaining and adjusting proportional relation of the brightness adjusting program stored in memory 72 to implement the following steps:
acquiring a minimum brightness value and a maximum brightness value of a second interval;
acquiring a current brightness value of a pixel point to be adjusted and a maximum brightness value in a reference brightness value;
and determining an adjustment proportional relation based on the minimum brightness value of the second interval, the maximum brightness value of the second interval, the current brightness value of the pixel point to be adjusted and the maximum brightness value in the reference brightness value.
It should be noted that, for a specific implementation process of the steps executed by the processor in this embodiment, reference may be made to implementation processes in the brightness adjustment method provided in embodiments corresponding to fig. 3 to 5 and 7, and details are not described here again.
The brightness adjusting device provided by the embodiment of the invention can automatically obtain the number of the pixel points corresponding to each brightness value according to the brightness value of each pixel point of the image, and adjust the brightness of the pixel points of the image according to the number of the pixel points corresponding to each brightness value, so that the problem of uneven brightness distribution of the image in the prior art is solved, and the brightness and darkness of the brightness of the image are ensured to be clear; meanwhile, the definition of the picture is improved, and the quality of the picture is ensured.
Based on the foregoing embodiments, an embodiment of the present invention provides a computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of:
acquiring a brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed;
determining the number of pixel points corresponding to each brightness value based on the brightness value of each pixel point;
and adjusting the brightness of the pixel points of the image to be processed based on the number of the pixel points corresponding to each brightness value and the total number of the pixel points in the image to be processed.
In other embodiments of the present invention, one or more programs may be executed by one or more processors to adjust the brightness of the pixels of the image to be processed based on the number of pixels corresponding to each brightness value and the total number of pixels in the image to be processed, so as to implement the following steps:
acquiring brightness distribution information of pixel points in the image to be processed based on the number of the pixel points corresponding to each brightness value;
and adjusting the brightness value of the pixel points of the image to be processed based on the brightness distribution information and the total number of the pixel points in the image to be processed.
In other embodiments of the present invention, one or more programs may be executed by one or more processors to obtain the luminance distribution information of the pixel points in the image to be processed based on the number of the pixel points corresponding to each luminance value, so as to implement the following steps:
and analyzing the number of pixel points corresponding to each brightness value based on the reference brightness value to obtain the brightness distribution information of the pixel points in the image to be processed.
In other embodiments of the present invention, the one or more programs may be executed by the one or more processors to adjust the luminance values of the pixels of the image to be processed based on the luminance distribution information and the total number of pixels in the image to be processed, so as to implement the steps of:
detecting whether the brightness value of a pixel point of the image to be processed meets a preset condition or not based on the brightness distribution information;
and if the brightness value of the pixel point of the image to be processed does not meet the preset condition, adjusting the brightness value of the pixel point of the image to be processed based on the brightness information and the total number of the pixel points in the image to be processed.
In other embodiments of the present invention, the one or more programs may be executed by the one or more processors to detect whether the brightness values of the pixel points of the image to be processed satisfy the preset condition based on the brightness distribution information, so as to implement the following steps:
analyzing brightness distribution information, and detecting whether the brightness values of pixel points of the image to be processed are uniformly distributed;
if the brightness values of the pixel points of the image to be processed are not uniformly distributed, detecting whether the quantity of the brightness values of the pixel points of the image to be processed distributed in the first interval meets a preset quantity or not;
and if the number of the brightness values of the pixel points of the image to be processed distributed in the first interval meets the preset number, determining that the brightness values of the pixel points of the image to be processed do not meet the preset condition.
In other embodiments of the present invention, if the luminance values of the pixels of the image to be processed are not uniformly distributed, the one or more programs may be executed by the one or more processors to detect whether the number of the luminance values of the pixels of the image to be processed distributed in the first interval satisfies a preset number, so as to implement the following steps:
if the brightness values of the pixel points of the image to be processed are not uniformly distributed, determining the quantity of the brightness values of the pixel points of the processed image distributed in a first interval;
calculating the proportion of the number of the brightness value distributions of the pixel points of the image to be processed in the first interval to the total number;
and if the ratio of the number of the pixel points of the image to be processed distributed in the first interval to the total number is smaller than the preset ratio, determining that the number of the pixel points of the image to be processed distributed in the first interval meets the preset number.
In other embodiments of the present invention, if the brightness values of the pixel points of the image to be processed do not satisfy the preset condition, the one or more programs may be executed by the one or more processors to adjust the brightness values of the pixel points of the image to be processed based on the brightness information and the total number of the pixel points in the image to be processed, so as to implement the following steps:
if the brightness value of the pixel point of the image to be processed does not meet the preset condition, obtaining an adjustment proportion relation;
adjusting the brightness value of the pixel point of the image to be processed in the second interval according to the adjustment proportion relation;
the second interval is an interval in which brightness values except the brightness value in the first interval in the standard brightness value are located.
In other embodiments of the present invention, one or more programs executable by the one or more processors to obtain the scaling relationship may be further configured to:
acquiring a minimum brightness value and a maximum brightness value of a second interval;
acquiring a current brightness value of a pixel point to be adjusted and a maximum brightness value in a reference brightness value;
and determining an adjustment proportional relation based on the minimum brightness value of the second interval, the maximum brightness value of the second interval, the current brightness value of the pixel point to be adjusted and the maximum brightness value in the reference brightness value.
It should be noted that, for a specific implementation process of the steps executed by the processor in this embodiment, reference may be made to implementation processes in the brightness adjustment method provided in embodiments corresponding to fig. 3 to 5 and 7, and details are not described here again.
In the embodiment of the present invention corresponding to fig. 1, the memory 109 is identical to the memory 72 in the embodiment corresponding to fig. 10, and the processor 110 in the embodiment corresponding to fig. 1 is identical to the processor 71 in the embodiment corresponding to fig. 10.
The computer-readable storage medium may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a magnetic Random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); and may be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., including one or any combination of the above-mentioned memories.
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.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
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 described in the embodiments of the present invention.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
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 (6)

1. A method of adjusting brightness, the method comprising:
acquiring a brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed;
determining the number of pixel points corresponding to each brightness value based on the brightness value of each pixel point;
acquiring brightness distribution information of the pixel points in the image to be processed based on the number of the pixel points corresponding to each brightness value;
analyzing the brightness distribution information, and determining the quantity of the brightness values of the pixel points of the image to be processed distributed in a first interval when the brightness values of the pixel points of the image to be processed are not uniformly distributed;
calculating the proportion of the number of the brightness value distributions of the pixel points of the image to be processed in a first interval to the total number;
when the ratio of the number of the pixel points of the image to be processed in the first interval to the total number is smaller than a preset ratio, determining that the number of the pixel points of the image to be processed in the first interval meets the preset number;
when the number of the brightness value distributions of the pixel points of the image to be processed in the first interval meets the preset number, the brightness value of the pixel points of the image to be processed is adjusted based on the brightness distribution information and the total number of the pixel points in the image to be processed.
2. The method according to claim 1, wherein the obtaining the luminance distribution information of the pixels in the image to be processed based on the number of the pixels corresponding to each luminance value comprises:
and analyzing the number of the pixel points corresponding to each brightness value based on the reference brightness value to obtain the brightness distribution information of the pixel points in the image to be processed.
3. The method according to claim 1, wherein when the number of the luminance value distributions of the pixel points of the image to be processed in the first interval satisfies the preset number, adjusting the luminance values of the pixel points of the image to be processed based on the luminance distribution information and the total number of the pixel points in the image to be processed comprises:
when the number of the brightness values of the pixel points of the image to be processed distributed in the first interval meets the preset number, acquiring an adjustment proportional relation;
adjusting the brightness value of the pixel point of the image to be processed in a second interval according to the adjustment proportion relation; the second interval is an interval in which brightness values except the brightness value in the first interval in the reference brightness value are located.
4. The method of claim 3, wherein obtaining the adjustment scaling relationship comprises:
acquiring a minimum brightness value and a maximum brightness value of the second interval;
acquiring a current brightness value of a pixel point to be adjusted and a maximum brightness value in a reference brightness value;
and determining the adjustment proportional relation based on the minimum brightness value of the second interval, the maximum brightness value of the second interval, the current brightness value of the pixel point to be adjusted and the maximum brightness value in the reference brightness value.
5. A brightness adjustment apparatus, characterized in that the apparatus comprises: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the brightness adjusting program stored in the memory so as to realize the following steps:
acquiring a brightness value corresponding to each pixel point in an image to be processed and the total number of the pixel points in the image to be processed;
determining the number of pixel points corresponding to each brightness value based on the brightness value of each pixel point;
acquiring brightness distribution information of the pixel points in the image to be processed based on the number of the pixel points corresponding to each brightness value;
analyzing the brightness distribution information, and determining the quantity of the brightness values of the pixel points of the image to be processed distributed in a first interval when the brightness values of the pixel points of the image to be processed are not uniformly distributed;
calculating the proportion of the number of the brightness value distributions of the pixel points of the image to be processed in a first interval to the total number;
when the ratio of the number of the pixel points of the image to be processed in the first interval to the total number is smaller than a preset ratio, determining that the number of the pixel points of the image to be processed in the first interval meets the preset number;
when the number of the brightness value distributions of the pixel points of the image to be processed in the first interval meets the preset number, the brightness value of the pixel points of the image to be processed is adjusted based on the brightness distribution information and the total number of the pixel points in the image to be processed.
6. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the brightness adjustment method according to any one of claims 1 to 4.
CN201810002653.1A 2018-01-02 2018-01-02 Brightness adjusting method, brightness adjusting equipment and computer readable storage medium Active CN108234893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810002653.1A CN108234893B (en) 2018-01-02 2018-01-02 Brightness adjusting method, brightness adjusting equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810002653.1A CN108234893B (en) 2018-01-02 2018-01-02 Brightness adjusting method, brightness adjusting equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108234893A CN108234893A (en) 2018-06-29
CN108234893B true CN108234893B (en) 2021-02-05

Family

ID=62645080

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810002653.1A Active CN108234893B (en) 2018-01-02 2018-01-02 Brightness adjusting method, brightness adjusting equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108234893B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672829B (en) * 2019-01-04 2021-02-02 Oppo广东移动通信有限公司 Image brightness adjusting method and device, storage medium and terminal
CN110971781B (en) * 2019-11-08 2021-06-15 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
CN111917986A (en) * 2020-08-20 2020-11-10 安谋科技(中国)有限公司 Image processing method, medium thereof, and electronic device
CN114374796B (en) * 2021-12-31 2023-10-31 北京瞰瞰智能科技有限公司 Image processing method and device, image sensor and vehicle

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710955A (en) * 2009-11-24 2010-05-19 北京中星微电子有限公司 Method and equipment for adjusting brightness and contrast
CN103617792A (en) * 2013-11-14 2014-03-05 天津三星电子有限公司 Method for adjusting image display of display terminal and display terminal
CN104200794A (en) * 2014-08-20 2014-12-10 明基电通有限公司 Image adjusting method and display
CN105513566A (en) * 2016-01-25 2016-04-20 明基电通有限公司 Image adjusting method of executing optimal adjustment according to different environments and displayer

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI296483B (en) * 2005-12-07 2008-05-01 Marketech Int Corp Apparatus and method for adjusting input image based on characteristics of display system
CN106570833A (en) * 2016-10-31 2017-04-19 湖南国科微电子股份有限公司 Video image self-adaptive contrast enhancement method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101710955A (en) * 2009-11-24 2010-05-19 北京中星微电子有限公司 Method and equipment for adjusting brightness and contrast
CN103617792A (en) * 2013-11-14 2014-03-05 天津三星电子有限公司 Method for adjusting image display of display terminal and display terminal
CN104200794A (en) * 2014-08-20 2014-12-10 明基电通有限公司 Image adjusting method and display
CN105513566A (en) * 2016-01-25 2016-04-20 明基电通有限公司 Image adjusting method of executing optimal adjustment according to different environments and displayer

Also Published As

Publication number Publication date
CN108234893A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
CN107093418B (en) Screen display method, computer equipment and storage medium
CN107302663B (en) Image brightness adjusting method, terminal and computer readable storage medium
CN108234893B (en) Brightness adjusting method, brightness adjusting equipment and computer readable storage medium
CN110035176B (en) Brightness adjusting method of mobile terminal, mobile terminal and 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
CN107705247B (en) Image saturation adjusting method, terminal and storage medium
CN107240072B (en) Screen brightness adjusting method, terminal and computer readable storage medium
CN108198150B (en) Method for eliminating image dead pixel, terminal and storage medium
CN110198379B (en) Mobile terminal control method, mobile terminal, and computer-readable storage medium
CN110069122B (en) Screen control method, terminal and computer readable storage medium
CN108984063B (en) Desktop interaction regulation and control method and device and computer readable storage medium
CN111899695A (en) Backlight adjusting method, terminal device and readable storage medium
CN108848321B (en) Exposure optimization method, device and computer-readable storage medium
CN113179369B (en) Shot picture display method, mobile terminal and storage medium
CN107613222B (en) Light supplement adjusting method of terminal, terminal and computer readable storage medium
CN108093233B (en) Image processing method, terminal and computer readable storage medium
CN113347372A (en) Shooting light supplement method, mobile terminal and readable storage medium
CN112866685A (en) Screen projection delay measuring method, mobile terminal and computer readable storage medium
CN112437472A (en) Network switching method, equipment and computer readable storage medium
CN112423102A (en) Small window screen projection control method and device and computer readable storage medium
CN109510941B (en) Shooting processing method and device and computer readable storage medium
CN108282608B (en) Multi-region focusing method, mobile terminal and computer readable storage medium
CN112203022B (en) Electrochromic control method and device and computer readable storage medium
CN108989673B (en) Image synthesis processing method and mobile terminal

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