WO2019075666A1 - 图像处理方法、装置、终端及存储介质 - Google Patents

图像处理方法、装置、终端及存储介质 Download PDF

Info

Publication number
WO2019075666A1
WO2019075666A1 PCT/CN2017/106714 CN2017106714W WO2019075666A1 WO 2019075666 A1 WO2019075666 A1 WO 2019075666A1 CN 2017106714 W CN2017106714 W CN 2017106714W WO 2019075666 A1 WO2019075666 A1 WO 2019075666A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
feature points
feature point
feature
source object
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.)
Ceased
Application number
PCT/CN2017/106714
Other languages
English (en)
French (fr)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201780050383.5A priority Critical patent/CN109952594B/zh
Priority to PCT/CN2017/106714 priority patent/WO2019075666A1/zh
Publication of WO2019075666A1 publication Critical patent/WO2019075666A1/zh
Priority to US16/593,811 priority patent/US11043011B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/18Image warping, e.g. rearranging pixels individually
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/00Two-dimensional [2D] image generation
    • G06T11/60Creating or editing images; Combining images with text
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/211Selection of the most significant subset of features
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/00Two-dimensional [2D] image generation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/17Image acquisition using hand-held instruments
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/771Feature selection, e.g. selecting representative features from a multi-dimensional feature space
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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
    • G06V40/171Local features and components; Facial parts ; Occluding parts, e.g. glasses; Geometrical relationships

