WO2022089185A1 - Image processing method and image processing device - Google Patents

Image processing method and image processing device Download PDF

Info

Publication number
WO2022089185A1
WO2022089185A1 PCT/CN2021/123080 CN2021123080W WO2022089185A1 WO 2022089185 A1 WO2022089185 A1 WO 2022089185A1 CN 2021123080 W CN2021123080 W CN 2021123080W WO 2022089185 A1 WO2022089185 A1 WO 2022089185A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
face
area
deformed
background
Prior art date
Application number
PCT/CN2021/123080
Other languages
French (fr)
Chinese (zh)
Inventor
赵明菲
闻兴
Original Assignee
北京达佳互联信息技术有限公司
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 北京达佳互联信息技术有限公司 filed Critical 北京达佳互联信息技术有限公司
Publication of WO2022089185A1 publication Critical patent/WO2022089185A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Definitions

  • the present disclosure relates to the technical field of image processing, and more particularly, to an image processing method and an image processing apparatus.
  • the present disclosure provides an image processing method and an image processing apparatus.
  • an image processing method comprising: identifying a face region in a first image; performing face-lifting on the face region in the first image based on a face-lifting algorithm, to obtain a face-lifted face the second image; perform repairing on the deformed area in the second image resulting from performing face-lifting to obtain a repaired third image.
  • the deformed area may be an area other than the face area after face reduction in a predetermined area including the face area involved in performing face reduction in the first image.
  • the performing inpainting on the deformed region in the second image resulting from performing face reduction may include: performing inpainting by filling the deformed region with background pixels.
  • the performing inpainting by filling the deformed area with background pixels may include: based on the deformed area and the first image or first image, using an image inpainting algorithm to fill the deformed area background pixels.
  • the performing inpainting by filling the deformed area with background pixels may include: filling the deformed area with background pixels based on the background image and the second image, wherein the background image is a The first image has a pure background image of the same scene.
  • an image processing apparatus comprising: an identification unit configured to identify a face region in a first image; a face reduction unit configured to performing face-lifting on the face region to obtain a second image after face-lifting; the repairing unit is configured to perform repairing on a deformed region in the second image that is generated by performing face-lifting, so as to generate a repaired third image.
  • the deformed area may be an area other than the face area after face reduction in a predetermined area including the face area involved in performing face reduction in the first image.
  • the inpainting unit may be configured to perform inpainting by filling the deformed region with background pixels.
  • the inpainting unit may be configured to fill the deformed region with background pixels using an image inpainting algorithm based on the deformed region and the first image or the first image.
  • the repair unit may be configured to fill the deformed region with background pixels based on a background image and a second image, wherein the background image is a pure background image having the same scene as the first image.
  • the repairing unit may be configured to: search for an area in the background image that is the same as the deformed area; replace the deformed area with pixel values of pixels of the searched area in the background image The pixel value of the pixel in .
  • an electronic device comprising: at least one processor; at least one memory storing computer-executable instructions, wherein the computer-executable instructions are executed by the at least one processor when the at least one processor is caused to execute the image processing method according to the present disclosure.
  • a computer-readable storage medium storing instructions, wherein, when the instructions are executed by at least one processor, the at least one processor is caused to execute the method according to the present disclosure. image processing method.
  • a computer program product wherein instructions in the computer program product can be executed by a processor of a computer device to complete the image processing method according to the present disclosure.
  • a more natural and more realistic face-lifting effect can be obtained by performing restoration on a region that is distorted and deformed by performing face-lifting.
  • FIG. 2 is a schematic diagram illustrating an implementation scenario of an image processing method and an image processing apparatus according to an exemplary embodiment of the present disclosure.
  • FIG. 3 is a flowchart illustrating an image processing method according to an exemplary embodiment of the present disclosure.
  • FIG. 4 is a schematic diagram showing a deformed area due to face-lifting.
  • FIG. 5 is a schematic diagram illustrating a background frame replacement method according to an exemplary embodiment of the present disclosure.
  • FIG. 6 is a block diagram illustrating an image processing apparatus according to an exemplary embodiment of the present disclosure.
  • FIG. 7 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
  • FIG. 1 is a schematic diagram illustrating a face-lifting algorithm.
  • the process of the face-lifting algorithm may include: (1) As shown in (a) in Figure 1, first, obtain basic information on key points of the face, mainly including eyebrows, eyes, nose, mouth, face The 106 key points of the outer contour; (2) As shown in (b) in Figure 1, secondly, based on the detected 106 key points, the facial key points are densified, and additional key points are inserted, such as The forehead area and the peripheral area of the face are limited so that it can cover the entire face area; (3) As shown in (c) in Figure 1, finally, based on the face key points after densification, the entire face is constructed for it The triangulation of the entire face area (Delaunay Triangulation) is realized.
  • the triangulation divides the face into multiple non-overlapping triangular areas, and then the area transformation can achieve the effect of thin face.
  • region transformation by translating the vertices of the triangulation, then updating the translated vertices to the corresponding texture coordinates, and rendering through openGL or D3D, so as to realize the deformation of the entire associated triangulation.
  • This achieves the face-reduction effect, it will also lead to deformation or unnaturalness of the non-face area (as shown in (c) in Figure 1) involved in the triangular mesh of the face-reduction algorithm.
  • the non-face area includes the background area around the original face area and the area in the original face area that is thinned by the face thinning algorithm.
  • the present disclosure proposes an image processing method and an image processing apparatus, which can perform restoration on an area deformed by a face-reduction operation after a face-reduction operation is performed on an image, so as to obtain a more natural face-reduction image.
  • the image processing method and the image processing apparatus according to the present disclosure will be described in detail with reference to FIGS. 2 to 7 .
  • FIG. 2 is a schematic diagram illustrating an implementation scenario of an image processing method and an image processing apparatus according to an exemplary embodiment of the present disclosure.
  • the host in the network live broadcast system, can use the live broadcast equipment 201 to shoot the live broadcast program and upload the live broadcast program to the server 202 in the live broadcast room through the client of the live broadcast equipment 201, and the server 202 distributes the live broadcast program to the host who enters the host.
  • the client terminal of the user terminal 203 or 204 in the live broadcast room can present the live broadcast program to the users watching the live broadcast.
  • the live broadcast device 201 may be any device including a shooting function or a device capable of being connected with the shooting device, for example, a mobile phone, a portable computer, a tablet computer, a video camera, and the like.
  • the client used by the host during the live broadcast can perform face-lifting on the part of the face in the video and/or image captured by the live-streaming device 201, and include the face-lifting performed
  • the resulting live video and/or image live program is uploaded to the server 202 and distributed to each user terminal 203 or 204 for viewing by the user, so the video and/or image of the anchor with a face-lifted and more beautified image can be viewed. Therefore, the image processing method and the image processing apparatus according to the present disclosure can be applied to this live broadcast scene.
  • the image processing method and image processing apparatus according to the present disclosure can be applied to any scene where face reduction can be performed, such as a short video recording scene, a photographing scene, a self-portraiting scene, and the like, in addition to a live broadcast scene.
  • FIG. 3 is a flowchart illustrating an image processing method according to an exemplary embodiment of the present disclosure.
  • a face region in a first image may be identified.
  • the first image may be an image captured by photographing, or may be an image of a video obtained by capturing a video.
  • the first image may be obtained in real-time from the photographing device, or may be obtained from local storage or a local database as needed, or received from an external data source (eg, the Internet, a server, a database, etc.) through an input device or transmission medium, the present
  • an external data source eg, the Internet, a server, a database, etc.
  • the face area may be an area occupied by a face in the first image.
  • the face area may be an area including only a face part, or an area including a face part and related parts such as hair and accessories, which is not limited in the present disclosure.
  • any possible face recognition method can be used to identify the face region in the image, which is not limited in the present disclosure.
  • a face-lift may be performed on a face region in the first image based on a face-lift algorithm to obtain a face-lifted second image.
  • a face-lift algorithm can be used to perform face reduction on the face region, but any other possible face reduction algorithm can also be used to perform face reduction, which is not limited in the present disclosure.
  • the second image may be an intermediate process image and may not be the actual output image.
  • FIG. 4 is a schematic diagram showing a deformed area due to face-lifting. As shown in FIG. 4 , (a) in FIG. 4 exemplarily shows a first image before performing face-lifting, and (b) in FIG. 4 exemplarily shows a second image after performing face-lifting. As shown in (a) of FIG.
  • the first image may include a face region 401 and a background region 402 .
  • the predetermined area 403 to be involved in performing face-reduction on the face area using the face-reduction algorithm may include the face area 401 and a part of the background area 402 .
  • the predetermined area 403 may be an area involved in a triangular mesh (as shown in (c) in FIG. 1 ). As shown in (b) of FIG.
  • the second image may include a face region 401 ′ and a background region 402 ′, wherein the face region 401 ′ is reduced due to the face-lifting algorithm.
  • the background area 402' increases because the reduced part of the face area is filled with background pixels.
  • the area other than the face area 401' after face reduction in the predetermined area 403' will be deformed, that is, it may be referred to as a deformed area.
  • the deformed area may include a background area 404' around the original face area and an area 405' in the original face area that is thinned by a face thinning algorithm.
  • step 303 inpainting may be performed on the deformed region in the second image resulting from performing face-lifting to obtain a repaired third image.
  • a deformed area resulting from performing face reduction may be first determined.
  • the deformed area may be determined as an area other than the face area after face reduction in a predetermined area including a face area involved in performing face reduction in the first image, for example, in (b) of FIG. 4
  • the deformed area is an area (404'+405') other than the face area 401' in the predetermined area 403'.
  • the deformed region can also be determined by comparing the pixel values around the face region of the second image after face-lifting with the pixel values around the face region of the first image before face-lifting.
  • any possible method can be used to determine the deformation area, which is not limited in the present disclosure.
  • inpainting may be performed on the deformed region by filling the deformed region with background pixels.
  • the inpainting can be performed on the deformed regions by an image inpainting algorithm or a method of background frame replacement.
  • the present disclosure is not limited to these repair methods, and any possible repair method can be used to perform repair on the deformed region. The following describes in detail how to perform inpainting on deformed regions through image inpainting algorithms or background frame replacement.
  • the deformed region may be filled with background pixels using an image inpainting algorithm based on the deformed region and the first image or the first image.
  • image inpainting algorithms may include traditional inpainting algorithms (non-deep learning algorithms) and deep learning algorithms.
  • Conventional patching algorithms may include patch-based methods and diffusion-based methods.
  • an image patch similar to the deformed area can be filled in the deformed area by searching the first image before performing face-lifting.
  • the diffusion-based method is used, the pixels at the edge of the deformed area can be in-grown according to the properties of the corresponding area of the first image before performing face-lifting, and the entire deformed area can be filled by diffusion.
  • Deep learning algorithms may include convolutional neural network (CNN) based methods, generative adversarial network (GAN) based methods, recurrent neural network (RNN) based methods, and the like.
  • a mask may be generated based on the deformed area, and based on the second image after performing face reduction and the generated mask, image inpainting may be performed on the deformed area using a deep learning algorithm.
  • the specific method may be inputting the second image and the generated mask after performing face-lifting into the model based on the deep learning algorithm, and the model based on the deep learning algorithm outputs the third image after the deformed area has been repaired.
  • a simpler and faster background frame replacement method can be used to repair the deformed region.
  • the background image before adding the human face and the first image after adding the human face can be obtained respectively.
  • multiple frames of video images can be continuously captured, and the shooting device can first capture image frames with only background to obtain background frame images, and then allow the user to shoot in front of the shooting device to obtain video frame images (for example, the first image).
  • FIG. 5 is a schematic diagram illustrating a background frame replacement method according to an exemplary embodiment of the present disclosure.
  • a pure background image 501 having the same scene as the first image can be acquired.
  • the pure background image 501 is searched for the same area 502 (shown by hatching) as the deformed area (404'+405') shown in (b) of Fig. 4 .
  • the pixel values of the pixels in the deformed area (404'+405') are replaced with the pixel values of the pixels in the searched area 502.
  • FIG. 6 is a block diagram illustrating an image processing apparatus according to an exemplary embodiment of the present disclosure.
  • an image processing apparatus 600 may include a recognition unit 601 , a face reduction unit 602 , and a repair unit 603 .
  • the identifying unit 601 can identify the face region in the first image.
  • the first image may be an image captured by photographing, or may be an image of a video obtained by capturing a video.
  • the first image may be obtained in real-time from the photographing device, or may be obtained from local storage or a local database as needed, or received from an external data source (eg, the Internet, a server, a database, etc.) through an input device or transmission medium, the present There is no restriction on this disclosure.
  • the face area may be an area occupied by a face in the first image.
  • the face area may be an area including only a face part, or an area including a face part and related parts such as hair and accessories, which is not limited in the present disclosure.
  • the recognition unit 601 may use any possible face recognition method to recognize the face area in the image, which is not limited in the present disclosure.
  • the face-reduction unit 602 may perform face-reduction on the face region in the first image based on a face-reduction algorithm to obtain a face-reduced second image.
  • the face-reduction unit 602 may use the above-mentioned triangulation method to perform face-reduction on the face region, but may also use any other possible face-reduction algorithms to perform face-reduction, which is not limited in the present disclosure.
  • the second image may be an intermediate process image and may not be the actual output image.
  • the surrounding area may include a background area around the original face area and an area in the original face area that is thinned by the face thinning algorithm. Therefore, the inpainting unit 603 may perform inpainting on the deformed region in the second image resulting from performing the face reduction, to obtain a repaired third image.
  • the repairing unit 603 may first determine a deformed area resulting from performing face reduction. For example, the repairing unit 603 may determine the deformed area as an area other than the face area after face reduction in the predetermined area including the face area involved in performing face reduction in the first image, for example, (b in FIG. 4 ) The deformed area in ) is the area (404'+405') in the predetermined area 403' except the face area 401'. For another example, the repairing unit 603 may also determine the deformed region by comparing the pixel values around the face region of the second image after face reduction with the pixel values around the face region of the first image before face reduction. Of course, any possible method can be used to determine the deformation area, which is not limited in the present disclosure.
  • the repairing unit 603 may perform repairing on the deformed region by filling the deformed region with background pixels.
  • the inpainting unit 603 may perform inpainting on the deformed region through an image inpainting algorithm or a background frame replacement method.
  • the present disclosure is not limited to these repairing methods, and the repairing unit 603 may also use any possible repairing method to repair the deformed area. The following describes in detail how to perform inpainting on deformed regions through image inpainting algorithms or background frame replacement.
  • the repairing unit 603 may fill the deformed region with background pixels using an image inpainting algorithm based on the deformed region and the first image or the first image.
  • image inpainting algorithms may include traditional inpainting algorithms (non-deep learning algorithms) and deep learning algorithms.
  • Conventional patching algorithms may include patch-based methods and diffusion-based methods.
  • the repairing unit 603 may fill in the deformed area by searching for an image block similar to the deformed area on the first image before performing face-lifting.
  • the repairing unit 603 uses the diffusion-based method, the pixels at the edge of the deformed area may grow inward according to the properties of the corresponding area of the first image before performing face-lifting, and the entire deformed area may be filled by diffusion.
  • the deep learning algorithm may include a convolutional neural network (CNN)-based method, a generative adversarial network (GAN)-based method, a recurrent neural network (RNN)-based method, and the like.
  • the repairing unit 603 may generate a mask based on the deformed area, and perform image inpainting on the deformed area by using a deep learning algorithm based on the second image after performing face reduction and the generated mask.
  • the specific method may be that the repairing unit 603 inputs the second image after face-lifting and the generated mask to the model based on the deep learning algorithm, and the model based on the deep learning algorithm outputs the third image after the deformed area is repaired.
  • the repairing unit 603 may use a simpler and faster background frame replacement method to repair the deformed region.
  • the background image before adding the human face and the first image after adding the human face can be obtained respectively.
  • multiple frames of video images can be continuously captured, and the shooting device can first capture image frames with only background to obtain background frame images, and then allow the user to shoot in front of the shooting device to obtain video frame images (for example, the first image).
  • the repairing unit 603 may fill the deformed area with background pixels based on the background image and the second image. For example, the repairing unit 603 may search for the same area as the deformed area in the background image, and replace the pixel value of the pixel in the deformed area with the pixel value of the pixel of the searched area in the background image.
  • FIG. 7 is a block diagram of an electronic device 700 according to an exemplary embodiment of the present disclosure.
  • the electronic device 700 includes at least one memory 701 and at least one processor 702.
  • the at least one memory 701 stores a computer-executable instruction set.
  • the computer-executable instruction set is executed by the at least one processor 702 the execution An image processing method according to an exemplary embodiment of the present disclosure.
  • the electronic device 700 may be a PC computer, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above set of instructions.
  • the electronic device 700 is not necessarily a single electronic device, but can also be a collection of any device or circuit capable of individually or jointly executing the above-mentioned instructions (or instruction sets).
  • Electronic device 700 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces locally or remotely (eg, via wireless transmission).
  • processor 702 may include a central processing unit (CPU), graphics processing unit (GPU), programmable logic device, special purpose processor system, microcontroller, or microprocessor.
  • processors may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
  • Processor 702 may execute instructions or code stored in memory 701, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transport protocol.
  • the memory 701 may be integrated with the processor 702, eg, RAM or flash memory arranged within an integrated circuit microprocessor or the like. Furthermore, memory 701 may comprise a separate device, such as an external disk drive, a storage array, or any other storage device that may be used by a database system. The memory 701 and the processor 702 may be operatively coupled, or may communicate with each other, eg, through I/O ports, network connections, etc., to enable the processor 702 to read files stored in the memory.
  • the electronic device 700 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of electronic device 700 may be connected to each other via a bus and/or network.
  • a video display such as a liquid crystal display
  • a user interaction interface such as a keyboard, mouse, touch input device, etc.
  • a computer-readable storage medium storing instructions, wherein the instructions, when executed by at least one processor, cause the at least one processor to perform a video demarking method according to the present disclosure.
  • Examples of the computer-readable storage medium herein include: Read Only Memory (ROM), Random Access Programmable Read Only Memory (PROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Random Access Memory (RAM) , dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM , DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or Optical Disc Storage, Hard Disk Drive (HDD), Solid State Hard disk (SSD), card memory (such as a multimedia card, Secure Digital (SD) card, or
  • the computer program in the above-mentioned computer readable storage medium can be executed in an environment deployed in a computer device such as a client, a host, a proxy device, a server, etc.
  • a computer device such as a client, a host, a proxy device, a server, etc.
  • the computer program and any associated data, data files and data structures are distributed over networked computer systems so that the computer programs and any associated data, data files and data structures are stored, accessed and executed in a distributed fashion by one or more processors or computers.
  • a computer program product wherein instructions in the computer program product can be executed by a processor of a computer device to complete the image processing method according to the exemplary embodiment of the present disclosure.
  • a more natural and more realistic face-lifting effect can be obtained by performing restoration on a region that is distorted and deformed by performing face-lifting.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The present invention relates to an image processing method and an image processing device. The image processing method comprises: recognizing a face region in a first image; performing face thinning on the face region in the first image on the basis of a face thinning algorithm so as to obtain a second image after the face thinning; and repairing a deformed region generated due to the face thinning in the second image so as to obtain a repaired third image.

Description

图像处理方法和图像处理装置Image processing method and image processing device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本公开要求于2020年10月30日提交中国专利局、申请号为202011192273.2、发明名称为“图像处理方法和图像处理装置”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This disclosure claims the priority of a Chinese patent application with application number 202011192273.2 and titled "Image Processing Method and Image Processing Device" filed with the China Patent Office on October 30, 2020, the entire contents of which are incorporated in this disclosure by reference .
技术领域technical field
本公开涉及图像处理技术领域,更具体地说,涉及一种图像处理方法和图像处理装置。The present disclosure relates to the technical field of image processing, and more particularly, to an image processing method and an image processing apparatus.
背景技术Background technique
在视频直播、短视频、拍照等应用场景中,一个非常常用的技术是瘦脸,它可以让用户的脸变小,达到更好的主观效果。In application scenarios such as live video, short video, and photography, a very commonly used technology is face-lifting, which can make the user's face smaller and achieve better subjective effects.
发明内容SUMMARY OF THE INVENTION
本公开提供一种图像处理方法和图像处理装置。The present disclosure provides an image processing method and an image processing apparatus.
根据本公开实施例的第一方面,提供一种图像处理方法,包括:识别第一图像中的人脸区域;基于瘦脸算法对第一图像中的所述人脸区域执行瘦脸,以获得瘦脸后的第二图像;对第二图像中因执行瘦脸而产生的变形区域执行修复,以获得修复后的第三图像。According to a first aspect of the embodiments of the present disclosure, there is provided an image processing method, comprising: identifying a face region in a first image; performing face-lifting on the face region in the first image based on a face-lifting algorithm, to obtain a face-lifted face the second image; perform repairing on the deformed area in the second image resulting from performing face-lifting to obtain a repaired third image.
在一些实施例中,所述变形区域可以是在第一图像中执行瘦脸所涉及的包括所述人脸区域的预定区域中的除瘦脸后的人脸区域之外的区域。In some embodiments, the deformed area may be an area other than the face area after face reduction in a predetermined area including the face area involved in performing face reduction in the first image.
在一些实施例中,所述对第二图像中因执行瘦脸而产生的变形区域执行修复,可包括:通过对所述变形区域填充背景像素,来执行修复。In some embodiments, the performing inpainting on the deformed region in the second image resulting from performing face reduction may include: performing inpainting by filling the deformed region with background pixels.
在一些实施例中,所述通过对所述变形区域填充背景像素,来执行修复,可包括:基于所述变形区域以及第一图像或第一图像,使用图像修补算法,对所述变形区域填充背景像素。In some embodiments, the performing inpainting by filling the deformed area with background pixels may include: based on the deformed area and the first image or first image, using an image inpainting algorithm to fill the deformed area background pixels.
在一些实施例中,所述通过对所述变形区域填充背景像素,来执行修复,可包括:基于背景图像和第二图像,对所述变形区域填充背景像素,其中,所述背景图像是与第一图像具有相同场景的纯背景图像。In some embodiments, the performing inpainting by filling the deformed area with background pixels may include: filling the deformed area with background pixels based on the background image and the second image, wherein the background image is a The first image has a pure background image of the same scene.
在一些实施例中,所述基于背景图像和第二图像,对所述变形区域填充背景像素,可包括:搜索所述背景图像中与所述变形区域相同的区域;利用所述背景图像中搜索到的所述区域的像素的像素值替换所述变形区域中的像素的像素值。In some embodiments, the filling the deformed area with background pixels based on the background image and the second image may include: searching the background image for the same area as the deformed area; using the search in the background image The pixel values of the obtained pixels in the region replace the pixel values of the pixels in the deformed region.
根据本公开实施例的第二方面,提供一种图像处理装置,包括:识别单元,被配置为识别第一图像中的人脸区域;瘦脸单元,被配置为基于瘦脸算法对第一图像中的所述人脸区域执行瘦脸,以获得瘦脸后的第二图像;修复单元,被配置为对第二图像中因执行瘦脸而产生的变形区域执行修复,以生成修复后的第三图像。According to a second aspect of the embodiments of the present disclosure, there is provided an image processing apparatus, comprising: an identification unit configured to identify a face region in a first image; a face reduction unit configured to performing face-lifting on the face region to obtain a second image after face-lifting; the repairing unit is configured to perform repairing on a deformed region in the second image that is generated by performing face-lifting, so as to generate a repaired third image.
在一些实施例中,所述变形区域可以是在第一图像中执行瘦脸所涉及的包括所述人脸区域的预定区域中的除瘦脸后的人脸区域之外的区域。In some embodiments, the deformed area may be an area other than the face area after face reduction in a predetermined area including the face area involved in performing face reduction in the first image.
在一些实施例中,修复单元可被配置为:通过对所述变形区域填充背景像素,来执行修复。In some embodiments, the inpainting unit may be configured to perform inpainting by filling the deformed region with background pixels.
在一些实施例中,修复单元可被配置为:基于所述变形区域以及第一图像或第一图像,使用图像修补算法,对所述变形区域填充背景像素。In some embodiments, the inpainting unit may be configured to fill the deformed region with background pixels using an image inpainting algorithm based on the deformed region and the first image or the first image.
在一些实施例中,修复单元可被配置为:基于背景图像和第二图像,对所述变形区域填充背景像素,其中,所述背景图像是与第一图像具有相同场景的纯背景图像。In some embodiments, the repair unit may be configured to fill the deformed region with background pixels based on a background image and a second image, wherein the background image is a pure background image having the same scene as the first image.
在一些实施例中,修复单元可被配置为:搜索所述背景图像中与所述变形区域相同的区域;利用所述背景图像中搜索到的所述区域的像素的像素值替换所述变形区域中的像素的像素值。In some embodiments, the repairing unit may be configured to: search for an area in the background image that is the same as the deformed area; replace the deformed area with pixel values of pixels of the searched area in the background image The pixel value of the pixel in .
根据本公开实施例的第三方面,提供一种电子设备,包括:至少一个处理器;存储计算机可执行指令的至少一个存储器,其中,所述计算机可执行指令在被所述至少一个处理器运行时,促使所述至少一个处理器执行根据本公开的图像处理方法。According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor; at least one memory storing computer-executable instructions, wherein the computer-executable instructions are executed by the at least one processor when the at least one processor is caused to execute the image processing method according to the present disclosure.
根据本公开实施例的第四方面,提供一种存储指令的计算机可读存储介质,其特征在于,当所述指令被至少一个处理器运行时,促使所述至少一个处理器执行根据本公开的图像处理方法。According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing instructions, wherein, when the instructions are executed by at least one processor, the at least one processor is caused to execute the method according to the present disclosure. image processing method.
根据本公开实施例的第五方面,提供一种计算机程序产品,该计算机程序产品中的指令可由计算机设备的处理器执行以完成根据本公开的图像处理方法。According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, wherein instructions in the computer program product can be executed by a processor of a computer device to complete the image processing method according to the present disclosure.
根据本公开的图像处理方法和图像处理装置,可通过对因执行瘦脸而发生扭曲变形的区域执行修复,来获得更加自然更加真实的瘦脸效果。According to the image processing method and the image processing apparatus of the present disclosure, a more natural and more realistic face-lifting effect can be obtained by performing restoration on a region that is distorted and deformed by performing face-lifting.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。The accompanying drawings, which are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the principles of the present disclosure and do not unduly limit the present disclosure.
图1是示出瘦脸算法的示意图。FIG. 1 is a schematic diagram illustrating a face-lifting algorithm.
图2是示出根据本公开的示例性实施例的图像处理方法和图像处理装置的实施场景的示意图。FIG. 2 is a schematic diagram illustrating an implementation scenario of an image processing method and an image processing apparatus according to an exemplary embodiment of the present disclosure.
图3是示出根据本公开的示例性实施例的图像处理方法的流程图。FIG. 3 is a flowchart illustrating an image processing method according to an exemplary embodiment of the present disclosure.
图4是示出由于瘦脸而导致的变形区域的示意图。FIG. 4 is a schematic diagram showing a deformed area due to face-lifting.
图5是示出根据本公开的示例性实施例的背景帧替换方法的示意图。FIG. 5 is a schematic diagram illustrating a background frame replacement method according to an exemplary embodiment of the present disclosure.
图6是示出根据本公开的示例性实施例的图像处理装置的框图。FIG. 6 is a block diagram illustrating an image processing apparatus according to an exemplary embodiment of the present disclosure.
图7是根据本公开的示例性实施例的电子设备的框图。FIG. 7 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。In order to make those skilled in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。It should be noted that the terms "first", "second" and the like in the description and claims of the present disclosure and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the disclosure described herein can be practiced in sequences other than those illustrated or described herein. The implementations described in the following examples are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.
在此需要说明的是,在本公开中出现的“若干项之中的至少一项”均表示包含“该若干项中的任意一项”、“该若干项中的任意多项的组合”、“该若干项的全体”这三类并列的情况。例如“包括A和B之中的至少一个”即包括如下三种并列的情况:(1)包括A;(2)包括B;(3)包括A和B。又例如“执行步骤一和步骤二之中的至少一个”,即表示如下三种并列的情况:(1)执行步骤一;(2)执行步骤二;(3)执行步骤一和步骤二。It should be noted here that "at least one of several items" in the present disclosure all means including "any one of the several items", "a combination of any of the several items", The three categories of "the whole of the several items" are juxtaposed. For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "execute at least one of step 1 and step 2", which means the following three parallel situations: (1) execute step 1; (2) execute step 2; (3) execute step 1 and step 2.
现有的瘦脸算法主要是基于人脸关键点的检测,然后对人脸关键点进行稠密化处理,最后使用三角剖分的方法实现瘦脸的效果。图1是示出瘦脸算法的示意图。如图1所示,瘦脸算法的过程可包括:(1)如图1中的(a)所示,首先,获取进行人脸关键点基本信息,主要包括眉毛、眼睛、鼻子、嘴巴、脸部外轮廓这106个关键点;(2)如图1中的(b)所示,其次,基于检测出的106个关键点,对脸部关键点进行稠密化处理,插入额外的关键点,如额头区域和脸部外围限制区域,使其能够覆盖整个脸部区域;(3)如图1中的(c)所示,最后,基于稠密化以后的人脸关键点,对其构建整张脸的三角网格,实现对整个脸部区域的三角剖分(Delaunay Triangulation),三角剖分将人脸切分成多个无重叠的三角区域,然后进行区域变换可以实现瘦脸的效果。在区域变换的过程中,通过对三角网顶点进行平移,再将平移后的顶点更新到对应的纹理坐标,通过openGL或者D3D进行绘制渲染,从而实现整 个关联三角网的变形。这样虽然达到了瘦脸效果,但也会导致瘦脸算法的三角网格所涉及到的非脸部区域(如图1中的(c)所示)造成变形或不自然。该非脸部区域包括原脸部区域周围的背景区域和原脸部区域中经瘦脸算法而被削瘦的区域。为了解决上述问题,本公开提出了一种图像处理方法和图像处理装置,能够在图像执行瘦脸后对因瘦脸操作而变形的区域执行修复,以获得更加自然的瘦脸图像。下面,将参照图2至图7详细描述根据本公开的图像处理方法和图像处理装置。The existing face-lifting algorithms are mainly based on the detection of key points of the face, then densify the key points of the face, and finally use the triangulation method to achieve the effect of face-lifting. FIG. 1 is a schematic diagram illustrating a face-lifting algorithm. As shown in Figure 1, the process of the face-lifting algorithm may include: (1) As shown in (a) in Figure 1, first, obtain basic information on key points of the face, mainly including eyebrows, eyes, nose, mouth, face The 106 key points of the outer contour; (2) As shown in (b) in Figure 1, secondly, based on the detected 106 key points, the facial key points are densified, and additional key points are inserted, such as The forehead area and the peripheral area of the face are limited so that it can cover the entire face area; (3) As shown in (c) in Figure 1, finally, based on the face key points after densification, the entire face is constructed for it The triangulation of the entire face area (Delaunay Triangulation) is realized. The triangulation divides the face into multiple non-overlapping triangular areas, and then the area transformation can achieve the effect of thin face. In the process of region transformation, by translating the vertices of the triangulation, then updating the translated vertices to the corresponding texture coordinates, and rendering through openGL or D3D, so as to realize the deformation of the entire associated triangulation. Although this achieves the face-reduction effect, it will also lead to deformation or unnaturalness of the non-face area (as shown in (c) in Figure 1) involved in the triangular mesh of the face-reduction algorithm. The non-face area includes the background area around the original face area and the area in the original face area that is thinned by the face thinning algorithm. In order to solve the above problems, the present disclosure proposes an image processing method and an image processing apparatus, which can perform restoration on an area deformed by a face-reduction operation after a face-reduction operation is performed on an image, so as to obtain a more natural face-reduction image. Hereinafter, the image processing method and the image processing apparatus according to the present disclosure will be described in detail with reference to FIGS. 2 to 7 .
图2是示出根据本公开的示例性实施例的图像处理方法和图像处理装置的实施场景的示意图。FIG. 2 is a schematic diagram illustrating an implementation scenario of an image processing method and an image processing apparatus according to an exemplary embodiment of the present disclosure.
参照图2,在网络直播系统中,主播可使用直播设备201拍摄直播节目并通过直播设备201的客户端在直播间中将直播节目上传至服务器202,服务器202将该直播节目分发到进入该主播的直播间的用户终端203或204的客户端以将该直播节目展现给观看直播的用户。这里,直播设备201可以是任何包括拍摄功能的设备或能够与拍摄设备连接的设备,例如,手机、便携式计算机、平板电脑、摄像机等。为了使观看直播的用户看到的主播的形象更加美化,主播在直播时使用的客户端可将由直播设备201拍摄到的视频和/或图像中的人脸部分执行瘦脸,并将包括被执行瘦脸后的视频和/或图像的直播节目上传至服务器202,从而分发到各个用户终端203或204以供用户观看,因此观看可观看到经过瘦脸的形象更加美化的主播的视频和/或图像。因此,根据本公开的图像处理方法和图像处理装置可应用于此直播场景。2, in the network live broadcast system, the host can use the live broadcast equipment 201 to shoot the live broadcast program and upload the live broadcast program to the server 202 in the live broadcast room through the client of the live broadcast equipment 201, and the server 202 distributes the live broadcast program to the host who enters the host. The client terminal of the user terminal 203 or 204 in the live broadcast room can present the live broadcast program to the users watching the live broadcast. Here, the live broadcast device 201 may be any device including a shooting function or a device capable of being connected with the shooting device, for example, a mobile phone, a portable computer, a tablet computer, a video camera, and the like. In order to beautify the image of the host seen by the users watching the live broadcast, the client used by the host during the live broadcast can perform face-lifting on the part of the face in the video and/or image captured by the live-streaming device 201, and include the face-lifting performed The resulting live video and/or image live program is uploaded to the server 202 and distributed to each user terminal 203 or 204 for viewing by the user, so the video and/or image of the anchor with a face-lifted and more beautified image can be viewed. Therefore, the image processing method and the image processing apparatus according to the present disclosure can be applied to this live broadcast scene.
此外,根据本公开的图像处理方法和图像处理装置除了可应用于直播场景以外,还可应用于诸如短视频录制场景、拍照场景、自拍场景等等的任何可执行瘦脸的场景。In addition, the image processing method and image processing apparatus according to the present disclosure can be applied to any scene where face reduction can be performed, such as a short video recording scene, a photographing scene, a self-portraiting scene, and the like, in addition to a live broadcast scene.
图3是示出根据本公开的示例性实施例的图像处理方法的流程图。FIG. 3 is a flowchart illustrating an image processing method according to an exemplary embodiment of the present disclosure.
参照图3,在步骤301,可识别第一图像中的人脸区域。这里,第一图像可以是执行拍照捕捉的图像,也可以是拍摄视频所得到的视频的图像。此外,第一图像可从拍摄设备实时获得,或者可根据需要从本地存储器或本地数据库被获取或者通过输入装置或传输媒介而从外部数据源(例如,互联网、服务器、数据库等)被接收,本公开对此不作限制。此外,人脸区域可以是第一图像中人脸所占据的区域。人脸区域既可以是仅包含人脸部分的区域,也可以是包含人脸部分以及头发、配饰等相关部分的区域,本公开对此不作限制。此外,可利用任何可能的人脸识别方法来识别图像中的人脸区域,本公开对此不作限制。Referring to FIG. 3, in step 301, a face region in a first image may be identified. Here, the first image may be an image captured by photographing, or may be an image of a video obtained by capturing a video. In addition, the first image may be obtained in real-time from the photographing device, or may be obtained from local storage or a local database as needed, or received from an external data source (eg, the Internet, a server, a database, etc.) through an input device or transmission medium, the present There is no restriction on this disclosure. Furthermore, the face area may be an area occupied by a face in the first image. The face area may be an area including only a face part, or an area including a face part and related parts such as hair and accessories, which is not limited in the present disclosure. In addition, any possible face recognition method can be used to identify the face region in the image, which is not limited in the present disclosure.
在步骤302,可基于瘦脸算法对第一图像中的人脸区域执行瘦脸,以获得瘦脸后的第二图像。例如,可使用上述提及的三角剖分的方法来对所述人脸区域执行瘦脸,但也可利用其它任何可能的瘦脸算法来执行瘦脸,本公开对此不作限制。例如,第二图像可以是中间过程图像,可以不是实际输出的图像。In step 302, a face-lift may be performed on a face region in the first image based on a face-lift algorithm to obtain a face-lifted second image. For example, the above-mentioned triangulation method can be used to perform face reduction on the face region, but any other possible face reduction algorithm can also be used to perform face reduction, which is not limited in the present disclosure. For example, the second image may be an intermediate process image and may not be the actual output image.
当使用瘦脸算法对人脸区域执行瘦脸时,必然导致人脸区域的周围区域不同程度的扭曲变形。该周围区域可包括原人脸区域周围的背景区域和原人脸区域中经瘦脸算法而被削瘦的区域。图4是示出由于瘦脸而导致的变形区域的示意图。如图4所示,图4中的(a)示例性地示出执行瘦脸前的第一图像,图4中的(b)示例性地示出执行瘦脸后的第二图像。如图4中的(a)所示,在利用瘦脸算法对人脸区域执行瘦脸前,第一图像可包括人脸区域401和背景区域402。此外,利用瘦脸算法对人脸区域执行瘦脸将涉及的预定区域403可包括人脸区域401以及背景区域402的一部分。例如,当使用三角剖分算法执行瘦脸时,预定区域403可为三角网格所涉及到的区域(如图1中的(c)所示)。如图4中的(b)所示,在利用瘦脸算法对人脸区域执行瘦脸后,第二图像可包括人脸区域401’和背景区域402’,其中,人脸区域401’因执行瘦脸而减小,背景区域402’因人脸区域被减小的部分被填充背景像素而增大。此外,预定区域403’中除了瘦脸后的人脸区域401’之外的区域将会发生变形,即,可称为变形区域。该变形区域可包括原人脸区域周围的背景区域404’和原人脸区域中经瘦脸算法而被削瘦的区域405’。When using the face-lifting algorithm to perform face-lifting on the face region, it will inevitably lead to different degrees of distortion and deformation of the surrounding regions of the face region. The surrounding area may include a background area around the original face area and an area in the original face area that is thinned by the face thinning algorithm. FIG. 4 is a schematic diagram showing a deformed area due to face-lifting. As shown in FIG. 4 , (a) in FIG. 4 exemplarily shows a first image before performing face-lifting, and (b) in FIG. 4 exemplarily shows a second image after performing face-lifting. As shown in (a) of FIG. 4 , before performing face-lifting on the face region using the face-lifting algorithm, the first image may include a face region 401 and a background region 402 . In addition, the predetermined area 403 to be involved in performing face-reduction on the face area using the face-reduction algorithm may include the face area 401 and a part of the background area 402 . For example, when face-lifting is performed using a triangulation algorithm, the predetermined area 403 may be an area involved in a triangular mesh (as shown in (c) in FIG. 1 ). As shown in (b) of FIG. 4 , after performing face-lifting on the face region using the face-lifting algorithm, the second image may include a face region 401 ′ and a background region 402 ′, wherein the face region 401 ′ is reduced due to the face-lifting algorithm. Decrease, the background area 402' increases because the reduced part of the face area is filled with background pixels. In addition, the area other than the face area 401' after face reduction in the predetermined area 403' will be deformed, that is, it may be referred to as a deformed area. The deformed area may include a background area 404' around the original face area and an area 405' in the original face area that is thinned by a face thinning algorithm.
返回参照图3,因此,在步骤303,可对第二图像中因执行瘦脸而产生的变形区域执行修复,以获得修复后的第三图像。Referring back to FIG. 3 , therefore, in step 303 , inpainting may be performed on the deformed region in the second image resulting from performing face-lifting to obtain a repaired third image.
根据本公开的示例性实施例,可首先确定因执行瘦脸而产生的变形区域。例如,可将变形区域确定为在第一图像中执行瘦脸所涉及的包括人脸区域的预定区域中的除瘦脸后的人脸区域之外的区域,例如,图4中的(b)中的变形区域为预定区域403’之中的除人脸区域401’之外的区域(404’+405’)。又例如,还可通过将执行瘦脸后的第二图像的人脸区域周围的像素值与执行瘦脸前的第一图像的人脸区域周围的像素值进行比较,还确定变形区域。当然,可利用任何可能的方法来确定变形区域,本公开对此不作限制。According to an exemplary embodiment of the present disclosure, a deformed area resulting from performing face reduction may be first determined. For example, the deformed area may be determined as an area other than the face area after face reduction in a predetermined area including a face area involved in performing face reduction in the first image, for example, in (b) of FIG. 4 The deformed area is an area (404'+405') other than the face area 401' in the predetermined area 403'. For another example, the deformed region can also be determined by comparing the pixel values around the face region of the second image after face-lifting with the pixel values around the face region of the first image before face-lifting. Of course, any possible method can be used to determine the deformation area, which is not limited in the present disclosure.
根据本公开的示例性实施例,可对变形区域填充背景像素来对变形区域执行修复。例如,可通过图像修补(image inpainting)算法或背景帧替换的方法来对变形区域执行修复。当然,本公开不限于这些修复方法,还可使用任何可能的修复方法来对变形区域执行修复。下面具体介绍通过图像修补算法或背景帧替换的方法来对变形区域执行修复。According to an exemplary embodiment of the present disclosure, inpainting may be performed on the deformed region by filling the deformed region with background pixels. For example, the inpainting can be performed on the deformed regions by an image inpainting algorithm or a method of background frame replacement. Of course, the present disclosure is not limited to these repair methods, and any possible repair method can be used to perform repair on the deformed region. The following describes in detail how to perform inpainting on deformed regions through image inpainting algorithms or background frame replacement.
根据本公开的示例性实施例,可基于变形区域以及第一图像或第一图像,使用图像修补算法,对变形区域填充背景像素。例如,图像修补算法可包括传统修补算法(非深度学习算法)和深度学习算法。传统修补算法可包括基于图像块(patch-based)的方法和基于扩散(diffusion-based)的方法。利用基于图像块的方法时,可通过在执行瘦脸前的第一图像上搜索与变形区域相似的图像块,将其填充到变形区域。利用基于扩散的方法时,可将变形区域边缘的像素按照执行瘦脸前的第一图像的相应区域的性质向内生长,扩散填充整个变形区域。深度学习算法可包括基于卷积神经网络(CNN)的方法、基于生成对抗网络(GAN)的 方法、基于循环神经网络(RNN)的方法等。可基于变形区域生成掩膜,基于执行瘦脸后的第二图像和生成的掩膜,利用深度学习算法,对变形区域执行图像修补。具体做法可以是将执行瘦脸后的第二图像和生成的掩膜输入到基于深度学习算法的模型,由基于深度学习算法的模型输出变形区域被修复后的第三图像。According to an exemplary embodiment of the present disclosure, the deformed region may be filled with background pixels using an image inpainting algorithm based on the deformed region and the first image or the first image. For example, image inpainting algorithms may include traditional inpainting algorithms (non-deep learning algorithms) and deep learning algorithms. Conventional patching algorithms may include patch-based methods and diffusion-based methods. When using the image patch-based method, an image patch similar to the deformed area can be filled in the deformed area by searching the first image before performing face-lifting. When the diffusion-based method is used, the pixels at the edge of the deformed area can be in-grown according to the properties of the corresponding area of the first image before performing face-lifting, and the entire deformed area can be filled by diffusion. Deep learning algorithms may include convolutional neural network (CNN) based methods, generative adversarial network (GAN) based methods, recurrent neural network (RNN) based methods, and the like. A mask may be generated based on the deformed area, and based on the second image after performing face reduction and the generated mask, image inpainting may be performed on the deformed area using a deep learning algorithm. The specific method may be inputting the second image and the generated mask after performing face-lifting into the model based on the deep learning algorithm, and the model based on the deep learning algorithm outputs the third image after the deformed area has been repaired.
根据本公开的示例性实施例,在能够获取到与第一图像具有相同场景的纯背景图像的情况下,可使用更为简单更快速的背景帧替换方法来对变形区域进行修复。例如,但不限于,当拍摄第一图像的拍摄设备静止且位置固定时,可分别获取到加入人脸前的背景图像和加入人脸后的第一图像。例如,在视频场景下,可连续采集多帧视频图像,拍摄设备可先采集只有背景的图像帧以得到背景帧图像,然后再让用户在拍摄设备前拍摄以获得视频帧图像(例如,第一图像)。According to an exemplary embodiment of the present disclosure, under the condition that a pure background image with the same scene as the first image can be obtained, a simpler and faster background frame replacement method can be used to repair the deformed region. For example, but not limited to, when the photographing device for photographing the first image is stationary and the position is fixed, the background image before adding the human face and the first image after adding the human face can be obtained respectively. For example, in a video scene, multiple frames of video images can be continuously captured, and the shooting device can first capture image frames with only background to obtain background frame images, and then allow the user to shoot in front of the shooting device to obtain video frame images (for example, the first image).
在获取到背景图像之后,可基于背景图像和第二图像,对变形区域填充背景像素。例如,可搜索背景图像中与变形区域相同的区域,并利用背景图像中搜索到的区域的像素的像素值替换变形区域中的像素的像素值。图5是示出根据本公开的示例性实施例的背景帧替换方法的示意图。参照图5,可获取与第一图像具有相同场景的纯背景图像501。在纯背景图像501中搜索与如图4中的(b)中所示的变形区域(404’+405’)相同的区域502(阴影线示出)。用搜索到的区域502中的像素的像素值替换变形区域(404’+405’)中的像素的像素值。After the background image is acquired, the deformed area may be filled with background pixels based on the background image and the second image. For example, the background image may be searched for the same area as the deformed area, and the pixel value of the pixel in the deformed area may be replaced with the pixel value of the pixel of the searched area in the background image. FIG. 5 is a schematic diagram illustrating a background frame replacement method according to an exemplary embodiment of the present disclosure. Referring to FIG. 5 , a pure background image 501 having the same scene as the first image can be acquired. The pure background image 501 is searched for the same area 502 (shown by hatching) as the deformed area (404'+405') shown in (b) of Fig. 4 . The pixel values of the pixels in the deformed area (404'+405') are replaced with the pixel values of the pixels in the searched area 502.
图6是示出根据本公开的示例性实施例的图像处理装置的框图。FIG. 6 is a block diagram illustrating an image processing apparatus according to an exemplary embodiment of the present disclosure.
参照图6,根据本公开的示例性实施例的图像处理装置600可包括识别单元601、瘦脸单元602和修复单元603。6 , an image processing apparatus 600 according to an exemplary embodiment of the present disclosure may include a recognition unit 601 , a face reduction unit 602 , and a repair unit 603 .
识别单元601可识别第一图像中的人脸区域。这里,第一图像可以是执行拍照捕捉的图像,也可以是拍摄视频所得到的视频的图像。此外,第一图像可从拍摄设备实时获得,或者可根据需要从本地存储器或本地数据库被获取或者通过输入装置或传输媒介而从外部数据源(例如,互联网、服务器、数据库等)被接收,本公开对此不作限制。此外,人脸区域可以是第一图像中人脸所占据的区域。人脸区域既可以是仅包含人脸部分的区域,也可以是包含人脸部分以及头发、配饰等相关部分的区域,本公开对此不作限制。此外,识别单元601可利用任何可能的人脸识别方法来识别图像中的人脸区域,本公开对此不作限制。The identifying unit 601 can identify the face region in the first image. Here, the first image may be an image captured by photographing, or may be an image of a video obtained by capturing a video. In addition, the first image may be obtained in real-time from the photographing device, or may be obtained from local storage or a local database as needed, or received from an external data source (eg, the Internet, a server, a database, etc.) through an input device or transmission medium, the present There is no restriction on this disclosure. Furthermore, the face area may be an area occupied by a face in the first image. The face area may be an area including only a face part, or an area including a face part and related parts such as hair and accessories, which is not limited in the present disclosure. In addition, the recognition unit 601 may use any possible face recognition method to recognize the face area in the image, which is not limited in the present disclosure.
瘦脸单元602可基于瘦脸算法对第一图像中的人脸区域执行瘦脸,以获得瘦脸后的第二图像。例如,瘦脸单元602可使用上述提及的三角剖分的方法来对所述人脸区域执行瘦脸,但也可利用其它任何可能的瘦脸算法来执行瘦脸,本公开对此不作限制。例如,第二图像可以是中间过程图像,可以不是实际输出的图像。The face-reduction unit 602 may perform face-reduction on the face region in the first image based on a face-reduction algorithm to obtain a face-reduced second image. For example, the face-reduction unit 602 may use the above-mentioned triangulation method to perform face-reduction on the face region, but may also use any other possible face-reduction algorithms to perform face-reduction, which is not limited in the present disclosure. For example, the second image may be an intermediate process image and may not be the actual output image.
当使用瘦脸算法对人脸区域执行瘦脸时,必然导致人脸区域的周围区域不同程度的扭曲变形。该周围区域可包括原人脸区域周围的背景区域和原人脸区域中经瘦脸算法而被削瘦的 区域。因此,修复单元603可对第二图像中因执行瘦脸而产生的变形区域执行修复,以获得修复后的第三图像。When using the face-lifting algorithm to perform face-lifting on the face region, it will inevitably lead to different degrees of distortion and deformation of the surrounding regions of the face region. The surrounding area may include a background area around the original face area and an area in the original face area that is thinned by the face thinning algorithm. Therefore, the inpainting unit 603 may perform inpainting on the deformed region in the second image resulting from performing the face reduction, to obtain a repaired third image.
根据本公开的示例性实施例,修复单元603可首先确定因执行瘦脸而产生的变形区域。例如,修复单元603可将变形区域确定为在第一图像中执行瘦脸所涉及的包括人脸区域的预定区域中的除瘦脸后的人脸区域之外的区域,例如,图4中的(b)中的变形区域为预定区域403’之中的除人脸区域401’之外的区域(404’+405’)。又例如,修复单元603还可通过将执行瘦脸后的第二图像的人脸区域周围的像素值与执行瘦脸前的第一图像的人脸区域周围的像素值进行比较,还确定变形区域。当然,可利用任何可能的方法来确定变形区域,本公开对此不作限制。According to an exemplary embodiment of the present disclosure, the repairing unit 603 may first determine a deformed area resulting from performing face reduction. For example, the repairing unit 603 may determine the deformed area as an area other than the face area after face reduction in the predetermined area including the face area involved in performing face reduction in the first image, for example, (b in FIG. 4 ) The deformed area in ) is the area (404'+405') in the predetermined area 403' except the face area 401'. For another example, the repairing unit 603 may also determine the deformed region by comparing the pixel values around the face region of the second image after face reduction with the pixel values around the face region of the first image before face reduction. Of course, any possible method can be used to determine the deformation area, which is not limited in the present disclosure.
根据本公开的示例性实施例,修复单元603可对变形区域填充背景像素来对变形区域执行修复。例如,修复单元603可通过图像修补(image inpainting)算法或背景帧替换的方法来对变形区域执行修复。当然,本公开不限于这些修复方法,修复单元603还可使用任何可能的修复方法来对变形区域。下面具体介绍通过图像修补算法或背景帧替换的方法来对变形区域执行修复。According to an exemplary embodiment of the present disclosure, the repairing unit 603 may perform repairing on the deformed region by filling the deformed region with background pixels. For example, the inpainting unit 603 may perform inpainting on the deformed region through an image inpainting algorithm or a background frame replacement method. Of course, the present disclosure is not limited to these repairing methods, and the repairing unit 603 may also use any possible repairing method to repair the deformed area. The following describes in detail how to perform inpainting on deformed regions through image inpainting algorithms or background frame replacement.
根据本公开的示例性实施例,修复单元603可基于变形区域以及第一图像或第一图像,使用图像修补算法,对变形区域填充背景像素。例如,图像修补算法可包括传统修补算法(非深度学习算法)和深度学习算法。传统修补算法可包括基于图像块(patch-based)的方法和基于扩散(diffusion-based)的方法。修复单元603利用基于图像块的方法时,可通过在执行瘦脸前的第一图像上搜索与变形区域相似的图像块,将其填充到变形区域。修复单元603利用基于扩散的方法时,可将变形区域边缘的像素按照执行瘦脸前的第一图像的相应区域的性质向内生长,扩散填充整个变形区域。深度学习算法可包括基于卷积神经网络(CNN)的方法、基于生成对抗网络(GAN)的方法、基于循环神经网络(RNN)的方法等。修复单元603可基于变形区域生成掩膜,基于执行瘦脸后的第二图像和生成的掩膜,利用深度学习算法,对变形区域执行图像修补。具体做法可以是修复单元603将执行瘦脸后的第二图像和生成的掩膜输入到基于深度学习算法的模型,由基于深度学习算法的模型输出变形区域被修复后的第三图像。According to an exemplary embodiment of the present disclosure, the repairing unit 603 may fill the deformed region with background pixels using an image inpainting algorithm based on the deformed region and the first image or the first image. For example, image inpainting algorithms may include traditional inpainting algorithms (non-deep learning algorithms) and deep learning algorithms. Conventional patching algorithms may include patch-based methods and diffusion-based methods. When using the image block-based method, the repairing unit 603 may fill in the deformed area by searching for an image block similar to the deformed area on the first image before performing face-lifting. When the repairing unit 603 uses the diffusion-based method, the pixels at the edge of the deformed area may grow inward according to the properties of the corresponding area of the first image before performing face-lifting, and the entire deformed area may be filled by diffusion. The deep learning algorithm may include a convolutional neural network (CNN)-based method, a generative adversarial network (GAN)-based method, a recurrent neural network (RNN)-based method, and the like. The repairing unit 603 may generate a mask based on the deformed area, and perform image inpainting on the deformed area by using a deep learning algorithm based on the second image after performing face reduction and the generated mask. The specific method may be that the repairing unit 603 inputs the second image after face-lifting and the generated mask to the model based on the deep learning algorithm, and the model based on the deep learning algorithm outputs the third image after the deformed area is repaired.
根据本公开的示例性实施例,在能够获取到与第一图像具有相同场景的纯背景图像的情况下,修复单元603可使用更为简单更快速的背景帧替换方法来对变形区域进行修复。例如,但不限于,当拍摄第一图像的拍摄设备静止且位置固定时,可分别获取到加入人脸前的背景图像和加入人脸后的第一图像。例如,在视频场景下,可连续采集多帧视频图像,拍摄设备可先采集只有背景的图像帧以得到背景帧图像,然后再让用户在拍摄设备前拍摄以获得视频帧图像(例如,第一图像)。According to an exemplary embodiment of the present disclosure, under the condition that a pure background image with the same scene as the first image can be obtained, the repairing unit 603 may use a simpler and faster background frame replacement method to repair the deformed region. For example, but not limited to, when the photographing device for photographing the first image is stationary and the position is fixed, the background image before adding the human face and the first image after adding the human face can be obtained respectively. For example, in a video scene, multiple frames of video images can be continuously captured, and the shooting device can first capture image frames with only background to obtain background frame images, and then allow the user to shoot in front of the shooting device to obtain video frame images (for example, the first image).
在获取到背景图像之后,修复单元603可基于背景图像和第二图像,对变形区域填充背景像素。例如,修复单元603可搜索背景图像中与变形区域相同的区域,并利用背景图像中搜索到的区域的像素的像素值替换变形区域中的像素的像素值。After acquiring the background image, the repairing unit 603 may fill the deformed area with background pixels based on the background image and the second image. For example, the repairing unit 603 may search for the same area as the deformed area in the background image, and replace the pixel value of the pixel in the deformed area with the pixel value of the pixel of the searched area in the background image.
图7是根据本公开的示例性实施例的电子设备700的框图。FIG. 7 is a block diagram of an electronic device 700 according to an exemplary embodiment of the present disclosure.
参照图7,电子设备700包括至少一个存储器701和至少一个处理器702,所述至少一个存储器701中存储有计算机可执行指令集合,当计算机可执行指令集合被至少一个处理器702执行时,执行根据本公开的示例性实施例的图像处理方法。Referring to FIG. 7 , the electronic device 700 includes at least one memory 701 and at least one processor 702. The at least one memory 701 stores a computer-executable instruction set. When the computer-executable instruction set is executed by the at least one processor 702, the execution An image processing method according to an exemplary embodiment of the present disclosure.
作为示例,电子设备700可以是PC计算机、平板装置、个人数字助理、智能手机、或其他能够执行上述指令集合的装置。这里,电子设备700并非必须是单个的电子设备,还可以是任何能够单独或联合执行上述指令(或指令集)的装置或电路的集合体。电子设备700还可以是集成控制系统或系统管理器的一部分,或者可被配置为与本地或远程(例如,经由无线传输)以接口互联的便携式电子设备。As an example, the electronic device 700 may be a PC computer, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above set of instructions. Here, the electronic device 700 is not necessarily a single electronic device, but can also be a collection of any device or circuit capable of individually or jointly executing the above-mentioned instructions (or instruction sets). Electronic device 700 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces locally or remotely (eg, via wireless transmission).
在电子设备700中,处理器702可包括中央处理器(CPU)、图形处理器(GPU)、可编程逻辑装置、专用处理器系统、微控制器或微处理器。作为示例而非限制,处理器还可包括模拟处理器、数字处理器、微处理器、多核处理器、处理器阵列、网络处理器等。In electronic device 700, processor 702 may include a central processing unit (CPU), graphics processing unit (GPU), programmable logic device, special purpose processor system, microcontroller, or microprocessor. By way of example and not limitation, processors may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
处理器702可运行存储在存储器701中的指令或代码,其中,存储器701还可以存储数据。指令和数据还可经由网络接口装置而通过网络被发送和接收,其中,网络接口装置可采用任何已知的传输协议。 Processor 702 may execute instructions or code stored in memory 701, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transport protocol.
存储器701可与处理器702集成为一体,例如,将RAM或闪存布置在集成电路微处理器等之内。此外,存储器701可包括独立的装置,诸如,外部盘驱动、存储阵列或任何数据库系统可使用的其他存储装置。存储器701和处理器702可在操作上进行耦合,或者可例如通过I/O端口、网络连接等互相通信,使得处理器702能够读取存储在存储器中的文件。The memory 701 may be integrated with the processor 702, eg, RAM or flash memory arranged within an integrated circuit microprocessor or the like. Furthermore, memory 701 may comprise a separate device, such as an external disk drive, a storage array, or any other storage device that may be used by a database system. The memory 701 and the processor 702 may be operatively coupled, or may communicate with each other, eg, through I/O ports, network connections, etc., to enable the processor 702 to read files stored in the memory.
此外,电子设备700还可包括视频显示器(诸如,液晶显示器)和用户交互接口(诸如,键盘、鼠标、触摸输入装置等)。电子设备700的所有组件可经由总线和/或网络而彼此连接。Additionally, the electronic device 700 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of electronic device 700 may be connected to each other via a bus and/or network.
根据本公开的示例性实施例,还可提供一种存储指令的计算机可读存储介质,其中,当指令被至少一个处理器运行时,促使至少一个处理器执行根据本公开的视频去痕方法。这里的计算机可读存储介质的示例包括:只读存储器(ROM)、随机存取可编程只读存储器(PROM)、电可擦除可编程只读存储器(EEPROM)、随机存取存储器(RAM)、动态随机存取存储器(DRAM)、静态随机存取存储器(SRAM)、闪存、非易失性存储器、CD-ROM、CD-R、CD+R、CD-RW、CD+RW、DVD-ROM、DVD-R、DVD+R、DVD-RW、DVD+RW、DVD-RAM、BD-ROM、BD-R、BD-R LTH、BD-RE、蓝光或光盘存储器、硬盘驱动器(HDD)、固态硬盘(SSD)、卡式存储器(诸如,多媒体卡、安全数字(SD)卡或极速数字(XD)卡)、磁带、软盘、磁光数据存储装置、光学数据存储 装置、硬盘、固态盘以及任何其他装置,所述任何其他装置被配置为以非暂时性方式存储计算机程序以及任何相关联的数据、数据文件和数据结构并将所述计算机程序以及任何相关联的数据、数据文件和数据结构提供给处理器或计算机使得处理器或计算机能执行所述计算机程序。上述计算机可读存储介质中的计算机程序可在诸如客户端、主机、代理装置、服务器等计算机设备中部署的环境中运行,此外,在一个示例中,计算机程序以及任何相关联的数据、数据文件和数据结构分布在联网的计算机系统上,使得计算机程序以及任何相关联的数据、数据文件和数据结构通过一个或多个处理器或计算机以分布式方式存储、访问和执行。According to exemplary embodiments of the present disclosure, there may also be provided a computer-readable storage medium storing instructions, wherein the instructions, when executed by at least one processor, cause the at least one processor to perform a video demarking method according to the present disclosure. Examples of the computer-readable storage medium herein include: Read Only Memory (ROM), Random Access Programmable Read Only Memory (PROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Random Access Memory (RAM) , dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM , DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or Optical Disc Storage, Hard Disk Drive (HDD), Solid State Hard disk (SSD), card memory (such as a multimedia card, Secure Digital (SD) card, or Extreme Digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, and any other apparatus configured to store and provide the computer program and any associated data, data files and data structures in a non-transitory manner with the computer program and any associated data, data files and data structures The computer program is given to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer readable storage medium can be executed in an environment deployed in a computer device such as a client, a host, a proxy device, a server, etc. Furthermore, in one example, the computer program and any associated data, data files and data structures are distributed over networked computer systems so that the computer programs and any associated data, data files and data structures are stored, accessed and executed in a distributed fashion by one or more processors or computers.
根据本公开的示例性实施例,还可提供一种计算机程序产品,该计算机程序产品中的指令可由计算机设备的处理器执行以完成根据本公开的示例性实施例的图像处理方法。According to an exemplary embodiment of the present disclosure, there can also be provided a computer program product, wherein instructions in the computer program product can be executed by a processor of a computer device to complete the image processing method according to the exemplary embodiment of the present disclosure.
根据本公开的图像处理方法和图像处理装置,可通过对因执行瘦脸而发生扭曲变形的区域执行修复,来获得更加自然更加真实的瘦脸效果。According to the image processing method and the image processing apparatus of the present disclosure, a more natural and more realistic face-lifting effect can be obtained by performing restoration on a region that is distorted and deformed by performing face-lifting.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, comprising:
    识别第一图像中的人脸区域;identifying the face region in the first image;
    基于瘦脸算法对第一图像中的所述人脸区域执行瘦脸,以获得瘦脸后的第二图像;Perform face-lifting on the face region in the first image based on a face-lifting algorithm to obtain a face-lifted second image;
    对第二图像中因执行瘦脸而产生的变形区域执行修复,以获得修复后的第三图像。Inpainting is performed on the deformed region in the second image resulting from performing the face-lifting to obtain the inpainted third image.
  2. 如权利要求1所述的图像处理方法,其特征在于,所述变形区域是在第一图像中执行瘦脸所涉及的包括所述人脸区域的预定区域中的除瘦脸后的人脸区域之外的区域。The image processing method according to claim 1, wherein the deformed area is a predetermined area including the face area involved in performing face reduction in the first image except the face area after face reduction Area.
  3. 如权利要求1所述的图像处理方法,其特征在于,所述对第二图像中因执行瘦脸而产生的变形区域执行修复,包括:The image processing method according to claim 1, wherein the performing restoration on the deformed region in the second image caused by performing face-lifting comprises:
    通过对所述变形区域填充背景像素,来执行修复。Inpainting is performed by filling the deformed area with background pixels.
  4. 如权利要求3所述的图像处理方法,其特征在于,所述通过对所述变形区域填充背景像素,来执行修复,包括:The image processing method according to claim 3, wherein the performing restoration by filling the deformed area with background pixels, comprising:
    基于所述变形区域以及第一图像或第一图像,使用图像修补算法,对所述变形区域填充背景像素。Based on the deformed region and the first image or first image, the deformed region is filled with background pixels using an image inpainting algorithm.
  5. 如权利要求3所述的图像处理方法,其特征在于,所述通过对所述变形区域填充背景像素,来执行修复,包括:The image processing method according to claim 3, wherein the performing restoration by filling the deformed area with background pixels, comprising:
    基于背景图像和第二图像,对所述变形区域填充背景像素,filling the deformed region with background pixels based on the background image and the second image,
    其中,所述背景图像是与第一图像具有相同场景的纯背景图像。Wherein, the background image is a pure background image with the same scene as the first image.
  6. 如权利要求5所述的图像处理方法,其特征在于,所述基于背景图像和第二图像,对所述变形区域填充背景像素,包括:The image processing method according to claim 5, wherein, based on the background image and the second image, filling the deformed area with background pixels, comprising:
    搜索所述背景图像中与所述变形区域相同的区域;searching the background image for the same area as the deformed area;
    利用所述背景图像中搜索到的区域的像素的像素值替换所述变形区域中的像素的像素值。The pixel values of the pixels in the deformed area are replaced with the pixel values of the pixels of the searched area in the background image.
  7. 一种图像处理装置,其特征在于,包括:An image processing device, comprising:
    识别单元,被配置为识别第一图像中的人脸区域;an identification unit configured to identify the face region in the first image;
    瘦脸单元,被配置为基于瘦脸算法对第一图像中的所述人脸区域执行瘦脸,以获得瘦脸后的第二图像;A face-lifting unit, configured to perform face-lifting on the face region in the first image based on a face-lifting algorithm to obtain a face-lifted second image;
    修复单元,被配置为对第二图像中因执行瘦脸而产生的变形区域执行修复,以生成修复后的第三图像。The inpainting unit is configured to perform inpainting on the deformed region in the second image resulting from performing the face reduction, so as to generate a repaired third image.
  8. 如权利要求7所述的图像处理装置,其特征在于,所述变形区域是在第一图像中执行瘦脸所涉及的包括所述人脸区域的预定区域中的除瘦脸后的人脸区域之外的区域。8. The image processing apparatus according to claim 7, wherein the deformed area is a predetermined area including the face area involved in performing face reduction in the first image except the face area after face reduction Area.
  9. 如权利要求7所述的图像处理装置,其特征在于,修复单元被配置为:The image processing apparatus according to claim 7, wherein the repairing unit is configured to:
    通过对所述变形区域填充背景像素,来执行修复。Inpainting is performed by filling the deformed area with background pixels.
  10. 如权利要求9所述的图像处理装置,其特征在于,修复单元被配置为:The image processing apparatus of claim 9, wherein the repair unit is configured to:
    基于所述变形区域以及第一图像或第一图像,使用图像修补算法,对所述变形区域填充背景像素。Based on the deformed region and the first image or first image, the deformed region is filled with background pixels using an image inpainting algorithm.
  11. 如权利要求9所述的图像处理装置,其特征在于,修复单元被配置为:The image processing apparatus of claim 9, wherein the repair unit is configured to:
    基于背景图像和第二图像,对所述变形区域填充背景像素,filling the deformed region with background pixels based on the background image and the second image,
    其中,所述背景图像是与第一图像具有相同场景的纯背景图像。Wherein, the background image is a pure background image with the same scene as the first image.
  12. 如权利要求11所述的图像处理装置,其特征在于,修复单元被配置为:The image processing apparatus of claim 11, wherein the repair unit is configured to:
    搜索所述背景图像中与所述变形区域相同的区域;searching the background image for the same area as the deformed area;
    利用所述背景图像中搜索到的区域的像素的像素值替换所述变形区域中的像素的像素值。The pixel values of the pixels in the deformed area are replaced with the pixel values of the pixels of the searched area in the background image.
  13. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    至少一个处理器;at least one processor;
    存储计算机可执行指令的至少一个存储器,at least one memory storing computer-executable instructions,
    其中,所述计算机可执行指令在被所述至少一个处理器运行时,促使所述至少一个处理器执行如权利要求1到6中的任一权利要求所述的图像处理方法。Wherein, the computer-executable instructions, when executed by the at least one processor, cause the at least one processor to perform the image processing method of any one of claims 1-6.
  14. 一种存储指令的计算机可读存储介质,其特征在于,当所述指令被至少一个处理器运行时,促使所述至少一个处理器执行如权利要求1到6中的任一权利要求所述的图像处理方法。A computer-readable storage medium storing instructions, wherein the instructions, when executed by at least one processor, cause the at least one processor to perform the method of any one of claims 1 to 6 image processing method.
PCT/CN2021/123080 2020-10-30 2021-10-11 Image processing method and image processing device WO2022089185A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011192273.2A CN113012031A (en) 2020-10-30 2020-10-30 Image processing method and image processing apparatus
CN202011192273.2 2020-10-30

Publications (1)

Publication Number Publication Date
WO2022089185A1 true WO2022089185A1 (en) 2022-05-05

Family

ID=76382998

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/123080 WO2022089185A1 (en) 2020-10-30 2021-10-11 Image processing method and image processing device

Country Status (2)

Country Link
CN (1) CN113012031A (en)
WO (1) WO2022089185A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113012031A (en) * 2020-10-30 2021-06-22 北京达佳互联信息技术有限公司 Image processing method and image processing apparatus
CN113435445A (en) * 2021-07-05 2021-09-24 深圳市鹰硕技术有限公司 Image over-optimization automatic correction method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050275723A1 (en) * 2004-06-02 2005-12-15 Sezai Sablak Virtual mask for use in autotracking video camera images
CN109410138A (en) * 2018-10-16 2019-03-01 北京旷视科技有限公司 Modify jowled methods, devices and systems
CN110675420A (en) * 2019-08-22 2020-01-10 华为技术有限公司 Image processing method and electronic equipment
CN113012031A (en) * 2020-10-30 2021-06-22 北京达佳互联信息技术有限公司 Image processing method and image processing apparatus

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019090502A1 (en) * 2017-11-08 2019-05-16 深圳传音通讯有限公司 Intelligent terminal-based image capturing method and image capturing system
CN110706179B (en) * 2019-09-30 2023-11-10 维沃移动通信有限公司 Image processing method and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050275723A1 (en) * 2004-06-02 2005-12-15 Sezai Sablak Virtual mask for use in autotracking video camera images
CN109410138A (en) * 2018-10-16 2019-03-01 北京旷视科技有限公司 Modify jowled methods, devices and systems
CN110675420A (en) * 2019-08-22 2020-01-10 华为技术有限公司 Image processing method and electronic equipment
CN113012031A (en) * 2020-10-30 2021-06-22 北京达佳互联信息技术有限公司 Image processing method and image processing apparatus

Also Published As

Publication number Publication date
CN113012031A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN110503703B (en) Method and apparatus for generating image
US11410457B2 (en) Face reenactment
US10832086B2 (en) Target object presentation method and apparatus
US9699380B2 (en) Fusion of panoramic background images using color and depth data
US8861800B2 (en) Rapid 3D face reconstruction from a 2D image and methods using such rapid 3D face reconstruction
WO2022001509A1 (en) Image optimisation method and apparatus, computer storage medium, and electronic device
US20180114363A1 (en) Augmented scanning of 3d models
US20200013212A1 (en) Facial image replacement using 3-dimensional modelling techniques
US20210287449A1 (en) Delivering virtualized content
US20220222892A1 (en) Normalized three-dimensional avatar synthesis and perceptual refinement
WO2022089185A1 (en) Image processing method and image processing device
TW202011260A (en) Liveness detection method, apparatus and computer-readable storage medium
JP2020529086A (en) Methods and equipment for blurring preview photos and storage media
CN112241933A (en) Face image processing method and device, storage medium and electronic equipment
CN111008935B (en) Face image enhancement method, device, system and storage medium
US10719729B2 (en) Systems and methods for generating skin tone profiles
US11527014B2 (en) Methods and systems for calibrating surface data capture devices
CN109712082B (en) Method and device for collaboratively repairing picture
CN112330527A (en) Image processing method, image processing apparatus, electronic device, and medium
WO2023066120A1 (en) Image processing method and apparatus, electronic device, and storage medium
JP2023521270A (en) Learning lighting from various portraits
US20140198177A1 (en) Realtime photo retouching of live video
US20230080639A1 (en) Techniques for re-aging faces in images and video frames
US8891857B2 (en) Concave surface modeling in image-based visual hull
CN113223128B (en) Method and apparatus for generating image

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: 21884914

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: 21884914

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.08.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21884914

Country of ref document: EP

Kind code of ref document: A1