[go: up one dir, main page]

WO2018177364A1 - Filter implementation method and device - Google Patents

Filter implementation method and device Download PDF

Info

Publication number
WO2018177364A1
WO2018177364A1 PCT/CN2018/081068 CN2018081068W WO2018177364A1 WO 2018177364 A1 WO2018177364 A1 WO 2018177364A1 CN 2018081068 W CN2018081068 W CN 2018081068W WO 2018177364 A1 WO2018177364 A1 WO 2018177364A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
partition
face
face region
region
Prior art date
Application number
PCT/CN2018/081068
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 WO2018177364A1 publication Critical patent/WO2018177364A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • 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
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • 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
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/62Extraction of image or video features relating to a temporal dimension, e.g. time-based feature extraction; Pattern tracking

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for implementing a filter.
  • live video is also one of the dark horses.
  • the existing live video will often provide a filter function for the user to use.
  • the existing filter function is mainly used to realize various special scene effects of the image, generally by directly changing the color style of the image, that is, performing color adjustment. For example, nostalgia, black and white, sketch, beautiful and so on.
  • current filter functions are no longer able to meet the increasing demands of users.
  • the invention provides a method and a device for implementing a filter, which are used to solve the technical problem that the video filter in the prior art has a single function and cannot meet more demands of users.
  • the present invention provides a method of implementing a filter, comprising:
  • the face area being an area including a face image
  • the obtained blurred image replaces the partition image and is displayed.
  • the acquiring a face region in the target image includes: alternately using a face detection algorithm and a face tracking algorithm to acquire a target image in the video. Face area.
  • the method further includes: when the partition image belongs to the face region, adopting a dermabrasion algorithm and/or tone After the color algorithm processes the partition image, the obtained foreground image replaces the partition image and performs display.
  • the acquiring a face region in the target image includes: detecting and acquiring a face image in the target image; and using the circular region including the face image as the face region; Whether the partition image on the target image belongs to the face region includes: determining a distance between the partition image and a center of the face region; and determining, when the distance is less than or equal to a radius of the face region, determining The partition image belongs to the face area; when the distance is greater than a radius of the face area, it is determined that the partition image does not belong to the face area.
  • the blurring algorithm is used to blur the partition image, including: performing a downsampling process on the partition image; and using a blur algorithm to blur the downsampled processed partition image;
  • the partition image is subjected to upsampling processing.
  • an apparatus for implementing a filter comprising:
  • An acquiring module configured to acquire a face area in the target image, where the face area is an area including a face image
  • a determining module configured to determine whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, where N is an integer greater than one;
  • a fuzzy module configured to: when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image, and is displayed.
  • the acquiring module is further configured to: alternately use a face detection algorithm and a face tracking algorithm to acquire a face region of the target image in the video.
  • the device further includes: a beautification module, configured to obtain a foreground image after the partition image is processed by using a microdermabrasion algorithm and/or a toning algorithm when the partition image belongs to the face region Replace the partition image and display it.
  • a beautification module configured to obtain a foreground image after the partition image is processed by using a microdermabrasion algorithm and/or a toning algorithm when the partition image belongs to the face region Replace the partition image and display it.
  • the method and device provided by the embodiment of the present application first acquire a face region in a target image, and then determine whether each partition image segmented on the target image belongs to the face region, and when the partition image does not belong to the In the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed, thereby realizing a filter with background blurring function, which not only enriches the filter
  • the function also makes the face in the target image more prominent, and increases the confidentiality of the environment by blurring the background, thereby satisfying more needs of the user.
  • FIG. 1 is a flowchart of a method for implementing a filter according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of an apparatus for implementing a filter according to an embodiment of the present invention.
  • the embodiment of the present application provides a method and an apparatus for implementing a filter, which is used to solve the technical problem that the video filter in the prior art has a single function and cannot meet more demands of users.
  • a rich filter function has been implemented to meet the technical effects of users' needs for highlighting faces and increasing environmental confidentiality.
  • Obtaining a face region in the target image the face region being an area including a face image; determining whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partitions The image, N is an integer greater than 1; when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed.
  • the face region in the target image is first acquired, and then it is determined whether each of the segment images segmented on the target image belongs to the face region, and when the segment image does not belong to the face region,
  • the fuzzy algorithm blurs the partition image
  • the obtained blurred image replaces the partition image and performs display, thereby realizing a filter with background blur function, which not only enriches the filter function, but also makes the target
  • the faces in the image are more prominent, and the privacy of the environment is increased by blurring the background, thereby satisfying more needs of users.
  • This embodiment provides a method for implementing a filter. As shown in FIG. 1, the method includes:
  • Step S101 acquiring a face area in the target image, where the face area is an area including a face image
  • Step S102 determining whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, where N is an integer greater than one;
  • Step S103 When the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed.
  • the target image may be a single picture, or may be a live video or a picture stored in the video, which is not limited herein.
  • the method can implement background blurring on the picture; when the target image is a picture in the video, the implementation is implemented by using each frame picture or part of the picture in the video.
  • the method provided by the example can achieve background blurring of the video.
  • the method can be applied to a terminal such as a smart phone, a tablet computer, or a desktop computer, and can also be applied to a server, and is not limited herein.
  • step S101 is performed to acquire a face region in the target image, the face region being an area including a face image.
  • the location of the face in the target image and the size of the region in the target image are obtained, which can be implemented by various existing face detection algorithms.
  • the acquiring a face region in the target image includes:
  • the face detection algorithm and the face tracking algorithm are alternately used to acquire a face region of the target image in the video.
  • the alternate use of the face detection algorithm and the face tracking algorithm are particularly suitable for the target image in the live video to improve the efficiency of acquiring the face region of the plurality of images in the video in real time.
  • the capturing the face region in the target image may include: detecting and acquiring a face image in the target image; A circular area of the face image is described as the face area.
  • a square area or an elliptical area including the face image may be used as the face area, which is not limited herein.
  • step S102 is executed to determine whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, and N is an integer greater than 1.
  • the partition image may be N partition images that are divided in advance by a small triangle, a small square, or a small diamond.
  • the face area may also be a pixel point, where N is the number of pixel points, which is not limited herein.
  • the first type is judged according to the coordinates of the partition image.
  • the coordinates of the partition image and the coordinate range of the face region are first acquired; and it is determined whether the coordinates of the partition image belong to the coordinate range of the face region; when the coordinates of the partition image belong to the face When the coordinate range of the region is determined, the partition image is determined to belong to the face region; when the coordinates of the partition image do not belong to the coordinate range of the face region, it is determined that the partition image does not belong to the face region.
  • the face area is set as a regular figure, and is determined according to the distance between the partition image and the center of the face area.
  • the face region may be set as a circular region.
  • determining whether the partition image on the target image belongs to the face region comprises: determining a distance between the partition image and a center of the face region; and when the distance is less than or equal to the face When the radius of the region is determined, the partition image is determined to belong to the face region; when the distance is greater than a radius of the face region, it is determined that the partition image does not belong to the face region.
  • the location information of the face in the video image is obtained.
  • the face region is set to a circle
  • the coordinates of the center point A of the face region are obtained as A(x, y)
  • the radius is r.
  • the calculation formula of the distance di s of the center point D(i,j) of the partition image and the point A(x,y) is as follows:
  • step S103 when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed.
  • a blur algorithm may be used to blur the target image as a whole, and then a blurred image corresponding to the partition image may be obtained according to the position of the partition image.
  • each of the partition images may be blurred by using a blurring algorithm to obtain a blurred image corresponding to each of the partition images, which is not limited herein.
  • the blurring algorithm is used to blur the partition image, including:
  • the partition image after the downsampling process is blurred by using a fuzzy algorithm
  • the fuzzy algorithm can be Gaussian blur, mean filtering, median filtering, and the like.
  • the median filtering the larger the blur radius of the median filter, the more blurred the image, but the larger the blur radius, the larger the computation amount. Therefore, in order to improve the running efficiency of the program, you can first The target image is subjected to downsampling processing, and then the target image is blurred by median filtering, and then the target image is upsampled, and since the blurred image is obtained by acquiring the blurred image, the image is downsampled and uploaded. Sampling does not affect the final result of the image.
  • the method further includes:
  • the partition image belongs to the face region
  • the partition image is processed by using a dermabrasion algorithm and/or a toning algorithm
  • the obtained foreground image replaces the partition image and is displayed.
  • the target image may be processed in advance by using a microdermabrasion algorithm and/or a toning algorithm, and then the foreground image corresponding to the partition image may be obtained according to the position of the partition image.
  • each of the partition images may be processed by using a dermabrasion algorithm and/or a grading algorithm to obtain a foreground image corresponding to each of the partition images, which is not limited herein.
  • the present application not only considers the blurring of the background, but also considers the beautification of the face area.
  • the main function of the microdermabrasion algorithm is to denoise, that is, to remove or blur the noise in the image, so that the user can obtain a better visual experience.
  • denoise that is, to remove or blur the noise in the image
  • dermabrasion algorithms such as Gaussian filtering, bilateral filtering, local mean square error, surface ambiguity, mean blur, Gaussian blur and median filtering.
  • the dermabrasion algorithm can be used as a combination of bilateral filtering and Gaussian filtering. .
  • the skin color can be detected first, and only the noise in the skin color is processed, and the hair, eyes and the like are not treated, so that the skin dermabrasion effect is more natural.
  • the adjustment objects of simple color grading algorithm are: contrast, saturation, brightness, exposure, sharpness, etc.; adjustment of complex color grading algorithm Objects such as: soft light, elegant, retro, beautiful, sketch, rape, etc.
  • a transitional area that is attached to the attachment of the face area and a background area that is far from the face area may be further set, where The size of the transition area can be adjusted according to the actual situation.
  • determining that the partition image does not belong to the face area includes: when the distance is greater than When the radius of the face region is less than or equal to the preset radius, it is determined that the partition image belongs to the transition region, wherein the preset radius is greater than or equal to the radius of the face region; when the distance is greater than the preset At the radius, it is determined that the partition image belongs to the background area.
  • the partition image belongs to the background area, the partition image is replaced with the blurred image.
  • the partitioned area in the face area is displayed as a clear dermabrasion and/or the toned foreground image; the partitioned area in the background area is displayed as blurred by a fuzzy algorithm.
  • the face area is a circle with a point A as a center and r is a radius, and R is the predetermined radius
  • the background area is centered on point A
  • R is a radius
  • a portion other than the circle, the transition region being a ring region centered on the point A, the ring having a thickness of Rr.
  • a function that does not require background blurring may be set to directly display a foreground image of the target image, that is, after the target image is subjected to microdermabrasion and/or color adjustment. The display effect.
  • the method provided by the embodiment implements the microdermabrasion and the background blur on the basis of the color adjustment, thereby realizing a filter with a background blur function, which not only enriches the filter function, but also makes the The face in the target image is more prominent and beautified, and the privacy of the environment is increased by blurring the background, thereby satisfying more needs of the user.
  • the present application also provides an apparatus corresponding to the implementation method of the filter in the first embodiment. For details, see Embodiment 2.
  • the embodiment provides a filter implementation device. As shown in FIG. 2, the device includes:
  • the obtaining module 201 is configured to acquire a face area in the target image, where the face area is an area including a face image;
  • the determining module 202 is configured to determine whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, where N is an integer greater than one;
  • the blurring module 203 is configured to: when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image, and is displayed.
  • the device may be a terminal such as a smart phone, a tablet computer, or a desktop computer, or may be a server, and is not limited herein.
  • the obtaining module 201 is further configured to:
  • the face detection algorithm and the face tracking algorithm are alternately used to acquire a face region of the target image in the video.
  • the device further includes:
  • a beautification module configured to replace the partition image with the foreground image after the partition image is processed by the dermabrasion algorithm and/or the color grading algorithm, and display the partition image after the partition image belongs to the face region.
  • the acquiring module 201 is further configured to: detect and acquire a face image in the target image; and use a circular area including the face image as the face region;
  • the determining module 202 is further configured to: determine a distance between the partition image and a center of the face region; and when the distance is less than or equal to a radius of the face region, determine that the partition image belongs to the face a region; when the distance is greater than a radius of the face region, determining that the partition image does not belong to the face region;
  • the determining module 202 is further configured to: when the distance is greater than a radius of the face region and less than or equal to a preset radius, determine that the partition image belongs to a transition region, where the preset radius is greater than the person a radius of the face region; when the distance is greater than the preset radius, determining that the partition image belongs to a background region;
  • the device described in the second embodiment of the present invention is a device for implementing the method for implementing the filter according to the first embodiment of the present invention. Therefore, those skilled in the art can understand the device according to the method described in the first embodiment of the present invention. The specific structure and deformation are not described here.
  • the apparatus used in the method of the first embodiment of the present invention is within the scope of the present invention.
  • the method and device provided by the embodiment of the present application first acquire a face region in a target image, and then determine whether each partition image segmented on the target image belongs to the face region, and when the partition image does not belong to the In the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed, thereby realizing a filter with background blurring function, which not only enriches the filter
  • the function also makes the face in the target image more prominent, and increases the confidentiality of the environment by blurring the background, thereby satisfying more needs of the user.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other 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 apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

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