Definitions

  • the present invention relates to image processing technologies, and in particular, to an image processing method, apparatus, terminal, and storage medium.
  • Image fusion refers to merging an object in an image frame of a video or a photo with an object in the material, so that the object in the image frame of the video or the object in the photo has the feature of the object in the material; taking the object as a human face as an example, By fusing the face of each image frame in the video with the face in the material image, the face in the video image frame will have the facial features of the face in the material image.
  • embodiments of the present invention are directed to providing an image processing method, apparatus, terminal, and storage medium, which can ensure accurate fusion of objects in a fused image.
  • an embodiment of the present invention provides an image processing method, including:
  • an embodiment of the present invention provides an image processing method, where the method is performed by a terminal, where the terminal includes one or more processors and a memory, and one or more programs, where the one or More than one program is stored in the memory, the program may include one or more units each corresponding to a set of instructions, the one or more processors being configured to execute the instructions; the method comprising:
  • the source object and the material object subjected to the deformation processing are subjected to fusion processing.
  • an embodiment of the present invention provides an image processing apparatus, including:
  • a recognition unit configured to identify a base feature point of the source object in the source image and a base feature point of the material object in the material image
  • the fusion unit is configured to perform fusion processing on the source object and the material object subjected to the deformation processing.
  • an embodiment of the present invention provides an image processing apparatus, including:
  • a memory configured to store an executable program
  • the image processing method provided by the embodiment of the present invention is implemented when the processor is configured to execute the executable program stored in the memory.
  • an embodiment of the present invention provides a terminal, including:
  • a memory configured to store an executable program
  • the image processing method provided by the embodiment of the present invention is implemented when the processor is configured to execute the executable program stored in the memory.
  • the feature points used include basic feature points and auxiliary feature points.
  • the auxiliary feature points effectively complement the basic feature points, effectively overcoming the problem of uneven or even missing feature point sparseness in related technologies, and improving the image. Fusion accuracy
  • the source object and the material object are deformed to ensure the visual characteristics of the source object and the material object with the fusion effect, and the fusion effect is good.
  • FIG. 1A is a schematic structural diagram of an optional hardware of an image processing apparatus according to an embodiment of the present invention.
  • FIG. 1B is a schematic structural diagram of an optional hardware of a terminal according to an embodiment of the present disclosure
  • FIG. 2A is a schematic diagram of an optional application scenario of an image processing method according to an embodiment of the present invention.
  • FIG. 2B is a schematic diagram of an optional application scenario of an image processing method according to an embodiment of the present disclosure
  • FIG. 3 is an optional schematic flowchart of an image processing method according to an embodiment of the present disclosure
  • 4A is an optional schematic diagram of a basic feature point of a source object that is identified according to an embodiment of the present disclosure
  • FIG. 4B is an optional schematic diagram of an auxiliary feature point of the identified source object according to an embodiment of the present invention.
  • FIG. 5 is an optional schematic diagram of performing color balancing on a source object according to an embodiment of the present disclosure
  • FIG. 6 is an optional schematic diagram of a face triangle segmentation according to an embodiment of the present invention.
  • FIG. 7 is an optional schematic diagram of image fusion according to an embodiment of the present invention.
  • FIG. 8 is an optional schematic diagram of performing image background fusion according to an embodiment of the present invention.
  • FIG. 9 is an optional schematic flowchart of an image processing method according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic diagram showing the functional structure of an image processing apparatus according to an embodiment of the present invention.
  • the object can be any element that can be imaged in the image, such as an object, a human body or a specific part of the human body, etc.
  • the face in the material image is used as a material
  • the face in the source image The merging is performed such that the face in the source image also has the facial features of the face in the material image.
  • the face mentioned in the embodiment of the present invention includes the face of the real user object and the face of the cartoon object.
  • Feature points points in the image that can reflect local features of the object (such as color features, shape features, and texture features), generally a collection of multiple pixel points.
  • the feature point may be an eye feature. Point, mouth feature points or nose feature points, etc.
  • Fusion which has the features of the object in the source image when it is imaged with the object in the material image (which may be the same or the same type of object as the object in the source image, or may be a different type of object)
  • the features are merged such that the features of the objects in the source image are merged with the features of the objects in the material image.
  • FIG. 1A an exemplary hardware configuration of an image processing apparatus that implements the image processing method of the embodiment of the present invention will be described with reference to FIG. 1A, and the image processing apparatus may be implemented in various forms, for example,
  • the image processing method of the embodiment of the present invention is implemented by a computer device such as a terminal, a server, or the like in an independent or coordinated manner, by various types of computer devices, such as a desktop computer, a notebook computer, or a smart phone.
  • the hardware structure of the image processing apparatus of the embodiment of the present invention will be described in detail below. It can be understood that FIG. 1A only shows an exemplary structure of the image processing apparatus, not the entire structure, and part or all of the structure shown in FIG. 1A can be implemented as needed. structure.
  • memory 102 can be either volatile memory or non-volatile memory, and can include both volatile and nonvolatile memory.
  • the image processing method disclosed in the embodiment of the present invention may be applied to the processor 101 or implemented by the processor 101.
  • Processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the image processing method can pass the hard in the processor 101.
  • the integrated logic circuit or the instruction in the form of software is completed.
  • the processor 101 described above may be a general purpose processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, or the like.
  • DSP digital signal processor
  • the processor 201 can implement or perform the various methods, steps, and logic blocks disclosed in the embodiments of the present invention.
  • a general purpose processor can be a microprocessor or any conventional processor or the like.
  • FIG. 1B is a schematic diagram of an optional hardware structure of a terminal according to an embodiment of the present disclosure, where the terminal includes:
  • the memory 102 is configured to store an executable program
  • the image processing method provided by the embodiment of the present invention is implemented when the processor 101 is configured to execute an executable program stored in the memory.
  • the memory 102 also stores an operating system 1022 of the terminal.
  • Network interface 104 may include one or more communication modules, such as mobile communication module 1041 and wireless internet module 1042.
  • the A/V (Audio/Video) input unit 120 is for receiving an audio or video signal.
  • a camera 121 and a microphone 122 may be included.
  • the sensing unit 140 includes a sensor 141 that implements acquisition of sensing data, such as a light sensor, a motion sensor, a pressure sensor, an iris sensor, and the like.
  • the display unit 151 displays information input by the user or information provided to the user, and may include a display panel;
  • the audio output module 152 can convert the received or stored audio data into an audio signal and output the same when the terminal is in a call signal receiving mode, a call mode, a recording mode, a voice recognition mode, a broadcast receiving mode, and the like. sound. Moreover, the audio output module can also provide audio output (eg, call signal reception sound, message reception sound, etc.) associated with a particular function performed by the terminal, and can include a speaker, a buzzer, and the like.
  • audio output eg, call signal reception sound, message reception sound, etc.
  • the alarm unit 153 can implement an alarm of a specific event of the terminal, such as a fault alarm.
  • the image processing device according to the embodiment of the present invention has been described in terms of functions. Based on the optional hardware structure of the image processing device, an application scenario of the image processing method in the embodiment of the present invention is described below.
  • FIG. 2A and FIG. 2B are schematic diagrams of an alternative application scenario of the image processing method according to the embodiment of the present invention.
  • the image processing method of the embodiment of the present invention may be implemented by a server.
  • the terminal or the server may be implemented by one or more processors and a memory, and one or more programs, wherein the one or more programs are stored in a memory, and the program may include one or one Each of the above corresponds to a unit of a set of instructions, the one or more processors being configured to execute instructions to implement an image processing method of an embodiment of the present invention.
  • FIGS. 2A and 2B The following description will be respectively made with reference to FIGS. 2A and 2B.
  • the terminal sends a request for image fusion to the server according to requirements, and the image fusion processing is implemented by the server, and the fusion processing result is returned to the terminal.
  • the operation of the fusion processing is completed by the server, which reduces the data processing pressure on the terminal side, and is suitable for the case where the resolution of the source image is large.
  • the terminal can target a specific object through its own image acquisition device (such as a camera) (ie, the source object, such as a face, of course, the source object can also be other forms of objects such as an animal head).
  • a source image such as a video frame in a photo or video
  • an image fusion request the source image is carried in the request
  • the server parses the image fusion request to the source image.
  • the material image is fused to form a fused image, and the fusion result is sent to the terminal, and the terminal displays according to the fused image returned by the server.
  • the material image used in the fusion processing of the server is described, and the material image may have the following cases:
  • the material image is selected by the user on the terminal side and carried in the image fusion request sent by the terminal, and the server obtains the material image by parsing the image fusion request.
  • a live communication such as a WeChat chat scenario
  • User A wants to display his own image (source image) displayed in the video window and User B displayed in the video window.
  • the image (material image) is merged, and the user A sends an image fusion request carrying the source image and the material image to the server through the terminal used, and realizes image fusion through the server, and obtains the fusion result returned by the server.
  • the material image is preset by the user on the server side, and the server side pre-stores the mapping relationship between the user identifier and the material image.
  • the server After receiving the image fusion request, the server parses the user identifier carried in the image fusion request, based on the user identifier. Get the corresponding material image.
  • the server After receiving the image fusion request, the server parses the user identifier carried in the image fusion request, acquires the user's usage record based on the user identifier, and obtains a material object with a higher frequency of use based on the obtained usage record, thereby based on the frequency of use. Select a material image that the user likes or is interested in.
  • the server After receiving the image fusion request, the server randomly selects the material image (such as randomly selected from its own material image library).
  • the user selects a material image on the terminal side (which may be a material image stored locally by the terminal, or the user triggers the terminal to obtain from the server) Material image), the material image is implemented by the terminal
  • the image of the source image (which can be collected or preset by the terminal in real time) can be merged.
  • the image fusion can be real-timed on the terminal side, which improves the image fusion efficiency and enhances the user experience.
  • an image processing client is disposed on the terminal, and the image processing client includes a material image library, which provides material images of different styles (such as military uniforms, costume beauty, childhood memories, etc.).
  • the style image of the material includes at least one material image.
  • the user selects a material image in a specific style, and then collects the face image (ie, the source image) of the image through the camera to realize real-time fusion of the material image and the source image, and output fusion. After the image processing results.
  • FIG. 3 is a schematic flowchart of an image processing method according to an embodiment of the present invention.
  • the image processing method of the embodiment of the present invention is applied to a terminal, and the terminal is provided with
  • the image processing client see Fig. 3, relates to steps 200 to 205, which are separately described below.
  • Step 200 The image processing client sends a material image acquisition request to the server.
  • the terminal needs to acquire the source image and the material image before performing the image fusion processing, and in actual implementation, the material image can be obtained in at least two ways:
  • the user triggers sending a request for acquiring the specified material image (may carry the identifier of the specified material image) to the server, and obtains the material image returned by the server (for example, the user clicks on the icon corresponding to the material image, and triggers the terminal to send the material corresponding to the icon)
  • the image is requested to the server, and the corresponding material image returned by the server is obtained, as shown in FIG.
  • Step 201 Receive a material image returned by the server.
  • Step 202 Acquire a source image.
  • the source image can be obtained in at least two ways:
  • Step 203 Identify a base feature point of the source object in the source image and a base feature point of the material object in the material image.
  • the manner in which the image processing client recognizes the base feature point of the source object in the source image is similar to the manner of identifying the base feature point of the material object in the material image, to identify the basic feature point of the source object in the source image as
  • the process of the image processing client identifying the base feature points of the source object in the source image is as follows:
  • the image processing client identifies the imaging region of the source object from the source image; compares the feature extracted from the imaging region of the source object with the candidate object feature template; and identifies the feature point in the successfully succeeded object feature template as the source
  • the base feature point of the object It can be understood that the terminal side is provided with an object feature template library, and a plurality of object feature templates are stored, and each object feature template is labeled with a plurality of (83 in an alternative embodiment) basic feature points, when the source object is When the feature extracted by the imaging region matches the feature of the object feature template (the similarity exceeds the preset threshold), the basic feature point of the object feature template is regarded as the basic feature point of the source object, see FIG. 4A, and FIG. 4A identifies An optional schematic diagram of the base feature points of the source object, the identified 83 base feature points are shown in Figure 4A.
  • the image processing client recognizes the imaged area of the source object from the source image, that is, the image. Handling the client for face detection.
  • face detection accurately calibrates the position and size of the face (ie, the face is imaged) in the image; the face features in the image include a rich set of features, such as Histogram features, color features, template features, and structural features; face detection is the extraction of useful features in the image, and use these features to calibrate the face.
  • face detection may use Adaboost's machine learning algorithm to calibrate a face based on the above features; the Adaboost algorithm is an iterative algorithm for classification.
  • the Adaboost algorithm is used to select some rectangular features that are most representative of the face (implemented by the weak classifier), and then the weak classifier is constructed as a strong classifier according to the weighted voting method, and then the training is obtained.
  • a number of strong classifiers are connected in series to form a cascaded classifier of the cascade structure, which effectively improves the speed at which the classifier detects faces.
  • face detection can be implemented by face detection technology such as face detection, OpenCV face detection, Face++, sensetime, and Tencent excellent face detection.
  • image preprocessing must be performed on grayscale correction and noise filtering in the early stage of image processing, that is, the person who is detected.
  • the face image is preprocessed; here, for the face image, the preprocessing process mainly includes: ray compensation, gradation transformation, histogram equalization, normalization, geometric correction, filtering, and sharpening of the face image. .
  • the features extracted by the image processing client in the process of recognizing the basic feature points of the face are generally divided into visual features, pixel statistical features, face image transform coefficient features, face image algebra features, and the like.
  • the methods for extracting facial image features can be summarized into two categories: one is based on knowledge representation method, and the other is based on algebraic features or statistical learning.
  • the knowledge-based representation method mainly obtains the feature data which is helpful for face classification according to the shape description of the face organ and the distance characteristics between the face organs, and the feature components usually include the Euclidean between the feature points. Distance, curvature, angle, etc.; the face is composed of local features such as eyes, nose, mouth and chin.
  • the geometric description of these local features and the structural relationship between the local features can be used as important features for recognizing human faces.
  • Features are called geometric features.
  • Step 204 Identify, according to the distribution of the basic feature points in the source image and the material image, the auxiliary feature points that are consistent with the preset filling conditions according to the basic feature point distribution.
  • the manner of identifying the auxiliary feature points according to the basic feature point distribution that meet the preset filling conditions includes at least two of the following:
  • determining that the distribution density of the feature points in the source image and the material image exceeds the first region of the first density threshold includes:
  • the pixel point is selected as the auxiliary feature point in the adjacent region of the first region, including:
  • a pixel point is selected as the auxiliary feature point in the adjacent region according to a filling condition that does not exceed a predetermined difference value from a difference in feature point distribution density of the first region.
  • the source object and the material object are both faces, and the area where the distribution density of the basic feature points exceeds the average distribution density of the facial feature points is calculated as an eye region, as shown in FIG. 4A, correspondingly, the adjacent region of the eye is obtained.
  • the pixel point is selected as the auxiliary feature point in the eyelid region.
  • FIG. 4B is an embodiment of the present invention.
  • An optional schematic diagram of the identified auxiliary feature points of the source object, such as feature points 84 through 130 in FIG. 4B are identified auxiliary feature points.
  • the second density threshold is used to determine whether a candidate feature point of a certain region is relatively sparse
  • determining that the distribution density of feature points in the source image and the material image is low The second region of the second density threshold includes:
  • the pixel points are selected as the auxiliary feature points in the second region, including:
  • the pixel point is selected as the auxiliary feature point in the second region according to a filling condition that makes the difference of the distribution density of the second region exceed a predetermined ratio of the average distribution density of the facial feature points.
  • the source object and the material object are both faces, and the area where the distribution density of the basic feature points is lower than the average distribution density of the facial feature points is calculated as the forehead area, as shown in FIG. 4A, according to the feature points of the forehead area.
  • the distribution density exceeds the filling condition of the second density threshold, and the pixel point is selected as the auxiliary feature point in the forehead region, as shown in FIG. 4B.
  • the base feature point density threshold may be set to form a density gradient of the base feature point, that is, the second density threshold is smaller than the first density threshold (in practical applications, the average density of the feature points may be used) If the density of the basic feature points of a certain area exceeds the first density threshold, it indicates that the basic feature points of the area are densely distributed, so that the fusion effect of the area and its adjacent areas is better and accurate in the subsequent image fusion process.
  • the first density threshold and the second density threshold may be set according to actual needs.
  • Step 205 Calculate an average feature point according to the positions of the same type of feature points in the source object and the material object.
  • the position of the average feature point can be calculated by calculating the source object and the material pair.
  • the average coordinates of the positions of the same type of feature points are obtained.
  • the final result of the image fusion is more likely to be (close to) the material object or the source object, and therefore, in an optional
  • the location weight corresponding to the material object and the source object may be set, and the position of the feature point of the different types of the source object and the position of the feature point of the material object belonging to the same type as the feature point located by the source object may be set according to the fusion result.
  • Similarity to the material object for example, the degree of similarity to the material object in the fusion effect is 30%, that is, the fusion effect tends to be 30% of the material object
  • the similarity with the source object for example, the fusion effect and the source
  • the degree of similarity of the object is 70%, that is, the degree of convergence tends to be 70% of the source object
  • the position weight corresponding to the material object and the source object is determined (in actual implementation, the degree and the corresponding position weight are preset)
  • Correspondence relationship for example, when the fusion effect tends to be 70% of the source object, the corresponding source object's position right 0.6); according to the position of the located position corresponding to a weight increase and to obtain the average position of the corresponding feature points.
  • the location of the different types of feature points of the source object and the location of the feature points of the material object that belong to the same type as the feature points located by the source object may be implemented by:
  • the reference feature points of the source object and the material object are determined; by aligning the position of the reference feature point, the size of the source object is adjusted to match the size of the material object; and then the same type of feature points of the source object and the material object are determined according to the matching result. s position.
  • the selection of the reference feature points may be selected according to actual needs, such as selecting eyebrow feature points, nose tip feature points, etc.; the above-mentioned size matching is uniform in size, and in actual implementation, the image is imaged based on the alignment of the reference feature points.
  • the result may be compared according to the color value of the source object and the material object (R, G, B channels) Adjust the color of the source object and the material object separately for comparison) The color satisfies the equilibrium condition. In this way, the color effect of the fused image is made more natural.
  • FIG. 5 is an optional schematic diagram of color balancing the source object according to an embodiment of the present invention. Referring to FIG. 5, before and after color balance (ie, skin color adjustment) of the face, the skin color changes. A contrast diagram that makes the skin color closer to the hue of the material object.
  • the image processing client in order to make the color of the source object and the color of the material object satisfy the equilibrium condition, the image processing client can be adjusted as follows:
  • the compensation value of the corresponding pixel point is determined; and the color value of the corresponding pixel point of the source object is compensated according to the compensation value.
  • the image processing client can determine the compensation value of the corresponding pixel by:
  • the first compensation coefficient and the second compensation coefficient are determined according to a ratio of an original color value of the corresponding pixel point to an average color value of the source object; the reference value is a difference between the average color value of the source object and the average color value of the material object. The value is determined.
  • the color value of each pixel in the source object is recorded as X R
  • the average color value of the source object is U R
  • the average color of the material object is M R , wherein the color values of the pixels are between 0 and 1;
  • X R X R +(M R -U R )* ⁇ (1.0-X R )/(1.0-U R ) ⁇ ; where M R -U R is a reference value, ( 1.0-X R )/(1.0-U R ) is the first compensation coefficient;
  • Step 206 Perform deformation processing on the source object and the material object according to the average feature point.
  • the image processing client can implement the above deformation processing by:
  • adjusting the position of the feature point in the source object to match the position of the average feature point, and adjusting the position of the feature point in the material object to match the position of the average feature point may adopt one of the following:
  • FIG. 6 is an implementation of the present invention.
  • the schematic diagram of the face triangle segmentation provided by the example if the position of any feature point is changed, the corresponding triangle will also be distorted, thereby causing the face deformation, and the triangle and the structure based on the feature point of the source object may be respectively constructed in units of triangles.
  • the triangle based on the feature point construction of the material object infinitely matches the triangle based on the average feature point construction, and realizes the feature point of the source object, the feature point of the material object and the corresponding average feature point.
  • the source object is affine transformed according to the position of the average feature point and the positional relationship of the corresponding feature point in the source object; according to the position of the average feature point and the positional relationship of the corresponding feature point in the material object , affine transformation of the material object.
  • affine transformation of the material object can also be used.
  • the warping template may be constructed based on the average feature points, and the source object and the material object may be twisted based on the constructed warping template.
  • Step 207 Perform fusion processing on the deformed source object and the material object.
  • the image processing client deforms the mask image of the material image according to the material object synchronously (or may deform the mask image of the material image based on the deformed material object to match the two);
  • the color values of the pixel points of the source object, the material object, and the mask image are weighted and summed (in actual implementation, the R, G, and B color channels are respectively weighted and summed).
  • the color values of the deformed source object, the material object, and the pixel points of the mask image are weighted and summed, including:
  • the fusion weight of the source object and the material object is determined based on the preset image fusion factor;
  • the image fusion factor has a value between 0 and 1;
  • the color values of the pixel points at the same position in the source object and the material object subjected to the deformation processing are weighted and summed according to the corresponding fusion weights.
  • the preset image fusion factor is alphaBlend, 0 ⁇ alphaBlend ⁇ 1, and the value of alphaBlend is used to control the merged image to be closer to the source pair.
  • An image or material object in an alternative embodiment, the larger the alphaBlend, the closer the merged image is to the material object;
  • the color value of the pixel of the source object is UserR
  • the color value of the pixel of the material object is StuR
  • the color value of the pixel of the mask image is StuMaskR
  • the color value of the pixel of the fused image is TarR, and the above values are all 0 to 1;
  • TarR (1.0–alpha)*UserR+alpha*StuR;
  • alphaBlend the larger the value of the corresponding alpha is, that is, the greater the fusion weight of the material object, and the closer the merged image is to the material object.
  • the image fusion factor corresponding to the image fusion is set, and the fusion weights of the source object and the material object are determined based on the image fusion factor, and then the color values of the respective objects are weighted and summed, so that the merged image is
  • the boundary (such as the corner of the eye) transitions naturally, there is no bluntness, and the fusion effect is good.
  • FIG. 7 is an optional schematic diagram of image fusion according to an embodiment of the present invention. As can be seen from FIG. 7 , the human face in the merged image is both an active image. The characteristics of the face also have the characteristics of the face in the material image.
  • the masking source object and the material object may be directly subjected to weighted fusion processing without using the mask image, so that the fusion process is simpler.
  • the merged object is obtained, and the source object and the material object are respectively regarded as foreground images in the image, and the obtained merged image is also a foreground object.
  • the background of the image may be further The background layer fusion processing is performed.
  • the background layer fusion processing may be performed in the following manner:
  • Extracting a background layer of the material image ie, an image other than the material object
  • FIG. 8 is a schematic diagram of merging a fused image with a background material object according to an embodiment of the present invention.
  • the image 1 is a fused image after being fused, and in actual application, the fused image is in the fused image.
  • the fusion object can be a human face (including a real face, a cartoon face, etc.), or a non-human face, such as a human body, an animal's face, and the like.
  • a corresponding set of basic feature points and auxiliary feature points there is a corresponding set of basic feature points and auxiliary feature points.
  • the basic feature points of the fusion object and the basic feature points of the material object are identified, and the auxiliary feature points in the corresponding image are determined according to the distribution of the basic feature points, and the same type of feature points in the fusion object and the material object are determined, and according to the same type
  • the position of the feature point is determined, and the average feature point is determined.
  • the fusion object and the material object are deformed according to the average feature point, and finally the fusion object and the material object subjected to the deformation processing are fused to obtain a fused image.
  • the fusion object as the palm as an example, there is a corresponding set of basic feature points and auxiliary feature points corresponding to the fusion object.
  • the basic feature points of the palm may include fingertips, knuckles, different types of palm prints, palm contours, etc.
  • the feature points may be selected based on the distribution density of the basic feature points in the palm image, and the selection process is similar to the selection process of the face-aided feature points, such as determining the first region where the distribution density of the base feature points exceeds the first density threshold, according to The difference of the feature point distribution density of an area does not exceed the filling condition of the predetermined difference, and the pixel point is selected as the auxiliary feature point in the adjacent area of the first area.
  • the fused image can be further fused with the background material object.
  • the foreground object in the image 1 is a cartoon character (non-real face) processed by the face fusion, through the background mask 3
  • the foreground layer and the background layer in the image 1 are separated, and the foreground layer 4 in the image 1 is extracted, and the image 2 is an image selected by the user as a background material object, and the image 2 can be further deformed.
  • other processing methods, such as color conversion, etc. may be used to obtain the image 5, and then the image 5 and the image 4 are fused to realize the fusion of the background layer to obtain the final fused image 6.
  • the operations of the foregoing steps 203 to 207 can be performed on a graphics processing unit (GPU) of the terminal, which realizes real-time image fusion and greatly improves the user experience.
  • GPU graphics processing unit
  • FIG. 9 is an optional schematic flowchart of an image processing method according to an embodiment of the present invention. For example, it involves steps 301 and 306, which are respectively described below.
  • Step 301 Select a photo containing a human face or capture an image containing a human face through a camera.
  • the purpose of this step is to obtain a source image for fusion (a photo containing a face, an image containing a face captured by a camera), and the face in the source image is a source object for fusion. .
  • Step 302 Face detection and facial features positioning, and acquiring facial features.
  • the identification of the basic feature points can be as follows:
  • the feature points in the object feature template are identified as the basic feature points of the face region.
  • the auxiliary feature points of the face region are calculated based on the distribution of the basic feature points.
  • the average density of the distribution of the basic feature points in the face region is calculated, and the first region in which the distribution density of the feature points in the face region exceeds the average distribution density of the facial feature points is determined. Included in at least one of the following regions: an eye, a nose, and a mouth; and then positioning the identified adjacent regions of the first region: eyelids, eyelids, cheeks, and mouth angles; and distribution of feature points according to the determined first region
  • the difference in density does not exceed the filling condition of the predetermined difference, and the pixel point is selected as the auxiliary feature point in the adjacent region.
  • the acquisition of the auxiliary feature points can make the subsequent face segmentation more fine and the fusion precision is higher.
  • Step 303 User photo cropping and skin color adjustment.
  • the user photo here refers to a photo containing a face selected in the step 301 of the feature point, or an image of the feature point captured by the camera to capture the face.
  • the process of user photo cropping is a process of triangulating the user's photo based on the determined feature points, that is, the determined basic feature point and the auxiliary feature point are triangular structures of the vertices of the triangle, and several triangles can be obtained, if any feature points are changed Position, the corresponding triangle will also be distorted, which will cause the face to deform, through Triangle coordinate transformation can achieve the effect of face deformation.
  • This triangle split is suitable for the OpenGL rendering process, making it easy to use OpenGL for subsequent image fusion.
  • the process of adjusting skin tone includes the following:
  • the face area of the user image and the face area of the material image are intercepted
  • the average color value of the face region of the user image and the face region of the material image are respectively calculated (the three color channels of R, G, and B are respectively calculated), and the average color values of the three channels of the user image face region are respectively recorded as: userR, userG. , userB, the average color value of the three-channel face of the material image is recorded as: modelR, modelG, modelB.
  • diffB modelB-userB.
  • each pixel here taking the R channel as an example, denoted as xr, there are:
  • Xr xr+diffR*((1.0-xr)/(1.0-userR));
  • the G and B channels perform similar operations to obtain the converted pixel values for each pixel.
  • Step 304 Acquire a facial feature of a cartoon character in the material image.
  • the facial image positioning and feature point recognition of the material image can be performed in the same manner as the user image, and the basic feature points and the auxiliary feature points of the cartoon character face are obtained.
  • Step 305 Perform position adjustment on the face feature points of the user image.
  • the average feature point is obtained based on the feature point position of the cartoon face and the feature point position of the face in the user image; each feature point of the face in the user image has a corresponding feature point on the face of the cartoon person. (such as the corresponding feature points of the pupil), the coordinates of the two points are weighted and averaged (the weight values of the two can be set according to actual needs), and a new set of feature points is obtained, which is the average feature point.
  • Position adjustment of the face feature points of the user image that is, performing feature point coordinate transformation on the face feature points, including:
  • the size of the user's face and the cartoon face are adjusted to be consistent (for example, the user image and the cartoon character image are first aligned with the eyebrow center as the center point, and then the user image is scaled by using the pupil distance as a standard. Both are the same size);
  • the position of the feature point in the user's face is adjusted to match the position of the average feature point
  • the position of the feature point in the cartoon face is adjusted to match the position of the average feature point
  • the above location matching can be achieved as follows:
  • Step 306 Perform area segmentation on the user face and the cartoon face, draw the user face on the corresponding area of the cartoon character image, and perform color fusion.
  • the drawing of the user's face in the corresponding area of the cartoon character image means that the determined average feature points are arranged in the area of the cartoon character image that originally belonged to the cartoon face.
  • the cartoon face area is displayed as a user face and a cartoon face.
  • Each material image is equipped with a face mask (the pure black area represents 100% user image pixels; the pure white area represents 100% of the material image pixels, and the intermediate transition represents between 100% and 0% of the user image pixels and 0% to 100% of the material image pixels). Blurring the edge of the mask can ensure the natural transition of the face edge after the user's face and the cartoon face are merged. Similarly, because the user's face changes as the facial features change, the face area of the mask also has to be deformed accordingly.
  • color fusion is performed by weighting and summing the color values of the user's face and the cartoon face and the pixel of the mask image after the position adjustment.
  • the following methods can be used:
  • the three-channel color value (gray value) of the pixel of the user's face is: UserR, UserG, UserB;
  • the color values of the three channels of the cartoon face in the material picture are: StuR, StuG, StuB;
  • the color values of the three channels of the mask are: StuMaskR, StuMaskG, and StuMaskB;
  • the above values range from 0 to 1, and the fusion factor alphaBlend is preset for image fusion.
  • the alphaBlend is used to control whether the image after fusion is closer to the user or the person in the material.
  • TarB (1.0–alpha)*UserB+alpha*StuB.
  • the merged image has both the characteristics of the user's face and the cartoon person in the material image.
  • the characteristics of the face, and the edge transition is natural, and the fusion precision is high.
  • the background of the fused image may be adjusted, and the background image and the foreground layer of the fused image are identified and separated by using the mask image, and any image is selected.
  • the background image can be deformed or otherwise processed; the new background is merged with the previously separated foreground image to generate a fusion result map of the letter.
  • FIG. 10 is a schematic diagram of an optional functional structure of an image processing apparatus according to an embodiment of the present invention.
  • the image processing apparatus 300 includes:
  • the identification unit 11 is configured to identify a base feature point of the source object in the source image and a base feature point of the material object in the material image;
  • the processing unit 12 is configured to calculate an average feature point according to the location of the same type of feature points in the source object and the material object;
  • the fusion unit 13 is configured to perform fusion processing on the source object and the material object subjected to the deformation processing.
  • the identifying unit 11 is further configured to identify an imaging area of the source object from the source image;
  • the feature points in the successful object feature template are identified as the base feature points of the source object.
  • the identifying unit 11 is further configured to: when the type of the source object and the material object is a human face, determine that a distribution density of feature points in each of the images exceeds a facial feature point average a first region of distributed density comprising at least one of: an eye, a nose, and a mouth;
  • the processing unit 12 is further configured to locate a location of any feature point of the source object, and a feature point of the material object that belongs to the same type as the feature point where the source object is located s position;
  • the merging unit 13 is further configured to perform a deformation process on the mask image of the material image in synchronization with the material object;
  • the color values of the source object, the material object, and the pixel points of the mask image subjected to the deformation processing are weighted and summed.
  • the merging unit 13 is further configured to extract a background layer of the material image, and synthesize the background layer with the fusion result as a foreground layer; or
  • the above unit may be implemented by a central processing unit (CPU), a microprocessor (MPU, Micro Processor Unit), a DSP, or a Field Programmable Gate Array (FPGA).
  • CPU central processing unit
  • MPU Microprocessor
  • DSP Digital Signal processor
  • FPGA Field Programmable Gate Array
  • the embodiment of the present invention further provides a readable storage medium, which may include: a mobile storage device, a random access memory (RAM), a read-only memory (ROM), a magnetic disk, or A variety of media such as optical discs that can store program code.
  • a readable storage medium stores an executable program
  • the executable program is also implemented when executed by the processor:
  • the executable program is also implemented when executed by the processor:
  • the executable program is also implemented when executed by the processor:
  • determining a first region in which the distribution density of the feature points in each of the images exceeds the average distribution density of the facial feature points including at least one of the following: an eye, a nose Department and mouth;
  • the executable program is also implemented when executed by the processor:
  • the executable program is also implemented when executed by the processor:
  • determining a second region in which the distribution density of the feature points in each of the images is lower than the average distribution density of the facial feature points including at least one of the following: a squat, a forehead And cheeks;
  • the pixel point is selected as the auxiliary feature point according to a filling condition that causes a difference in the distribution density of the second region to exceed a predetermined ratio of the average distribution density of the facial feature points.
  • the executable program is also implemented when executed by the processor:
  • the positions that are located are summed according to the corresponding position weights, and the positions of the corresponding average feature points are obtained.
  • the executable program is also implemented when executed by the processor:
  • the executable program is also implemented when executed by the processor:
  • the executable program is also implemented when executed by the processor:
  • the executable program is also implemented when executed by the processor:
  • the color values of the source object, the material object, and the pixel points of the mask image subjected to the deformation processing are weighted and summed.
  • the source object of the deformation process and the color value of the pixel at the same position in the material object are weighted and summed according to the corresponding fusion weight.
  • the executable program is also implemented when executed by the processor:
  • An image different from the source image and the material image is used as a background layer
  • the synthesis results for the foreground layer are synthesized.
  • the embodiments of the present invention can achieve the following beneficial effects:
  • the feature points used in the fusion process of the source object and the material object include the basic feature points of the object and the auxiliary feature points identified based on the distribution of the basic feature points, thus increasing the number and type of the feature points, The feature point density is increased, the unit of fusion processing is reduced, and the processing precision is improved, and the fusion precision of the image can be ensured to meet the use requirement;
  • the source object and the material object are deformed according to the calculated average feature points, so that the source object and the material object are more matched during the fusion processing, and the fusion effect is obtained. better.
  • the image fusion process can be performed on the GPU on the terminal, realizing the real-time integration.
  • embodiments of the present invention can be provided as a method, system, or executable program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the present invention can take the form of an executable program product embodied on one or more computer usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • computer usable storage media including but not limited to disk storage and optical storage, etc.
  • the executable program instructions can also be stored in a computer readable memory that can boot a computer or reference a programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.
  • the executable program instructions can also be loaded onto a computer or reference programmable data processing device such that a series of operational steps are performed on the computer or reference programmable device to produce computer-implemented processing for execution on a computer or reference programmable device
  • the instructions provide steps configured to implement the functions specified in a block or blocks of a flow or a flow and/or block diagram of the flowchart.
  • the embodiment of the present invention identifies a base feature point of the source object in the source image and a base feature point of the material object in the material image; and determines an auxiliary feature point in the corresponding image according to the distribution of the basic feature points in each of the images;
  • the source object is the same type of feature point as the material object, and the same type of feature point includes the same type of base feature point and the same type of auxiliary feature point in the source object and the material object; Determining, by the position of the same type of feature points, an average feature point; deforming the source object and the material object according to the average feature point; and fusing the source object and the material object after the deformation processing Reason.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Human Computer Interaction (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种图像处理方法,包括:识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;根据各所述图像中的基础特征点的分布,从相应图像中识别出根据所述分布符合填充条件的辅助特征点;确定所述源对象与所述素材对象中相同类型的特征点,所述相同类型的特征点包括所述源对象与所述素材对象中相同类型的基础特征点、以及相同类型的辅助特征点;根据所述相同类型的特征点的位置,确定平均特征点;将所述源对象和所述素材对象根据所述平均特征点进行变形处理;将经过变形处理的所述源对象和素材对象进行融合处理。本发明还公开了一种图像处理装置、终端以及存储介质。

Description

图像处理方法、装置、终端及存储介质 技术领域
本发明涉及图像处理技术,尤其涉及一种图像处理方法、装置、终端及存储介质。
背景技术
随着图像处理技术的飞速发展,图像融合得到广泛应用。
图像融合是指,将视频的图像帧中或者照片中的对象,与素材中的对象进行融合,使得视频的图像帧中或者照片中的对象具有素材中对象的特征;以对象为人脸为例,通过将视频中各图像帧的人脸与素材图像中的人脸进行融合,那么,视频图像帧中的人脸将具有素材图像中人脸的五官特征。
目前,视频图像帧中或者照片中对象成像与素材中对象成像融合时,存在融合精度无法满足使用需求的问题。
发明内容
有鉴于此,本发明实施例期望提供一种图像处理方法、装置、终端及存储介质,能够保证实现融合图像中对象的精确融合。
为达到上述目的,本发明实施例的技术方案是这样实现的:
第一方面,本发明实施例提供一种图像处理方法,包括:
识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点;确定所述源对象与所述素材对象中相同类型特征点,所述相同类型的特征点包括所述源对象与所述素材对象中相同类型的基础特征点、 以及相同类型的辅助特征点;根据所述相同类型的特征点的位置,确定平均特征点;将所述源对象和所述素材对象根据所述平均特征点进行变形处理;将经过变形处理的所述源对象和素材对象进行融合处理。
第二方面,本发明实施例提供一种图像处理方法,所述方法由终端执行,所述终端包括有一个或多个处理器以及存储器,以及一个或一个以上的程序,其中,所述一个或一个以上的程序存储于存储器中,所述程序可以包括一个或一个以上的每一个对应于一组指令的单元,所述一个或多个处理器被配置为执行指令;所述方法包括:
识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;
根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点;
确定所述源对象与所述素材对象中相同类型特征点,所述相同类型的特征点包括所述源对象与所述素材对象中相同类型的基础特征点、以及相同类型的辅助特征点;
根据所述相同类型的特征点的位置,确定平均特征点;
将所述源对象和所述素材对象根据所述平均特征点进行变形处理;
将经过变形处理的所述源对象和素材对象进行融合处理。
第三方面,本发明实施例提供一种图像处理装置,包括:
识别单元,配置为识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;
以及,配置为根据各所述图像中的基础特征点的分布,从相应图像中识别出根据所述分布符合填充条件的辅助特征点;
处理单元,配置为确定所述源对象与所述素材对象中相同类型特征点,所述相同类型的特征点包括所述源对象与所述素材对象中相同类型的基础 特征点、以及相同类型的辅助特征点;
根据所述相同类型的特征点的位置,确定平均特征点;
以及,配置为将所述源对象和所述素材对象根据所述平均特征点进行变形处理;
融合单元,配置为将经过变形处理的所述源对象和素材对象进行融合处理。
第四方面,本发明实施例提供一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现本发明实施例提供的图像处理方法。
第五方面,本发明实施例提供一种图像处理装置,包括:
存储器,配置为存储可执行程序;
处理器,配置为执行所述存储器中存储的可执行程序时,实现本发明实施例提供的图像处理方法。
第六方面,本发明实施例提供一种终端,包括:
存储器,配置为存储可执行程序;
处理器,配置为执行所述存储器中存储的可执行程序时,实现本发明实施例提供的图像处理方法。
应用本发明上述实施例具有以下有益效果:
1)采用的特征点包括基础特征点和辅助特征点,其中辅助特征点对基础特征点进行了有效地补充,有效克服了相关技术采用的特征点稀疏程度不均衡甚至缺失的问题,提升了图像的融合精度;
2)根据平均特征点对源对象和素材对象进行变形处理,保证了融合效果兼具的源对象和素材对象的视觉特征,融合效果好。
附图说明
图1A为本发明实施例提供的图像处理装置的一个可选的硬件结构示意图;
图1B为本发明实施例提供的终端的一个可选的硬件结构示意图;
图2A为本发明实施例提供的图像处理方法的一个可选的应用场景示意图;
图2B为本发明实施例提供的图像处理方法的一个可选的应用场景示意图;
图3为本发明实施例提供的图像处理方法的一个可选的流程示意图;
图4A为本发明实施例提供的识别出的源对象的基础特征点的一个可选的示意图;
图4B为本发明实施例提供的识别出的源对象的辅助特征点的一个可选的示意图;
图5为本发明实施例提供的对源对象进行颜色均衡后的一个可选的示意图;
图6为本发明实施例提供的人脸三角形分割的一个可选的示意图;
图7为本发明实施例提供的图像融合的一个可选的示意图;
图8为本发明实施例提供的进行图像背景融合的一个可选的示意图;
图9为本发明实施例提供的图像处理方法的一个可选的流程示意图;
图10为本发明实施例提供的图像处理装置的功能结构示意图。
具体实施方式
以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所提供的实施例仅仅用以解释本发明,并不用于限定本发明。另外,以下所提供的实施例是用于实施本发明的部分实施例,而非提供实施本发明的全部实施例,在不冲突的情况下,本发明实施例记载的技术方案可以任意组合的方式实施。
对本发明实施例进行进一步详细说明之前,对本发明实施例中涉及的名词和术语进行说明,本发明实施例中涉及的名词和术语适用于如下的解 释。
1)源图像和素材图像,需要针对所包括的对象进行融合的图像,包括需要处理的对象(即源对象)的图像为源图像,包括用于进行融合的素材对象的图像为素材图像。
以对象为人脸为例(当然,对象可以为在图像中能够成像的任意元素,如物体、人体或人体特定部位等),素材图像中的人脸用于作为素材,与源图像中的人脸进行融合,使得源图像中的人脸还具有素材图像中人脸的五官特征;需要说明的是,本发明实施例中提到的人脸包括真实用户对象的脸部及卡通对象的脸部。
可以理解的是,源图像与素材图像为相对的概念,在一个融合处理实施例中作为源图像的图像,在另一个融合处理实施例中可以作为素材图像。
2)特征点,在图像中能够反映对象的局部特征(如颜色特征、形状特征和纹理特征)的点,一般为多个像素点的集合,以人脸图像为例,特征点可以是眼睛特征点、嘴巴特征点或鼻子特征点等。
3)相同类型特征点,源图像及素材图像中标识源对象及素材对象的同一特征部位的点,以对象为人脸为例,标识源对象的鼻尖部位的特征点和标识素材对象的鼻尖部位的特征点为相同类型特征点。
4)尺寸,对象在图像中成像区域的分布的度量,以人脸为例,尺寸包括可以表示为人脸在二维平面的宽度和高度。
5)融合,将源图像中的对象成像时具有的特征,与素材图像中的对象(可以与源图像中的对象为同一个或同一类型的对象,也可以为不同类型的对象)成像时具有的特征进行合并,使源图像中对象的特征与素材图像中对象的特征融合在一起。
接下来根据图1A说明实现本发明实施例的图像处理方法的图像处理装置的示例性的硬件结构,图像处理装置可以以各种形式来实施,例如终 端(如台式机电脑、笔记本电脑或智能手机)、服务器、或终端服务器等各种类型的计算机设备,由终端、服务器等计算机设备采用独立或协同的方式实现本发明实施例的图像处理方法。下面对本发明实施例的图像处理装置的硬件结构做详细说明,可以理解,图1A仅仅示出了图像处理装置的示例性结构而非全部结构,根据需要可以实施图1A示出的部分结构或全部结构。
参见图1A,图1A为本发明实施例提供的图像处理装置的一个可选的硬件结构示意图,实际应用中可以应用于前述的运行应用程序的各种终端,图1A所示的图像处理装置100包括:至少一个处理器101、存储器102、用户接口103和至少一个网络接口104。图像处理装置100中的各个组件通过总线系统105耦合在一起。可以理解,总线系统105用于实现这些组件之间的连接通信。总线系统105除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图1A中将各种总线都标为总线系统105。
其中,用户接口103可以包括显示器、键盘、鼠标、轨迹球、点击轮、按键、按钮、触感板或者触摸屏等。
可以理解,存储器102可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。
本发明实施例中的存储器102用于存储各种类型的数据以支持图像处理装置100的操作。这些数据的示例包括:用于在图像处理装置100上操作的任何计算机程序,如可执行程序1021,实现本发明实施例的图像处理方法的程序可以包含在可执行程序1021中。
本发明实施例揭示的图像处理方法可以应用于处理器101中,或者由处理器101实现。处理器101可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,图像处理方法的各步骤可以通过处理器101中的硬 件的集成逻辑电路或者软件形式的指令完成。上述的处理器101可以是通用处理器、数字信号处理器(DSP,Digital Signal Processor),或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器201可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器102,处理器101读取存储器102中的信息,结合其硬件完成本发明实施例提供的图像处理方法的步骤。
在本发明一个实施例中,图1B示出的图像处理装置实施为终端,参见图1B,图1B为本发明实施例提供的终端的一个可选的硬件结构示意图,终端包括:
存储器102,配置为存储可执行程序;
处理器101,配置为执行所述存储器中存储的可执行程序时,实现本发明实施例提供的上述图像处理方法。
存储器102还存储有终端的操作系统1022。
网络接口104可以包括一个或多个通信模块,如包括移动通信模块1041及无线互联网模块1042。
A/V(音频/视频)输入单元120用于接收音频或视频信号。可以包括摄像头121和麦克风122。
感测单元140包括传感器141,实现传感数据的采集,比如光传感器、运动传感器、压力传感器、虹膜传感器等。
电源单元190(比如电池),优选的,电源单元190可以通过电源管理系统与处理器101逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
输出单元150,包括:
显示单元151,显示由用户输入的信息或提供给用户的信息,可包括显示面板;
音频输出模块152,可以在终端处于呼叫信号接收模式、通话模式、记录模式、语音识别模式、广播接收模式等模式下时,将接收的或者在存储器中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出模块还可以提供与终端执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等),可以包括扬声器、蜂鸣器等。
警报单元153,可实现终端的特定事件的告警,如故障告警等。
至此,已经按照功能描述了本发明实施例中涉及的图像处理装置,基于上述图像处理装置的可选硬件结构示意图,下面对实现本发明实施例的图像处理方法的应用场景进行说明。
图2A及图2B均为本发明实施例提供的图像处理方法的可选的应用场景示意图,参见图2A及图2B,在实际实施时,本发明实施例的图像处理方法既可以由服务器实现,亦可由终端实现,终端或服务器包括有一个或多个处理器以及存储器,以及一个或一个以上的程序,其中,所述一个或一个以上的程序存储于存储器中,所述程序可以包括一个或一个以上的每一个对应于一组指令的单元,所述一个或多个处理器被配置为执行指令,实现本发明实施例的图像处理方法。以下结合图2A及图2B分别进行说明。
在本发明实施例提供的图像处理方法的一个可选的应用场景中,参见图2A,终端根据需要向服务器发送进行图像融合的请求,由服务器实现图像融合处理,并返回融合处理结果给终端,如此,融合处理的操作由服务器完成,降低了终端侧的数据处理压力,且适用于源图像的分辨率较大的情况。示例性地,终端通过自身的图像采集装置(如摄像头)对特定对象(即源对象,如人脸,当然,源对象还可以为动物头部等其他形式的对象) 进行图像采集,形成包含源对象的源图像(如照片或视频中的视频帧),基于该源图像发送图像融合请求(请求中携带源图像)给服务器,服务器解析该图像融合请求,对源图像及素材图像进行融合处理形成融合图像,发送融合结果给终端,终端根据服务器返回的融合图像进行显示。
这里,对服务器进行融合处理时采用的素材图像进行说明,该素材图像可以有以下几种情况:
1)、素材图像由用户在终端侧选定,并携带于终端发送的图像融合请求中,服务器通过解析图像融合请求得到该素材图像。
举例来说,在即时通信如微信聊天场景下,用户A和用户B进行视频聊天的过程中,用户A想要将视频窗口中显示的自身的图像(源图像)和视频窗口中显示的用户B的图像(素材图像)进行融合,用户A通过使用的终端发送携带源图像及素材图像的图像融合请求给服务器,通过服务器实现图像融合,获得服务器返回的融合结果。
2)、素材图像为用户在服务器侧预设的,服务器侧预先存储了用户标识与素材图像的映射关系,服务器接收到图像融合请求后,解析得到图像融合请求中携带的用户标识,基于用户标识获取对应的素材图像。
3)、服务器接收到图像融合请求后,解析得到图像融合请求中携带的用户标识,基于用户标识获取用户的使用记录,基于获得的使用记录得知使用频率较高的素材对象,从而基于使用频率选择用户喜欢或感兴趣的素材图像。
4)、服务器接收到图像融合请求后,随机选择素材图像(如从自身的素材图像库中随机选择)。
在发明实施例提供的图像处理方法的另一个可选的应用场景中,参见图2B,用户在终端侧进行素材图像的选择(可以为终端本地存储的素材图像,或者用户触发终端从服务器处获取素材图像),由终端实现素材图像和 源图像(可以为终端实时采集的或预设的)的图像融合,如此,图像融合可在终端侧做到实时化,提高了图像融合效率,增强用户体验。
示例性地,如图2B所示,终端上设置有图像处理客户端,图像处理客户端包括一个素材图像库,提供有不同风格(如军装照、古装美人、童年记忆等)的素材图像,每种风格的素材图像包括至少一个素材图像,用户通过选取某特定风格下的一个素材图像,然后通过摄像头采集自身的人脸图像(即源图像),实现素材图像和源图像的实时融合,输出融合后的图像处理结果。
作为上述图像处理方法的一个可选实施例,图3示出了本发明实施例提供的图像处理方法的一个可选的流程示意图,本发明实施例的图像处理方法应用于终端,终端上设置有图像处理客户端,参见图3,涉及步骤200至步骤205,下面分别进行说明。
步骤200:图像处理客户端发送素材图像获取请求给服务器。
这里,终端在进行图像融合处理之前需要获取源图像及素材图像,而在实际实施时,素材图像的获取方式可以有至少如下两种:
1)、通过用户选定终端本地存储的素材图像(如素材图像库中的素材图像)得到。
2)、用户触发发送获取指定素材图像的请求(可以携带指定素材图像的标识)给服务器,得到服务器返回的素材图像(例如用户点击某素材图像对应的图标,触发终端发送获取该图标对应的素材图像的请求给服务器,得到服务器返回的相应的素材图像),如图3所示。
步骤201:接收服务器返回的素材图像。
步骤202:获取源图像。
在实际应用中,源图像的获取方式可以有至少如下两种:
1)、通过终端上设置的摄像头实时采集得到。
2)、通过用户选定终端上存储的图像(如照片库中的照片)得到。
步骤203:识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点。
这里,在实际实施时,图像处理客户端识别源图像中源对象的基础特征点的方式与识别素材图像中素材对象的基础特征点的方式类似,以识别源图像中源对象的基础特征点为例,在一可选的实施例中,图像处理客户端识别源图像中源对象的基础特征点的过程如下:
图像处理客户端从源图像中识别源对象的成像区域;将从源对象的成像区域提取的特征与候选的对象特征模板比对;将比对成功的对象特征模板中的特征点,识别为源对象的基础特征点。可以理解为终端侧设置有对象特征模板库,存储有多个对象特征模板,每个对象特征模板上标定了多个(在一可选实施例中为83个)基础特征点,当源对象的成像区域提取的特征与对象特征模板的特征相匹配(相似度超过预设阈值)时,视为该对象特征模板的基础特征点为源对象的基础特征点,参见图4A,图4A为识别出的源对象的基础特征点的一个可选的示意图,图4A中示出了识别得到的83个基础特征点。
以对象为人脸(包括真实的人(如奥巴马)的脸部及卡通人(如樱桃小丸子)的脸部)为例,图像处理客户端从源图像中识别源对象的成像区域,即为图像处理客户端进行人脸检测,在实际应用中,人脸检测即在图像中准确标定出人脸(即人脸所成像)的位置和尺寸;图像中的人脸包括的模式特征十分丰富,如直方图特征、颜色特征、模板特征和结构特征等;人脸检测,就是将图像中有用的特征提取出来,并利用这些特征来标定人脸。
在一可选的实施例中,人脸检测可基于以上特征采用Adaboost的机器学习算法来标定人脸;Adaboost算法是一种用来分类的迭代算法。在实现 人脸检测过程中,使用Adaboost算法先挑选出一些最能代表人脸的矩形特征(通过弱分类器实现),然后按照加权投票的方式将弱分类器构造为一个强分类器,再将训练得到的若干强分类器串联组成一个级联结构的层叠分类器,有效地提高分类器检测人脸的速度。当然,在实际应用中,还可通过iOS自带人脸检测、OpenCV人脸检测、Face++、sensetime、腾讯优图人脸检测等人脸检测技术实现人脸检测的操作。
在实际应用中,由于图像受到各种条件的限制和随机干扰,往往不能直接使用,必须在图像处理的早期阶段对图像进行灰度校正、噪声过滤等图像预处理,也即对检测得到的人脸图像进行预处理;这里,对于人脸图像而言,预处理过程主要包括:人脸图像的光线补偿、灰度变换、直方图均衡化、归一化、几何校正、滤波以及锐化等操作。
在一可选的实施例中,图像处理客户端在识别人脸的基础特征点的过程中提取的特征通常分为视觉特征、像素统计特征、人脸图像变换系数特征、人脸图像代数特征等;可将提取人脸图像特征的方法归纳为两大类:一种是基于知识的表征方法,另一种是基于代数特征或统计学习的表征方法。其中,基于知识的表征方法,主要是根据人脸器官的形状描述以及各人脸器官之间的距离特性来获得有助于人脸分类的特征数据,其特征分量通常包括特征点间的欧氏距离、曲率和角度等;人脸由眼睛、鼻子、嘴和下巴等局部特征构成,对这些局部特征以及局部特征之间的结构关系的几何描述,可作为识别人脸的重要特征,并将这些特征称为几何特征。
步骤204:根据源图像及素材图像中的基础特征点的分布,从相应图像中识别出根据基础特征点分布符合预设填充条件的辅助特征点。
这里,在实际实施时,识别出根据基础特征点分布符合预设填充条件的辅助特征点的方式包括以下至少两种:
1)、分别确定源图像及素材图像中基础特征点的分布密度超出第一密 度阈值的第一区域;根据与第一区域的特征点分布密度的差值不超出预定差值的填充条件,在第一区域的邻接区域中选取至少一个像素点为辅助特征点。
在一可选的实施例中,确定源图像及素材图像中特征点的分布密度超出第一密度阈值的第一区域,包括:
当源对象和素材对象的类型为人脸时,确定各图像中特征点的分布密度超出脸部特征点平均分布密度的第一区域,包括以下至少之一:眼部、鼻部和嘴部;
相应的,根据与第一区域的特征点分布密度的差值不超出预定差值的填充条件,在第一区域的邻接区域中选取像素点为所述辅助特征点,包括:
定位以下至少之一为第一区域的邻接区域:眼皮、眼睑、面颊和嘴角;
根据与第一区域的特征点分布密度的差值不超出预定差值的填充条件,在邻接区域中选取像素点为所述辅助特征点。
示例性地,源对象和素材对象均为人脸,通过计算得到基础特征点的分布密度超出脸部特征点平均分布密度的区域为眼部区域,如图4A,相应的,得到眼部的邻接区域为眼皮区域,根据与眼部区域的特征点分布密度的差值不超出预定差值的填充条件,在眼皮区域中选取像素点为辅助特征点,参见图4B,图4B为本发明实施例提供的识别出的源对象的辅助特征点的一个可选的示意图,如图图4B中特征点84至特征点130为识别得到的辅助特征点。
2)、分别确定源图像及素材图像中的特征点的分布密度低于第二密度阈值(第二密度阈值用于判断某一区域的候选特征点是否比较稀疏)的第二区域;根据使第二区域的特征点的分布密度超出第二密度阈值的填充条件,在第二区域中选取像素点为辅助特征点。
在一可选的实施例中,确定源图像及素材图像中特征点的分布密度低 于第二密度阈值的第二区域,包括:
当源对象和素材对象的类型为人脸时,确定各图像中特征点的分布密度低于脸部特征点平均分布密度的第二区域,包括以下至少之一:下颚、额头和面颊;
相应的,根据使第二区域的特征点的分布密度超出第二密度阈值的填充条件,在第二区域中选取像素点为辅助特征点,包括:
根据使第二区域的分布密度的差值超出脸部特征点平均分布密度的预定比例的填充条件,在第二区域中选取像素点为辅助特征点。
示例性地,源对象和素材对象均为人脸,通过计算得到基础特征点的分布密度低于脸部特征点平均分布密度的区域为额头区域,如图4A所示,根据使额头区域的特征点的分布密度超出第二密度阈值的填充条件,在额头区域中选取像素点为辅助特征点,如图4B所示。
也就是说,在本发明实施例中,可以设置基础特征点密度阈值,形成一个基础特征点的密度梯度,即第二密度阈值小于第一密度阈值(在实际应用中可为特征点的平均密度),若某一区域的基础特征点的密度超过第一密度阈值时,表明该区域基础特征点分布较密,为了使得在后续图像融合过程中,该区域与其邻接区域的融合效果更好、精度更高,需要在其邻接区域中补充辅助特征点;而为了达到相同的融合效果,当某区域的基础特征点的密度小于第二密度阈值时,表明该区域基础特征点分布稀疏,需在该区域补充辅助特征点。
在实际实施时,上述第一密度阈值和第二密度阈值可以依据实际需要进行设定。
步骤205:根据源对象和素材对象中相同类型特征点的位置,计算平均特征点。
这里,在实际实施中,平均特征点的位置可通过计算源对象和素材对 象中相同类型特征点的位置的平均坐标得到,然而,在实际应用中,基于用户实际需求,需要图像融合的最终结果更倾向(接近)于素材对象或源对象,因此,在一可选的实施例中,可以设置素材对象以及源对象对应的位置权重,通过定位源对象不同类型特征点的位置、以及素材对象中与源对象所定位特征点属于相同类型的特征点的位置;根据融合结果与素材对象的相似度(例如融合效果中与素材对象的相似程度为30%,也即融合效果倾向于素材对象的程度为30%)、以及与源对象的相似度(例如融合效果中与源对象的相似程度为70%,也即融合效果倾向于源对象的程度为70%),确定素材对象以及源对象对应的位置权重(在实际实施时,所述程度与相应的位置权重存在预设的对应关系,例如,当融合效果倾向于源对象的程度为70%时,相应的源对象的位置权重为0.6);对所定位的位置根据对应的位置权重加和,得到相应的平均特征点的位置。
在一实施例中,定位源对象不同类型特征点的位置、以及素材对象中与源对象所定位特征点属于相同类型的特征点的位置,可以通过以下方式实现:
首先确定源对象及素材对象的基准特征点;通过对齐基准特征点的位置的方式,调整源对象的尺寸与素材对象的尺寸匹配;然后根据匹配结果确定源对象及素材对象的相同类型的特征点的位置。
作为示例,基准特征点的选取可以依据实际需要进行选取,如选取眉心特征点、鼻尖特征点等;上述尺寸匹配即尺寸大小一致,在实际实施时,在对齐基准特征点的基础上,进行图像调整时,还可选取一个调整标准,如选取瞳距为调整标准,将源对象缩放到与素材对象大小一致。
基于本发明上述实施例,将源对象和素材对象根据平均特征点进行变形处理之前,在一可选实施例中,可以根据源对象与素材对象的颜色值比较结果(R、G、B三通道分别对应比较),调整源对象的颜色与素材对象的 颜色满足均衡条件。如此,使得融合后的图像的颜色效果更加自然。以源对象为人脸为例,图5为本发明实施例提供的对源对象进行颜色均衡后的一个可选的示意图,参见图5,对人脸进行颜色均衡(即肤色调整)前后,肤色变化的对比示意图,如此使得肤色更接近素材对象的色调。
在实际实施时,为了使得源对象的颜色与素材对象的颜色满足均衡条件,图像处理客户端可通过如下方式进行调整:
针对源对象的各个像素点,根据源对象的平均颜色值与源图像的像素点的颜色值的比较结果,确定相应像素点的补偿值;根据补偿值对源对象相应像素点的颜色值进行补偿。
在一可选实施例中,图像处理客户端可通过如下方式确定相应像素点的补偿值:
当源对象像素点的颜色值大于源对象的平均颜色值时,确定相应像素点的补偿值为参考值与第一补偿系数的乘积;
当源对象像素点的颜色值小于或等于源对象的平均颜色值时,确定相应像素点的补偿值为参考值与第二补偿系数的乘积;
其中,第一补偿系数、第二补偿系数为根据相应像素点的原始颜色值与源对象的平均颜色值的比值确定;参考值为根据源对象的平均颜色值与素材对象的平均颜色值的差值确定。
举例说明,以对R通道颜色值进行比较,进而调整颜色均衡为例,源对象中的每一个像素点的颜色值记为XR,源对象的平均颜色值为UR,素材对象的平均颜色值为MR,其中,像素点的颜色值均介于0到1之间;
如果XR大于UR,则XR=XR+(MR-UR)*{(1.0-XR)/(1.0-UR)};其中,MR-UR为参考值,(1.0-XR)/(1.0-UR)为第一补偿系数;
如果XR小于或等于UR,则令XR=XR+(MR-UR)*(XR/UR);其中,MR-UR为参考值,XR/UR为第二补偿系数。
步骤206:将源对象和素材对象根据平均特征点进行变形处理。
这里,在实际实施时,图像处理客户端可通过如下方式实现上述变形处理:
根据对齐源对象和素材对象中相同类型特征点的方式,调整源对象和素材对象的尺寸一致;调整源对象中特征点的位置与平均特征点的位置匹配,以及,调整素材对象中特征点的位置与平均特征点的位置匹配。
以对象为人脸举例说明,采用源对象及素材对象中的相同类型的特征点为瞳孔特征点,首先对齐源对象及素材对象中的瞳孔特征点,然后调整瞳距,使另外一个相同类型的特征点(如另一个瞳孔特征点)也对齐;当然,可以采用其他方式,如调整两耳之间的距离,头顶至下颚的距离。
在实际应用中,调整源对象中特征点的位置与平均特征点的位置匹配,以及,调整素材对象中特征点的位置与平均特征点的位置匹配的方式可以采用以下之一:
1)、根据源对象的特征点的位置构造三角形(即基于确定的基础特征点及辅助特征点做三角形分割)、以及根据素材对象的特征点的位置构造三角形,将构造的三角形的顶点向对应的平均特征点的位置拟合的方式调整所构造的三角形;
以对象为人脸举例说明,按照区域关系将源对象中的特征点作为三角形的顶点进行连线,可以得到若干三角形,实现了采用三角形对人脸的分割,参见图6,图6为本发明实施例提供的人脸三角形分割的示意图,如果改变任意特征点的位置,对应的三角形也会发生扭曲,进而导致脸部形变,可以以三角形为单位,分别将基于源对象的特征点构造的三角形和基于素材对象的特征点构造的三角形无限匹配基于平均特征点构造的三角形,实现源对象的特征点、素材对象的特征点与相应的平均特征点的位置拟合。
2)、对源对象的特征点的位置、以及素材对象的特征点的位置进行仿 射变换,直至与平均特征点的位置匹配;
在实际实施时,根据平均特征点的位置、与源对象中的相应特征点的位置关系,对源对象进行仿射变换;根据平均特征点的位置、与素材对象中的相应特征点的位置关系,对素材对象进行仿射变换。当然,在实际应用中,还可采用其它仿射变换方式。
3)、对源对象中特征点的位置、以及素材对象中特征点的位置进行基于特征点的图像扭曲操作,直至与平均特征点的位置匹配。
这里,在实际实施时,可基于平均特征点构造扭曲模板,基于构造的扭曲模板对源对象及素材对象进行扭曲操作。
步骤207:将经过变形处理的源对象和素材对象进行融合处理。
这里,在实际实施时,可采用如下方式实现上述融合处理:
图像处理客户端将素材图像的蒙版图像对应素材对象同步进行变形处理(或者可基于变形后的素材对象对素材图像的蒙版图像进行变形处理,使二者相匹配);将经过变形处理的源对象、素材对象以及蒙版图像的像素点的颜色值进行加权求和(在实际实施时,为R、G、B三颜色通道分别进行加权求和)。
在一可选实施例中,将经过变形处理的源对象、素材对象以及蒙版图像的像素点的颜色值进行加权求和,包括:
针对源对象、素材对象以及蒙版图像的任一相同位置,根据蒙版图像在相应位置的颜色值为权重因子,基于预设的图像融合因子确定源对象以及素材对象的融合权重;其中,预设的图像融合因子的值介于0到1之间;
将经过变形处理的源对象、素材对象中相同位置的像素点的颜色值,根据对应的融合权重进行加权求和。
以R通道颜色值为例,举例说明,预设的图像融合因子为alphaBlend,0<alphaBlend<1,alphaBlend的取值大小用于控制融合后的图像更接近源对 象或素材对象,在一可选实施例中,alphaBlend越大,融合后的图像越接近素材对象;
设源对象的像素的颜色值为UserR,素材对象的像素的颜色值为StuR,蒙版图像的像素的颜色值为StuMaskR,融合后的图像的像素的颜色值为TarR,上述取值范围均为0~1;
源对象的融合权重为(1.0–alpha),素材对象的融合权重为alpha,设定alpha=alphaBlend+(1.0-alphaBlend)*StuMaskR;
则,TarR=(1.0–alpha)*UserR+alpha*StuR;
可知,alphaBlend取值越大,相应的alpha的值越大,即素材对象的融合权重越大,融合后的图像越接近素材对象。
上述实施方式中,设置了图像融合对应的图像融合因子,基于图像融合因子确定源对象以及素材对象的融合权重,进而对各个对象的颜色值进行加权求和,如此,使得融合后的图像中的边界(如眼角部分)过渡自然,没有生硬感,融合效果好。以对象为人脸为例,参见图7,图7为本发明实施例提供的图像融合的一个可选的示意图,通过图7可看出,融合后的图像中的人脸既有源图像中人脸的特征,也有素材图像中人脸的特征。
而在另一可选实施例中,可不采用蒙版图像,将变形处理的源对象和素材对象直接进行加权融合处理,如此,使得融合过程更简单。
进行上述融合处理后,得到融合后的对象,将源对象及素材对象分别看作图像中的前景图像,则得到的融合后的图像亦为前景对象,在实际应用中,可进一步对图像的背景进行背景层的融合处理,在一可选实施例中,可采用如下方式进行背景层的融合处理:
提取素材图像的背景图层(即除素材对象外的图像),将提取得到的背景图层与作为前景图层的融合结果进行合成;或者,
将不同于源图像、以及素材图像的图像作为背景图层,与作为前景图 层的融合结果进行合成。
这里,不同于源图像、以及素材图像的图像可以为用户预设或选定的终端本地的任一不同于源图像、以及素材图像的图像,还可以为用户触发从服务器处获取的特定的背景素材图像,亦可以为对预设的图像进行处理后得到的图像。
在一可选实施例中,可采用背景蒙版图来提取素材图像的背景图层,当然,还可以采用其它可识别前景图层与背景图层的方式。图8为本发明实施例提供的将融合图像与背景素材对象进行融合的示意图,参见图8,在图8中,图像1为经过融合处理后的融合图像,在实际应用中,该融合图像中的融合对象既可以为人脸(包括真实人脸、卡通人脸等),亦可为非人脸,如人体、动物的脸等。
在实际实施时,对于不同的融合对象,都有对应的一套基础特征点及辅助特征点。识别出融合对象的基础特征点及素材对象的基础特征点,根据基础特征点的分布,确定相应图像中的辅助特征点,确定融合对象与素材对象中相同类型的特征点,并根据相同类型的特征点的位置,确定平均特征点,然后将融合对象和素材对象根据平均特征点进行变形处理,最后将经过变形处理的融合对象和素材对象进行融合处理,得到融合图像。
以融合对象为手掌为例,对应该融合对象存在对应的一套基础特征点及辅助特征点,如手掌的基础特征点可以包括指尖、指关节、不同类型掌纹、手掌轮廓等,而辅助特征点可以基于手掌图像中基础特征点的分布密度进行选取,选取过程与人脸辅助特征点的选取过程类似,如确定基础特征点的分布密度超出第一密度阈值的第一区域,根据与第一区域的特征点分布密度的差值不超出预定差值的填充条件,在第一区域的邻接区域中选取像素点为辅助特征点。如此,在确定了手掌的基础特征点及辅助特征点后,可基于手掌及素材对象(如卡通人物的手掌,卡通人物手掌的基础特 征点及辅助特征点的确定和人手掌相同)的基础特征点及辅助特征点进行融合处理,得到融合图像。
得到融合图像后,融合图像可进一步与背景素材对象进行融合处理,在图8中,图像1中的前景对象即为经过人脸融合处理的卡通人物(非真实人脸),通过背景蒙版图3将图像1中的前景图层和背景图层进行分离,以此提取得到图像1中的前景图层4,图像2为用户选定的作为背景素材对象的图像,可进一步对图像2进行变形处理(在实际应用中亦可为其它处理方式,如色彩变换等)得到图像5,进而将图像5及图像4进行融合实现背景层的融合,得到最终的融合图像6。
在实际应用中,上述步骤203至步骤207的操作均可在终端的图形处理器(GPU,Graphics Processing Unit)上进行,做到了图像融合的实时化,大大提高了用户体验。
作为实现上述图像处理方法的另一个可选实施例,参见图9,图9为本发明实施例提供的图像处理方法的一个可选的流程示意图,基于OpenGL的图像融合技术,以融合对象为人脸为例,涉及步骤301及步骤306,下面分别进行说明。
步骤301:选定包含人脸的照片或者通过摄像头捕获到包含人脸的图像。
在实际应用中,本步骤的目的是为了获得用于融合的源图像(包含人脸的照片、摄像头采集到的包含人脸的图像),源图像中的人脸即为用于融合的源对象。
步骤302:人脸检测及五官定位,获取人脸特征。
这里,当终端获取源图像后,首先进行人脸检测,可采用iOS自带人脸检测、OpenCV人脸检测、Face++、sensetime、腾讯优图人脸检测等人脸检测技术,识别得到源图像中的人脸区域,然后进行五官定位,确定人脸 的特征点;这里得到的特征点包括两部分:基础特征点(83个)和辅助特征点;
其中,基础特征点的识别可通过如下方式:
将人脸区域提取的特征与对象特征模板库中候选的对象特征模板进行特征(视觉特征、像素统计特征、人脸图像变换系数特征、人脸图像代数特征等)比对,将比对成功的对象特征模板中的特征点,识别为人脸区域的基础特征点。
人脸区域的辅助特征点基于基础特征点分布计算得到,首先计算人脸区域基础特征点分布的平均密度,确定人脸区域中特征点的分布密度超出脸部特征点平均分布密度的第一区域,包括以下区域至少之一:眼部、鼻部和嘴部;然后,定位确定的上述第一区域的邻接区域:眼皮、眼睑、面颊和嘴角;根据与确定的上述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在邻接区域中选取像素点为辅助特征点。然后,确定人脸区域中特征点的分布密度小于预设的分布密度阈值的第二区域,包括以下至少之一:下颚、额头和面颊,根据使第二区域的分布密度的差值超出脸部特征点平均分布密度的预定比例的填充条件,在第二区域中选取像素点为辅助特征点。辅助特征点的获得可以使后续的脸部分割更为精细,融合精度更高。
步骤303:用户照片剪裁及肤色调节。
这里的用户照片指的是,确定了特征点的步骤301中选定的包含人脸的照片,或者确定了特征点的通过摄像头捕获到包含人脸的图像。
首先对用户照片剪裁进行说明。进行用户照片剪裁的过程为基于确定的特征点对用户照片进行三角形分割的过程,即以确定的基础特征点及辅助特征点为三角形的顶点构造三角形,可以得到若干三角形,如果改变任意特征点的位置,对应的三角形也会发生扭曲,进而导致脸部形变,通过 三角形坐标变换,可达到人脸形变的效果。这种三角形分割,适合OpenGL的渲染流程,便于利用OpenGL完成后续的图像融合。
接下来肤色调节进行说明。肤色调节是调节用户照片的色调使其与素材图的色调一致,这样脸部融合之后,脸部边界过渡自然,与素材风格保持一致。这里需要说明的是,在进行肤色调节之前,要获得素材图像,可以通过用户选定本地的素材图像获得,或者由用户触发从服务器处获得。
进行肤色调节的过程包括如下:
首先,截取用户图像的人脸区域、素材图像人脸区域;
然后,分别计算用户图像人脸区域、素材图像人脸区域的平均颜色值(R、G、B三颜色通道分别计算),用户图像人脸区域三通道的平均颜色值分别记为:userR、userG、userB,素材图像人脸区域三通道的平均颜色值分别记为:modelR,modelG,modelB。
接下来计算diffR=modelR–userR;
diffG=modelG–userG;
diffB=modelB-userB。
对于用户图像,其中的每一个像素的像素值,这里以R通道为例,记为xr,有:
if(xr<=userR){
xr=xr+diffR*(xr/userR);
}else{
xr=xr+diffR*((1.0-xr)/(1.0-userR));
}
G、B通道进行类似操作,从而得到每一个像素的转换后的像素值。
步骤304:获取素材图像中卡通人物的脸部特征。
这里,在实际实施时,可采用和用户图像一样的方法对素材图像进行五官定位及特征点识别,得到卡通人物脸部的基础特征点及辅助特征点。
步骤305:对用户图像的人脸特征点进行位置调整。
在实际应用中,首先基于卡通人脸的特征点位置及用户图像中人脸的特征点位置得到平均特征点;用户图像中人脸的每一个特征点都在卡通人脸上有对应的特征点(如对应的瞳孔的特征点),将这两个点的坐标求加权平均(二者的权重值可以依据实际需要进行设定),得到新的一套特征点,即为平均特征点。
对用户图像的人脸特征点进行位置调整,即对人脸特征点进行特征点坐标变换,包括:
根据对齐相同类型特征点的方式,调整用户人脸和卡通人脸的尺寸一致(例如:首先以眉心为中心点对齐用户图像和卡通人物图像,然后以瞳距为标准,对用户图像进行缩放使得二者大小一致);
调整用户人脸中特征点的位置与平均特征点的位置匹配,以及,调整卡通人脸中特征点的位置与平均特征点的位置匹配。
在一可选实施例中,可通过如下方式实现上述位置匹配:
根据用户人脸的特征点的位置构造三角形(即基于确定的基础特征点及辅助特征点做三角形分割)、以及根据卡通人脸的特征点的位置构造三角形,将构造的三角形的顶点向对应的平均特征点的位置拟合的方式调整所构造的三角形。
步骤306:对用户人脸和卡通人脸做区域分割,将用户人脸画在卡通人物图像的对应区域,并做颜色融合。
这里,在实际应用中,区域分割,即是在人脸特征点的基础上,将人脸划分为很多的小三角形。
将用户人脸画在卡通人物图像的对应区域指的是,将确定的平均特征点排布到卡通人物图像中原本属于卡通人脸的区域。
为了保证最终融合结果仅卡通人脸区域显示为用户人脸与卡通人脸融 合的效果,而其它区域(包括耳朵、头发)仍然保持原来卡通人物图像的效果,需要增加一个脸部灰度mask,用于标识哪些区域需要融合入用户的照片,以及用户照片所占的比重。每一个素材图像,都配备一个脸部蒙版图(纯黑色区域代表100%用户图像像素;纯白色区域代表100%的素材图图像像素,中间过渡表示介于100%~0%的用户图像像素和0%~100%的素材图图像像素)。对该蒙版图的边缘进行模糊处理,可以保证用户人脸与卡通人脸融合后脸部边缘自然过渡。同样的,因为用户的脸随着五官基准点变化而形变,蒙版图的脸部区域同样要做对应形变。
在实际实施时,进行颜色融合即是将进行位置调整后的用户人脸与卡通人脸、蒙版图的像素点的颜色值进行加权求和。具体可通过如下方式:
三个图像(用户人脸、卡通人脸、蒙版图)的任意的位置,假设三个图像和目标图(即融合后的图像)同一位置的像素,R、G、B三个通道的颜色值如下:
用户人脸的像素的三通道的颜色值(灰度值)为:UserR、UserG、UserB;
素材图中卡通人脸的三通道的颜色值为:StuR、StuG、StuB;
蒙版图的三通道的颜色值为:StuMaskR、StuMaskG、StuMaskB;
目标图的三通道的颜色值为:TarR、TarG、TarB;
上述取值范围均为0~1,另外预设用于图像融合的融合因子alphaBlend,alphaBlend用于控制融合之后的图像更接近用户还是素材中人物,则有:
alpha=alphaBlend+(1.0-alphaBlend)*StuMaskR;
TarR=(1.0–alpha)*UserR+alpha*StuR;
TarG=(1.0–alpha)*UserG+alpha*StuG;
TarB=(1.0–alpha)*UserB+alpha*StuB。
通过上述用户人脸和卡通人脸的融合,达到了一种将真人画在卡通画之中的效果,融合后的图像既有用户人脸的特征,还有素材图像中卡通人 脸的特征,且边缘过渡自然,融合精度高。
在一可选实施例中,实施完上述人脸融合过程后,还可以对融合图像的背景进行调整,使用蒙版图像识别并分离融合图像的背景图层及前景图层,选择任何一张图像作为新的背景,可对背景图做形变或者其他特效处理;将新的背景和之前分离出的前景图像做融合,生成信的融合结果图。
本发明实施例还提供了一种图像处理装置300,参见图10,图10为本发明实施例提供的图像处理装置的一个可选的功能结构示意图,图像处理装置300包括:
识别单元11,配置为识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;
以及,配置为根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点;
处理单元12,配置为根据所述源对象和所述素材对象中相同类型特征点的位置,计算平均特征点;
以及,配置为将所述源对象和所述素材对象根据所述平均特征点进行变形处理;
融合单元13,配置为将经过变形处理的所述源对象和素材对象进行融合处理。
在一可选实施例中,所述识别单元11,还配置为从所述源图像中识别所述源对象的成像区域;
将从所述源对象的成像区域提取的特征,与候选的对象特征模板比对;
将比对成功的对象特征模板中的特征点,识别为所述源对象的基础特征点。
在一可选实施例中,所述识别单元11,还配置为确定各所述图像中特征点的分布密度超出第一密度阈值的第一区域;
根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述第一区域的邻接区域中选取像素点为所述辅助特征点。
在一可选实施例中,所述识别单元11,还配置为当所述源对象和所述素材对象的类型为人脸时,确定各所述图像中特征点的分布密度超出脸部特征点平均分布密度的第一区域,包括以下至少之一:眼部、鼻部和嘴部;
以及配置为定位以下至少之一作为所述第一区域的邻接区域:眼皮、眼睑、面颊和嘴角;
根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述邻接区域中选取像素点为所述辅助特征点。
在一可选实施例中,所述识别单元11,还配置为确定各所述图像中的特征点的分布密度低于第二密度阈值的第二区域;
根据使所述第二区域的特征点的分布密度超出所述第二密度阈值的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
在一可选实施例中,所述识别单元11,还配置为当所述源对象和所述素材对象的类型为人脸时,确定各所述图像中特征点的分布密度低于脸部特征点平均分布密度的第二区域,包括以下至少之一:下颚、额头和面颊;
以及,配置为根据使所述第二区域的分布密度的差值超出脸部特征点平均分布密度的预定比例的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
在一可选实施例中,所述处理单元12,还配置为定位所述源对象任一特征点的位置、以及所述素材对象中与所述源对象所定位特征点属于相同类型的特征点的位置;
根据融合效果倾向于所述素材对象的程度、以及倾向于所述源对象的程度,确定所述素材对象、以及所述源对象对应的位置权重;
对所定位的位置根据对应的位置权重加和,得到相应的平均特征点的 位置。
在一可选实施例中,所述处理单元12,还配置为将所述源对象和所述素材对象根据所述平均特征点进行变形处理之前,
根据所述源对象与所述素材对象的颜色值比较结果,调整所述源对象的颜色与所述素材对象的颜色满足均衡条件。
在一可选实施例中,所述处理单元12,还配置为根据对齐所述源对象和所述素材对象中相同类型特征点的方式,调整所述源对象和所述素材对象的尺寸一致;
调整所述源对象中特征点的位置与所述平均特征点的位置匹配,以及,调整所述素材对象中特征点的位置与所述平均特征点的位置匹配。
在一可选实施例中,所述处理单元12,还配置为根据所述源对象的特征点的位置构造三角形、以及根据所述素材对象的特征点的位置构造三角形,将构造的三角形的顶点通过向对应的平均特征点的位置拟合的方式调整所构造的三角形;
对所述源对象的特征点的位置、以及所述素材对象的特征点的位置进行仿射变换,直至与所述平均特征点的位置匹配;
对所述源对象中特征点的位置、以及所述素材对象中特征点的位置进行基于特征点的图像扭曲操作,直至与所述平均特征点的位置匹配。
在一可选实施例中,所述融合单元13,还配置为将所述素材图像的蒙版图像对应所述素材对象同步进行变形处理;
将经过变形处理的所述源对象、素材对象以及所述蒙版图像的像素点的颜色值进行加权求和。
在一可选实施例中,所述融合单元13,还配置为针对所述源对象、素材对象以及所述蒙版图像的任一相同位置,
根据所述蒙版图像在相应位置的颜色值为权重因子,确定所述源对象 以及所述素材对象的融合权重;
将经过变形处理的所述源对象、所述素材对象中相同位置的像素点的颜色值,根据对应的融合权重进行加权求和。
在一可选实施例中,所述融合单元13,还配置为提取所述素材图像的背景图层,将所述背景图层与作为前景图层的所述融合结果进行合成;或者,
将不同于所述源图像、以及所述素材图像的图像作为背景图层,与作为前景图层的所述融合结果进行合成。
在实际应用中,上述单元可由中央处理器(CPU,Central Processing Unit)、微处理器(MPU,Micro Processor Unit)、DSP、或现场可编程门阵列(FPGA,Field Programmable Gate Array)等实现。
需要说明的是:上述实施例提供的图像处理装置在进行图像处理时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的图像处理装置与图像处理方法实施例属于同一构思,图像处理装置的具体实现过程详见方法实施例,这里不再赘述。
本发明实施例还提供了一种可读存储介质,存储介质可以包括:移动存储设备、随机存取存储器(RAM,Random Access Memory)、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。所述可读存储介质存储有可执行程序;
所述可执行程序,用于被处理器执行时实现:
识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;
根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征 点;
确定所述源对象与所述素材对象中相同类型的特征点,所述相同类型的特征点包括所述源对象与所述素材对象中相同类型的基础特征点、以及相同类型的辅助特征点;
根据所述相同类型的特征点的位置,确定平均特征点;
将所述源对象和所述素材对象根据所述平均特征点进行变形处理;
将经过变形处理的所述源对象和素材对象进行融合处理。
所述可执行程序,还用于被处理器执行时实现:
从所述源图像中识别所述源对象的成像区域;
将从所述源对象的成像区域提取的特征,与候选的对象特征模板比对;
将比对成功的对象特征模板中的特征点,识别为所述源对象的基础特征点。
所述可执行程序,还用于被处理器执行时实现:
确定各所述图像中特征点的分布密度超出第一密度阈值的第一区域;
根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述第一区域的邻接区域中选取像素点为所述辅助特征点。
所述可执行程序,还用于被处理器执行时实现:
当所述源对象和所述素材对象的类型为人脸时,确定各所述图像中特征点的分布密度超出脸部特征点平均分布密度的第一区域,包括以下至少之一:眼部、鼻部和嘴部;
以及定位以下至少之一作为所述第一区域的邻接区域:眼皮、眼睑、面颊和嘴角;
根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述邻接区域中选取像素点为所述辅助特征点。
所述可执行程序,还用于被处理器执行时实现:
确定各所述图像中的特征点的分布密度低于第二密度阈值的第二区域;
根据使所述第二区域的特征点的分布密度超出所述第二密度阈值的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
所述可执行程序,还用于被处理器执行时实现:
当所述源对象和所述素材对象的类型为人脸时,确定各所述图像中特征点的分布密度低于脸部特征点平均分布密度的第二区域,包括以下至少之一:下颚、额头和面颊;
以及,根据使所述第二区域的分布密度的差值超出脸部特征点平均分布密度的预定比例的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
所述可执行程序,还用于被处理器执行时实现:
定位所述源对象不同类型特征点的位置、以及所述素材对象中与所述源对象所定位特征点属于相同类型的特征点的位置;
根据融合结果与所述素材对象以及所述源对象的相似度,确定所述素材对象、以及所述源对象对应的位置权重;
对所定位的位置根据对应的位置权重加和,得到相应的平均特征点的位置。
所述可执行程序,还用于被处理器执行时实现:
将所述源对象和所述素材对象根据所述平均特征点进行变形处理之前,
根据所述源对象与所述素材对象的颜色值比较结果,调整所述源对象的颜色与所述素材对象的颜色满足均衡条件。
所述可执行程序,还用于被处理器执行时实现:
根据对齐所述源对象和所述素材对象中相同类型特征点的方式,调整 所述源对象和所述素材对象的尺寸一致;
调整所述源对象中特征点的位置与所述平均特征点的位置匹配,以及,调整所述素材对象中特征点的位置与所述平均特征点的位置匹配。
所述可执行程序,还用于被处理器执行时实现:
根据所述源对象的特征点的位置构造三角形、以及根据所述素材对象的特征点的位置构造三角形,将构造的三角形的顶点通过向对应的平均特征点的位置拟合的方式调整所构造的三角形;
对所述源对象的特征点的位置、以及所述素材对象的特征点的位置进行仿射变换,直至与所述平均特征点的位置匹配;
对所述源对象中特征点的位置、以及所述素材对象中特征点的位置进行基于特征点的图像扭曲操作,直至与所述平均特征点的位置匹配。
所述可执行程序,还用于被处理器执行时实现:
将所述素材图像的蒙版图像对应所述素材对象同步进行变形处理;
将经过变形处理的所述源对象、素材对象以及所述蒙版图像的像素点的颜色值进行加权求和。
所述可执行程序,还用于被处理器执行时实现:
针对所述源对象、素材对象以及所述蒙版图像的任一相同位置,
根据所述蒙版图像在相应位置的颜色值为权重因子,确定所述源对象以及所述素材对象的融合权重;
将经过变形处理的所述源对象、所述素材对象中相同位置的像素点的颜色值,根据对应的融合权重进行加权求和。
所述可执行程序,还用于被处理器执行时实现:
提取所述素材图像的背景图层,将所述背景图层与作为前景图层的所述融合结果进行合成;或者,
将不同于所述源图像、以及所述素材图像的图像作为背景图层,与作 为前景图层的所述融合结果进行合成。
综上所述,本发明实施例可实现以下有益效果:
1),在对源对象和素材对象进行融合处理过程中采用的特征点包括对象的基础特征点,以及基于基础特征点的分布识别出的辅助特征点,如此提高了特征点的数量和种类,加大了特征点密度,缩小了融合处理的单位进而提高了处理精度,确保了图像的融合精度能够满足使用需求;
2),在对源对象和素材对象进行融合处理前,将源对象和素材对象根据计算得到的平均特征点进行变形处理,使得在进行融合处理时的源对象和素材对象更为匹配,融合效果更好。
3)对源图像中各像素点的颜色值进行均衡化处理,可以使得源图像中的对象与素材图像中的对象在进行融合的过程中,两者的颜色能够最大限度地接近,以保证融合的效果。
4)为保证人脸融合的效果,采用脸部灰度mask图片,使得人脸外围轮廓的地方能够平滑的过渡,从而得到最终的融合人脸图。
5)图像融合过程可在终端上的GPU上进行,做到了融合的实时化。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或可执行程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的可执行程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和可执行程序产品的流程图和/或方框图来描述的。应理解可由可执行程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些可执行程序指令到通用计算机、专用计算机、 嵌入式处理机或参考可编程数据处理设备的处理器以产生一个机器,使得通过计算机或参考可编程数据处理设备的处理器执行的指令产生配置为实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些可执行程序指令也可存储在能引导计算机或参考可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些可执行程序指令也可装载到计算机或参考可编程数据处理设备上,使得在计算机或参考可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或参考可编程设备上执行的指令提供配置为实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
工业实用性
本发明实施例识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点;确定所述源对象与所述素材对象中相同类型的特征点,所述相同类型的特征点包括所述源对象与所述素材对象中相同类型的基础特征点、以及相同类型的辅助特征点;根据所述相同类型的特征点的位置,确定平均特征点;将所述源对象和所述素材对象根据所述平均特征点进行变形处理;将经过变形处理的所述源对象和素材对象进行融合处 理。如此,采用的特征点包括基础特征点和辅助特征点,其中辅助特征点对基础特征点进行了有效地补充,有效克服了相关技术采用的特征点稀疏程度不均衡甚至缺失的问题,提升了图像的融合精度;根据平均特征点对源对象和素材对象进行变形处理,保证了融合效果兼具的源对象和素材对象的视觉特征,融合效果好。

