CN111626921A - Picture processing method and device and electronic equipment - Google Patents

Picture processing method and device and electronic equipment Download PDF

Info

Publication number
CN111626921A
CN111626921A CN202010388677.2A CN202010388677A CN111626921A CN 111626921 A CN111626921 A CN 111626921A CN 202010388677 A CN202010388677 A CN 202010388677A CN 111626921 A CN111626921 A CN 111626921A
Authority
CN
China
Prior art keywords
area
picture
oil
processed
face
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.)
Pending
Application number
CN202010388677.2A
Other languages
Chinese (zh)
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010388677.2A priority Critical patent/CN111626921A/en
Publication of CN111626921A publication Critical patent/CN111626921A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/10Image enhancement or restoration using non-spatial domain filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the disclosure provides a picture processing method and device and electronic equipment, and belongs to the technical field of image processing. The method comprises the following steps: selecting a face area from a picture to be processed, wherein the picture to be processed comprises at least one face area; determining an oil light area from the face area, wherein the oil light area is an area which shows an oil light effect in the face area; performing oil removing treatment on the oil polishing area to obtain optimized pixel characteristics of the oil polishing area; and overlapping the optimized pixel characteristics of the gloss area with the initial characteristics of the picture to be processed to obtain the matte processed picture. By the scheme, the oil removing treatment is carried out on the face area in the picture, the pixel point characteristics of other areas in the picture are reserved as much as possible, the targeted beautifying treatment operation of the oil area is realized, and the face beautifying treatment effect is more real.

Description