Abstract

Disclosed are a filter implementation method and device. The method comprises: obtaining a face region in a target image, the face region being a region comprising a face image; determining whether sub-region images on the target image belong to the face region or not, wherein the target image is divided into N sub-region images, N is an integer greater than 1; and when the sub-region images do not belong to the face region, blurring the sub-region images using a fuzzy algorithm, replacing the sub-region images with the obtained blurred images, and displaying a final image. By means of the method and the device provided by the present application, the technical problem in the prior art that the video filter has a single function and cannot meet more requirements of users can be solved. The filter function is enriched, and the demands of users for highlighting the human face and increasing the environment secrecy are satisfied.

Description

一种滤镜的实现方法及装置Method and device for implementing filter 技术领域Technical field
本发明涉及图像处理技术领域,尤其涉及一种滤镜的实现方法及装置。The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for implementing a filter.
背景技术Background technique
当前,各类互联网商业模式层出不穷,直播视频也是其中一匹黑马。为了给直播主播或观众提供较优的视觉体验和丰富的娱乐体验,现有的直播视频往往会提供滤镜功能,以供用户使用。At present, various types of Internet business models are emerging one after another, and live video is also one of the dark horses. In order to provide a better visual experience and rich entertainment experience for the live broadcast anchor or viewer, the existing live video will often provide a filter function for the user to use.
现有的滤镜功能主要是用来实现图像的各种特殊场景效果,一般是通过直接改变图像的颜色风格,即进行颜色调整来实现。例如怀旧、黑白、素描、唯美等等。然而,当前的滤镜功能已不能满足用户日益增多的需求。The existing filter function is mainly used to realize various special scene effects of the image, generally by directly changing the color style of the image, that is, performing color adjustment. For example, nostalgia, black and white, sketch, beautiful and so on. However, current filter functions are no longer able to meet the increasing demands of users.
可见,现有技术中的视频滤镜,存在功能单一,不能满足用户更多需求的技术问题。It can be seen that the video filter in the prior art has a single function and cannot meet the technical problems of more users' needs.
发明内容Summary of the invention
本发明提供一种滤镜的实现方法及装置,用以解决现有技术中的视频滤镜,存在的功能单一,不能满足用户更多需求的技术问题。The invention provides a method and a device for implementing a filter, which are used to solve the technical problem that the video filter in the prior art has a single function and cannot meet more demands of users.
一方面,本发明提供了一种滤镜的实现方法,包括:In one aspect, the present invention provides a method of implementing a filter, comprising:
获取目标图像中的人脸区域,所述人脸区域为包括人脸图像的区域;Acquiring a face area in the target image, the face area being an area including a face image;
判断所述目标图像上的分区图像是否属于所述人脸区域,其中,所述目标图像划分为N个分区图像,N为大于1的整数;Determining whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, and N is an integer greater than 1;
当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示。When the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed.
可选的,当所述目标图像为视频中的图像时,所述获取目标图像中的人脸区域,包括:交替使用人脸检测算法和人脸跟踪算法,获取所述视频中的目标图像的人脸区域。Optionally, when the target image is an image in a video, the acquiring a face region in the target image includes: alternately using a face detection algorithm and a face tracking algorithm to acquire a target image in the video. Face area.
可选的,在所述判断所述目标图像上的分区图像是否属于所述人脸区域之后,还包括:当所述分区图像属于所述人脸区域时,以采用磨皮算法和/或调色算法处理所述分区图像后,获得的前景图像替换所述分区图像,并进行显示。Optionally, after the determining whether the partition image on the target image belongs to the face region, the method further includes: when the partition image belongs to the face region, adopting a dermabrasion algorithm and/or tone After the color algorithm processes the partition image, the obtained foreground image replaces the partition image and performs display.
可选的,所述获取目标图像中的人脸区域,包括:检测获取所述目标图像中的人脸图像;以包括所述人脸图像的圆形区域作为所述人脸区域;所述判断所述目标图像上的分区图像是否属于所述人脸区域,包括:确定所述分区图像与所述人脸区域的圆心的距离;当所述距离小于等于所述人脸区域的半径时,确定所述分区图像属于所述人脸区域;当所述距离大于所述人脸区域的半径 时,确定所述分区图像不属于所述人脸区域。Optionally, the acquiring a face region in the target image includes: detecting and acquiring a face image in the target image; and using the circular region including the face image as the face region; Whether the partition image on the target image belongs to the face region includes: determining a distance between the partition image and a center of the face region; and determining, when the distance is less than or equal to a radius of the face region, determining The partition image belongs to the face area; when the distance is greater than a radius of the face area, it is determined that the partition image does not belong to the face area.
可选的,所述当所述距离大于所述人脸区域的半径时,确定所述分区图像不属于所述人脸区域,包括:当所述距离大于所述人脸区域的半径,且小于等于预设半径时,确定所述分区图像属于过渡区域,其中,所述预设半径大于等于所述人脸区域的半径;当所述距离大于所述预设半径时,确定所述分区图像属于背景区域;所述当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,包括:当所述分区图像属于所述过渡区域时,以(1-v)倍的前景图像和v倍的所述模糊图像混合后的混合图像替换所述分区图像,其中,v=(dis-r)/(R-r),其中,dis为所述距离,r为所述人脸区域的半径,R为所述预设半径,其中,所述前景图像为采用磨皮算法和/或调色算法处理所述分区图像后获得的图像;当所述分区图像属于所述背景区域时,以所述模糊图像替换所述分区图像。Optionally, when the distance is greater than a radius of the face region, determining that the partition image does not belong to the face region comprises: when the distance is greater than a radius of the face region, and is smaller than And determining that the partition image belongs to a transition region, wherein the preset radius is greater than or equal to a radius of the face region; and when the distance is greater than the preset radius, determining that the partition image belongs to a background area; when the partition image does not belong to the face area, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image, including: when the partition image belongs to the In the transition region, the partition image is replaced by a mixed image of (1 - v) times the foreground image and v times the blurred image, wherein v = (dis - r) / (Rr), wherein Dis is the distance, r is the radius of the face region, and R is the predetermined radius, wherein the foreground image is an image obtained by processing the partition image by using a microdermabrasion algorithm and/or a toning algorithm. When the partition image At the time of the background region, the blurred image to replace the image partitioning.
可选的,所述采用模糊算法虚化所述分区图像,包括:对所述分区图像进行降采样处理;采用模糊算法虚化降采样处理后的所述分区图像;对虚化后的所述分区图像进行上采样处理。Optionally, the blurring algorithm is used to blur the partition image, including: performing a downsampling process on the partition image; and using a blur algorithm to blur the downsampled processed partition image; The partition image is subjected to upsampling processing.
另一方面,提供一种滤镜的实现装置,包括:In another aspect, an apparatus for implementing a filter is provided, comprising:
获取模块,用于获取目标图像中的人脸区域,所述人脸区域为包括人脸图像的区域;An acquiring module, configured to acquire a face area in the target image, where the face area is an area including a face image;
判断模块,用于判断所述目标图像上的分区图像是否属于所述人脸区域,其中,所述目标图像划分为N个分区图像,N为大于1的整数;a determining module, configured to determine whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, where N is an integer greater than one;
模糊模块,用于当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示。And a fuzzy module, configured to: when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image, and is displayed.
可选的,所述获取模块还用于:交替使用人脸检测算法和人脸跟踪算法,获取所述视频中的目标图像的人脸区域。Optionally, the acquiring module is further configured to: alternately use a face detection algorithm and a face tracking algorithm to acquire a face region of the target image in the video.
可选的,所述装置还包括:美化模块,用于当所述分区图像属于所述人脸区域时,以采用磨皮算法和/或调色算法处理所述分区图像后,获得的前景图像替换所述分区图像,并进行显示。Optionally, the device further includes: a beautification module, configured to obtain a foreground image after the partition image is processed by using a microdermabrasion algorithm and/or a toning algorithm when the partition image belongs to the face region Replace the partition image and display it.
可选的,所述获取模块还用于:检测获取所述目标图像中的人脸图像;以包括所述人脸图像的圆形区域作为所述人脸区域;所述判断模块还用于:确定所述分区图像与所述人脸区域的圆心的距离;当所述距离小于等于所述人脸区域的半径时,确定所述分区图像属于所述人脸区域;当所述距离大于所述人脸区域的半径时,确定所述分区图像不属于所述人脸区域;所述判断模块还用于:当所述距离大于所述人脸区域的半径,且小于等于预设半径时,确定所述分区图像属于过渡区域,其中,所述预设半径大于所述人脸区域的半径;当所述距 离大于所述预设半径时,确定所述分区图像属于背景区域;所述模糊模块还用于:当所述分区图像属于所述过渡区域时,以(1-v)倍的前景图像和v倍的所述模糊图像混合后的混合图像替换所述分区图像,其中,v=(dis-r)/(R-r),其中,dis为所述距离,r为所述人脸区域的半径,R为所述预设半径,其中,所述前景图像为采用磨皮算法和/或调色算法处理所述分区图像后获得的图像;当所述分区图像属于所述背景区域时,以所述模糊图像替换所述分区图像。Optionally, the obtaining module is further configured to: detect a face image in the target image; use a circular area that includes the face image as the face area; and the determining module is further configured to: Determining a distance between the partition image and a center of the face region; when the distance is less than or equal to a radius of the face region, determining that the partition image belongs to the face region; when the distance is greater than the Determining that the partition image does not belong to the face region when the radius of the face region is determined; the determining module is further configured to: when the distance is greater than a radius of the face region and less than or equal to a preset radius, determine The partition image belongs to a transition area, wherein the preset radius is greater than a radius of the face area; when the distance is greater than the preset radius, determining that the partition image belongs to a background area; For replacing the partition image with a mixed image of (1-v) times the foreground image and v times the blurred image when the partition image belongs to the transition region, where v=(dis -r)/(R- r), wherein dis is the distance, r is a radius of the face region, and R is the predetermined radius, wherein the foreground image is processed by using a microdermabrasion algorithm and/or a toning algorithm An image obtained after the image; when the partition image belongs to the background region, the partition image is replaced with the blurred image.
本发明实施例中提供的一个或多个技术方案,至少具有如下技术效果或优点:One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
本申请实施例提供的方法及装置,先获取目标图像中的人脸区域,再判断所述目标图像上划分出的各分区图像是否属于所述人脸区域,当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示,从而实现了一种具有背景虚化功能的滤镜,不仅丰富了滤镜功能,还使得所述目标图像中的人脸更突出,并通过虚化背景增加了环境的保密性,进而满足了用户更多的需求。The method and device provided by the embodiment of the present application first acquire a face region in a target image, and then determine whether each partition image segmented on the target image belongs to the face region, and when the partition image does not belong to the In the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed, thereby realizing a filter with background blurring function, which not only enriches the filter The function also makes the face in the target image more prominent, and increases the confidentiality of the environment by blurring the background, thereby satisfying more needs of the user.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, and the above-described and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本发明实施例中滤镜的实现方法的流程图;1 is a flowchart of a method for implementing a filter according to an embodiment of the present invention;
图2为本发明实施例中滤镜的实现装置的结构示意图。FIG. 2 is a schematic structural diagram of an apparatus for implementing a filter according to an embodiment of the present invention.
具体实施方式detailed description
本申请实施例通过提供一种滤镜的实现方法及装置,用以解决现有技术中的视频滤镜,存在的功能单一,不能满足用户更多需求的技术问题。实现了丰富滤镜功能,满足了用户突出人脸和增加环境保密性等需求的技术效果。The embodiment of the present application provides a method and an apparatus for implementing a filter, which is used to solve the technical problem that the video filter in the prior art has a single function and cannot meet more demands of users. A rich filter function has been implemented to meet the technical effects of users' needs for highlighting faces and increasing environmental confidentiality.
本申请实施例中的技术方案,总体思路如下:The general technical idea of the technical solution in the embodiment of the present application is as follows:
获取目标图像中的人脸区域,所述人脸区域为包括人脸图像的区域;判断所述目标图像上的分区图像是否属于所述人脸区域,其中,所述目标图像划分为N个分区图像,N为大于1的整数;当所述分区图像不属于所述人脸区域时, 以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示。Obtaining a face region in the target image, the face region being an area including a face image; determining whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partitions The image, N is an integer greater than 1; when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed.
上述方法通过先获取目标图像中的人脸区域,再判断所述目标图像上划分出的各分区图像是否属于所述人脸区域,当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示,从而实现了一种具有背景虚化功能的滤镜,不仅丰富了滤镜功能,还使得所述目标图像中的人脸更突出,并通过虚化背景增加了环境的保密性,进而满足了用户更多的需求。In the above method, the face region in the target image is first acquired, and then it is determined whether each of the segment images segmented on the target image belongs to the face region, and when the segment image does not belong to the face region, After the fuzzy algorithm blurs the partition image, the obtained blurred image replaces the partition image and performs display, thereby realizing a filter with background blur function, which not only enriches the filter function, but also makes the target The faces in the image are more prominent, and the privacy of the environment is increased by blurring the background, thereby satisfying more needs of users.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
实施例一Embodiment 1
本实施例提供一种滤镜的实现方法,如图1所示,该方法包括:This embodiment provides a method for implementing a filter. As shown in FIG. 1, the method includes:
步骤S101,获取目标图像中的人脸区域,所述人脸区域为包括人脸图像的区域;Step S101, acquiring a face area in the target image, where the face area is an area including a face image;
步骤S102,判断所述目标图像上的分区图像是否属于所述人脸区域,其中,所述目标图像划分为N个分区图像,N为大于1的整数;Step S102, determining whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, where N is an integer greater than one;
步骤S103,当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示。Step S103: When the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed.
需要说明的是,所述目标图像可以是单一的图片,也可以是直播视频或存储视频中的图片,在此不作限制。It should be noted that the target image may be a single picture, or may be a live video or a picture stored in the video, which is not limited herein.
当所述目标图像为单一的图片时,所述方法能够对该图片实现背景虚化;当所述目标图像是视频中的图片时,通过对视频中的每一帧图片或部分图片实施本实施例提供的方法,能实现对视频的背景虚化。When the target image is a single picture, the method can implement background blurring on the picture; when the target image is a picture in the video, the implementation is implemented by using each frame picture or part of the picture in the video. The method provided by the example can achieve background blurring of the video.
在具体实施过程中,所述方法可以应用于智能手机,平板电脑或台式机等终端,也可以应用于服务器,在此不作限制。In a specific implementation process, the method can be applied to a terminal such as a smart phone, a tablet computer, or a desktop computer, and can also be applied to a server, and is not limited herein.
下面,结合图1来详细介绍本实施例提供的方法的具体实施步骤。The specific implementation steps of the method provided in this embodiment are described in detail below with reference to FIG.
首先,执行步骤S101,获取目标图像中的人脸区域,所述人脸区域为包括人脸图像的区域。First, step S101 is performed to acquire a face region in the target image, the face region being an area including a face image.
在具体实施过程中,获取目标图像中的人脸区域,需要获取目标图像中人脸的位置及区域大小,具体可以通过各种现有的人脸检测算法来实现。In the specific implementation process, the location of the face in the target image and the size of the region in the target image are obtained, which can be implemented by various existing face detection algorithms.
在本申请实施例中,当所述目标图像为视频中的图像时,所述获取目标图 像中的人脸区域,包括:In the embodiment of the present application, when the target image is an image in a video, the acquiring a face region in the target image includes:
交替使用人脸检测算法和人脸跟踪算法,获取所述视频中的目标图像的人脸区域。The face detection algorithm and the face tracking algorithm are alternately used to acquire a face region of the target image in the video.
具体来讲,交替使用人脸检测算法和人脸跟踪算法特别适用于直播视频中的目标图像,以提高实时获取视频中多个图像的人脸区域的效率。Specifically, the alternate use of the face detection algorithm and the face tracking algorithm are particularly suitable for the target image in the live video to improve the efficiency of acquiring the face region of the plurality of images in the video in real time.
在具体实施过程中,为了便于后续判断分区图像是否属于所述人脸区域,可以设置所述获取目标图像中的人脸区域,包括:检测获取所述目标图像中的人脸图像;以包括所述人脸图像的圆形区域作为所述人脸区域。In a specific implementation process, in order to facilitate the subsequent determination of whether the partition image belongs to the face region, the capturing the face region in the target image may include: detecting and acquiring a face image in the target image; A circular area of the face image is described as the face area.
当然,在具体实施过程中,也可以以包括所述人脸图像的方形区域或椭圆形区域作为所述人脸区域,在此不作限制。Of course, in a specific implementation process, a square area or an elliptical area including the face image may be used as the face area, which is not limited herein.
然后,执行步骤S102,判断所述目标图像上的分区图像是否属于所述人脸区域,其中,所述目标图像划分为N个分区图像,N为大于1的整数。Then, step S102 is executed to determine whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, and N is an integer greater than 1.
在本申请实施例中,所述分区图像可以是预先以小三角形、小方形或小菱形等为单位,划分出的N个分区图像,N的数量越大,越利于判断分区图像是否属于所述人脸区域;所述分区图像还可以是像素点,N为像素点数量,在此不作限制。In the embodiment of the present application, the partition image may be N partition images that are divided in advance by a small triangle, a small square, or a small diamond. The larger the number of N, the better it is to determine whether the partition image belongs to the The face area may also be a pixel point, where N is the number of pixel points, which is not limited herein.
在本申请实施例中,判断所述分区图像是否属于所述人脸区域的方法很多,下面列举两种为例:In the embodiment of the present application, there are many methods for determining whether the partition image belongs to the face region, and two examples are as follows:
第一种,根据所述分区图像的坐标判断。The first type is judged according to the coordinates of the partition image.
即先获取所述分区图像的坐标和所述人脸区域的坐标范围;再判断所述分区图像的坐标是否属于所述人脸区域的坐标范围;当所述分区图像的坐标属于所述人脸区域的坐标范围时,确定所述分区图像属于所述人脸区域;当所述分区图像的坐标不属于所述人脸区域的坐标范围时,确定所述分区图像不属于所述人脸区域。That is, the coordinates of the partition image and the coordinate range of the face region are first acquired; and it is determined whether the coordinates of the partition image belong to the coordinate range of the face region; when the coordinates of the partition image belong to the face When the coordinate range of the region is determined, the partition image is determined to belong to the face region; when the coordinates of the partition image do not belong to the coordinate range of the face region, it is determined that the partition image does not belong to the face region.
第二种,设置人脸区域为规则图形,根据分区图像与所述人脸区域中心的距离来判断。Secondly, the face area is set as a regular figure, and is determined according to the distance between the partition image and the center of the face area.
具体来讲,为了便于判断分区图像是否属于所述人脸区域,可以设置所述人脸区域为圆形区域。对应的,所述判断所述目标图像上的分区图像是否属于所述人脸区域,包括:确定所述分区图像与所述人脸区域的圆心的距离;当所述距离小于等于所述人脸区域的半径时,确定所述分区图像属于所述人脸区域;当所述距离大于所述人脸区域的半径时,确定所述分区图像不属于所述人脸区域。Specifically, in order to facilitate determining whether the partition image belongs to the face region, the face region may be set as a circular region. Correspondingly, determining whether the partition image on the target image belongs to the face region comprises: determining a distance between the partition image and a center of the face region; and when the distance is less than or equal to the face When the radius of the region is determined, the partition image is determined to belong to the face region; when the distance is greater than a radius of the face region, it is determined that the partition image does not belong to the face region.
举例来说,获取人脸在视频图像中的位置信息,假设把人脸区域设置为圆形,获取所述人脸区域圆心点A的坐标为A(x,y),半径为r。所述分区图像的中 心点D(i,j)与点A(x,y)的距离di s的计算公式如下:For example, the location information of the face in the video image is obtained. Assuming that the face region is set to a circle, the coordinates of the center point A of the face region are obtained as A(x, y), and the radius is r. The calculation formula of the distance di s of the center point D(i,j) of the partition image and the point A(x,y) is as follows:
当dis小于等于r时,确定所述分区图像属于所述人脸区域;当dis大于r时,确定所述分区图像不属于所述人脸区域。When dis is less than or equal to r, it is determined that the partition image belongs to the face region; when dis is greater than r, it is determined that the partition image does not belong to the face region.
再下来,执行步骤S103,当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示。Then, in step S103, when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed.
在本申请实施例中,可以预先对所述目标图像整体采用模糊算法进行虚化,再根据所述分区图像的位置,获得所述分区图像对应的模糊图像。当然,也可以对每个分区图像分别采用模糊算法进行虚化,以获得每个所述分区图像对应的模糊图像,在此不作限制。In the embodiment of the present application, a blur algorithm may be used to blur the target image as a whole, and then a blurred image corresponding to the partition image may be obtained according to the position of the partition image. Of course, each of the partition images may be blurred by using a blurring algorithm to obtain a blurred image corresponding to each of the partition images, which is not limited herein.
在本申请实施例中,所述采用模糊算法虚化所述分区图像,包括:In the embodiment of the present application, the blurring algorithm is used to blur the partition image, including:
对所述分区图像进行降采样处理;Performing downsampling processing on the partition image;
采用模糊算法虚化降采样处理后的所述分区图像;The partition image after the downsampling process is blurred by using a fuzzy algorithm;
对虚化后的所述分区图像进行上采样处理。Performing upsampling processing on the blurred partition image.
具体来讲,为了实现背景虚化效果,首先需要得到一张虚化的视频图像。很多模糊算法可以实现虚化功能,例如,所述模糊算法可以为高斯模糊、均值滤波、中值滤波等。以采用中值滤波作为背景模糊算法为例,由于中值滤波的模糊半径越大,图像越模糊,但模糊半径越大,运算量就越大,故为提高程序的运行效率,可以先对所述目标图像做降采样处理,然后用中值滤波模糊所述目标图像,然后再对所述目标图像作上采样处理,而正由于虚化的目地是获取模糊的图像,故图像下采样和上采样并不会影响图像最终的效果。Specifically, in order to achieve the background blur effect, it is first necessary to obtain a blurred video image. Many fuzzy algorithms can implement blurring functions. For example, the fuzzy algorithm can be Gaussian blur, mean filtering, median filtering, and the like. Taking the median filtering as the background blur algorithm as an example, the larger the blur radius of the median filter, the more blurred the image, but the larger the blur radius, the larger the computation amount. Therefore, in order to improve the running efficiency of the program, you can first The target image is subjected to downsampling processing, and then the target image is blurred by median filtering, and then the target image is upsampled, and since the blurred image is obtained by acquiring the blurred image, the image is downsampled and uploaded. Sampling does not affect the final result of the image.
在本申请实施例中,在所述判断所述目标图像上的分区图像是否属于所述人脸区域之后,还包括:In the embodiment of the present application, after the determining whether the partition image on the target image belongs to the face region, the method further includes:
当所述分区图像属于所述人脸区域时,以采用磨皮算法和/或调色算法处理所述分区图像后,获得的前景图像替换所述分区图像,并进行显示。When the partition image belongs to the face region, after the partition image is processed by using a dermabrasion algorithm and/or a toning algorithm, the obtained foreground image replaces the partition image and is displayed.
在本申请实施例中,可以预先对所述目标图像整体采用磨皮算法和/或调色算法进行处理,再根据所述分区图像的位置,获得所述分区图像对应的前景图像。当然,也可以对每个分区图像分别采用磨皮算法和/或调色算法进行处理,以获得每个所述分区图像对应的前景图像,在此不作限制。In the embodiment of the present application, the target image may be processed in advance by using a microdermabrasion algorithm and/or a toning algorithm, and then the foreground image corresponding to the partition image may be obtained according to the position of the partition image. Of course, each of the partition images may be processed by using a dermabrasion algorithm and/or a grading algorithm to obtain a foreground image corresponding to each of the partition images, which is not limited herein.
具体来讲,本申请不仅考虑对背景的虚化,还考虑对人脸区域的美化。Specifically, the present application not only considers the blurring of the background, but also considers the beautification of the face area.
其中,磨皮算法的主要作用是去噪,即对图像中的噪点进行去除或者模糊化处理,以使用户获得更好的视觉体验。磨皮算法有很多种,例如高斯滤波、双边滤波、局部均方差、表面模糊、均值模糊、高斯模糊和中值滤波等,较优 的,可以采用的磨皮算法为双边滤波和高斯滤波的组合。Among them, the main function of the microdermabrasion algorithm is to denoise, that is, to remove or blur the noise in the image, so that the user can obtain a better visual experience. There are many kinds of dermabrasion algorithms, such as Gaussian filtering, bilateral filtering, local mean square error, surface ambiguity, mean blur, Gaussian blur and median filtering. For better, the dermabrasion algorithm can be used as a combination of bilateral filtering and Gaussian filtering. .
进一步,在执行所述磨皮算法前,可以先对肤色进行检测,只对肤色中的噪点进行处理,而不对头发、眼睛等部位处理,使面部磨皮的效果更加自然。Further, before performing the dermabrasion algorithm, the skin color can be detected first, and only the noise in the skin color is processed, and the hair, eyes and the like are not treated, so that the skin dermabrasion effect is more natural.
其中,调色算法有很多种,不同的调色算法显示出来的效果也不同,简单调色算法的调节对象例如:对比度、饱和度、亮度、曝光、锐度等;复杂的调色算法的调节对象例如:柔光、淡雅、复古、唯美、素描、油菜画等。Among them, there are many kinds of color grading algorithms, and the effects of different color grading algorithms are different. The adjustment objects of simple color grading algorithm are: contrast, saturation, brightness, exposure, sharpness, etc.; adjustment of complex color grading algorithm Objects such as: soft light, elegant, retro, beautiful, sketch, rape, etc.
在本申请实施例中,对所述分区区域不属于所述人脸区域的情况,还可以设置分为在人脸区域附件的过渡区域和远离人脸区域的背景区域两种情况,其中,所述过渡区域的大小可根据实际情况调整。In the embodiment of the present application, in a case where the partition area does not belong to the face area, a transitional area that is attached to the attachment of the face area and a background area that is far from the face area may be further set, where The size of the transition area can be adjusted according to the actual situation.
以所述人脸区域为圆形区域为例,所述当所述距离大于所述人脸区域的半径时,确定所述分区图像不属于所述人脸区域,包括:当所述距离大于所述人脸区域的半径,且小于等于预设半径时,确定所述分区图像属于过渡区域,其中,所述预设半径大于等于所述人脸区域的半径;当所述距离大于所述预设半径时,确定所述分区图像属于背景区域。Taking the face area as a circular area as an example, when the distance is greater than a radius of the face area, determining that the partition image does not belong to the face area includes: when the distance is greater than When the radius of the face region is less than or equal to the preset radius, it is determined that the partition image belongs to the transition region, wherein the preset radius is greater than or equal to the radius of the face region; when the distance is greater than the preset At the radius, it is determined that the partition image belongs to the background area.
对应的,所述当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,包括:当所述分区图像属于所述过渡区域时,以(1-v)倍的前景图像和v倍的所述模糊图像混合后的混合图像替换所述分区图像,其中,v=(dis-r)/(R-r),其中,dis为所述距离,r为所述人脸区域的半径,R为所述预设半径,其中,所述前景图像为采用磨皮算法和/或调色算法处理所述分区图像后获得的图像;当所述分区图像属于所述背景区域时,以所述模糊图像替换所述分区图像。Correspondingly, when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image, including: when the partition image belongs to the In the transition region, the partition image is replaced by a mixed image of (1 - v) times the foreground image and v times the blurred image, wherein v = (dis - r) / (Rr), wherein Dis is the distance, r is the radius of the face region, and R is the predetermined radius, wherein the foreground image is an image obtained by processing the partition image by using a microdermabrasion algorithm and/or a toning algorithm. When the partition image belongs to the background area, the partition image is replaced with the blurred image.
具体来讲,即设置所述人脸区域内的分区区域显示为清晰的磨皮和/或调色后的所述前景图像;所述背景区域内的分区区域显示为采用模糊算法虚化后的所述模糊图像;所述人脸区域与所述背景区域过渡的过渡区域显示为所述前景图像和所述模糊图像的混合。Specifically, the partitioned area in the face area is displayed as a clear dermabrasion and/or the toned foreground image; the partitioned area in the background area is displayed as blurred by a fuzzy algorithm. The blurred image; a transition region of the transition between the face region and the background region is displayed as a mixture of the foreground image and the blurred image.
举例来讲,假设所述人脸区域为以点A为圆心,r为半径的圆形区域,R为所述预设半径,则所述背景区域为以点A为圆心,以R为半径的圆形以外的部分,所述过渡区域为以点A为圆心的圆环区域,所述圆环的厚度为R-r。假设,图像上的某个分区图像的中心点D的坐标为(i,j),那么最终所述分区图像E的具体算法如下:For example, if the face area is a circle with a point A as a center and r is a radius, and R is the predetermined radius, the background area is centered on point A, and R is a radius. A portion other than the circle, the transition region being a ring region centered on the point A, the ring having a thickness of Rr. Assuming that the coordinates of the center point D of a certain partition image on the image are (i, j), then the specific algorithm of the partition image E is as follows:
其中,dis为点D与点A的距离,F为所述分区图像的前景图像,B为所述分区图像的模糊图像,v表示所述前景图像F与所述模糊图像B混合的比重,v的范围为[0,1]。当前像素点D与人脸区域圆心的距离小于等于r时,显示为所述前 景图像F;当前像素点D与人脸区域圆心的距离大于r且小于等于R时,显示为所述前景图像F与所述模糊图像B的混合,混合系数为v;当前像素点D与人脸区域圆心的距离大于R时,显示为所述模糊图像B。Where dis is the distance between point D and point A, F is the foreground image of the partition image, B is the blurred image of the partition image, and v is the proportion of the foreground image F mixed with the blurred image B, v The range is [0, 1]. When the distance between the current pixel point D and the center of the face region is less than or equal to r, the foreground image F is displayed; when the distance between the current pixel point D and the center of the face region is greater than r and less than or equal to R, the foreground image F is displayed. Mixed with the blurred image B, the mixing coefficient is v; when the distance between the current pixel point D and the center of the face region is greater than R, the blurred image B is displayed.
在具体实施过程中,如果所述目标图像中有多个人脸,可对每个人脸区域做上述同样的处理。In a specific implementation process, if there are multiple faces in the target image, the same processing as described above may be performed for each face region.
如果所述目标图像中并没有检测到人脸,就可以设置不需要背景虚化的功能,直接显示出所述目标图像的前景图像,即对所述目标图像进行磨皮和/或色彩调整后的显示效果。If a human face is not detected in the target image, a function that does not require background blurring may be set to directly display a foreground image of the target image, that is, after the target image is subjected to microdermabrasion and/or color adjustment. The display effect.
具体来讲,本实施例提供的方法在颜色调整的基础上,实现了磨皮和背景虚化,从而实现了一种具有背景虚化功能的滤镜,不仅丰富了滤镜功能,还使得所述目标图像中的人脸更突出美化,并通过虚化背景增加了环境的保密性,进而满足了用户更多的需求。Specifically, the method provided by the embodiment implements the microdermabrasion and the background blur on the basis of the color adjustment, thereby realizing a filter with a background blur function, which not only enriches the filter function, but also makes the The face in the target image is more prominent and beautified, and the privacy of the environment is increased by blurring the background, thereby satisfying more needs of the user.
基于同一发明构思,本申请还提供了与实施例一中滤镜的实现方法对应的装置,详见实施例二。Based on the same inventive concept, the present application also provides an apparatus corresponding to the implementation method of the filter in the first embodiment. For details, see Embodiment 2.
实施例二Embodiment 2
本实施例提供了一种滤镜的实现装置,如图2所示,该装置包括:The embodiment provides a filter implementation device. As shown in FIG. 2, the device includes:
获取模块201,用于获取目标图像中的人脸区域,所述人脸区域为包括人脸图像的区域;The obtaining module 201 is configured to acquire a face area in the target image, where the face area is an area including a face image;
判断模块202,用于判断所述目标图像上的分区图像是否属于所述人脸区域,其中,所述目标图像划分为N个分区图像,N为大于1的整数;The determining module 202 is configured to determine whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, where N is an integer greater than one;
模糊模块203,用于当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示。The blurring module 203 is configured to: when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image, and is displayed.
在具体实施过程中,所述装置可以为智能手机,平板电脑或台式机等终端,也可以为服务器,在此不作限制。In a specific implementation process, the device may be a terminal such as a smart phone, a tablet computer, or a desktop computer, or may be a server, and is not limited herein.
在本申请实施例中,所述获取模块201还用于:In the embodiment of the present application, the obtaining module 201 is further configured to:
交替使用人脸检测算法和人脸跟踪算法,获取所述视频中的目标图像的人脸区域。The face detection algorithm and the face tracking algorithm are alternately used to acquire a face region of the target image in the video.
在本申请实施例中,所述装置还包括:In the embodiment of the present application, the device further includes:
美化模块,用于当所述分区图像属于所述人脸区域时,以采用磨皮算法和/或调色算法处理所述分区图像后,获得的前景图像替换所述分区图像,并进行显示。And a beautification module, configured to replace the partition image with the foreground image after the partition image is processed by the dermabrasion algorithm and/or the color grading algorithm, and display the partition image after the partition image belongs to the face region.
在本申请实施例中,所述获取模块201还用于:检测获取所述目标图像中的人脸图像;以包括所述人脸图像的圆形区域作为所述人脸区域;In the embodiment of the present application, the acquiring module 201 is further configured to: detect and acquire a face image in the target image; and use a circular area including the face image as the face region;
所述判断模块202还用于:确定所述分区图像与所述人脸区域的圆心的距 离;当所述距离小于等于所述人脸区域的半径时,确定所述分区图像属于所述人脸区域;当所述距离大于所述人脸区域的半径时,确定所述分区图像不属于所述人脸区域;The determining module 202 is further configured to: determine a distance between the partition image and a center of the face region; and when the distance is less than or equal to a radius of the face region, determine that the partition image belongs to the face a region; when the distance is greater than a radius of the face region, determining that the partition image does not belong to the face region;
所述判断模块202还用于:当所述距离大于所述人脸区域的半径,且小于等于预设半径时,确定所述分区图像属于过渡区域,其中,所述预设半径大于所述人脸区域的半径;当所述距离大于所述预设半径时,确定所述分区图像属于背景区域;The determining module 202 is further configured to: when the distance is greater than a radius of the face region and less than or equal to a preset radius, determine that the partition image belongs to a transition region, where the preset radius is greater than the person a radius of the face region; when the distance is greater than the preset radius, determining that the partition image belongs to a background region;
所述模糊模块203还用于:当所述分区图像属于所述过渡区域时,以(1-v)倍的前景图像和v倍的所述模糊图像混合后的混合图像替换所述分区图像,其中,v=(dis-r)/(R-r),其中,dis为所述距离,r为所述人脸区域的半径,R为所述预设半径,其中,所述前景图像为采用磨皮算法和/或调色算法处理所述分区图像后获得的图像;当所述分区图像属于所述背景区域时,以所述模糊图像替换所述分区图像。The blurring module 203 is further configured to replace the partition image with a mixed image of (1-v) times the foreground image and v times the blurred image mixed when the partition image belongs to the transition region, Where v=(dis-r)/(Rr), where dis is the distance, r is the radius of the face region, and R is the predetermined radius, wherein the foreground image is a microdermabrasion An image obtained after processing the partition image by an algorithm and/or a toning algorithm; when the partition image belongs to the background region, replacing the partition image with the blurred image.
由于本发明实施例二所介绍的装置,为实施本发明实施例一的滤镜的实现方法所采用的装置,故而基于本发明实施例一所介绍的方法,本领域所属人员能够了解该装置的具体结构及变形,故而在此不再赘述。凡是本发明实施例一的方法所采用的装置都属于本发明所欲保护的范围。The device described in the second embodiment of the present invention is a device for implementing the method for implementing the filter according to the first embodiment of the present invention. Therefore, those skilled in the art can understand the device according to the method described in the first embodiment of the present invention. The specific structure and deformation are not described here. The apparatus used in the method of the first embodiment of the present invention is within the scope of the present invention.
本申请实施例中提供的技术方案,至少具有如下技术效果或优点:The technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
本申请实施例提供的方法及装置,先获取目标图像中的人脸区域,再判断所述目标图像上划分出的各分区图像是否属于所述人脸区域,当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示,从而实现了一种具有背景虚化功能的滤镜,不仅丰富了滤镜功能,还使得所述目标图像中的人脸更突出,并通过虚化背景增加了环境的保密性,进而满足了用户更多的需求。The method and device provided by the embodiment of the present application first acquire a face region in a target image, and then determine whether each partition image segmented on the target image belongs to the face region, and when the partition image does not belong to the In the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed, thereby realizing a filter with background blurring function, which not only enriches the filter The function also makes the face in the target image more prominent, and increases the confidentiality of the environment by blurring the background, thereby satisfying more needs of the user.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算 机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other 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 apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and
显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。It is apparent that those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the embodiments of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the embodiments of the invention.