Claims (33)

  1. 一种图像处理方法,包括:
    识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;
    根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点;
    确定所述源对象与所述素材对象中相同类型的特征点,所述相同类型的特征点包括所述源对象与所述素材对象中相同类型的基础特征点、以及相同类型的辅助特征点;
    根据所述相同类型的特征点的位置,确定平均特征点;
    将所述源对象和所述素材对象根据所述平均特征点进行变形处理;
    将经过变形处理的所述源对象和素材对象进行融合处理。
  2. 如权利要求1所述的方法,其中,所述识别出源图像中源对象的基础特征点,包括:
    从所述源图像中识别所述源对象的成像区域;
    将从所述源对象的成像区域提取的特征,与候选的对象特征模板比对;
    将比对成功的对象特征模板中的特征点,识别为所述源对象的基础特征点。
  3. 如权利要求1所述的方法,其中,所述根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点,包括:
    确定各所述图像中特征点的分布密度超出第一密度阈值的第一区域;
    根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述第一区域的邻接区域中选取像素点为所述辅助特征点。
  4. 如权利要求3所述的方法,其中,
    所述根据与所述第一区域的特征点分布密度的差值不超出预定差值的 填充条件,在所述第一区域的邻接区域中选取像素点为所述辅助特征点,包括:
    当所述第一区域包括眼部、鼻部和嘴部至少之一时,
    定位以下至少之一作为所述第一区域的邻接区域:眼皮、眼睑、面颊和嘴角;
    根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述邻接区域中选取像素点为所述辅助特征点。
  5. 如权利要求1所述的方法,其中,所述根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点,包括:
    确定各所述图像中的特征点的分布密度低于第二密度阈值的第二区域;
    根据使所述第二区域的特征点的分布密度超出所述第二密度阈值的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
  6. 如权利要求5所述的方法,其中,
    所述根据使所述第二区域的特征点的分布密度超出所述第二密度阈值的填充条件,在所述第二区域中选取像素点为所述辅助特征点,包括:
    当所述第二区域包括下颚、额头和面颊至少之一时,
    根据使所述第二区域的分布密度的差值超出脸部特征点平均分布密度的预定比例的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
  7. 如权利要求1所述的方法,其中,所述根据所述相同类型的特征点的位置,确定平均特征点,包括:
    定位所述源对象不同类型特征点的位置、以及所述素材对象中与所述源对象所定位特征点属于相同类型的特征点的位置;
    根据融合结果与所述素材对象以及所述源对象的相似度,确定所述素材对象、以及所述源对象对应的位置权重;
    对所定位的位置根据对应的位置权重加和,得到相应的平均特征点的位置。
  8. 如权利要求1所述的方法,其中,所述将所述源对象和所述素材对象根据所述平均特征点进行变形处理,包括:
    根据对齐所述源对象和所述素材对象中相同类型特征点的方式,
    调整所述源对象中特征点的位置与所述平均特征点的位置匹配,以及,调整所述素材对象中特征点的位置与所述平均特征点的位置匹配。
  9. 如权利要求1所述的方法,其中,所述将经过变形处理的所述源对象和素材对象进行融合处理,包括:
    将所述素材图像的蒙版图像对应所述素材对象同步进行变形处理;
    将经过变形处理的所述源对象、素材对象以及所述蒙版图像的像素点的颜色值进行加权求和。
  10. 如权利要求1所述的方法,其中,还包括:
    提取所述素材图像的背景图层,将所述背景图层与作为前景图层的所述融合结果进行合成。
  11. 一种图像处理方法,所述方法由终端执行,所述终端包括有一个或多个处理器以及存储器,以及一个或一个以上的程序,其中,所述一个或一个以上的程序存储于存储器中,所述程序可以包括一个或一个以上的每一个对应于一组指令的单元,所述一个或多个处理器被配置为执行指令;所述方法包括:
    识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;
    根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点;
    确定所述源对象与所述素材对象中相同类型的特征点,所述相同类型 的特征点包括所述源对象与所述素材对象中相同类型的基础特征点、以及相同类型的辅助特征点;
    根据所述相同类型的特征点的位置,确定平均特征点;
    将所述源对象和所述素材对象根据所述平均特征点进行变形处理;
    将经过变形处理的所述源对象和素材对象进行融合处理。
  12. 如权利要求11所述的方法,其中,所述识别出源图像中源对象的基础特征点,包括:
    从所述源图像中识别所述源对象的成像区域;
    将从所述源对象的成像区域提取的特征,与候选的对象特征模板比对;
    将比对成功的对象特征模板中的特征点,识别为所述源对象的基础特征点。
  13. 如权利要求11所述的方法,其中,所述根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点,包括:
    确定各所述图像中特征点的分布密度超出第一密度阈值的第一区域;
    根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述第一区域的邻接区域中选取像素点为所述辅助特征点。
  14. 如权利要求13所述的方法,其中,
    所述根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述第一区域的邻接区域中选取像素点为所述辅助特征点,包括:
    当所述第一区域包括眼部、鼻部和嘴部至少之一时,
    定位以下至少之一作为所述第一区域的邻接区域:眼皮、眼睑、面颊和嘴角;
    根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述邻接区域中选取像素点为所述辅助特征点。
  15. 如权利要求11所述的方法,其中,所述根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点,包括:
    确定各所述图像中的特征点的分布密度低于第二密度阈值的第二区域;
    根据使所述第二区域的特征点的分布密度超出所述第二密度阈值的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
  16. 如权利要求15所述的方法,其中,
    所述根据使所述第二区域的特征点的分布密度超出所述第二密度阈值的填充条件,在所述第二区域中选取像素点为所述辅助特征点,包括:
    当所述第二区域包括下颚、额头和面颊至少之一时,
    根据使所述第二区域的分布密度的差值超出脸部特征点平均分布密度的预定比例的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
  17. 如权利要求11所述的方法,其中,所述根据所述相同类型特征点的位置,确定平均特征点,包括:
    定位所述源对象不同类型特征点的位置、以及所述素材对象中与所述源对象所定位特征点属于相同类型的特征点的位置;
    根据融合结果与所述素材对象机所述源对象的相似度,确定所述素材对象、以及所述源对象对应的位置权重;
    对所定位的位置根据对应的位置权重加和,得到相应的平均特征点的位置。
  18. 如权利要求11所述的方法,其中,所述将所述源对象和所述素材对象根据所述平均特征点进行变形处理,包括:
    根据对齐所述源对象和所述素材对象中相同类型特征点的方式,
    调整所述源对象中特征点的位置与所述平均特征点的位置匹配,以及,调整所述素材对象中特征点的位置与所述平均特征点的位置匹配。
  19. 如权利要求11所述的方法,其中,所述将经过变形处理的所述源对象和素材对象进行融合处理,包括:
    将所述素材图像的蒙版图像对应所述素材对象同步进行变形处理;
    将经过变形处理的所述源对象、素材对象以及所述蒙版图像的像素点的颜色值进行加权求和。
  20. 如权利要求11所述的方法,其中,还包括:
    提取所述素材图像的背景图层,将所述背景图层与作为前景图层的所述融合结果进行合成。
  21. 一种图像处理装置,包括:
    识别单元,配置为识别出源图像中源对象的基础特征点、以及素材图像中素材对象的基础特征点;
    以及,配置为根据各所述图像中的基础特征点的分布,确定相应图像中的辅助特征点;
    处理单元,配置为确定所述源对象与所述素材对象中相同类型的特征点,所述相同类型的特征点包括所述源对象与所述素材对象中相同类型的基础特征点、以及相同类型的辅助特征点;
    根据所述相同类型的特征点的位置,确定平均特征点;
    以及,配置为将所述源对象和所述素材对象根据所述平均特征点进行变形处理;
    融合单元,配置为将经过变形处理的所述源对象和素材对象进行融合处理。
  22. 如权利要求21所述的装置,其中,
    所述识别单元,还配置为从所述源图像中识别所述源对象的成像区域;
    将从所述源对象的成像区域提取的特征,与候选的对象特征模板比对;
    将比对成功的对象特征模板中的特征点,识别为所述源对象的基础特 征点。
  23. 如权利要求21所述的装置,其中,
    所述识别单元,还配置为确定各所述图像中特征点的分布密度超出第一密度阈值的第一区域;
    根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述第一区域的邻接区域中选取像素点为所述辅助特征点。
  24. 如权利要求23所述的装置,其中,
    所述识别单元,还配置为当所述第一区域包括眼部、鼻部和嘴部至少之一时,
    定位以下至少之一作为所述第一区域的邻接区域:眼皮、眼睑、面颊和嘴角;
    根据与所述第一区域的特征点分布密度的差值不超出预定差值的填充条件,在所述邻接区域中选取像素点为所述辅助特征点。
  25. 如权利要求21所述的装置,其中,
    所述识别单元,还配置为确定各所述图像中的特征点的分布密度低于第二密度阈值的第二区域;
    根据使所述第二区域的特征点的分布密度超出所述第二密度阈值的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
  26. 如权利要求25所述的装置,其中,
    所述识别单元,还配置为所述第二区域包括下颚、额头和面颊至少之一时,
    根据使所述第二区域的分布密度的差值超出脸部特征点平均分布密度的预定比例的填充条件,在所述第二区域中选取像素点为所述辅助特征点。
  27. 如权利要求21所述的装置,其中,
    所述处理单元,还配置为定位所述源对象不同类型特征点的位置、以 及所述素材对象中与所述源对象所定位特征点属于相同类型的特征点的位置;
    根据融合结果与所述素材对象以及所述源对象的相似度,确定所述素材对象、以及所述源对象对应的位置权重;
    对所定位的位置根据对应的位置权重加和,得到相应的平均特征点的位置。
  28. 如权利要求21所述的装置,其中,
    所述处理单元,还配置为根据对齐所述源对象和所述素材对象中相同类型特征点的方式,
    调整所述源对象中特征点的位置与所述平均特征点的位置匹配,以及,调整所述素材对象中特征点的位置与所述平均特征点的位置匹配。
  29. 如权利要求21所述的装置,其中,
    所述融合单元,还配置为将所述素材图像的蒙版图像对应所述素材对象同步进行变形处理;
    将经过变形处理的所述源对象、素材对象以及所述蒙版图像的像素点的颜色值进行加权求和。
  30. 如权利要求21所述的装置,其中,
    所述融合单元,还配置为提取所述素材图像的背景图层,将所述背景图层与作为前景图层的所述融合结果进行合成。
  31. 一种存储介质,存储有可执行程序,所述可执行程序被处理器执行时,实现如权利要求1至10任一项所述的图像处理方法。
  32. 一种图像处理装置,包括:
    存储器,配置为存储可执行程序;
    处理器,配置为执行所述存储器中存储的可执行程序时,实现如权利要求1至10任一项所述的图像处理方法。
  33. 一种终端,包括:
    存储器,配置为存储可执行程序;
    处理器,配置为执行所述存储器中存储的可执行程序时,实现如权利要求1至10任一项所述的图像处理方法。
