WO2022068806A1 - 图像处理方法、装置及电子设备 - Google Patents

图像处理方法、装置及电子设备 Download PDF

Info

Publication number
WO2022068806A1
WO2022068806A1 PCT/CN2021/121282 CN2021121282W WO2022068806A1 WO 2022068806 A1 WO2022068806 A1 WO 2022068806A1 CN 2021121282 W CN2021121282 W CN 2021121282W WO 2022068806 A1 WO2022068806 A1 WO 2022068806A1
Authority
WO
WIPO (PCT)
Prior art keywords
special effect
target
preview image
face
faces
Prior art date
Application number
PCT/CN2021/121282
Other languages
English (en)
French (fr)
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 WO2022068806A1 publication Critical patent/WO2022068806A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters

Definitions

  • the present application belongs to the technical field of image processing, and in particular relates to an image processing method, device and electronic device.
  • the purpose of the embodiments of the present application is to provide an image processing method, device and electronic device, which can solve the problems that the existing special effect switching methods are cumbersome to operate, have a single content form, and cannot meet the individual needs of users.
  • an embodiment of the present application provides an image processing method, the method comprising:
  • the target special effect processing is performed on the target face in the preview image.
  • an embodiment of the present application provides an image processing apparatus, and the apparatus includes:
  • the preview image acquisition module is used to acquire the preview image through the camera
  • a target special effect determination module used for determining the target special effect when the number of faces in the preview image changes
  • a target special effect processing module configured to perform the target special effect processing on the target face in the preview image.
  • embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the image processing method according to the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the image processing method according to the first aspect is implemented A step of.
  • an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the image processing method.
  • a preview image is obtained through a camera, a target special effect is determined when the number of faces in the preview image changes, and target special effect processing is performed on the target face in the preview image.
  • the embodiment of the present application automatically acquires the target special effects of the target face (the changed face in the preview image) by combining the number of faces in the preview image, without requiring the user to manually switch, and combining different numbers of faces, different targets can be preset Special effects can realize the diversity of special effects switching and meet the individual needs of users.
  • FIG. 2 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
  • first, second and the like in the description and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in sequences other than those illustrated or described herein, and distinguish between “first”, “second”, etc.
  • the objects are usually of one type, and the number of objects is not limited.
  • the first object may be one or more than one.
  • “and/or” in the description and claims indicates at least one of the connected objects, and the character “/" generally indicates that the associated objects are in an "or” relationship.
  • the image processing method may specifically include the following steps:
  • Step 101 Obtain a preview image through a camera.
  • the embodiments of the present application can be applied to a scene where target special effects are determined in combination with changes in the number of faces in the preview image, and target special effects processing is performed for the target faces in the preview image.
  • the preview image refers to the image containing the face captured by the camera.
  • the preview image may be an image obtained by the user through a camera and displayed in the preview interface when taking a photo, so as to facilitate the user to focus.
  • the preview image may also be a video image of a certain frame displayed on the video recording interface when the user records the video.
  • step 102 is performed.
  • Step 102 Determine a target special effect when the number of faces in the preview image changes.
  • the target special effect refers to the special effect obtained according to the change of the number of faces in the preview image. For example, when the number of faces in the preview image increases, the target special effect can be determined to be a sticker effect; when the number of faces in the preview image decreases , the target effect can be determined to be a filter effect, etc.
  • the target special effect can be determined. Specifically, it can be divided into a case where the number of faces increases, a case where the number of faces decreases, and a case where the number of faces decreases first and then increases. , which can be described in detail in conjunction with the following specific implementation manners.
  • the preview image before the number of faces in the preview image changes, the preview image includes the first face that has undergone the first special effect processing, and the above step 102 may include:
  • Sub-step A1 when the number of faces in the preview image increases, determine that the target special effect corresponding to the target face is the second special effect of the first type.
  • the first face refers to the user's face that exists before the number of faces in the preview image changes, and the first special effect processing has been performed on the first face.
  • the target special effect corresponding to the target face is the second special effect of the first type, and the first type is the type to which the first special effect belongs.
  • the target face is the newly added face in the preview image, and the first special effect is different from the second special effect.
  • another set of special effects If the current style is pink tone style, you can add other pink and orange special effects to the new face) to achieve the difference from the previous main special effects makeup and enrich the style playability.
  • Another set of special effects that does not conflict with the current style is used as the target special effect of the newly added face, etc.
  • other special effects of the same special effect type can be added, so that different faces can have different special effects but belong to the same special effect type, so that the special effects styles do not conflict.
  • step 102 may include:
  • Sub-step B1 when the number of faces in the preview image is reduced, acquire the face retained in the preview image, and determine the retained face as the target face.
  • the retained face in the preview image may be acquired, and the retained face is determined as the target face.
  • the number of faces in the preview image changes.
  • the faces contained in the preview image were face 1, face 2, and face 3.
  • the reduced faces in the preview image are obtained first, and the remaining faces are used as the target
  • the human face if the human face 1 is reduced, the retained human face 2 and human face 3 are used as the target human face.
  • the retained face in the preview image may be acquired, and the retained face is determined as the target face, and then sub-step B2 is performed.
  • Sub-step B2 Determine the target special effect according to the facial expression of the target face.
  • the target special effect corresponding to the target face can be determined according to the facial expression of the target face.
  • the correspondence between the user's expression and the special effect can be stored in advance.
  • the target special effect corresponding to the target face can be determined according to the corresponding relationship.
  • the expression of the target face is detected by the preview image, and the special effect template corresponding to the expression is automatically switched to (for example, the detected expression is Positive expressions, such as smiling, laughing, etc., are switched to warm-toned style effects. If the detected expressions are negative expressions, that is, frowning, crying, etc., they are switched to cool-toned style effects, etc.
  • the preview image before the number of faces in the preview image changes, the preview image includes one second face that has undergone the third special effect processing, and the above step 102 may include: :
  • Sub-step C1 When the number of faces in the preview image changes from 1 to 0, and then from 0 to 1, if the target face is the second face, determine the target special effect are other special effects except the third special effect.
  • the second human face refers to one human face in the preview image that has undergone the third special effect process before the number of human faces in the preview image changes.
  • the target can be determined.
  • the special effects are other special effects except the third special effect. For example, when a sudden change in the number of a single face in the preview image is detected (the number of faces is from 1->0->1), the non-large The style template is automatically switched randomly under the angle, that is, a special effect other than the third special effect is randomly selected.
  • Sub-step C2 If the target face is not the second face, determine that the target special effect is the third special effect.
  • the target special effect is the third special effect.
  • the embodiments of the present application use multiple modules such as face quantity detection and expression detection to intelligently switch styles and special effects, thereby improving the playability of video shooting, providing a fresh feeling of shooting, and meeting the growing individual needs of users.
  • step 103 is executed.
  • Step 103 Perform the target special effect processing on the target face in the preview image.
  • the target face refers to the face that needs to be processed with the target special effect. After the target special effect corresponding to the target face is determined, the target special effect processing can be performed on the target face in the preview image, thereby generating an image with the target special effect added.
  • a preview image is acquired by a camera, a target special effect is determined when the number of faces in the preview image changes, and target special effect processing is performed on the target face in the preview image.
  • the embodiment of the present application automatically obtains the target special effect of the target face by combining the number of faces in the preview image, without requiring the user to manually switch, and combining with different face parameters, different target special effects can be preset, and the diversity of special effects switching can be realized , to meet the individual needs of users.
  • the execution subject may be an image processing apparatus, or a control module in the image processing apparatus for executing the image processing method.
  • the image processing apparatus provided by the embodiments of the present application is described by taking an image processing apparatus executing an image processing method as an example.
  • FIG. 2 a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application is shown.
  • the image processing apparatus 200 may specifically include the following modules:
  • a preview image acquisition module 210 configured to acquire a preview image through a camera
  • a target special effect determination module 220 configured to determine a target special effect when the number of faces in the preview image changes
  • the target special effect processing module 230 is configured to perform the target special effect processing on the target face in the preview image.
  • the preview image includes a first face that has been processed with a first special effect
  • the target special effect determination module 220 includes:
  • a second special effect determining unit configured to determine that the target special effect corresponding to the target face is the second special effect of the first type when the number of faces in the preview image increases;
  • the target face is the newly added face in the preview image
  • the first type is the type to which the first special effect belongs
  • the first special effect is different from the second special effect.
  • the target special effect determination module 220 includes:
  • a target face determination unit configured to acquire the retained face in the preview image when the number of faces in the preview image decreases, and determine the retained face as the target face
  • a target special effect determining unit configured to determine the target special effect according to the facial expression of the target face.
  • the preview image includes a second face that has been processed by the third special effect
  • the target special effect determination module 220 includes:
  • the target special effect is other special effect except the third special effect
  • a third special effect determination unit configured to determine when the number of faces in the preview image changes from 1 to 0 and then from 0 to 1, and the target face is not the second face
  • the target special effect is the third special effect.
  • the image processing apparatus acquires a preview image through a camera, determines a target special effect when the number of faces in the preview image changes, and performs target special effect processing on the target face in the preview image.
  • the embodiment of the present application automatically obtains the target special effect of the target face by combining the number of faces in the preview image, without requiring the user to manually switch, and combining with different face parameters, different target special effects can be preset, and the diversity of special effects switching can be realized , to meet the individual needs of users.
  • the image processing apparatus in this embodiment of the present application may be an apparatus, or may be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • PDA personal digital assistant
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • the image processing apparatus in this embodiment of the present application may be an apparatus having an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • the image processing apparatus provided in this embodiment of the present application can implement each process implemented by the method embodiment in FIG. 1 , and to avoid repetition, details are not described here.
  • an embodiment of the present application further provides an electronic device 300, including a processor 301, a memory 302, a program or instruction stored in the memory 302 and executable on the processor 301,
  • an electronic device 300 including a processor 301, a memory 302, a program or instruction stored in the memory 302 and executable on the processor 301,
  • the program or instruction is executed by the processor 301, each process of the above-mentioned image processing method embodiments can be implemented, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
  • the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 4 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 400 includes but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, and a processor 410, etc. part.
  • the electronic device 400 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 410 through a power management system, so that the power management system can manage charging, discharging, and power management. consumption management and other functions.
  • a power source such as a battery
  • the structure of the electronic device shown in FIG. 4 does not constitute a limitation to the electronic device.
  • the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
  • the radio frequency unit 401 is used to obtain a preview image through a camera
  • the processor 410 is configured to determine a target special effect when the number of faces in the preview image changes; and perform the target special effect processing on the target face in the preview image.
  • the embodiment of the present application automatically obtains the target special effect of the target face by combining the number of faces in the preview image, without requiring the user to manually switch, and combining with different face parameters, different target special effects can be preset, and the diversity of special effects switching can be realized , to meet the individual needs of users.
  • the processor 410 is further configured to, when the number of faces in the preview image increases, determine that the target special effect corresponding to the target face is the second special effect of the first type; wherein, the target face For the newly added face in the preview image, the first special effect is different from the second special effect.
  • the processor 410 is further configured to acquire the retained face in the preview image when the number of faces in the preview image decreases, and determine the retained face as the target face; according to the The facial expression of the target face determines the target special effect.
  • the processor 410 is further configured to determine that the target face is the second face when the number of faces in the preview image changes from 1 to 0 and then from 0 to 1.
  • the target special effect is another special effect except the third special effect; if the target human face is not the second human face, the target special effect is determined to be the third special effect.
  • the embodiments of the present application can determine the corresponding target special effects according to different changing modes of the number of faces in the preview image, and can automatically add special effects to the changed target faces without requiring the user to manually add special effects, thereby improving the user experience.
  • the input unit 404 may include a graphics processor (Graphics Processing Unit, GPU) 4041 and a microphone 4042. Such as camera) to obtain still pictures or video image data for processing.
  • the display unit 406 may include a display panel 4061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
  • the user input unit 407 includes a touch panel 4071 and other input devices 4072 .
  • the touch panel 4071 is also called a touch screen.
  • the touch panel 4071 may include two parts, a touch detection device and a touch controller.
  • Other input devices 4072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which are not described herein again.
  • Memory 409 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems.
  • the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the like, and the modem processor mainly processes wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 410.
  • Embodiments of the present application further provide a readable storage medium, where a program or an instruction is stored on the readable storage medium.
  • a program or an instruction is stored on the readable storage medium.
  • the processor is the processor in the electronic device described in the foregoing embodiments.
  • the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above image processing method embodiments.
  • the chip includes a processor and a communication interface
  • the communication interface is coupled to the processor
  • the processor is configured to run a program or an instruction to implement the above image processing method embodiments.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
  • the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or in a part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of this application.
  • a storage medium such as ROM/RAM, magnetic disk, CD-ROM