Claims (10)

  1. 一种滤镜的实现方法,其特征在于,包括:A method for implementing a filter, comprising:
    获取目标图像中的人脸区域,所述人脸区域为包括人脸图像的区域;Acquiring a face area in the target image, the face area being an area including a face image;
    判断所述目标图像上的分区图像是否属于所述人脸区域,其中,所述目标图像划分为N个分区图像,N为大于1的整数;Determining whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, and N is an integer greater than 1;
    当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示。When the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image and is displayed.
  2. 如权利要求1所述的方法,其特征在于,当所述目标图像为视频中的图像时,所述获取目标图像中的人脸区域,包括:The method according to claim 1, wherein when the target image is an image in a video, the acquiring a face region in the target image comprises:
    交替使用人脸检测算法和人脸跟踪算法,获取所述视频中的目标图像的人脸区域。The face detection algorithm and the face tracking algorithm are alternately used to acquire a face region of the target image in the video.
  3. 如权利要求1所述的方法,其特征在于,在所述判断所述目标图像上的分区图像是否属于所述人脸区域之后,还包括:The method of claim 1, further comprising: after determining whether the partition image on the target image belongs to the face region,
    当所述分区图像属于所述人脸区域时,以采用磨皮算法和/或调色算法处理所述分区图像后,获得的前景图像替换所述分区图像,并进行显示。When the partition image belongs to the face region, after the partition image is processed by using a dermabrasion algorithm and/or a toning algorithm, the obtained foreground image replaces the partition image and is displayed.
  4. 如权利要求1所述的方法,其特征在于,The method of claim 1 wherein
    所述获取目标图像中的人脸区域,包括:检测获取所述目标图像中的人脸图像;以包括所述人脸图像的圆形区域作为所述人脸区域;The acquiring a face region in the target image includes: detecting and acquiring a face image in the target image; and using the circular region including the face image as the face region;
    所述判断所述目标图像上的分区图像是否属于所述人脸区域,包括:确定所述分区图像与所述人脸区域的圆心的距离;当所述距离小于等于所述人脸区域的半径时,确定所述分区图像属于所述人脸区域;当所述距离大于所述人脸区域的半径时,确定所述分区图像不属于所述人脸区域。Determining whether the partition image on the target image belongs to the face region comprises: determining a distance between the partition image and a center of the face region; and when the distance is less than or equal to a radius of the face region And determining that the partition image belongs to the face region; when the distance is greater than a radius of the face region, determining that the partition image does not belong to the face region.
  5. 如权利要求4所述的方法,其特征在于,The method of claim 4 wherein:
    所述当所述距离大于所述人脸区域的半径时,确定所述分区图像不属于所述人脸区域,包括:当所述距离大于所述人脸区域的半径,且小于等于预设半径时,确定所述分区图像属于过渡区域,其中,所述预设半径大于等于所述人脸区域的半径;当所述距离大于所述预设半径时,确定所述分区图像属于背景区域;Determining that the partition image does not belong to the face region when the distance is greater than a radius of the face region, including: when the distance is greater than a radius of the face region, and less than or equal to a preset radius Determining that the partition image belongs to a transition region, wherein the preset radius is greater than or equal to a radius of the face region; and when the distance is greater than the preset radius, determining that the partition image belongs to a background region;
    所述当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,包括:当所述分区图像属于所述过渡区域时,以(1-v)倍的前景图像和v倍的所述模糊图像混合后的混合图像替换所述分区图像,其中,v=(dis-r)/(R-r),其中,dis为所述距离,r为所述人脸区域的半径,R为所述预设半径,其中,所述前景图像为采用磨皮算法和/或调色算法处理所述分区图像后获得的图像;当所述分区图像属于所 述背景区域时,以所述模糊图像替换所述分区图像。When the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image, including: when the partition image belongs to the transition region And replacing the partition image with a mixed image of (1 - v) times the foreground image and v times the blurred image, wherein v = (dis - r) / (Rr), wherein dis is a distance, where r is the radius of the face region, and R is the predetermined radius, wherein the foreground image is an image obtained by processing the partition image by using a microdermabrasion algorithm and/or a toning algorithm; When the partition image belongs to the background area, the partition image is replaced with the blurred image.
  6. 如权利要求1所述的方法,其特征在于,所述采用模糊算法虚化所述分区图像,包括:The method according to claim 1, wherein the blurring the partition image by using a blur algorithm comprises:
    对所述分区图像进行降采样处理;Performing downsampling processing on the partition image;
    采用模糊算法虚化降采样处理后的所述分区图像;The partition image after the downsampling process is blurred by using a fuzzy algorithm;
    对虚化后的所述分区图像进行上采样处理。Performing upsampling processing on the blurred partition image.
  7. 一种滤镜的实现装置,其特征在于,包括:A device for implementing a filter, comprising:
    获取模块,用于获取目标图像中的人脸区域,所述人脸区域为包括人脸图像的区域;An acquiring module, configured to acquire a face area in the target image, where the face area is an area including a face image;
    判断模块,用于判断所述目标图像上的分区图像是否属于所述人脸区域,其中,所述目标图像划分为N个分区图像,N为大于1的整数;a determining module, configured to determine whether the partition image on the target image belongs to the face region, wherein the target image is divided into N partition images, where N is an integer greater than one;
    模糊模块,用于当所述分区图像不属于所述人脸区域时,以采用模糊算法虚化所述分区图像后,获得的模糊图像替换所述分区图像,并进行显示。And a fuzzy module, configured to: when the partition image does not belong to the face region, after the partition image is blurred by using a blur algorithm, the obtained blurred image replaces the partition image, and is displayed.
  8. 如权利要求7所述的装置,其特征在于,所述获取模块还用于:The device according to claim 7, wherein the obtaining module is further configured to:
    交替使用人脸检测算法和人脸跟踪算法,获取所述视频中的目标图像的人脸区域。The face detection algorithm and the face tracking algorithm are alternately used to acquire a face region of the target image in the video.
  9. 如权利要求7所述的装置,其特征在于,还包括:The device of claim 7 further comprising:
    美化模块,用于当所述分区图像属于所述人脸区域时,以采用磨皮算法和/或调色算法处理所述分区图像后,获得的前景图像替换所述分区图像,并进行显示。And a beautification module, configured to replace the partition image with the foreground image after the partition image is processed by the dermabrasion algorithm and/or the color grading algorithm, and display the partition image after the partition image belongs to the face region.
  10. 如权利要求1所述的方法,其特征在于,The method of claim 1 wherein
    所述获取模块还用于:检测获取所述目标图像中的人脸图像;以包括所述人脸图像的圆形区域作为所述人脸区域;The acquiring module is further configured to: detect and acquire a face image in the target image; and use a circular area including the face image as the face area;
    所述判断模块还用于:确定所述分区图像与所述人脸区域的圆心的距离;当所述距离小于等于所述人脸区域的半径时,确定所述分区图像属于所述人脸区域;当所述距离大于所述人脸区域的半径时,确定所述分区图像不属于所述人脸区域;The determining module is further configured to: determine a distance between the partition image and a center of the face region; and when the distance is less than or equal to a radius of the face region, determine that the partition image belongs to the face region When the distance is greater than a radius of the face region, determining that the partition image does not belong to the face region;
    所述判断模块还用于:当所述距离大于所述人脸区域的半径,且小于等于预设半径时,确定所述分区图像属于过渡区域,其中,所述预设半径大于所述人脸区域的半径;当所述距离大于所述预设半径时,确定所述分区图像属于背景区域;The determining module is further configured to: when the distance is greater than a radius of the face region and less than or equal to a preset radius, determine that the partition image belongs to a transition region, where the preset radius is greater than the face a radius of the region; when the distance is greater than the preset radius, determining that the partition image belongs to a background region;
    所述模糊模块还用于:当所述分区图像属于所述过渡区域时,以(1-v)倍的前景图像和v倍的所述模糊图像混合后的混合图像替换所述分区图像,其中,v=(dis-r)/(R-r),其中,dis为所述距离,r为所述人脸区域的半径,R 为所述预设半径,其中,所述前景图像为采用磨皮算法和/或调色算法处理所述分区图像后获得的图像;当所述分区图像属于所述背景区域时,以所述模糊图像替换所述分区图像。The blurring module is further configured to replace the partition image with a mixed image of (1-v) times the foreground image and v times the blurred image when the partition image belongs to the transition region, wherein , v=(dis-r)/(Rr), where dis is the distance, r is the radius of the face region, and R is the predetermined radius, wherein the foreground image is a microdermabrasion algorithm And/or an image obtained by the toning algorithm after processing the partition image; when the partition image belongs to the background area, replacing the partition image with the blurred image.