Picture processing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for processing an image, and an electronic device.
Background
With the development of image processing technology, the function of beautifying human body in pictures is increasingly popularized, and the requirement of image processing is higher and higher. The existing picture processing scheme mainly aims at beautifying the face in the picture, such as integral skin grinding or brightness increasing, and the like, so that the beautified effect is distorted, the beautification type is single, and the face cannot be effectively beautified.
Therefore, the existing video face beautifying method has the technical problems of poor beautifying effect and single beautifying type.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide an image processing method, an image processing apparatus, and an electronic device, which at least partially solve the problems in the prior art.
In a first aspect, an embodiment of the present disclosure provides an image processing method, including:
selecting a face area from a picture to be processed, wherein the picture to be processed comprises at least one face area;
determining an oil light area from the face area, wherein the oil light area is an area which shows an oil light effect in the face area;
performing oil removing treatment on the oil polishing area to obtain optimized pixel characteristics of the oil polishing area;
and overlapping the optimized pixel characteristics of the gloss area with the initial characteristics of the picture to be processed to obtain the matte processed picture.
According to a specific implementation manner of the embodiment of the present disclosure, the step of determining the oil light area from the face area includes:
determining RGB channel values of the face area;
converting the RGB channel value of the face area into an HSV channel value;
and determining an oil light area in the face area according to the HSV channel value of the face area.
According to a specific implementation manner of the embodiment of the disclosure, the step of determining the gloss area in the face area according to the HSV channel value of the face area includes:
extracting the brightness channel value of each pixel point in the face area according to the HSV channel value of the face area;
screening out target pixel points with the brightness channel values larger than or equal to the preset brightness channel values;
and selecting an area frame containing all the target pixel points as an oil light area in the human face area.
According to a specific implementation manner of the embodiment of the present disclosure, the step of performing a matte treatment on the matte region to obtain an optimized pixel characteristic of the matte region includes:
and subtracting a preset value from the RGB channel value of each pixel point of the oil light area to obtain the optimized pixel characteristics of the oil light area.
According to a specific implementation manner of the embodiment of the present disclosure, the step of superimposing the optimized pixel feature of the gloss region and the initial feature of the to-be-processed picture includes:
filtering the picture to be processed;
extracting target color features of a peripheral area of the oil light area from the filtering result;
and superposing the target color feature and the to-be-processed picture containing the optimized pixel feature of the oil light area.
According to a specific implementation manner of the embodiment of the present disclosure, the step of superimposing the target color feature and the to-be-processed picture including the optimized pixel feature of the oil light region includes:
replacing color features in optimized pixel features of the oil light area in the picture to be processed with the target color features;
and reserving color characteristics of a non-oil-luster area in the picture to be processed, wherein the non-oil-luster area is an area except the oil-luster area in the picture to be processed.
According to a specific implementation manner of the embodiment of the present disclosure, the step of superimposing the target color feature and the to-be-processed picture including the optimized pixel feature of the oil light region includes:
superposing the target color feature and the to-be-processed picture containing the optimized pixel feature of the oil light region by using a formula RES (Img (1-R) + L R); wherein the content of the first and second substances,
RES is the picture after the oil polishing treatment, Img is the picture to be treated, L is a filtering result, R is the oil polishing degree in the picture to be treated, the oil polishing degree of an oil polishing area is 1, and the oil polishing degree of a non-oil polishing area is 0.
According to a specific implementation manner of the embodiment of the present disclosure, the step of performing filtering processing on the picture to be processed includes:
and filtering the picture to be processed by using a Gaussian low-pass filter.
According to a specific implementation manner of the embodiment of the present disclosure, the value range of the preset value is 10 to 20.
According to a specific implementation manner of the embodiment of the present disclosure, the step of selecting the face region from the frame of the to-be-processed picture includes:
extracting target key points associated with the human face in the picture to be processed;
calculating the length and the width of the face region according to the target key points;
and framing out the face region in the picture to be processed according to the position of the target key point and the length and width of the face region.
In a second aspect, an embodiment of the present disclosure provides a picture processing apparatus, including:
the frame selection module is used for selecting a face area from a picture to be processed, wherein the picture to be processed comprises at least one face area;
the determining module is used for determining an oil light area from the face area, wherein the oil light area is an area which is displayed as an oil light effect in the face area;
the processing module is used for performing oil removal treatment on the oil polishing area to obtain an optimized area;
and the superposition module is used for superposing the characteristic information of the optimized area and the initial characteristic information of the picture to be processed to obtain the picture after the oil light treatment.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the picture processing method of any one of the preceding first aspects.
In a fourth aspect, the disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the picture processing method in the first aspect or any implementation manner of the first aspect.
In a fifth aspect, the disclosed embodiments also provide a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the picture processing method in the foregoing first aspect or any implementation manner of the first aspect.
The scheme of the picture processing method in the embodiment of the disclosure comprises the following steps: selecting a face area from a picture to be processed, wherein the picture to be processed comprises at least one face area; determining an oil light area from the face area, wherein the oil light area is an area which shows an oil light effect in the face area; performing oil removing treatment on the oil polishing area to obtain optimized pixel characteristics of the oil polishing area; and overlapping the optimized pixel characteristics of the gloss area with the initial characteristics of the picture to be processed to obtain the matte processed picture. By the scheme, the oil removing treatment is carried out on the face area in the picture, the pixel point characteristics of other areas in the picture are reserved as much as possible, the targeted beautifying treatment operation of the oil area is realized, and the face beautifying treatment effect is more real.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a picture processing method according to an embodiment of the present disclosure;
fig. 2 is a partial schematic flow chart of another image processing method according to an embodiment of the present disclosure;
fig. 3 is a partial schematic flow chart of another image processing method according to an embodiment of the present disclosure;
fig. 4 is a partial schematic flow chart of another image processing method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an apparatus for processing an image according to an embodiment of the present disclosure;
fig. 6 is a schematic view of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be further noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than being drawn according to the number, shape and size of the components in actual implementation, and the type, number and proportion of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
The embodiment of the disclosure provides a picture processing method. The image processing method provided by the embodiment can be executed by a computing device, the computing device can be implemented as software, or implemented as a combination of software and hardware, and the computing device can be integrally arranged in a server, a terminal device and the like.
Referring to fig. 1, a schematic flow chart of a picture processing method according to an embodiment of the present disclosure is shown. As shown in fig. 1, the method mainly comprises the following steps:
s101, selecting a face area from a picture to be processed, wherein the picture to be processed comprises at least one face area;
the method provided by the embodiment is applied to the processing process of the face in the picture, and mainly comprises the oil removal processing of the face area. If the face appears in the oily area, the face looks poor in skin color makeup, the attractiveness is affected, the brightness of the oily area is too high, and the normal display of the face is affected.
When oil removal and polishing treatment is carried out, firstly, a face area to be treated is framed from a picture to be treated. It should be noted that there may be one or more objects in the picture to be processed, and the number of the face regions selected by the corresponding frame is at least one. The degreasing process for a face area will be described below, but the degreasing process for a plurality of face areas is to perform corresponding degreasing process for each face area, and is not limited.
In specific implementation, the step of selecting a face region from the frame of the to-be-processed picture may include:
extracting target key points associated with the human face in the picture to be processed;
calculating the length and the width of the face region according to the target key points;
and framing out the face region in the picture to be processed according to the position of the target key point and the length and width of the face region.
According to target key points related to the face in the picture, such as eye key points, nose key points, mouth key points and the like, the theoretical length and width of the face region are calculated according to a preset face extension rule, and then the face region can be framed and selected by combining the positions of the target key points.
S102, determining an oil light area from the face area, wherein the oil light area is an area which shows an oil light effect in the face area;
after the face area is selected from the picture frame to be processed, the area displaying the oil light effect, namely the oil light area, is identified from the face area. All the regions having the oil-shine effect may be defined as the oil-shine regions, or only the regions having the oil-shine effect greater than a certain degree may be defined as the oil-shine regions.
The judgment basis of the oil light region may include a brightness value or other parameter values, for example, the region where the pixel point with the brightness value greater than a certain threshold is located is divided into the oil light region, or the region where the pixel point with certain attribute parameters is located is divided into the oil light region, which is not limited.
S103, performing oil removing treatment on the oil light area to obtain optimized pixel characteristics of the oil light area;
according to the steps, after the gloss region displaying the gloss effect is determined from the face region, the gloss removal treatment can be started to be performed on the determined gloss region, the characteristics of the pixel points of the gloss region after the gloss removal treatment are the optimized pixel characteristics of the gloss region, the optimized pixel characteristics are initial characteristics of the pixel points of the gloss region, and the characteristics causing the gloss effect are removed.
When the oil polishing area is subjected to oil polishing treatment, the oil polishing area can be separated from an original image, the separated image layer area is independently treated, and the oil polishing area in the picture to be treated can also be directly treated.
And S104, overlapping the optimized pixel characteristics of the oil light area with the initial characteristics of the picture to be processed to obtain the oil light processed picture.
After the oil removing and polishing treatment is carried out on the oil polishing area according to the steps, the optimized pixel characteristics of the oil polishing area and the initial characteristics of the picture to be treated can be superposed, and in the picture after the superposition treatment, the face area does not display the oil polishing effect any more or the oil polishing effect is weakened, so that the display of the face makeup and the definition of the picture are not influenced.
On the basis of the foregoing embodiment, according to a specific implementation manner of the embodiment of the present disclosure, as shown in fig. 2, the step of determining the oil light area from the face area may include:
s201, determining RGB channel values of the face area;
when screening is carried out aiming at the oil light area in the face area, the characteristic value of each pixel point in the face area needs to be referred to. In this embodiment, the RGB channel values of the pixels are used as the initial basis, that is, the values of the pixels in the face region on the R, G, B channels are determined.
S202, converting the RGB channel value of the face area into HSV channel value;
and after the RGB channel values of all the pixel points in the face area are obtained, converting the RGB channel values into HSV channel values. The HSV channel refers to Hue (Hue, abbreviated as H), Saturation (Saturation, abbreviated as S), and brightness (Value, abbreviated as V). The pixel points in the oil light area are generally high in brightness value, the pixel points belonging to the oil light area are screened according to the HSV channel value, calculation is facilitated, and screening accuracy is high.
S203, determining an oil light area in the face area according to the HSV channel value of the face area.
Further, as shown in fig. 3, the step of determining the gloss area in the face area according to the HSV channel value of the face area may include:
s301, extracting a brightness channel value of each pixel point in the face region according to the HSV channel value of the face region;
after the HSV channel value of each pixel point in the face area is determined, the brightness channel value, namely the V channel value, of each pixel point can be extracted from the HSV channel value.
S302, screening out target pixel points with the brightness channel values larger than or equal to the preset brightness channel values;
the area of the pixel point with a large brightness value is usually obvious in oil light effect. The electronic device can preset the brightness value of the pixel point corresponding to a certain gloss degree, and the brightness value is set as a preset brightness value.
And when the oil light area is screened in the face area, judging whether the brightness channel value of each pixel point is greater than or equal to a preset brightness channel value. And if the brightness channel value of the pixel point is greater than or equal to the preset brightness channel value, defining the pixel point as a target pixel point. Otherwise, if the brightness channel value of the pixel point is smaller than the preset brightness channel value, the part of the pixel points is ignored.
And S303, selecting a region frame containing all the target pixel points as an oil light region in the human face region.
And screening out target pixel points with the brightness channel value larger than or equal to the preset brightness channel value according to the steps, and selecting the region frames of all the target pixel points to serve as the oil light region in the face region.
In this embodiment, the image is first converted from the RGB space to the HSV space, and an oil light area is found on the V channel, where the value of the oil light area in the V channel is usually large, and the oil light degree of these areas is determined by comparing the positive distance from the threshold, for example, the threshold is 100, the positive distance is V-100 and is greater than 0, and if the positive distance is less than 0, the positive distance is a darker area, no processing is performed).
Optionally, the step of performing matte treatment on the matte region to obtain an optimized pixel characteristic of the matte region may include:
and subtracting a preset value from the RGB channel value of each pixel point of the oil light area to obtain the optimized pixel characteristics of the oil light area.
For example, the preset value ranges from 10 to 20.
The level of gloss is suppressed by reducing the values of the three RGB channels simultaneously, for example by subtracting 15 from each other, but the result of this process is grey. To obtain the skin color, the skin color can then be obtained by low pass filtering. Since the low-pass filtering mixes the current color with the color of the surrounding skin
According to another specific implementation manner of the embodiment of the present disclosure, as shown in fig. 4, the step of overlapping the optimized pixel feature of the oil light region and the initial feature of the to-be-processed picture may include:
s401, filtering the picture to be processed;
in specific implementation, the to-be-processed picture may be filtered by using a gaussian low-pass filter.
S402, extracting target color characteristics of the peripheral area of the oil light area from the filtering result;
and performing primary filtering on the picture to be processed through convolution operation such as Gaussian filtering to obtain color information of other pixel points in the peripheral area of the current oil light area, and defining the obtained filtering result as L.
And S403, superposing the target color feature and the to-be-processed picture containing the optimized pixel feature of the oil light region.
And superposing the L and the original drawing according to the gloss degree calculated in the step. According to a specific implementation manner of the embodiment of the present disclosure, the step of superimposing the target color feature and the to-be-processed picture including the optimized pixel feature of the oil light region may include:
replacing color features in optimized pixel features of the oil light area in the picture to be processed with the target color features;
and reserving color characteristics of a non-oil-luster area in the picture to be processed, wherein the non-oil-luster area is an area except the oil-luster area in the picture to be processed.
In specific implementation, the step of superimposing the target color feature and the to-be-processed picture including the optimized pixel feature of the oil light region includes:
superposing the target color feature and the to-be-processed picture containing the optimized pixel feature of the oil light region by using a formula RES (Img (1-R) + L R); wherein the content of the first and second substances,
RES is the picture after the oil polishing treatment, Img is the picture to be treated, L is a filtering result, R is the oil polishing degree in the picture to be treated, the oil polishing degree of an oil polishing area is 1, and the oil polishing degree of a non-oil polishing area is 0.
In this way, the pixels in the area of the original picture having the oil-light effect can be replaced with L, the pixels in the area without oil-light are still the information of the original picture, and the oil-light area of the middle degree can be replaced with the information of the original picture and L superimposed on each other.
Corresponding to the above method embodiment, referring to fig. 5, an embodiment of the present disclosure further provides a picture processing apparatus 50, including:
a framing module 501, configured to frame out a face region from a to-be-processed picture, where the to-be-processed picture includes at least one face region;
a determining module 502, configured to determine an oil light region from the face region, where the oil light region is a region in the face region that shows an oil light effect;
the processing module 503 is configured to perform oil removal processing on the oil polishing area to obtain an optimized area;
and an overlapping module 504, configured to overlap the feature information of the optimized region with the initial feature information of the to-be-processed picture, to obtain a photo after matte processing.
The apparatus shown in fig. 5 may correspondingly execute the content in the above method embodiment, and details of the part not described in detail in this embodiment refer to the content described in the above method embodiment, which is not described again here.
Referring to fig. 6, an embodiment of the present disclosure also provides an electronic device 60, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the picture processing method of the foregoing method embodiments.
The disclosed embodiments also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the picture processing method in the foregoing method embodiments.
The disclosed embodiments also provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the picture processing method in the aforementioned method embodiments.
Referring now to FIG. 6, a schematic diagram of an electronic device 60 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 60 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. While the figures illustrate an electronic device 60 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, enable the electronic device to implement the schemes provided by the method embodiments.
Alternatively, the computer readable medium carries one or more programs, which when executed by the electronic device, enable the electronic device to implement the schemes provided by the method embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
The above description is only for the specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present disclosure should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (12)

