CN109902587B - Image processing method and device, mobile terminal and storage medium - Google Patents
Image processing method and device, mobile terminal and storage medium Download PDFInfo
- Publication number
- CN109902587B CN109902587B CN201910087624.4A CN201910087624A CN109902587B CN 109902587 B CN109902587 B CN 109902587B CN 201910087624 A CN201910087624 A CN 201910087624A CN 109902587 B CN109902587 B CN 109902587B
- Authority
- CN
- China
- Prior art keywords
- saturation
- parameter range
- brightness
- preset
- average
- 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
Links
Images
Landscapes
- Image Processing (AREA)
Abstract
The embodiment of the invention provides an image processing method and device. The method comprises the following steps: the lip region in the image to be processed is identified, the average saturation and the average brightness of the lip region are obtained, the lip region is processed according to the average saturation and the average brightness, different processing aiming at different saturations and different brightnesses can be achieved, the same image processing is not used for all lip colors, and the problem that a cut processing mode cannot be applied to all conditions is solved.
Description
Technical Field
The present invention relates to the field of mobile terminal technologies, and in particular, to an image processing method, an image processing apparatus, a mobile terminal, and a computer-readable storage medium.
Background
With the development of smart phones, more and more people like to use smart phones for self-timer entertainment. The demand of social networking makes users have higher and higher requirements for self-shooting. At present, self-photographing software can achieve the effects of beautifying according to the requirements of users, such as whitening, makeup, brightening eyes, lip beautifying and the like.
The lip color plays an important role in improving the human complexion, and a plurality of self-photographing software provide a solution for beautifying the lip color in order to improve the human complexion. Some lip beautifying modes can cause that the saturation of lip color is too high and fluorescent color is formed in dark environment, some lip beautifying modes can improve the complexion of people with lighter lip color or poorer complexion too little, and other lip beautifying modes can cause the change of the color phase of the lip color, but are not suitable for people who paint lipstick.
At present, most of adjustment modes of lip areas are all one-cut adjustment, the same adjustment mode is used for all people and all lip colors, the lip color adjusting device is difficult to be applied to all conditions, and the applicability is poor.
Disclosure of Invention
The embodiment of the invention provides an image processing method, which aims to solve the problem that the same adjustment mode is used for all people and all lip colors, and the method is difficult to be applied to all conditions.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an image processing method, including:
identifying a lip region in an image to be processed;
acquiring the average saturation and the average brightness of the lip area;
processing the lip region according to the average saturation and average lightness.
In a second aspect, an embodiment of the present invention provides an image processing apparatus, including:
the region identification module is used for identifying a lip region in the image to be processed;
an obtaining module, configured to obtain an average saturation and an average brightness of the lip region;
and the processing module is used for processing the lip area according to the average saturation and the average brightness.
In a third aspect, an embodiment of the present invention provides a mobile terminal, including a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the image processing method.
In a fourth aspect, the embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the image processing method.
In the embodiment of the invention, the lip region in the image to be processed is identified, the average saturation and the average brightness of the lip region are obtained, and the lip region is processed according to the average saturation and the average brightness, so that different processes can be adopted for different saturations and different brightnesses, the same image processing is not used for all lip colors, and the problem that a cut processing mode cannot be applied to all conditions is solved.
Drawings
FIG. 1 is a flowchart illustrating steps of an image processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of an image processing method according to an embodiment of the present invention;
FIG. 3 is a parameter range division diagram;
fig. 4 is a block diagram of an image processing apparatus according to an embodiment of the present invention;
fig. 5 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.
Example one
Referring to fig. 1, a flowchart illustrating steps of an image processing method according to a first embodiment of the present invention is shown, which may specifically include the following steps:
In the embodiment of the invention, an image to be processed is identified to obtain a lip region, for example, the image is subjected to face identification to obtain a face image, and the lip region is extracted from the face image by identifying the lip outline; or the lip recognition may be directly performed on the image to directly obtain the lip region, and any suitable recognition method may be specifically adopted, which is not limited in the embodiment of the present invention.
The parameters of the color of the lip region include Saturation, lightness, Hue, for example, S (Saturation), V (lightness), H (Hue) in HSV (Hue) color space.
In the embodiment of the invention, a large number of pixel points are arranged on the lip area, the saturation and the brightness of all or part of the pixel points on the lip area are detected, and the average value of the saturation and the brightness is calculated to obtain the average saturation and the average brightness of the lip area.
And 103, processing the lip area according to the average saturation and the average brightness.
Different average saturation and average lightness correspond to different lip region processing so as to beautify the lip region, and different processing can be adopted according to different lip colors, so that the requirement of different users for lip beautification is met.
In this embodiment of the present invention, processing the lip region according to the average saturation and the average brightness may include multiple implementation manners, for example, determining a target parameter range in which the average saturation and the average brightness are located, processing the lip region according to the target parameter range, or any other suitable implementation manner, which is not limited in this embodiment of the present invention.
For example, for a lip region where the average saturation and the average brightness are too high, the processing of reducing the average saturation and the average brightness is adopted, and for a lip region where the average saturation and the average brightness are both within an acceptable range, the original lip region may be directly output without any processing.
In the embodiment of the present invention, the processing may include processing of saturation, brightness, and sometimes hue, of an image. The lip area is subjected to image processing by this step so as to beautify the image.
In the embodiment of the invention, the lip region in the image to be processed is identified, the average saturation and the average brightness of the lip region are obtained, and the lip region is processed according to the average saturation and the average brightness, so that different processes can be adopted for different saturations and different brightnesses, the same image processing is not used for all lip colors, and the problem that a cut processing mode cannot be applied to all conditions is solved.
Example two
Referring to fig. 2, a flowchart illustrating steps of an image processing method according to a second embodiment of the present invention is shown, which may specifically include the following steps:
in step 201, a lip region in an image to be processed is identified.
In the embodiment of the present invention, the specific manner of this step may refer to the description in the foregoing embodiment, and is not repeated herein.
In the embodiment of the present invention, the specific manner of this step may refer to the description in the foregoing embodiment, and is not repeated herein.
In the embodiment of the present invention, the parameter range includes a range obtained by dividing parameters of two dimensions of saturation and brightness, and the parameter range may be defined according to statistics and experience, for example, the parameter range may be divided into a preset high-saturation high-brightness parameter range, a preset low-saturation low-brightness parameter range, a preset high-saturation low-brightness parameter range, a preset acceptable parameter range, and the like, or any other applicable range, which is not limited in this embodiment of the present invention.
For example, as shown in the parameter range division diagram of FIG. 3, four quadrants are divided according to two dimensions of saturation (denoted by S) and lightness (denoted by V), with the degree from high (denoted by H) to low (denoted by L). The middle part is a range in which the saturation and brightness of the lip region are in a relatively ideal range, namely a preset acceptable parameter range, and the other four regions respectively represent a preset high-saturation high-brightness parameter range (represented by HS-HV), a preset low-saturation high-brightness parameter range (represented by LS-HV), a preset low-saturation low-brightness parameter range (represented by LS-LV) and a preset high-saturation low-brightness parameter range (represented by HS-LV).
In the embodiment of the present invention, according to the average saturation and the average brightness, the parameter range in which the parameter is located can be determined and is recorded as the target parameter range.
And 204, processing the lip area according to the target parameter range.
In the embodiment of the invention, different target parameter ranges correspond to different treatments, and corresponding adjustment is made according to the color characteristics of the different target parameter ranges so as to be suitable for the lip region.
In the embodiment of the present invention, optionally, according to the average saturation and the average brightness, one implementation of processing the lip region may include: and determining an applicable display lookup table according to the average saturation and the average brightness, overlapping the display lookup table to the lip region, and outputting the processed lip region.
There are many ways to process the image, and here, a way of overlaying different display lookup tables (look up tables) is chosen to obtain the processed lip region.
In the embodiment of the present invention, optionally, according to the target parameter range, one implementation manner of processing the lip region may include: and if the target parameter range is a preset high-saturation high-brightness parameter range, reducing the brightness of the lip area and the saturation of a preset color.
According to statistics and experience, for the case that the target parameter range is the preset high-saturation high-brightness parameter range, the lip region may have applicability to reducing brightness and red saturation, where the preset color may be set according to actual needs, and the embodiment of the present invention is not limited thereto.
For example, the magenta and white in the magenta in the "optional colors" in the display lookup table are reduced, and the red in the white is increased to form LUT-1 (i.e., display lookup table No. 1), so that the lightness and the saturation of the red in the magenta are reduced for the color related to the magenta in the original color in the table, and after the LUT-1 is superimposed on the original lip area, the lightness and the saturation of the preset color in the lip area are reduced, thereby not only beautifying the lip color, but also preserving the hue of the lip area and avoiding the problem of the hue change of the human inverse sense of the coated red.
In the embodiment of the present invention, optionally, according to the target parameter range, one implementation manner of processing the lip region may include: and if the target parameter range is a preset low-saturation high-brightness parameter range, reducing the brightness of the lip region and improving the saturation of the preset color in the lip region.
According to statistics and experience, for the case that the target parameter range is the preset low-saturation high-brightness parameter range, the method has applicability to the lip region for reducing brightness and improving saturation of red, wherein the preset color can be set according to actual needs, and the embodiment of the invention is not limited to this.
For example, white in the 'optional colors' in the lookup table is displayed, black of the white is increased, cyan of the white is reduced to achieve the purposes of reducing lightness and changing pale lip color to ruddy, then saturation of red in the red is increased to form LUT-2 (namely, the lookup table No. 2 is displayed), so that original low-saturation red in the table becomes more saturated, and after the LUT-2 is overlapped on an original lip area, the lightness of the lip area is reduced and the saturation of a preset color is improved, so that the lip color beautifying effect is achieved, the original hue of the lip area is kept, and the problem that people who paint lipstick feel the hue change is avoided.
In the embodiment of the present invention, optionally, according to the target parameter range, one implementation manner of processing the lip region may include: and if the target parameter range is a preset low-saturation low-brightness parameter range, improving the brightness of the lip area and the saturation of preset colors, and adjusting the first preset hue in the lip area to be a second preset hue.
For the case that the target parameter range is the preset low-saturation low-brightness parameter range, it is applicable to the lip region to increase brightness and increase saturation of red, where the preset color may be set according to actual needs, and the embodiment of the present invention is not limited thereto. However, after the lightness is increased, the color unevenness is increased, and therefore, it is necessary to adjust the yellow-green color to an orange color to reduce the color unevenness and to beautify the color of the lips. The first preset hue and the second preset hue may be set according to actual needs, which is not limited in the embodiment of the present invention.
For example, white in the "optional color" in the display lookup table is increased, saturation of red is increased, and a yellow-green hue needs to be converted into an orange hue to form LUT-3 (i.e., display lookup table No. 3), and after the LUT-3 is superimposed on the original lip region, the effects of increasing lightness of the lip region and increasing saturation of a preset color are achieved, and then after the hue is adjusted, mottle in the lip color is reduced, so that the lip color becomes more beautiful.
In the embodiment of the present invention, optionally, according to the target parameter range, one implementation manner of processing the lip region may include: and if the target parameter range is a preset high-saturation low-brightness parameter range, improving the brightness of the lip area and reducing the saturation of the preset color.
For the case that the target parameter range is the preset high saturation low brightness parameter range, it is applicable to the lip region to increase brightness and decrease saturation of red, where the preset color may be set according to actual needs, and the embodiment of the present invention is not limited thereto.
For example, the curve highlights the red color in the 'optional color' in the display lookup table, and then the saturation of the red color is weakened to form LUT-4 (namely, the display lookup table No. 4), so that the original high saturation red color in the table is weakened, and after the LUT-4 is superposed on the original lip area, the lightness of the lip area is improved and the saturation of the preset color is reduced, thereby not only achieving the effect of beautifying the lip color, but also keeping the original hue of the lip area and avoiding the problem of the hue change which is disliked by people who paint the lip color.
In the embodiment of the present invention, optionally, according to the target parameter range, one implementation manner of processing the lip region may include: if the target parameter range is a preset acceptable parameter range, the lip region does not need to be processed.
In the embodiment of the invention, the lip region in the image to be processed is identified, the average saturation and the average brightness of the lip region are obtained, the target parameter range where the average saturation and the average brightness are located is determined, and the lip region is processed according to the target parameter range, so that different processes can be adopted for different saturations and different brightnesses, the same image process is not used for all lip colors, and the problem that a cut processing mode cannot be applied to all conditions is solved.
Further, if the target parameter range is a preset low-saturation high-brightness parameter range, the brightness of the lip area and the saturation of preset colors are reduced, or if the target parameter range is a preset low-saturation high-brightness parameter range, the brightness of the lip area is reduced, and the saturation of the preset colors in the lip area is improved, or if the target parameter range is a preset low-saturation low-brightness parameter range, the brightness of the lip area is improved, and the saturation of the preset colors is reduced, so that the original lip color beautifying effect is achieved, the hue of the lip area is also reserved, and the problem that people who paint lipstick feel the hue change reversely is avoided.
Further, if the target parameter range is a preset low-saturation low-brightness parameter range, brightness of the lip area and saturation of preset colors are improved, the first preset hue in the lip area is adjusted to be the second preset hue, the effects of improving brightness of the lip area and improving saturation of the preset colors are achieved, and then after the hue is adjusted, variegated colors in the lip colors are reduced, so that the lip colors are more attractive.
EXAMPLE III
Referring to fig. 4, a block diagram of an image processing apparatus according to a third embodiment of the present invention is shown, and may specifically include the following modules:
a region identification module 301, configured to identify a lip region in an image to be processed;
an obtaining module 302, configured to obtain an average saturation and an average brightness of the lip region;
a processing module 303, configured to process the lip region according to the average saturation and the average lightness.
In this embodiment of the present invention, optionally, the processing module includes:
the range determining submodule is used for determining the range of the target parameters where the average saturation and the average brightness are located;
and the processing submodule is used for processing the lip area according to the target parameter range.
In this embodiment of the present invention, optionally, the processing sub-module includes:
and the first processing unit is used for reducing the brightness of the lip area and the saturation of a preset color if the target parameter range is a preset high-saturation high-brightness parameter range.
In this embodiment of the present invention, optionally, the processing and finding module includes:
and the second processing unit is used for reducing the brightness of the lip region and improving the saturation of the preset color in the lip region if the target parameter range is a preset low-saturation high-brightness parameter range.
In this embodiment of the present invention, optionally, the processing sub-module includes:
and the third processing unit is used for improving the lightness of the lip area and the saturation of the preset color and adjusting the first preset hue in the lip area to be a second preset hue if the target parameter range is a preset low-saturation low-lightness parameter range.
In this embodiment of the present invention, optionally, the processing sub-module includes:
and the fourth processing unit is used for improving the brightness of the lip area and reducing the saturation of the preset color if the target parameter range is a preset high-saturation low-brightness parameter range.
In this embodiment of the present invention, optionally, the processing sub-module includes:
and the non-processing unit is used for processing the lip area if the target parameter range is a preset acceptable parameter range.
In this embodiment of the present invention, optionally, the processing module includes:
the lookup table determining submodule is used for determining an applicable display lookup table according to the average saturation and the average brightness;
and the superposition submodule is used for superposing the display lookup table to the lip region and outputting the processed lip region.
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 the embodiment of the invention, the lip region in the image to be processed is identified, the average saturation and the average brightness of the lip region are obtained, and the lip region is processed according to the average saturation and the average brightness, so that different processes can be adopted for different saturations and different brightnesses, the same image processing is not used for all lip colors, and the problem that a cut processing mode cannot be applied to all conditions is solved.
Example four
Referring to fig. 5, a hardware structure diagram of a mobile terminal for implementing various embodiments of the present invention is shown.
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. 5 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.
And the processor 410 is used for identifying the lip region in the image to be processed, acquiring the average saturation and the average brightness of the lip region, and processing the lip region according to the average saturation and the average brightness.
In the embodiment of the invention, the lip region in the image to be processed is identified, the average saturation and the average brightness of the lip region are obtained, and the lip region is processed according to the average saturation and the average brightness, so that different processes can be adopted for different saturations and different brightnesses, the same image processing is not used for all lip colors, and the problem that a cut processing mode cannot be applied to all conditions is solved.
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. 5, 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 being executed on the processor 410, where the computer program, when executed by the processor 410, implements each process of the above-mentioned image processing 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 embodiment of the image processing method, 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 (4)
1. An image processing method applied to a mobile terminal is characterized by comprising the following steps:
identifying a lip region in an image to be processed;
acquiring the average saturation and the average brightness of the lip area;
processing the lip region according to the average saturation and average lightness;
wherein the processing the lip region according to the average saturation and average lightness comprises:
determining a target parameter range in which the average saturation and the average brightness are located;
processing the lip region according to the target parameter range;
the determining the target parameter range in which the average saturation and the average lightness are located comprises:
determining the parameter range of the average saturation and the average brightness;
determining the parameter range as a target parameter range;
the parameter ranges comprise a preset high-saturation high-brightness parameter range, a preset low-saturation low-brightness parameter range, a preset high-saturation low-brightness parameter range and a preset acceptable parameter range;
the processing the lip region according to the target parameter range comprises:
if the target parameter range is the preset high-saturation high-brightness parameter range, reducing the brightness of the lip area and the saturation of a preset color;
if the target parameter range is the preset low-saturation high-brightness parameter range, reducing the brightness of the lip area and improving the saturation of preset colors in the lip area;
if the target parameter range is the preset low-saturation low-brightness parameter range, improving the brightness of the lip area and the saturation of preset colors, and adjusting the first preset hue in the lip area to be a second preset hue;
and if the target parameter range is the preset high-saturation low-brightness parameter range, improving the brightness of the lip area and reducing the saturation of preset colors.
2. The method of claim 1, wherein said processing the lip region according to the target parameter range further comprises:
and if the target parameter range is the preset acceptable parameter range, processing the lip region is not required.
3. The method of claim 1, wherein processing the lip region according to the average saturation and average lightness comprises:
determining an applicable display lookup table according to the average saturation and the average brightness;
and superposing the display lookup table to the lip region, and outputting the processed lip region.
4. An image processing apparatus characterized by comprising:
the region identification module is used for identifying a lip region in the image to be processed;
an obtaining module, configured to obtain an average saturation and an average brightness of the lip region;
a processing module for processing the lip region according to the average saturation and average lightness;
wherein the processing module comprises:
the range determining submodule is used for determining the range of the target parameters where the average saturation and the average brightness are located;
the processing submodule is used for processing the lip area according to the target parameter range;
the range determining submodule is used for determining the parameter range in which the average saturation and the average brightness are positioned; determining the parameter range as a target parameter range;
the parameter ranges comprise a preset high-saturation high-brightness parameter range, a preset low-saturation low-brightness parameter range, a preset high-saturation low-brightness parameter range and a preset acceptable parameter range;
the processing submodule comprises:
the first processing unit is used for reducing the brightness of the lip area and the saturation of a preset color if the target parameter range is a preset high-saturation high-brightness parameter range;
the second processing unit is used for reducing the brightness of the lip region and improving the saturation of the preset color in the lip region if the target parameter range is a preset low-saturation high-brightness parameter range;
the third processing unit is used for improving the lightness of the lip area and the saturation of a preset color and adjusting the first preset hue in the lip area to be a second preset hue if the target parameter range is a preset low-saturation low-lightness parameter range;
and the fourth processing unit is used for improving the brightness of the lip area and reducing the saturation of the preset color if the target parameter range is a preset high-saturation low-brightness parameter range.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910087624.4A CN109902587B (en) | 2019-01-29 | 2019-01-29 | Image processing method and device, mobile terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910087624.4A CN109902587B (en) | 2019-01-29 | 2019-01-29 | Image processing method and device, mobile terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109902587A CN109902587A (en) | 2019-06-18 |
CN109902587B true CN109902587B (en) | 2021-10-08 |
Family
ID=66944435
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910087624.4A Active CN109902587B (en) | 2019-01-29 | 2019-01-29 | Image processing method and device, mobile terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109902587B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104767983A (en) * | 2015-03-19 | 2015-07-08 | 华为技术有限公司 | Picture processing method and device |
CN108376539A (en) * | 2018-04-09 | 2018-08-07 | 青岛海信电器股份有限公司 | A kind of color compensation method and equipment of image |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105335939B (en) * | 2014-08-15 | 2020-01-10 | 腾讯科技(深圳)有限公司 | Image processing method and device |
CN104469131A (en) * | 2014-09-05 | 2015-03-25 | 宇龙计算机通信科技(深圳)有限公司 | Method, device and terminal for displaying shooting control |
CN105323459B (en) * | 2015-05-25 | 2018-10-16 | 维沃移动通信有限公司 | Image processing method and mobile terminal |
CN107644396B (en) * | 2017-10-18 | 2021-02-02 | 维沃移动通信有限公司 | Lip color adjusting method and device |
CN107800966B (en) * | 2017-10-31 | 2019-10-18 | Oppo广东移动通信有限公司 | Method, apparatus, computer readable storage medium and the electronic equipment of image procossing |
CN107863060B (en) * | 2017-11-28 | 2021-03-05 | 海信视像科技股份有限公司 | Method and device for correcting image color |
-
2019
- 2019-01-29 CN CN201910087624.4A patent/CN109902587B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104767983A (en) * | 2015-03-19 | 2015-07-08 | 华为技术有限公司 | Picture processing method and device |
CN108376539A (en) * | 2018-04-09 | 2018-08-07 | 青岛海信电器股份有限公司 | A kind of color compensation method and equipment of image |
Also Published As
Publication number | Publication date |
---|---|
CN109902587A (en) | 2019-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107256555B (en) | Image processing method, device and storage medium | |
CN107908383B (en) | Screen color adjusting method and device and mobile terminal | |
CN107817939B (en) | Image processing method and mobile terminal | |
CN110969981B (en) | Screen display parameter adjusting method and electronic equipment | |
CN109361867B (en) | Filter processing method and mobile terminal | |
CN110908765A (en) | Interface display method and device, terminal equipment and storage medium | |
CN107977652B (en) | Method for extracting screen display content and mobile terminal | |
CN107784232B (en) | Picture processing method and mobile terminal | |
CN107644396B (en) | Lip color adjusting method and device | |
CN107886321B (en) | Payment method and mobile terminal | |
CN109727212B (en) | Image processing method and mobile terminal | |
CN108513067B (en) | Shooting control method and mobile terminal | |
CN108040209B (en) | Shooting method and mobile terminal | |
CN108804184B (en) | Display control method and terminal equipment | |
CN110012143B (en) | Telephone receiver control method and terminal | |
CN108280813A (en) | A kind of image processing method, terminal and computer readable storage medium | |
CN107895352A (en) | A kind of image processing method and mobile terminal | |
US12027138B2 (en) | Screen illuminance control method for photo shooting and electronic device | |
CN109981904B (en) | Volume control method and terminal equipment | |
CN108845785B (en) | Display method and terminal | |
CN107729100B (en) | Interface display control method and mobile terminal | |
CN109462727B (en) | Filter adjusting method and mobile terminal | |
CN113888447A (en) | Image processing method, terminal and storage medium | |
CN111045769B (en) | Background picture switching method and electronic equipment | |
CN107563353B (en) | Image processing method and device 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 |