PCT/CN2017/106714 2017-10-18 2017-10-18 图像处理方法、装置、终端及存储介质 Ceased WO2019075666A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201780050383.5A CN109952594B (zh) 2017-10-18 2017-10-18 图像处理方法、装置、终端及存储介质
PCT/CN2017/106714 WO2019075666A1 (zh) 2017-10-18 2017-10-18 图像处理方法、装置、终端及存储介质
US16/593,811 US11043011B2 (en) 2017-10-18 2019-10-04 Image processing method, apparatus, terminal, and storage medium for fusing images of two objects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/106714 WO2019075666A1 (zh) 2017-10-18 2017-10-18 图像处理方法、装置、终端及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/593,811 Continuation US11043011B2 (en) 2017-10-18 2019-10-04 Image processing method, apparatus, terminal, and storage medium for fusing images of two objects

Publications (1)

Publication Number Publication Date
WO2019075666A1 true WO2019075666A1 (zh) 2019-04-25

Family

ID=66172967

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/106714 Ceased WO2019075666A1 (zh) 2017-10-18 2017-10-18 图像处理方法、装置、终端及存储介质

Country Status (3)

Country Link
US (1) US11043011B2 (zh)
CN (1) CN109952594B (zh)
WO (1) WO2019075666A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833238A (zh) * 2020-06-01 2020-10-27 北京百度网讯科技有限公司 图像的翻译方法和装置、图像翻译模型的训练方法和装置
CN112085835A (zh) * 2020-08-31 2020-12-15 腾讯科技(深圳)有限公司 三维卡通人脸生成方法、装置、电子设备及存储介质

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110288516A (zh) * 2019-06-27 2019-09-27 北京迈格威科技有限公司 图像处理的方法、装置、设备及计算机可读存储介质
CN110856014B (zh) * 2019-11-05 2023-03-07 北京奇艺世纪科技有限公司 动态图像生成方法、装置、电子设备及存储介质
CN110848924B (zh) * 2019-11-16 2020-08-28 台州明创科技有限公司 参数数据实时设置系统及方法
CN111179156B (zh) * 2019-12-23 2023-09-19 北京中广上洋科技股份有限公司 一种基于人脸检测的视频美化方法
CN111476871B (zh) * 2020-04-02 2023-10-03 百度在线网络技术(北京)有限公司 用于生成视频的方法和装置
CN111489311B (zh) * 2020-04-09 2023-08-08 北京百度网讯科技有限公司 一种人脸美化方法、装置、电子设备及存储介质
CN111627087A (zh) * 2020-06-03 2020-09-04 上海商汤智能科技有限公司 一种人脸图像的展示方法、装置、计算机设备及存储介质
US11670031B2 (en) * 2020-07-22 2023-06-06 Talent Unlimited Online Services Private Limited System and method for automatically generating an avatar with pronounced features
CN111768479B (zh) * 2020-07-29 2021-05-28 腾讯科技(深圳)有限公司 图像处理方法、装置、计算机设备以及存储介质
CN111931651B (zh) * 2020-08-11 2024-01-30 北华航天工业学院 一种视觉检测图像处理系统及其处理方法
CN112017257B (zh) * 2020-08-31 2021-10-29 北京字节跳动网络技术有限公司 图像处理方法、设备及存储介质
CN112257499B (zh) * 2020-09-15 2023-04-28 福建天泉教育科技有限公司 眼部状态检测方法及计算机可读存储介质
CN112613459B (zh) * 2020-12-30 2022-07-15 深圳艾摩米智能科技有限公司 一种人脸敏感区域检测方法
CN112884637B (zh) * 2021-01-29 2023-04-07 北京市商汤科技开发有限公司 特效生成方法、装置、设备及存储介质
TWI789071B (zh) * 2021-10-25 2023-01-01 瑞昱半導體股份有限公司 基於區域控制以及紋理合成進行圖像增強的圖像處理系統與相關圖像處理方法
FR3130427B1 (fr) * 2022-05-03 2024-04-19 Idemia Identity & Security France Procédé de génération d’une image de paume à partir d’images de paume partielles
CN115049569A (zh) * 2022-06-06 2022-09-13 上海云从企业发展有限公司 人脸融合方法、装置以及计算机可读存储介质
CN115757853B (zh) * 2022-11-09 2024-11-12 西安美院资产经营有限责任公司 一种群智化的艺术创新系统
DE102023105433A1 (de) * 2023-03-06 2024-09-12 Bundesdruckerei Gmbh Verfahren und Vorrichtung zum Bestimmen eines Bilddatensatzes für ein biometrisches Passbild, Verfahren zum Personalisieren eines Sicherheitsdokuments und Computerprogrammprodukt
CN118822864A (zh) * 2024-06-28 2024-10-22 北京字跳网络技术有限公司 一种图像处理方法、装置、电子设备及存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770649A (zh) * 2008-12-30 2010-07-07 中国科学院自动化研究所 一种人脸图像自动合成方法
CN101923726A (zh) * 2009-06-09 2010-12-22 华为技术有限公司 一种语音动画生成方法及系统
CN102074040A (zh) * 2009-11-16 2011-05-25 索尼公司 图像处理设备、图像处理方法和程序
CN103035022A (zh) * 2012-12-07 2013-04-10 大连大学 基于特征点的人脸表情合成方法
US20150310261A1 (en) * 2014-04-28 2015-10-29 Microsoft Corporation Creation of representative content based on facial analysis
CN105741229A (zh) * 2016-02-01 2016-07-06 成都通甲优博科技有限责任公司 实现人脸图像快速融合的方法
CN106023063A (zh) * 2016-05-09 2016-10-12 西安北升信息科技有限公司 一种视频移植换脸的方法
CN107038429A (zh) * 2017-05-03 2017-08-11 四川云图睿视科技有限公司 一种基于深度学习的多任务级联人脸对齐方法

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006051607A1 (ja) * 2004-11-12 2006-05-18 Omron Corporation 顔特徴点検出装置、特徴点検出装置
EP1966761A2 (en) * 2005-12-22 2008-09-10 Philips Intellectual Property & Standards GmbH Adaptive point-based elastic image registration
US8290304B2 (en) * 2007-02-23 2012-10-16 Lockheed Martin Corporation Iterative region-based automated control point generation
JP5166230B2 (ja) * 2008-12-26 2013-03-21 富士フイルム株式会社 画像処理装置および方法並びにプログラム
US8773513B2 (en) * 2011-07-01 2014-07-08 Seiko Epson Corporation Context and epsilon stereo constrained correspondence matching
US8811686B2 (en) * 2011-08-19 2014-08-19 Adobe Systems Incorporated Methods and apparatus for automated portrait retouching using facial feature localization
US8861868B2 (en) * 2011-08-29 2014-10-14 Adobe-Systems Incorporated Patch-based synthesis techniques
CN103295210B (zh) * 2012-03-01 2016-08-10 汉王科技股份有限公司 婴儿图像合成方法及装置
CN103514432B (zh) * 2012-06-25 2017-09-01 诺基亚技术有限公司 人脸特征提取方法、设备和计算机程序产品
CN103824269B (zh) * 2012-11-16 2017-03-29 广州三星通信技术研究有限公司 人脸特效处理方法以及系统
CN105139438B (zh) * 2014-09-19 2018-01-12 电子科技大学 视频人脸卡通动画生成方法
CN105184249B (zh) * 2015-08-28 2017-07-18 百度在线网络技术(北京)有限公司 用于人脸图像处理的方法和装置
CN105956997B (zh) * 2016-04-27 2019-07-05 腾讯科技(深圳)有限公司 图像形变处理的方法和装置
CN106156730B (zh) * 2016-06-30 2019-03-15 腾讯科技(深圳)有限公司 一种人脸图像的合成方法和装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101770649A (zh) * 2008-12-30 2010-07-07 中国科学院自动化研究所 一种人脸图像自动合成方法
CN101923726A (zh) * 2009-06-09 2010-12-22 华为技术有限公司 一种语音动画生成方法及系统
CN102074040A (zh) * 2009-11-16 2011-05-25 索尼公司 图像处理设备、图像处理方法和程序
CN103035022A (zh) * 2012-12-07 2013-04-10 大连大学 基于特征点的人脸表情合成方法
US20150310261A1 (en) * 2014-04-28 2015-10-29 Microsoft Corporation Creation of representative content based on facial analysis
CN105741229A (zh) * 2016-02-01 2016-07-06 成都通甲优博科技有限责任公司 实现人脸图像快速融合的方法
CN106023063A (zh) * 2016-05-09 2016-10-12 西安北升信息科技有限公司 一种视频移植换脸的方法
CN107038429A (zh) * 2017-05-03 2017-08-11 四川云图睿视科技有限公司 一种基于深度学习的多任务级联人脸对齐方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111833238A (zh) * 2020-06-01 2020-10-27 北京百度网讯科技有限公司 图像的翻译方法和装置、图像翻译模型的训练方法和装置
CN111833238B (zh) * 2020-06-01 2023-07-25 北京百度网讯科技有限公司 图像的翻译方法和装置、图像翻译模型的训练方法和装置
CN112085835A (zh) * 2020-08-31 2020-12-15 腾讯科技(深圳)有限公司 三维卡通人脸生成方法、装置、电子设备及存储介质
CN112085835B (zh) * 2020-08-31 2024-03-22 腾讯科技(深圳)有限公司 三维卡通人脸生成方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
US11043011B2 (en) 2021-06-22
US20200034996A1 (en) 2020-01-30
CN109952594B (zh) 2022-01-07
CN109952594A (zh) 2019-06-28