1. An image processing method, comprising:
selecting a face area from a picture to be processed, wherein the picture to be processed comprises at least one face area;
determining an oil light area from the face area, wherein the oil light area is an area which shows an oil light effect in the face area;
performing oil removing treatment on the oil polishing area to obtain optimized pixel characteristics of the oil polishing area;
and overlapping the optimized pixel characteristics of the gloss area with the initial characteristics of the picture to be processed to obtain the matte processed picture.
2. The method of claim 1, wherein the step of determining the oil light region from the face region comprises:
determining RGB channel values of the face area;
converting the RGB channel value of the face area into an HSV channel value;
and determining an oil light area in the face area according to the HSV channel value of the face area.
3. The method of claim 2, wherein the step of determining the gloss area in the face area according to the HSV channel values of the face area comprises:
extracting the brightness channel value of each pixel point in the face area according to the HSV channel value of the face area;
screening out target pixel points with the brightness channel values larger than or equal to the preset brightness channel values;
and selecting an area frame containing all the target pixel points as an oil light area in the human face area.
4. The method of claim 3, wherein the step of performing a matte treatment on the matte region to obtain optimized pixel characteristics of the matte region comprises:
and subtracting a preset value from the RGB channel value of each pixel point of the oil light area to obtain the optimized pixel characteristics of the oil light area.
5. The method according to claim 4, wherein the step of superimposing the optimized pixel features of the gloss region with the initial features of the picture to be processed comprises:
filtering the picture to be processed;
extracting target color features of a peripheral area of the oil light area from the filtering result;
and superposing the target color feature and the to-be-processed picture containing the optimized pixel feature of the oil light area.
6. The method of claim 5, wherein the step of superimposing the target color feature with the to-be-processed picture containing the optimized pixel feature of the gloss region comprises:
replacing color features in optimized pixel features of the oil light area in the picture to be processed with the target color features;
and reserving color characteristics of a non-oil-luster area in the picture to be processed, wherein the non-oil-luster area is an area except the oil-luster area in the picture to be processed.
7. The method of claim 6, wherein the step of superimposing the target color feature with the to-be-processed picture containing the optimized pixel feature of the gloss region comprises:
superposing the target color feature and the to-be-processed picture containing the optimized pixel feature of the oil light region by using a formula RES (Img (1-R) + L R); wherein the content of the first and second substances,
RES is the picture after the oil polishing treatment, Img is the picture to be treated, L is a filtering result, R is the oil polishing degree in the picture to be treated, the oil polishing degree of an oil polishing area is 1, and the oil polishing degree of a non-oil polishing area is 0.
8. The method according to claim 5, wherein the step of performing filtering processing on the picture to be processed comprises:
and filtering the picture to be processed by using a Gaussian low-pass filter.
9. The method according to any one of claims 1 to 8, wherein the step of framing out the face region from the picture to be processed comprises:
extracting target key points associated with the human face in the picture to be processed;
calculating the length and the width of the face region according to the target key points;
and framing out the face region in the picture to be processed according to the position of the target key point and the length and width of the face region.
10. A picture processing apparatus, comprising:
the frame selection module is used for selecting a face area from a picture to be processed, wherein the picture to be processed comprises at least one face area;
the determining module is used for determining an oil light area from the face area, wherein the oil light area is an area which is displayed as an oil light effect in the face area;
the processing module is used for performing oil removal treatment on the oil polishing area to obtain an optimized area;
and the superposition module is used for superposing the characteristic information of the optimized area and the initial characteristic information of the picture to be processed to obtain the picture after the oil light treatment.
11. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the picture processing method of any one of the preceding claims 1-10.
12. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the picture processing method of any one of the preceding claims 1-10.
CN202010388677.2A 2020-05-09 2020-05-09 Picture processing method and device and electronic equipment Pending CN111626921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010388677.2A CN111626921A (en) 2020-05-09 2020-05-09 Picture processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010388677.2A CN111626921A (en) 2020-05-09 2020-05-09 Picture processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111626921A true CN111626921A (en) 2020-09-04