PCT/CN2018/081068 2017-03-29 2018-03-29 Filter implementation method and device WO2018177364A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710196102.9A CN106971165B (en) 2017-03-29 2017-03-29 A kind of implementation method and device of filter
CN201710196102.9 2017-03-29

Publications (1)

Publication Number Publication Date
WO2018177364A1 true WO2018177364A1 (en) 2018-10-04

Family

ID=59335606

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/081068 WO2018177364A1 (en) 2017-03-29 2018-03-29 Filter implementation method and device

Country Status (2)

Country Link
CN (1) CN106971165B (en)
WO (1) WO2018177364A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113129207A (en) * 2019-12-30 2021-07-16 武汉Tcl集团工业研究院有限公司 Method and device for blurring background of picture, computer equipment and storage medium
CN116109473A (en) * 2021-11-11 2023-05-12 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106971165B (en) * 2017-03-29 2018-08-10 武汉斗鱼网络科技有限公司 A kind of implementation method and device of filter
CN107784629B (en) * 2017-11-24 2021-10-15 努比亚技术有限公司 Panoramic photo filter processing method and mobile terminal
CN107864336B (en) * 2017-11-24 2019-07-26 维沃移动通信有限公司 Image processing method and mobile terminal
CN107948517B (en) 2017-11-30 2020-05-15 Oppo广东移动通信有限公司 Preview image blur processing method, device and device
CN109144361A (en) * 2018-07-09 2019-01-04 维沃移动通信有限公司 A kind of image processing method and terminal device
CN109325926B (en) * 2018-09-30 2021-07-23 武汉斗鱼网络科技有限公司 Automatic filter implementation method, storage medium, device and system
CN111199169A (en) * 2018-11-16 2020-05-26 北京微播视界科技有限公司 Image processing method and device
CN109671138B (en) * 2018-11-26 2021-06-25 声望(上海)文化传播有限公司 Selfie video avatar background double overlapping method and related products
CN109618173B (en) * 2018-12-17 2021-09-28 深圳Tcl新技术有限公司 Video compression method, device and computer readable storage medium
CN110580688B (en) * 2019-08-07 2022-11-11 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN110991298B (en) * 2019-11-26 2023-07-14 腾讯科技(深圳)有限公司 Image processing method and device, storage medium and electronic device
CN111935418B (en) * 2020-08-18 2022-12-09 北京市商汤科技开发有限公司 Video processing method and device, electronic device and storage medium
CN114598902B (en) * 2022-03-09 2023-12-22 安徽文香科技股份有限公司 Video frame processing method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105049695A (en) * 2015-07-07 2015-11-11 广东欧珀移动通信有限公司 Video recording method and device
US20150365627A1 (en) * 2014-06-13 2015-12-17 Arcsoft Inc. Enhancing video chatting
CN105847728A (en) * 2016-04-13 2016-08-10 腾讯科技(深圳)有限公司 Information processing method and terminal
CN106302124A (en) * 2016-08-18 2017-01-04 北京奇虎科技有限公司 A kind of method adding specially good effect and electronic equipment
CN106971165A (en) * 2017-03-29 2017-07-21 武汉斗鱼网络科技有限公司 The implementation method and device of a kind of filter

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7911513B2 (en) * 2007-04-20 2011-03-22 General Instrument Corporation Simulating short depth of field to maximize privacy in videotelephony
CN103973977B (en) * 2014-04-15 2018-04-27 联想(北京)有限公司 Virtualization processing method, device and the electronic equipment of a kind of preview interface
CN104574306A (en) * 2014-12-24 2015-04-29 掌赢信息科技(上海)有限公司 Face beautifying method for real-time video and electronic equipment
CN104794462B (en) * 2015-05-11 2018-05-22 成都野望数码科技有限公司 A kind of character image processing method and processing device
CN105512605B (en) * 2015-11-23 2018-12-25 小米科技有限责任公司 Face image processing process and device
CN105631417B (en) * 2015-12-24 2018-11-09 武汉鸿瑞达信息技术有限公司 Video enhancement system and method applied to internet video live streaming
CN106447620B (en) * 2016-08-26 2019-10-29 北京金山猎豹科技有限公司 Facial image grinds skin method, apparatus and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150365627A1 (en) * 2014-06-13 2015-12-17 Arcsoft Inc. Enhancing video chatting
CN105049695A (en) * 2015-07-07 2015-11-11 广东欧珀移动通信有限公司 Video recording method and device
CN105847728A (en) * 2016-04-13 2016-08-10 腾讯科技(深圳)有限公司 Information processing method and terminal
CN106302124A (en) * 2016-08-18 2017-01-04 北京奇虎科技有限公司 A kind of method adding specially good effect and electronic equipment
CN106971165A (en) * 2017-03-29 2017-07-21 武汉斗鱼网络科技有限公司 The implementation method and device of a kind of filter

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113129207A (en) * 2019-12-30 2021-07-16 武汉Tcl集团工业研究院有限公司 Method and device for blurring background of picture, computer equipment and storage medium
CN116109473A (en) * 2021-11-11 2023-05-12 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN106971165A (en) 2017-07-21
CN106971165B (en) 2018-08-10