Abstract

本申请公开了一种图像处理方法、装置及电子设备,所述方法包括:通过摄像头获取预览图像;在所述预览图像中的人脸数量发生变化时,确定目标特效;对所述预览图像中的目标人脸执行所述目标特效处理。

Description

图像处理方法、装置及电子设备
相关申请的交叉引用
本申请主张在2020年09月30日在中国提交的中国专利申请号202011066486.0的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于图像处理技术领域,具体涉及一种图像处理方法、装置及电子设备。
背景技术
随着科学技术的不断发展,电子设备已经成为人们生活工作中不可或缺的一种工具。
视频录像作为一种新兴媒体形式已经成为当前年轻人追求的潮流趋势。得益于智能电子设备的普及和5G(5th Generation Mobile Networks,第五代移动通信系统)网络的逐步推进,视频有望成为主流的传播媒介,重新定义大众传播格局。作为“潮流”“个性”的代名词,视频与特效等紧密相连。因此,个性多变的特效切换方式已成为视频拍摄平台的关注重点。
目前视频中的特效切换方式多为手动切换方式,或直接使用预先设定好的模板,在模板内实现两个特效的切换过渡,在用户出现模板所要求的指定动作时从当前风格切换过渡为下一指定风格,现有特效切换方式操作较为繁琐,且内容形式单一,无法满足用户的个性需求。
发明内容
本申请实施例的目的是提供一种图像处理方法、装置及电子设备,能够解决现有特效切换方式操作繁琐,且内容形式单一,无法满足用户的个性需求的问题。
为了解决上述技术问题,本申请是这样实现的:
第一方面,本申请实施例提供了一种图像处理方法,该方法包括:
通过摄像头获取预览图像;
在所述预览图像中的人脸数量发生变化时,确定目标特效;
对所述预览图像中的目标人脸执行所述目标特效处理。
第二方面,本申请实施例提供了一种图像处理装置,该装置包括:
预览图像获取模块,用于通过摄像头获取预览图像;
目标特效确定模块,用于在所述预览图像中的人脸数量发生变化时,确定目标特效;
目标特效处理模块,用于对所述预览图像中的目标人脸执行所述目标特效处理。
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的图像处理方法的步骤。
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的图像处理方法的步骤。
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的图像处理方法。
在本申请实施例中,通过摄像头获取预览图像,在预览图像中的人脸数量发生变化时确定目标特效,对预览图像中的目标人脸执行目标特效处理。本申请实施例通过结合预览图像中人脸数量,自动获取目标人脸(预览图像中变化的人脸)的目标特效,无需用户手动切换,且结合不同的人脸数量,可以预先设置不同的目标特效,能够实现特效切换的多样性,满足了用户的个性需求。
附图说明
图1为本申请实施例提供的一种图像处理方法的步骤流程图;
图2为本申请实施例提供的一种图像处理装置的结构示意图;
图3为本申请实施例提供的一种电子设备的结构示意图;
图4为本申请实施例提供的另一种电子设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的图像处理方案进行详细地说明。
参照图1,示出了本申请实施例提供的一种图像处理方法的步骤流程图,如图1所示,该图像处理方法具体可以包括如下步骤:
步骤101:通过摄像头获取预览图像。
本申请实施例可以应用于结合预览图像中的人脸数量的变化确定目标特效,并为预览图像中的目标人脸执行目标特效处理的场景中。
预览图像是指通过摄像头拍摄得到的包含人脸图像。
可以理解地,预览图像可以为用户在进行拍照时通过摄像头获取的显示于预览界面内的图像,以便于用户进行对焦。预览图像也可以为用户在录制视频时,显示于视频录制界面的某一帧视频图像等。
在通过摄像头获取到预览图像之后,执行步骤102。
步骤102:在所述预览图像中的人脸数量发生变化时,确定目标特效。
目标特效是指根据预览图像中的人脸数量变化情况获取的特效,例如,在预览图像中的人脸数量增加时,则可以确定目标特效为贴纸特效;在预览图像中的人脸数量减少时,则可以确定目标特效为滤镜特效等。
可以理解地,上述示例仅是为了更好地理解本申请实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
在预览图像中的人脸数量发生变化时,可以确定出目标特效,具体地,可以分为人脸数量增加的情况,人脸数量减少的情况,以及人脸数量先减少后增加的情况,具体地,可以结合下述具体实现方式进行详细描述。
在本申请的一种具体实现方式中,在所述预览图像中的人脸数量发生变化前,所述预览图像中包含执行了第一特效处理的第一人脸,上述步骤102可以包括:
子步骤A1:在所述预览图像中的人脸数量增加时,确定所述目标人脸对应的目标特效为第一类型的第二特效。
在本实施例中,第一人脸是指预览图像中人脸数量发生变化之前存在的用户人脸,且第一人脸已经执行了第一特效处理。
在预览图像中的人脸数量增加时,可以确定目标人脸对应的目标特效为第一类型的第二特效,第一类型为第一特效所属的类型。此时,目标人脸即为预览图像中新增的人脸,第一特效与第二特效是不相同的。例如,在进行视频录制的过程中,当检测到人脸数量增加(如1人脸变为2人脸等)时,可以自动为新增人脸加入与当前风格不冲突的另一套特效(如当前风格为粉色调风格,则可以为新增人脸加入其它粉色系、橘色系的特效等),实现与之前主体特效妆容的差异化,丰富风格可玩性,此时,可以将与当前风格不冲突的另一套特效作为新增人脸的目标特效等。可选地,可以新增同一特效类型的其他特效,这样,可以使不同人脸有不同的特效,却又属同一特效类型,从而特效风格不冲突。
可以理解地,上述示例仅是为了更好地理解本申请实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
在本申请的另一种具体实现方式中,上述步骤102可以包括:
子步骤B1:在所述预览图像中的人脸数量减少时,获取所述预览图像中保留的人脸,并将所述保留的人脸确定为所述目标人脸。
在本实施例中,在预览图像中的人脸数量减少时,可以获取预览图像中保留的人脸,并将保留的人脸确定为目标人脸,例如,在预览图像中的人脸数量变化之前,预览图像中包含的人脸为人脸1、人脸2和人脸3,在预览图像中的人脸数量减少时,首先获取预览 图像中减少的人脸,并将保留的人脸作为目标人脸,如在减少了人脸1时,则将保留的人脸2和人脸3作为目标人脸。
可以理解地,上述示例仅是为了更好地理解本申请实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
在预览图像中的人脸数量减少时,可以获取预览图像中保留的人脸,并将保留的人脸确定为目标人脸,进而,执行子步骤B2。
子步骤B2:根据所述目标人脸的面部表情,确定所述目标特效。
在确定预览图像中的目标人脸之后,可以根据目标人脸的面部表情确定出目标人脸对应的目标特效,例如,在系统中,可以预先保存用户表情与特效之间的对应关系,在确定目标人脸的面部表情之后,可以根据该对应关系,确定目标人脸对应的目标特效,例如,通过预览图像检测目标人脸的表情,自动切换至与表情相对应的特效模板(如检测表情为正面表情,即微笑、大笑等,则切换至暖调的风格特效,如检测表情为负面表情,即皱眉、哭泣等,则切换至冷色调的风格特效等。
可以理解地,上述示例仅是为了更好地理解本申请实施例的技术方案而列举的示例,不作为对本实施例的唯一限制。
在本申请的另一种具体实现方式中,在所述预览图像中的人脸数量变化之前,所述预览图像中包含1个执行了第三特效处理的第二人脸,上述步骤102可以包括:
子步骤C1:在所述预览图像中的人脸数量由1变为0,再由0变为1的情况下,若所述目标人脸为所述第二人脸,则确定所述目标特效为除所述第三特效之外的其它特效。
在本实施例中,第二人脸是指在预览图像中的人脸数量变化之前,预览图像中的1个执行了第三特效处理的人脸。
在预览图像中的人脸数量由1变为0,再由0变为1的情况下,若从0变为1时,预览图像中增加的这个人脸为第二人脸,则可以确定目标特效为除第三特效之外的其它特效,例如,当检测到预览图像中单个人脸出现数量突变(人脸数由1->0->1)时,则在人脸出现后的非大角度下自动随机切换风格模板,即随机选取一个除第三特效之外的其它特效。
子步骤C2:若所述目标人脸不为所述第二人脸,则确定所述目标特效为所述第三特效。
而在目标人脸不为第二人脸,则可以确定目标特效为第三特效。
本申请实施例通过人脸数量检测、表情检测等多个模块智能切换风格特效,提升视频拍摄的可玩性,提供拍摄新鲜感,满足用户日益增长的个性需求。
在确定出目标特效之后,执行步骤103。
步骤103:对所述预览图像中的目标人脸执行所述目标特效处理。
目标人脸是指需要进行目标特效处理的人脸,在确定出目标人脸对应的目标特效之后,可以在预览图像中对目标人脸执行目标特效处理,从而可以生成添加目标特效的图像。
本申请实施例提供的图像处理方法,通过摄像头获取预览图像,在预览图像中的人脸数量发生变化时确定目标特效,对预览图像中的目标人脸执行目标特效处理。本申请实施例通过结合预览图像中人脸数量,自动获取目标人脸的目标特效,无需用户手动切换,且结合不同的人脸参数,可以预先设置不同的目标特效,能够实现特效切换的多样性,满足了用户的个性需求。
需要说明的是,本申请实施例提供的图像处理方法,执行主体可以为图像处理装置,或者该图像处理装置中的用于执行图像处理方法的控制模块。本申请实施例中以图像处理装置执行图像处理方法为例,说明本申请实施例提供的图像处理装置。
参照图2,示出了本申请实施例提供的一种图像处理装置的结构示意图,如图2所示,该图像处理装置200具体可以包括如下模块:
预览图像获取模块210,用于通过摄像头获取预览图像;
目标特效确定模块220,用于在所述预览图像中的人脸数量发生变化时,确定目标特效;
目标特效处理模块230,用于对所述预览图像中的目标人脸执行所述目标特效处理。
可选地,在所述预览图像中的人脸数量发生变化前,所述预览图像中包含执行了第一特效处理的第一人脸;
所述目标特效确定模块220包括:
第二特效确定单元,用于在所述预览图像中的人脸数量增加时,确定所述目标人脸对应的目标特效为第一类型的第二特效;
其中,所述目标人脸为预览图像中新增的人脸,所述第一类型为所述第一特效所属的 类型,所述第一特效与所述第二特效不同。
可选地,所述目标特效确定模块220包括:
目标人脸确定单元,用于在所述预览图像中的人脸数量减少时,获取所述预览图像中保留的人脸,并将所述保留的人脸确定为所述目标人脸;
目标特效确定单元,用于根据所述目标人脸的面部表情,确定所述目标特效。
可选地,在所述预览图像的人脸数量变化之前,所述预览图像中包含1个执行了第三特效处理的第二人脸,
所述目标特效确定模块220包括:
其它特效确定单元,用于在所述预览图像中的人脸数量由1变为0,再由0变为1的情况下,所述目标人脸为所述第二人脸时,确定所述目标特效为除所述第三特效之外的其它特效;
第三特效确定单元,用于在所述预览图像中的人脸数量由1变为0,再由0变为1的情况下,所述目标人脸不为所述第二人脸时,确定所述目标特效为所述第三特效。
本申请实施例提供的图像处理装置,通过摄像头获取预览图像,在预览图像中的人脸数量发生变化时确定目标特效,对预览图像中的目标人脸执行目标特效处理。本申请实施例通过结合预览图像中人脸数量,自动获取目标人脸的目标特效,无需用户手动切换,且结合不同的人脸参数,可以预先设置不同的目标特效,能够实现特效切换的多样性,满足了用户的个性需求。
本申请实施例中的图像处理装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例中的图像处理装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施 例不作具体限定。
本申请实施例提供的图像处理装置能够实现图1的方法实施例实现的各个过程,为避免重复,这里不再赘述。
可选地,如图3所示,本申请实施例还提供一种电子设备300,包括处理器301,存储器302,存储在存储器302上并可在所述处理器301上运行的程序或指令,该程序或指令被处理器301执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。
图4为实现本申请实施例的一种电子设备的硬件结构示意图。
该电子设备400包括但不限于:射频单元401、网络模块402、音频输出单元403、输入单元404、传感器405、显示单元406、用户输入单元407、接口单元408、存储器409、以及处理器410等部件。
本领域技术人员可以理解,电子设备400还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器410逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图4中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
其中,射频单元401,用于通过摄像头获取预览图像;
处理器410,用于在所述预览图像中的人脸数量发生变化时,确定目标特效;对所述预览图像中的目标人脸执行所述目标特效处理。
本申请实施例通过结合预览图像中人脸数量,自动获取目标人脸的目标特效,无需用户手动切换,且结合不同的人脸参数,可以预先设置不同的目标特效,能够实现特效切换的多样性,满足了用户的个性需求。
可选地,处理器410,还用于在所述预览图像中的人脸数量增加时,确定所述目标人脸对应的目标特效为第一类型的第二特效;其中,所述目标人脸为预览图像中新增的人脸,所述第一特效与所述第二特效不同。
处理器410,还用于在所述预览图像中的人脸数量减少时,获取所述预览图像中保留的人脸,并将所述保留的人脸确定为所述目标人脸;根据所述目标人脸的面部表情,确定所述目标特效。
处理器410,还用于在所述预览图像中的人脸数量由1变为0,再由0变为1的情况下,若所述目标人脸为所述第二人脸,则确定所述目标特效为除所述第三特效之外的其它特效;若所述目标人脸不为所述第二人脸,则确定所述目标特效为所述第三特效。
本申请实施例可以根据预览图像中人脸数量的不同变化方式确定对应的目标特效,可以达到自动为变化的目标人脸添加特效,无需用户手动添加特效,提高了用户的体验。
应理解的是,本申请实施例中,输入单元404可以包括图形处理器(Graphics Processing Unit,GPU)4041和麦克风4042,图形处理器4041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元406可包括显示面板4061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板4061。用户输入单元407包括触控面板4071以及其他输入设备4072。触控面板4071,也称为触摸屏。触控面板4071可包括触摸检测装置和触摸控制器两个部分。其他输入设备4072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器409可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器410可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器410中。
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述图像处理方法实施例的各个 过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (13)

  1. 一种图像处理方法,包括:
    通过摄像头获取预览图像;
    在所述预览图像中的人脸数量发生变化时,确定目标特效;
    对所述预览图像中的目标人脸执行所述目标特效处理。
  2. 根据权利要求1所述的方法,其中,在所述预览图像中的人脸数量发生变化前,所述预览图像中包含执行了第一特效处理的第一人脸;
    所述在所述预览图像中的人脸数量发生变化时,确定目标特效,包括:
    在所述预览图像中的人脸数量增加时,确定所述目标人脸对应的目标特效为第一类型的第二特效;
    其中,所述目标人脸为预览图像中新增的人脸,所述第一类型为所述第一特效所属的类型,所述第一特效与所述第二特效不同。
  3. 根据权利要求1所述的方法,其中,所述在所述预览图像中的人脸数量发生变化时,确定目标特效,具体包括:
    在所述预览图像中的人脸数量减少时,获取所述预览图像中保留的人脸,并将所述保留的人脸确定为所述目标人脸;
    根据所述目标人脸的面部表情,确定所述目标特效。
  4. 根据权利要求1所述的方法,其中,在所述预览图像的人脸数量变化之前,所述预览图像中包含1个执行了第三特效处理的第二人脸,
    所述在所述预览图像中的人脸数量发生变化时,确定目标特效,具体包括:
    在所述预览图像中的人脸数量由1变为0,再由0变为1的情况下,若所述目标人脸为所述第二人脸,则确定所述目标特效为除所述第三特效之外的其它特效;
    若所述目标人脸不为所述第二人脸,则确定所述目标特效为所述第三特效。
  5. 一种图像处理装置,包括:
    预览图像获取模块,用于通过摄像头获取预览图像;
    目标特效确定模块,用于在所述预览图像中的人脸数量发生变化时,确定目标特效;
    目标特效处理模块,用于对所述预览图像中的目标人脸执行所述目标特效处理。
  6. 根据权利要求5所述的装置,其中,在所述预览图像中的人脸数量发生变化前,所述预览图像中包含执行了第一特效处理的第一人脸;
    所述目标特效确定模块包括:
    第二特效确定单元,用于在所述预览图像中的人脸数量增加时,确定所述目标人脸对应的目标特效为第一类型的第二特效;
    其中,所述目标人脸为预览图像中新增的人脸,所述第一类型为所述第一特效所属的类型,所述第一特效与所述第二特效不同。
  7. 根据权利要求6所述的装置,其中,所述目标特效确定模块包括:
    目标人脸确定单元,用于在所述预览图像中的人脸数量减少时,获取所述预览图像中保留的人脸,并将所述保留的人脸确定为所述目标人脸;
    目标特效确定单元,用于根据所述目标人脸的面部表情,确定所述目标特效。
  8. 根据权利要求6所述的装置,其中,在所述预览图像的人脸数量变化之前,所述预览图像中包含1个执行了第三特效处理的第二人脸,
    所述目标特效确定模块包括:
    其它特效确定单元,用于在所述预览图像中的人脸数量由1变为0,再由0变为1的情况下,所述目标人脸为所述第二人脸时,确定所述目标特效为除所述第三特效之外的其它特效;
    第三特效确定单元,用于在所述预览图像中的人脸数量由1变为0,再由0变为1的情况下,所述目标人脸不为所述第二人脸时,确定所述目标特效为所述第三特效。
  9. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1-4任一项所述的图像处理方法的步骤。
  10. 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-4任一项所述的图像处理方法的步骤。
  11. 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1-4任一项所述的图像处理方 法。
  12. 一种计算机程序产品,所述计算机程序产品被至少一个处理器执行以实现如权利要求1-4任一项所述的图像处理方法。
  13. 一种电子设备,包括所述电子设备被配置成用于执行如权利要求1-4任一项所述的图像处理方法。
PCT/CN2021/121282 2020-09-30 2021-09-28 图像处理方法、装置及电子设备 WO2022068806A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011066486.0A CN112188103A (zh) 2020-09-30 2020-09-30 图像处理方法、装置及电子设备
CN202011066486.0 2020-09-30

Publications (1)

Publication Number Publication Date
WO2022068806A1 true WO2022068806A1 (zh) 2022-04-07

Family

ID=73947800

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/121282 WO2022068806A1 (zh) 2020-09-30 2021-09-28 图像处理方法、装置及电子设备

Country Status (2)

Country Link
CN (1) CN112188103A (zh)
WO (1) WO2022068806A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115379113A (zh) * 2022-07-18 2022-11-22 北京达佳互联信息技术有限公司 拍摄处理方法、装置、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112188103A (zh) * 2020-09-30 2021-01-05 维沃移动通信有限公司 图像处理方法、装置及电子设备
CN113744135A (zh) * 2021-09-16 2021-12-03 北京字跳网络技术有限公司 图像处理方法、装置、电子设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101370042B1 (ko) * 2012-10-29 2014-03-25 주식회사 에스원 얼굴 이미지 색인화 방법, 이를 이용한 이미지 검색 장치 및 그 방법
CN107592474A (zh) * 2017-09-14 2018-01-16 光锐恒宇(北京)科技有限公司 一种图像处理方法和装置
CN108495049A (zh) * 2018-06-15 2018-09-04 Oppo广东移动通信有限公司 拍摄控制方法及相关产品
CN108958610A (zh) * 2018-07-27 2018-12-07 北京微播视界科技有限公司 基于人脸的特效生成方法、装置和电子设备
CN109034063A (zh) * 2018-07-27 2018-12-18 北京微播视界科技有限公司 人脸特效的多人脸跟踪方法、装置和电子设备
CN109190576A (zh) * 2018-09-13 2019-01-11 深圳市梦网百科信息技术有限公司 一种基于视频动态信息的多人美颜调整方法和系统
CN112188103A (zh) * 2020-09-30 2021-01-05 维沃移动通信有限公司 图像处理方法、装置及电子设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170161553A1 (en) * 2015-12-08 2017-06-08 Le Holdings (Beijing) Co., Ltd. Method and electronic device for capturing photo

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101370042B1 (ko) * 2012-10-29 2014-03-25 주식회사 에스원 얼굴 이미지 색인화 방법, 이를 이용한 이미지 검색 장치 및 그 방법
CN107592474A (zh) * 2017-09-14 2018-01-16 光锐恒宇(北京)科技有限公司 一种图像处理方法和装置
CN108495049A (zh) * 2018-06-15 2018-09-04 Oppo广东移动通信有限公司 拍摄控制方法及相关产品
CN108958610A (zh) * 2018-07-27 2018-12-07 北京微播视界科技有限公司 基于人脸的特效生成方法、装置和电子设备
CN109034063A (zh) * 2018-07-27 2018-12-18 北京微播视界科技有限公司 人脸特效的多人脸跟踪方法、装置和电子设备
CN109190576A (zh) * 2018-09-13 2019-01-11 深圳市梦网百科信息技术有限公司 一种基于视频动态信息的多人美颜调整方法和系统
CN112188103A (zh) * 2020-09-30 2021-01-05 维沃移动通信有限公司 图像处理方法、装置及电子设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115379113A (zh) * 2022-07-18 2022-11-22 北京达佳互联信息技术有限公司 拍摄处理方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN112188103A (zh) 2021-01-05

Similar Documents

Publication Publication Date Title
WO2022068806A1 (zh) 图像处理方法、装置及电子设备
WO2022012657A1 (zh) 图像编辑方法、装置和电子设备
WO2022161267A1 (zh) 视频录制方法及装置
CN112532882B (zh) 图像显示方法和装置
WO2022268024A1 (zh) 视频播放方法、装置及电子设备
WO2022143525A1 (zh) 视频播放方法、装置及电子设备
CN112672061B (zh) 视频拍摄方法、装置、电子设备及介质
WO2023025196A1 (zh) 图像处理方法、装置及电子设备
WO2022206582A1 (zh) 视频处理方法、装置、电子设备和存储介质
CN112911147B (zh) 显示控制方法、显示控制装置及电子设备
WO2023083132A1 (zh) 拍摄方法、装置、电子设备和可读存储介质
WO2023083089A1 (zh) 拍摄控件显示方法, 装置, 电子设备及介质
WO2022143382A1 (zh) 图像处理方法及装置
CN112269522A (zh) 图像处理方法、装置、电子设备和可读存储介质
WO2022111458A1 (zh) 图像拍摄方法和装置、电子设备及存储介质
WO2022156703A1 (zh) 一种图像显示方法、装置及电子设备
CN113014801A (zh) 录像方法、装置、电子设备及介质
CN112532885A (zh) 防抖方法、装置及电子设备
WO2022135476A1 (zh) 截图方法、装置及电子设备
WO2022089481A1 (zh) 信息处理方法、装置及电子设备
WO2020057241A1 (zh) 应用程序显示的方法、装置及终端设备
WO2022068721A1 (zh) 截屏方法、装置及电子设备
WO2022068768A1 (zh) 权限设置方法、文件播放方法、装置和电子设备
WO2023125159A1 (zh) 视频生成电路、方法和电子设备
CN112449098B (zh) 一种拍摄方法、装置、终端及存储介质

Legal Events

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

Ref document number: 21874466

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

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21874466

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 02/11/2023)