Similar Documents

Publication Publication Date Title
CN109952594B (zh) 图像处理方法、装置、终端及存储介质
JP7365445B2 (ja) コンピューティング装置及び方法
EP3992919B1 (en) Three-dimensional facial model generation method and apparatus, device, and medium
US11010967B2 (en) Three dimensional content generating apparatus and three dimensional content generating method thereof
CN110675487B (zh) 基于多角度二维人脸的三维人脸建模、识别方法及装置
EP3454250B1 (en) Facial image processing method and apparatus and storage medium
WO2020103700A1 (zh) 一种基于微表情的图像识别方法、装置以及相关设备
CN113570684B (zh) 图像处理方法、装置、计算机设备和存储介质
CN104680121B (zh) 一种人脸图像的处理方法及装置
WO2020000908A1 (zh) 一种人脸活体检测方法及装置
CN102436636B (zh) 自动分割头发的方法及其系统
CN109937434B (zh) 图像处理方法、装置、终端和存储介质
CN107771336A (zh) 基于颜色分布的图像中的特征检测和掩模
CN108198130B (zh) 图像处理方法、装置、存储介质及电子设备
CN111008935B (zh) 一种人脸图像增强方法、装置、系统及存储介质
CN103430218A (zh) 用3d脸部建模和地标对齐扩增造型的方法
CN112818899B (zh) 人脸图像处理方法、装置、计算机设备和存储介质
WO2022267653A1 (zh) 图像处理方法、电子设备及计算机可读存储介质
CN111586424B (zh) 一种实现化妆品多维动态展示的视频直播方法及装置
US12327299B2 (en) Facial expression image processing method and apparatus, and electronic device
CN105989331A (zh) 脸部特征提取装置、脸部特征提取方法、图像处理设备和图像处理方法
WO2019142127A1 (en) Method and system of creating multiple expression emoticons
WO2024059374A1 (en) User authentication based on three-dimensional face modeling using partial face images
WO2022135574A1 (zh) 肤色检测方法、装置、移动终端和存储介质
CN111586428A (zh) 具有虚拟人物上妆功能的化妆品直播系统及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17929170

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17929170

Country of ref document: EP

Kind code of ref document: A1