Similar Documents

Publication Publication Date Title
WO2018177364A1 (en) Filter implementation method and device
US9639956B2 (en) Image adjustment using texture mask
CN107771336B (en) Feature detection and masking in images based on color distribution
Winnemöller et al. Real-time video abstraction
US9105088B1 (en) Image blur with preservation of detail
CN111066026B (en) Techniques for providing virtual light adjustment to image data
CN107172354B (en) Video processing method, device, electronic device and storage medium
CN114372931B (en) A method, device, storage medium and electronic device for blurring a target object
US9734551B1 (en) Providing depth-of-field renderings
US20200184098A1 (en) Systems and Methods for Secure Obfuscation of Sensitive Information in Images
CN107507155A (en) Video segmentation result edge optimization real-time processing method, device and computing device
CN107622504A (en) Method and device for processing pictures
CN111743524A (en) Information processing method, terminal and computer readable storage medium
CN107547803A (en) Video segmentation result edge optimization processing method, device and computing device
CN107610149A (en) Image segmentation result edge optimization processing method, device and computing device
CN114862729B (en) Image processing method, device, computer equipment and storage medium
CN107564085B (en) Image warping processing method, device, computing device and computer storage medium
US20110058057A1 (en) Image capture device and method, image processing device and method, and program
US9563940B2 (en) Smart image enhancements
CN111583163A (en) AR-based face image processing method, device, equipment and storage medium
CN114998465B (en) A method, device and computer storage medium for processing face images
US20250148673A1 (en) Method, apparatus, electronic device and storage medium for effect processing
CN117635788A (en) Image rendering method and device, electronic equipment and storage medium
HK40073122A (en) Image processing method, device, computer equipment and storage medium
Safonov et al. Changing the Aspect Ratio for Borderless Printing

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

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

Country of ref document: EP

Kind code of ref document: A1