Family

ID=72270962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010388677.2A Pending CN111626921A (en) 2020-05-09 2020-05-09 Picture processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111626921A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112233014A (en) * 2020-10-16 2021-01-15 陈晶晶 Face processing method and face processing platform based on big data and artificial intelligence
CN112381737A (en) * 2020-11-17 2021-02-19 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN112465940A (en) * 2020-11-25 2021-03-09 北京字跳网络技术有限公司 Image rendering method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719234A (en) * 2016-01-26 2016-06-29 厦门美图之家科技有限公司 Automatic gloss removing method and system for face area and shooting terminal
CN107194374A (en) * 2017-06-16 2017-09-22 广东欧珀移动通信有限公司 Human face region goes glossy method, device and terminal
CN107392858A (en) * 2017-06-16 2017-11-24 广东欧珀移动通信有限公司 Image highlight area processing method, device and terminal device
WO2019062608A1 (en) * 2017-09-30 2019-04-04 深圳市商汤科技有限公司 Image processing method and device, electronic device and computer storage medium
CN110211030A (en) * 2019-06-04 2019-09-06 北京字节跳动网络技术有限公司 Image generating method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105719234A (en) * 2016-01-26 2016-06-29 厦门美图之家科技有限公司 Automatic gloss removing method and system for face area and shooting terminal
CN107194374A (en) * 2017-06-16 2017-09-22 广东欧珀移动通信有限公司 Human face region goes glossy method, device and terminal
CN107392858A (en) * 2017-06-16 2017-11-24 广东欧珀移动通信有限公司 Image highlight area processing method, device and terminal device
WO2019062608A1 (en) * 2017-09-30 2019-04-04 深圳市商汤科技有限公司 Image processing method and device, electronic device and computer storage medium
CN110211030A (en) * 2019-06-04 2019-09-06 北京字节跳动网络技术有限公司 Image generating method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴颖斌;: "基于肤色检测和导向滤波的人脸美化技术", 运城学院学报, no. 03 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112233014A (en) * 2020-10-16 2021-01-15 陈晶晶 Face processing method and face processing platform based on big data and artificial intelligence
CN112233014B (en) * 2020-10-16 2021-05-25 深圳市小蚁数智科技有限公司 Face processing method and face processing platform based on big data and artificial intelligence
CN112381737A (en) * 2020-11-17 2021-02-19 北京达佳互联信息技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN112381737B (en) * 2020-11-17 2024-07-12 北京达佳互联信息技术有限公司 Image processing method, device, electronic equipment and storage medium
CN112465940A (en) * 2020-11-25 2021-03-09 北京字跳网络技术有限公司 Image rendering method and device, electronic equipment and storage medium
CN112465940B (en) * 2020-11-25 2021-10-15 北京字跳网络技术有限公司 Image rendering method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111626921A (en) Picture processing method and device and electronic equipment
CN112101305B (en) Multi-path image processing method and device and electronic equipment
CN110619314A (en) Safety helmet detection method and device and electronic equipment
CN110070495B (en) Image processing method and device and electronic equipment
CN113742025B (en) Page generation method, device, equipment and storage medium
CN110211030B (en) Image generation method and device
CN110070515B (en) Image synthesis method, apparatus and computer-readable storage medium
CN111459601A (en) Data processing method and device, electronic equipment and computer readable medium
CN109947973B (en) Background configuration method, device and equipment for display area and readable medium
CN111738950B (en) Image processing method and device
CN110070482B (en) Image processing method, apparatus and computer readable storage medium
CN110264430B (en) Video beautifying method and device and electronic equipment
CN111696041B (en) Image processing method and device and electronic equipment
CN111200705B (en) Image processing method and device
CN111223105B (en) Image processing method and device
CN111754424B (en) Face beautifying processing method and device in picture and electronic equipment
CN111754425A (en) Image highlight removing processing method and device and electronic equipment
CN111798399B (en) Image processing method and device and electronic equipment
CN111445405B (en) Human body shoulder and neck processing method and device in picture and electronic equipment
EP4395355A1 (en) Video processing method and apparatus, and electronic device and storage medium
CN111292268B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN110288554B (en) Video beautifying method and device and electronic equipment
CN111415382B (en) Method and device for processing human body arm body beautification in picture and electronic equipment
CN117234650A (en) Image display method and device, storage medium and electronic equipment
US20240233071A1 (en) Video processing method and apparatus, and electronic device and storage medium

Legal Events

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