技术领域technical field
本公开涉及通信领域,尤其涉及美颜处理方法及装置。The present disclosure relates to the communication field, and in particular, to a beauty treatment method and device.
背景技术Background technique
目前,美颜处理功能的应用越来越广泛,但是,一旦所述美颜处理功能处于开启状态或关闭状态后,除非用户手动修改,否则终端无法自动修改所述美颜处理功能所处的状态。At present, the beauty treatment function is more and more widely used, but once the beauty treatment function is turned on or off, the terminal cannot automatically modify the state of the beauty treatment function unless the user manually modifies it. .
当所述美颜处理功能处于开启状态时,如果当前不需要使用所述美颜处理功能,就会占用大量中央处理器(Central Processing Unit,CPU)资源和图形处理器(GraphicsProcessing Unit,GPU)资源,造成资源浪费,同时造成图像的画质损失。当所述美颜处理功能处于关闭状态时,就无法自动对当前的实时图像中的人脸进行美颜处理,用户体验差。When the beautifying processing function is turned on, if the beautifying processing function is not currently used, a large amount of central processing unit (Central Processing Unit, CPU) resources and graphics processing unit (Graphics Processing Unit, GPU) resources will be occupied , resulting in a waste of resources and loss of image quality. When the beautification processing function is turned off, the face in the current real-time image cannot be automatically beautified, and the user experience is poor.
发明内容Contents of the invention
有鉴于此,本公开提供了美颜处理方法及装置,以解决相关技术中的不足。In view of this, the present disclosure provides a beauty treatment method and device to solve the deficiencies in the related art.
根据本公开实施例的第一方面,提供一种美颜处理方法,所述方法包括:According to the first aspect of the embodiments of the present disclosure, there is provided a beauty treatment method, the method comprising:
采集实时图像;Collect real-time images;
对采集到的所述实时图像进行人脸识别,确定识别结果;Perform face recognition on the collected real-time images, and determine the recognition result;
当所述识别结果指示所述实时图像中包括需要进行美颜处理的人脸时,控制美颜处理功能处于开启状态;When the recognition result indicates that the real-time image includes a human face requiring beauty treatment, control the beauty treatment function to be turned on;
当所述识别结果指示所述实时图像中不包括需要进行美颜处理的人脸时,控制所述美颜处理功能处于关闭状态。When the recognition result indicates that the real-time image does not include a human face requiring beauty treatment, control the beauty treatment function to be in an off state.
可选地,所述确定识别结果,包括:Optionally, the determination of the recognition result includes:
当所述实时图像中包括人脸时,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸;When the real-time image includes a human face, determining that the recognition result is that the real-time image includes a human face that needs to be beautified;
当所述实时图像中不包括人脸时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸。When the real-time image does not include a human face, it is determined that the recognition result is that the real-time image does not include a human face requiring beauty treatment.
可选地,所述确定识别结果,包括:Optionally, the determination of the recognition result includes:
当所述实时图像中包括人脸,且所述人脸的面积占所述实时图像的面积的百分比超过预设值时,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸;When the real-time image includes a human face, and the percentage of the area of the human face to the area of the real-time image exceeds a preset value, it is determined that the recognition result is that the real-time image includes a face that requires beauty treatment. human face;
当所述实时图像中不包括人脸,或所述实时图像中所述人脸的面积占所述实时图像的面积的百分比未超过所述预设值时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸。When the real-time image does not include a human face, or the percentage of the area of the human face in the real-time image to the area of the real-time image does not exceed the preset value, it is determined that the recognition result is the real-time The image does not include faces that need to be beautified.
可选地,所述确定识别结果,包括:Optionally, the determination of the recognition result includes:
当所述实时图像中包括人脸,且所述人脸位于目标区域内,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸;When the real-time image includes a human face, and the human face is located in the target area, determining that the recognition result is that the real-time image includes a human face that requires beauty treatment;
当所述实时图像中不包括人脸,或所述实时图像中所述人脸未位于所述目标区域内时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸;When the real-time image does not include a human face, or the human face in the real-time image is not located in the target area, determining that the recognition result is that the real-time image does not include a person who needs to be beautified. Face;
其中,所述目标区域包括聚焦区域和/或用户指定区域。Wherein, the target area includes a focus area and/or a user designated area.
可选地,所述方法还包括:Optionally, the method also includes:
当所述实时图像中包括人脸的数目为多个时,通过所述美颜处理功能对位于所述目标区域的所述人脸进行美颜处理;When the number of human faces included in the real-time image is multiple, perform beautifying processing on the human faces located in the target area through the beautifying processing function;
输出通过美颜处理后的所述实时图像。and outputting the real-time image processed by beautification.
根据本公开实施例的第二方面,提供一种美颜处理装置,所述装置包括:According to the second aspect of the embodiments of the present disclosure, there is provided a beauty treatment device, the device comprising:
图像采集模块,被配置为采集实时图像;An image acquisition module configured to acquire real-time images;
人脸识别模块,被配置为对采集到的所述实时图像进行人脸识别,确定识别结果;The face recognition module is configured to perform face recognition on the collected real-time image, and determine the recognition result;
第一控制模块,被配置为当所述识别结果指示所述实时图像中包括需要进行美颜处理的人脸时,控制美颜处理功能处于开启状态;The first control module is configured to control the beautification processing function to be turned on when the recognition result indicates that the real-time image includes a human face requiring beautification processing;
第二控制模块,被配置为当所述识别结果指示所述实时图像中不包括需要进行美颜处理的人脸时,控制所述美颜处理功能处于关闭状态。The second control module is configured to control the beautification processing function to be in an off state when the recognition result indicates that the real-time image does not include a human face requiring beautification processing.
可选地,所述人脸识别模块包括:Optionally, the face recognition module includes:
第一确定子模块,被配置为当所述实时图像中包括人脸时,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸;The first determination submodule is configured to determine that the recognition result is that the real-time image includes a human face that needs to be beautified when the real-time image includes a human face;
第二确定子模块,被配置为当所述实时图像中不包括人脸时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸。The second determining submodule is configured to determine that the recognition result is that the real-time image does not include a human face that needs to be beautified when the real-time image does not include a human face.
可选地,所述人脸识别模块包括:Optionally, the face recognition module includes:
第三确定子模块,被配置为当所述实时图像中包括人脸,且所述人脸的面积占所述实时图像的面积的百分比超过预设值时,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸;The third determining submodule is configured to determine that the recognition result is the real-time The image includes a face that needs to be beautified;
第四确定子模块,被配置为当所述实时图像中不包括人脸,或所述实时图像中所述人脸的面积占所述实时图像的面积的百分比未超过所述预设值时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸。The fourth determining submodule is configured to: when the real-time image does not include a human face, or the percentage of the area of the human face in the real-time image to the area of the real-time image does not exceed the preset value, It is determined that the recognition result is that the real-time image does not include a human face that requires beauty treatment.
可选地,所述人脸识别模块包括:Optionally, the face recognition module includes:
第五确定子模块,被配置为当所述实时图像中包括人脸,且所述人脸位于目标区域内,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸;The fifth determining submodule is configured to determine that the recognition result is that the real-time image includes a human face that needs to be beautified when the real-time image includes a human face and the human face is located in the target area;
第六确定子模块,被配置为当所述实时图像中不包括人脸,或所述实时图像中所述人脸未位于所述目标区域内时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸;The sixth determination sub-module is configured to determine that the recognition result is a human face in the real-time image when the real-time image does not include a human face, or the human face in the real-time image is not located in the target area. Do not include faces that require beauty treatment;
其中,所述目标区域包括聚焦区域和/或用户指定区域。Wherein, the target area includes a focus area and/or a user designated area.
可选地,所述装置还包括:Optionally, the device also includes:
处理模块,被配置为当所述实时图像中包括人脸的数目为多个时,通过所述美颜处理功能对位于所述目标区域的所述人脸进行美颜处理;The processing module is configured to perform beautification processing on the face located in the target area through the beautification processing function when the number of human faces included in the real-time image is multiple;
图像输出模块,被配置为输出通过美颜处理后的所述实时图像。The image output module is configured to output the real-time image processed by beautification.
根据本公开实施例的第三方面,提供一种美颜处理装置,包括:According to a third aspect of the embodiments of the present disclosure, there is provided a beauty treatment device, comprising:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured as:
采集实时图像;Collect real-time images;
对采集到的所述实时图像进行人脸识别,确定识别结果;Perform face recognition on the collected real-time images, and determine the recognition result;
当所述识别结果指示所述实时图像中包括需要进行美颜处理的人脸时,控制美颜处理功能处于开启状态;When the recognition result indicates that the real-time image includes a human face requiring beauty treatment, control the beauty treatment function to be turned on;
当所述识别结果指示所述实时图像中不包括需要进行美颜处理的人脸时,控制所述美颜处理功能处于关闭状态。When the recognition result indicates that the real-time image does not include a human face requiring beauty treatment, control the beauty treatment function to be in an off state.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
本公开实施例中,终端可以根据对实时图像进行人脸识别的识别结果,自动控制所述美颜处理功能所处的状态,提升了终端智能化程度。另外,还可以避免所述美颜处理功能不必要的开启造成的资源浪费和画质受损的问题,简化了用户操作,提升了用户体验。In the embodiment of the present disclosure, the terminal can automatically control the state of the beautification processing function according to the recognition result of the face recognition on the real-time image, which improves the intelligence of the terminal. In addition, the problems of resource waste and image quality damage caused by unnecessary activation of the beauty treatment function can be avoided, user operations are simplified, and user experience is improved.
本公开实施例中,可以在确定实时图像中包括人脸时,或者在确定所述实时图像中的主体为人脸时,确定识别结果为所述实时图像中包括需要进行美颜处理的人脸。可选地,可以在所述人脸的面积占所述实时图像的面积的百分比超过预设值,或者所述人脸位于目标区域内时,确定所述实时图像中的主体为人脸。相应地,可以根据上述情况,对应确定所述实时图像中不包括需要进行美颜处理的人脸的情况。本公开实施例中,终端根据上述识别结果自动控制所述美颜处理功能所处的状态。实现简便,可用性高,且提升了终端的智能化程度。In the embodiment of the present disclosure, when it is determined that the real-time image includes a human face, or when it is determined that the subject in the real-time image is a human face, it is determined that the recognition result is that the real-time image includes a human face that needs to be beautified. Optionally, it may be determined that the subject in the real-time image is a human face when the percentage of the area of the human face to the area of the real-time image exceeds a preset value, or when the human face is located in a target area. Correspondingly, according to the above situation, it may be correspondingly determined that the real-time image does not include a human face that needs to be beautified. In the embodiment of the present disclosure, the terminal automatically controls the state of the beauty treatment function according to the above identification result. The implementation is simple, the usability is high, and the intelligent degree of the terminal is improved.
本公开实施例中,在美颜处理功能处于开启状态时,终端可以通过所述美颜处理功能对当前采集的实时图像中的人脸进行美颜处理,进而输出所述实时图像。在所述美颜处理功能处于关闭状态时,所述终端直接输出采集到的所述实时图像即可。不再需要用户手动对美颜处理状态进行切换,简化了用户操作,且可以在避免资源浪费的情况下,输出用户满意的图像,提升了用户体验。In the embodiment of the present disclosure, when the beautification processing function is turned on, the terminal may use the beautification processing function to perform beautification processing on the face in the currently collected real-time image, and then output the real-time image. When the beautifying processing function is turned off, the terminal may directly output the collected real-time image. It is no longer necessary for the user to manually switch the beautification processing state, which simplifies the user operation, and can output images satisfactory to the user while avoiding resource waste, thereby improving the user experience.
本公开实施例中,终端可以通过所述美颜处理功能只对处于所述目标区域内的人脸进行美颜,进而输出美颜处理后的实时图像。通过上述过程,所述终端可以以所述目标区域内的所述人脸为主体进行美颜处理,加快美颜处理的速度,提升终端智能化程度和用户体验。In the embodiment of the present disclosure, the terminal may only perform beautification on the face in the target area through the beautification processing function, and then output the real-time image after beautification processing. Through the above process, the terminal can perform beautification processing with the face in the target area as the main body, speed up the beautification processing, and improve terminal intelligence and user experience.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
图1是本公开根据一示例性实施例示出的一种美颜处理方法流程图;Fig. 1 is a flow chart of a beauty treatment method according to an exemplary embodiment of the present disclosure;
图2A至2D是本公开根据一示例性实施例示出的美颜处理场景示意图;2A to 2D are schematic diagrams of beauty treatment scenarios according to an exemplary embodiment of the present disclosure;
图3A至3B是本公开根据一示例性实施例示出的美颜处理场景示意图;3A to 3B are schematic diagrams of beauty treatment scenarios according to an exemplary embodiment of the present disclosure;
图4是本公开根据一示例性实施例示出的另一种美颜处理方法流程图;Fig. 4 is a flowchart of another beauty treatment method according to an exemplary embodiment of the present disclosure;
图5是本公开根据一示例性实施例示出的另一种美颜处理方法流程图;Fig. 5 is a flowchart of another beauty treatment method according to an exemplary embodiment of the present disclosure;
图6是本公开根据一示例性实施例示出的一种美颜处理装置框图;Fig. 6 is a block diagram of a beauty treatment device according to an exemplary embodiment of the present disclosure;
图7是本公开根据一示例性实施例示出的另一种美颜处理装置框图;Fig. 7 is a block diagram of another beauty treatment device according to an exemplary embodiment of the present disclosure;
图8是本公开根据一示例性实施例示出的另一种美颜处理装置框图;Fig. 8 is a block diagram of another beauty treatment device according to an exemplary embodiment of the present disclosure;
图9是本公开根据一示例性实施例示出的另一种美颜处理装置框图;Fig. 9 is a block diagram of another beauty treatment device according to an exemplary embodiment of the present disclosure;
图10是本公开根据一示例性实施例示出的另一种美颜处理装置框图;Fig. 10 is a block diagram of another beauty treatment device according to an exemplary embodiment of the present disclosure;
图11是本公开根据一示例性实施例示出的一种用于美颜处理装置的一结构示意图。Fig. 11 is a schematic structural diagram of a beauty treatment device according to an exemplary embodiment of the present disclosure.
具体实施方式detailed description
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.
在本公开运行的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所运行的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中运行的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used in this disclosure and the appended claims, the singular forms "a", "said" and "the" are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所运行的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of the present disclosure, first information may also be called second information, and similarly, second information may also be called first information. Depending on the context, the word "if" as used herein may be interpreted as "at" or "when" or "in response to a determination."
本公开实施例提供的美颜处理方法可以用于终端,例如,智能手机、平板电脑、个人数字助理(Personal Digital Assistant,PDA)等。如图1所示,图1是根据一示例性实施例示出的一种美颜处理方法,包括以下步骤:The beauty treatment method provided by the embodiments of the present disclosure may be applied to a terminal, for example, a smart phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), and the like. As shown in Figure 1, Figure 1 is a beauty treatment method shown according to an exemplary embodiment, including the following steps:
在步骤101中,采集实时图像。In step 101, real-time images are collected.
本步骤中,所述终端可以通过预先安装的图像采集装置,例如摄像头等采集所述实时图像。In this step, the terminal may collect the real-time image through a pre-installed image collection device, such as a camera.
在步骤102中,对采集到的所述实时图像进行人脸识别,确定识别结果。In step 102, face recognition is performed on the collected real-time image, and a recognition result is determined.
本步骤中,所述终端按照相关技术对采集到的所述实时图像进行人脸识别。可选地,可以通过预先建立的人脸特征模型从所述实时图像中进行人脸特征参数的提取,如果提取到所述人脸特征参数,就确定所述实时图像中包括人脸,否则确定所述实时图像中不包括人脸。In this step, the terminal performs face recognition on the collected real-time image according to related technologies. Optionally, the facial feature parameters can be extracted from the real-time image through a pre-established facial feature model, if the facial feature parameters are extracted, it is determined that the real-time image includes a human face, otherwise it is determined The real-time image does not include a human face.
本公开实施例中,在确定所述识别结果时,可以采用以下方式中的任意一种。In the embodiment of the present disclosure, when determining the recognition result, any one of the following manners may be adopted.
第一种方式,直接根据所述实时图像中是否包括人脸来确定所述识别结果。In the first manner, the recognition result is determined directly according to whether the real-time image includes a human face.
此种方式中,所述终端可以按照上述方式在确定所述实时图像中包括人脸时,直接将所述识别结果确定为所述实时图像中包括需要进行美颜处理的人脸。当然,如果所述实时图像中不包括人脸,则将所述识别结果确定为所述实时图像中不包括需要进行美颜处理的人脸。In this manner, when determining that the real-time image includes a human face according to the above manner, the terminal may directly determine the recognition result as that the real-time image includes a human face that needs to be beautified. Of course, if the real-time image does not include a human face, then the recognition result is determined to be that the real-time image does not include a human face requiring beauty treatment.
第二种方式,根据所述实时图像中是否以人脸为主体来确定所述识别结果。In a second manner, the recognition result is determined according to whether the real-time image is dominated by a human face.
当所述终端基于上述方式确定所述实时图像中包括人脸时,还可以进一步确定所述实时图像是否以所述人脸为主体。可选地,可以通过所述人脸所占的面积或所述人脸是否位于目标区域内来确定。When the terminal determines that the real-time image includes a human face based on the foregoing manner, it may further determine whether the real-time image mainly includes the human face. Optionally, it may be determined by the area occupied by the human face or whether the human face is located in the target area.
其中,当所述人脸的面积占所述实时图像的面积的百分比超过预设值,可以确定所述实时图像以所述人脸为主体。可选地,可以统计所述人脸所占的像素点的数目和所述实时图像的像素点的总数目,所述人脸所占的像素点的数目占所述总数目的百分比即为所述人脸的面积占所述实时图像的面积的百分比。当然,如果所述实时图像中包括多个人脸时,所述人脸所占的像素点的数目为所有人脸所占的像素点的数目之和。Wherein, when the percentage of the area of the human face to the area of the real-time image exceeds a preset value, it may be determined that the real-time image is dominated by the human face. Optionally, the number of pixels occupied by the human face and the total number of pixels of the real-time image may be counted, and the percentage of the number of pixels occupied by the human face in the total number is the The percentage of the area of the human face to the area of the real-time image. Of course, if the real-time image includes multiple human faces, the number of pixels occupied by the human faces is the sum of the number of pixels occupied by all faces.
本公开实施例中,当所述实时图像中包括人脸,且所述人脸的面积占所述实时图像的面积的百分比超过预设值,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸,否则,当所述实时图像中不包括人脸,或所述实时图像包括人脸,但所述人脸的面积占所述实时图像的面积的百分比未超过所述预设值时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸。In the embodiment of the present disclosure, when the real-time image includes a human face, and the percentage of the area of the human face in the area of the real-time image exceeds a preset value, it is determined that the recognition result is that the real-time image includes the required The human face undergoing beauty treatment, otherwise, when the real-time image does not include a human face, or the real-time image includes a human face, but the percentage of the area of the human face in the area of the real-time image does not exceed the specified When the preset value is used, it is determined that the recognition result is that the real-time image does not include a human face that requires beauty treatment.
或者,当所述人脸位于所述目标区域内时,例如图2A所示,可以确定所述实时图像以所述人脸为主体。可选地,所述目标区域可以是所述终端预先设置的聚焦区域,和/或所述用户指定的某一区域。所述聚焦区域和用户指定区域可以不重合,例如图2B所示;也可以有至少部分重合,例如图2C所示。所述目标区域可以只包括所述聚焦区域,也可以只包括用户指定区域,或者还可以同时包括所述聚焦区域和所述用户指定区域。Alternatively, when the human face is located in the target area, for example as shown in FIG. 2A , it may be determined that the real-time image takes the human face as a main body. Optionally, the target area may be a focus area preset by the terminal, and/or a certain area designated by the user. The focus area and the user-specified area may not overlap, as shown in FIG. 2B for example; they may also overlap at least partially, as shown in FIG. 2C for example. The target area may include only the focus area, may only include a user-designated area, or may include both the focus area and the user-designated area.
当然,如果所述实时图像中包括多个人脸时,可以判断多个人脸是否在所述目标区域内,如果所述多个人脸中有至少一个人脸位于所述目标区域内,例如图2D所示,则同样可以确定所述实时图像以所述人脸为主体。Of course, if the real-time image includes multiple human faces, it may be determined whether the multiple human faces are in the target area, and if at least one of the multiple human faces is located in the target area, for example, as shown in FIG. 2D display, it can also be determined that the real-time image takes the human face as the main body.
本公开实施例中,当所述实时图像中包括人脸,且所述人脸位于目标区域内,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸,否则当所述实时图像中不包括人脸,或所述实时图像包括人脸但所述人脸未位于所述目标区域内时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸。In the embodiment of the present disclosure, when the real-time image includes a human face, and the human face is located in the target area, it is determined that the recognition result indicates that the real-time image includes a human face that needs to be beautified, otherwise when the When the real-time image does not include a human face, or the real-time image includes a human face but the human face is not located in the target area, it is determined that the recognition result is that the real-time image does not include any face that requires beauty treatment human face.
当所述识别结果指示所述实时图像中包括需要进行美颜处理的人脸时,执行步骤103,当所述识别结果指示所述实时图像中不包括需要进行美颜处理的人脸时,执行步骤104。When the recognition result indicates that the real-time image includes a human face that requires beauty treatment, perform step 103, and when the recognition result indicates that the real-time image does not include a human face that requires beauty treatment, perform Step 104.
在步骤103中,控制美颜处理功能处于开启状态。In step 103, control the beautification processing function to be in an on state.
本步骤中,所述终端可以在确定当前所述美颜处理功能处于关闭状态时,自动按照相关技术控制所述美颜处理功能处于开启状态。可选地,可以自动控制所述美颜处理功能所对应的虚拟按键处于开启状态。例如图3A所示,所述滑块虚拟图标滑动至右侧,对应于所述美颜处理功能处于开启状态。In this step, the terminal may automatically control the beautification processing function to be in an on state according to related technologies when it is determined that the beautifying processing function is currently in an off state. Optionally, the virtual key corresponding to the beauty treatment function may be automatically controlled to be in an on state. For example, as shown in FIG. 3A , the slider virtual icon slides to the right, corresponding to that the beauty treatment function is turned on.
在步骤104中,控制所述美颜处理功能处于关闭状态。In step 104, the beauty treatment function is controlled to be off.
本步骤中,所述终端可以在确定当前所述美颜处理功能处于开启状态时,自动按照相关技术控制所述美颜处理功能处于关闭状态。可选地,可以自动控制所述美颜处理功能所对应的虚拟按键处于关闭状态。例如图3B所示,所述滑块虚拟图标滑动至左侧,对应于所述美颜处理功能处于关闭状态。In this step, when the terminal determines that the beauty treatment function is currently on, it can automatically control the beauty treatment function to be off according to related technologies. Optionally, the virtual button corresponding to the beautification processing function may be automatically controlled to be in an off state. For example, as shown in FIG. 3B , the slider virtual icon slides to the left, corresponding to the beautification processing function being in an off state.
上述实施例中,终端可以根据对实时图像进行人脸识别的识别结果,自动控制所述美颜处理功能所处的状态,提升了终端智能化程度。另外,还可以避免所述美颜处理功能不必要的开启造成的资源浪费和画质受损的问题,简化了用户操作,提升了用户体验。In the above embodiment, the terminal can automatically control the state of the beautification processing function according to the face recognition result of the real-time image, which improves the intelligence of the terminal. In addition, the problems of resource waste and image quality damage caused by unnecessary activation of the beauty treatment function can be avoided, user operations are simplified, and user experience is improved.
当然,所述终端可以通过已处于开启状态的所述美颜处理功能对所有人脸进行美颜处理,进而输出经过美颜处理后的所述实时图像。或者在所述美颜处理功能处于关闭状态时,直接输出所述实时图像。不再需要用户手动对美颜处理状态进行切换,简化了用户操作,且可以在避免资源浪费的情况下,输出用户满意的图像,提升了用户体验。Certainly, the terminal may perform beauty treatment on all faces through the beauty treatment function that is already turned on, and then output the real-time image after beauty treatment. Or when the beautification processing function is off, the real-time image is directly output. It is no longer necessary for the user to manually switch the beautification processing state, which simplifies the user operation, and can output images satisfactory to the user while avoiding resource waste, thereby improving the user experience.
进一步地,如图4所示,图4是在前述图1所示实施例的基础上示出的另一种美颜处理方法,上述方法还包括以下步骤:Further, as shown in Figure 4, Figure 4 is another beauty treatment method based on the embodiment shown in Figure 1, and the above method also includes the following steps:
在步骤105中,当所述人脸的数目为多个时,通过所述美颜处理功能对位于所述目标区域的所述人脸进行美颜处理。In step 105, when the number of the human faces is multiple, perform beautification processing on the human faces located in the target area through the beautifying processing function.
本步骤中,当所述人脸的数目为多个时,可以通过所述美颜处理功能确定美颜参数,所述美颜参数可以是用户设置的或所述终端预设的,进一步地,通过所述美颜参数仅对处于所述目标区域内的所述人脸进行美颜处理,即只对所述目标区域内的所述人脸对应的像素点,按照所述美颜参数进行像素点参数修改。In this step, when the number of faces is multiple, the beautification parameters can be determined through the beautification processing function, and the beautification parameters can be set by the user or preset by the terminal. Further, Use the beautification parameters to only perform beautification processing on the faces in the target area, that is, only perform pixel points corresponding to the faces in the target area according to the beautification parameters Click to modify the parameters.
在步骤106中,输出通过美颜处理后的所述实时图像。In step 106, the real-time image processed by beautification is output.
本步骤中,所述终端在对位于目标区域内的所述人脸进行美颜处理后,直接在屏幕上输出所述实时图像即可。In this step, the terminal may directly output the real-time image on the screen after performing beautification processing on the face located in the target area.
上述实施例中,所述终端可以通过所述美颜处理功能只对处于所述实时图像中位于所述目标区域内的所述人脸进行美颜,进而输出美颜处理后的所述实时图像。通过上述过程,所述终端可以以所述目标区域内的所述人脸为主体进行美颜处理,加快美颜处理的速度,提升终端智能化程度和用户体验。In the above embodiment, the terminal can only perform beautification on the face in the target area in the real-time image through the beautification processing function, and then output the real-time image after beautification processing . Through the above process, the terminal can perform beautification processing with the face in the target area as the main body, speed up the beautification processing, and improve terminal intelligence and user experience.
下面以直播应用程序(Application,App)为例,说明上述美颜处理过程。一般情况下,所述直播App在开启时在通过当前启动的图像采集装置采集实时图像,且默认所述美颜处理功能处于开启状态。一旦所述图像采集装置发生切换,例如由前置摄像头切换到后置摄像头时,所述美颜处理功能自动切换到关闭状态。基于所述图像采集装置发生切换的情况,本公开实施例提供了另一种美颜处理方法,如图5所示,上述方法还包括以下步骤:The following uses a live broadcast application (Application, App) as an example to illustrate the above beauty treatment process. Generally, when the live broadcast App is started, it collects real-time images through the currently activated image collection device, and the beauty treatment function is enabled by default. Once the image acquisition device is switched, for example, when the front camera is switched to the rear camera, the beauty treatment function is automatically switched to an off state. Based on the switching of the image acquisition device, an embodiment of the present disclosure provides another beauty treatment method, as shown in FIG. 5 , the above method further includes the following steps:
在步骤201中,采集实时图像。In step 201, real-time images are collected.
本步骤中,所述直播App自动通过切换后的图像采集装置,例如后置摄像头采集所述实时图像。In this step, the live broadcast App automatically collects the real-time images through the switched image collection device, such as a rear camera.
在步骤202中,对采集到的所述实时图像进行人脸识别。In step 202, face recognition is performed on the collected real-time images.
在步骤203中,当所述实时图像中包括人脸,且所述人脸位于目标区域内,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸。In step 203, when the real-time image includes a human face and the human face is located in the target area, it is determined that the recognition result indicates that the real-time image includes a human face that needs to be beautified.
其中,可选地,所述目标区域可以为用户指定区域。本公开实施例中,可以在所述实时图像以所述人脸为主体时,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸。假设所述人脸的数目为多个,则所述人脸中的至少一个需要位于所述目标区域内。Wherein, optionally, the target area may be a user-specified area. In the embodiment of the present disclosure, when the real-time image mainly takes the human face, it may be determined that the recognition result is that the real-time image includes a human face that needs to be beautified. Assuming that there are multiple human faces, at least one of the human faces needs to be located in the target area.
在步骤204中,控制美颜处理功能处于开启状态。In step 204, the beauty treatment function is controlled to be turned on.
本步骤中,所述终端自动控制所述美颜处理功能由所述关闭状态切换到所述开启状态。In this step, the terminal automatically controls the beauty treatment function to switch from the off state to the on state.
在步骤205中,当所述人脸的数目为多个时,通过所述美颜处理功能对位于所述目标区域的所述人脸进行美颜处理。In step 205, when the number of the human faces is multiple, perform beautification processing on the human faces located in the target area through the beautifying processing function.
本步骤中,所述终端可以通过所述美颜处理功能只对多个人脸中位于用户指定区域,即所述目标区域的所述人脸进行美颜处理。In this step, the terminal may use the beautification processing function to perform beautification processing only on the faces located in the area designated by the user, that is, the target area, among the multiple faces.
在步骤206中,输出通过美颜处理后的所述实时图像。In step 206, the real-time image processed by beautification is output.
在步骤207中,当所述实时图像中不包括人脸,或所述实时图像中包括人脸但所述人脸未位于所述目标区域内时,控制所述美颜处理功能处于关闭状态。In step 207, when the real-time image does not include a human face, or the real-time image includes a human face but the human face is not located in the target area, control the beautification processing function to be in an off state.
在步骤208中,输出所述实时图像。In step 208, the real-time image is output.
当所述美颜处理功能处于关闭状态时,所述终端可以直接在屏幕上输出所述实时图像。When the beauty treatment function is turned off, the terminal may directly output the real-time image on the screen.
上述实施例中,在所述美颜处理功能处于开启状态之后,所述终端仍按照相关技术采集所述实时图像,并对所述实时图像进行人脸识别。一旦识别到所述实时图像中不包括人脸,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸,此时控制所述美颜处理功能切换到关闭状态。或者识别到所述实时图像中包括人脸,但所述人脸未位于所述目标区域内时,同样确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸,控制所述美颜处理功能切换到关闭状态。In the above embodiment, after the beauty treatment function is turned on, the terminal still collects the real-time image according to related technologies, and performs face recognition on the real-time image. Once it is recognized that the real-time image does not include a human face, it is determined that the recognition result is that the real-time image does not include a human face that needs beautification processing, and at this time control the beautification processing function to switch to an off state. Or when it is recognized that the real-time image includes a human face, but the human face is not located in the target area, it is also determined that the recognition result is that the real-time image does not include a human face that requires beauty treatment, and the control The beauty treatment function is switched to an off state.
当然,在直播App中,如果用户未进行图像采集装置切换时,同样可以对采集到的所述实时图像进行人脸识别,如果识别到所述实时图像中不包括人脸,或所述实时图像中包括人脸但所述人脸未位于所述目标区域内时,同样控制所述美颜处理功能处于关闭状态。Of course, in the live broadcast app, if the user does not switch the image acquisition device, face recognition can also be performed on the collected real-time image. If it is recognized that the real-time image does not include a human face, or the real-time image When a human face is included in the target area but the human face is not located in the target area, the beautification processing function is also controlled to be turned off.
本公开实施例提供的美颜处理方法可以应用在直播App中,在直播过程中不再需要用户手动切换所述美颜处理功能的状态,所述终端可以自动根据识别结果来控制所述美颜处理功能的状态,简化了用户操作,且可以在避免资源浪费的情况下,输出用户满意的图像,提升了用户体验。The beauty treatment method provided by the embodiments of the present disclosure can be applied in the live broadcast App. During the live broadcast, the user no longer needs to manually switch the state of the beauty treatment function, and the terminal can automatically control the beauty treatment according to the recognition result. The status of the processing function simplifies user operations, and can output images satisfactory to users while avoiding waste of resources, thereby improving user experience.
与前述方法实施例相对应,本公开还提供了装置的实施例。Corresponding to the aforementioned method embodiments, the present disclosure also provides device embodiments.
如图6所示,图6是本公开根据一示例性实施例示出的一种美颜处理装置框图,包括:As shown in Fig. 6, Fig. 6 is a block diagram of a beauty treatment device according to an exemplary embodiment of the present disclosure, including:
图像采集模块310,被配置为采集实时图像;The image acquisition module 310 is configured to acquire real-time images;
人脸识别模块320,被配置为对采集到的所述实时图像进行人脸识别,确定识别结果;The face recognition module 320 is configured to perform face recognition on the collected real-time image, and determine the recognition result;
第一控制模块330,被配置为当所述识别结果指示所述实时图像中包括需要进行美颜处理的人脸时,控制美颜处理功能处于开启状态;The first control module 330 is configured to control the beautification processing function to be turned on when the recognition result indicates that the real-time image includes a human face requiring beautification processing;
第二控制模块340,被配置为当所述识别结果指示所述实时图像中不包括需要进行美颜处理的人脸时,控制所述美颜处理功能处于关闭状态。The second control module 340 is configured to control the beautification processing function to be turned off when the recognition result indicates that the real-time image does not include a human face requiring beautification processing.
如图7所示,图7是本公开根据一示例性实施例示出的另一种美颜处理装置框图,该实施例在前述图6所示实施例的基础上,所述人脸识别模块320包括:As shown in FIG. 7, FIG. 7 is a block diagram of another beauty treatment device according to an exemplary embodiment of the present disclosure. On the basis of the embodiment shown in FIG. 6, the face recognition module 320 include:
第一确定子模块321,被配置为当所述实时图像中包括人脸时,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸;The first determining submodule 321 is configured to determine that the recognition result is that the real-time image includes a human face that needs to be beautified when the real-time image includes a human face;
第二确定子模块322,被配置为当所述实时图像中不包括人脸时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸。The second determination sub-module 322 is configured to determine that the recognition result is that the real-time image does not include a human face that requires beauty treatment when the real-time image does not include a human face.
如图8所示,图8是本公开根据一示例性实施例示出的另一种美颜处理装置框图,该实施例在前述图6所示实施例的基础上,所述人脸识别模块320包括:As shown in FIG. 8, FIG. 8 is a block diagram of another beauty treatment device according to an exemplary embodiment of the present disclosure. This embodiment is based on the embodiment shown in FIG. 6, the face recognition module 320 include:
第三确定子模块323,被配置为当所述实时图像中包括人脸,且所述人脸的面积占所述实时图像的面积的百分比超过预设值时,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸;The third determination sub-module 323 is configured to determine that the recognition result is the Real-time images include faces that need to be beautified;
第四确定子模块324,被配置为当所述实时图像中不包括人脸,或所述实时图像中所述人脸的面积占所述实时图像的面积的百分比未超过所述预设值时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸。The fourth determination sub-module 324 is configured to when the real-time image does not include a human face, or the percentage of the area of the human face in the real-time image to the area of the real-time image does not exceed the preset value , determining that the recognition result is that the real-time image does not include a human face requiring beauty treatment.
如图9所示,图9是本公开根据一示例性实施例示出的另一种美颜处理装置框图,该实施例在前述图6所示实施例的基础上,所述人脸识别模块320包括:As shown in FIG. 9, FIG. 9 is a block diagram of another beauty treatment device according to an exemplary embodiment of the present disclosure. On the basis of the embodiment shown in FIG. 6, the face recognition module 320 include:
第五确定子模块325,被配置为当所述实时图像中包括人脸,且所述人脸位于目标区域内,确定所述识别结果为所述实时图像中包括需要进行美颜处理的人脸;The fifth determination sub-module 325 is configured to determine that the recognition result is that the real-time image includes a human face that needs to be beautified when the real-time image includes a human face and the human face is located in the target area. ;
第六确定子模块326,被配置为当所述实时图像中不包括人脸,或所述实时图像中所述人脸未位于所述目标区域内时,确定所述识别结果为所述实时图像中不包括需要进行美颜处理的人脸;The sixth determination sub-module 326 is configured to determine that the recognition result is the real-time image when the real-time image does not include a human face, or the human face in the real-time image is not located in the target area Does not include faces that need to be beautified;
其中,所述目标区域包括聚焦区域和/或用户指定区域。Wherein, the target area includes a focus area and/or a user designated area.
如图10所示,图10是本公开根据一示例性实施例示出的另一种美颜处理装置框图,该实施例在前述图9所示实施例的基础上,所述装置还包括:As shown in Fig. 10, Fig. 10 is a block diagram of another beauty treatment device according to an exemplary embodiment of the present disclosure. On the basis of the embodiment shown in Fig. 9, the device further includes:
处理模块350,被配置为当所述实时图像中包括人脸的数目为多个时,通过所述美颜处理功能对位于所述目标区域的所述人脸进行美颜处理;The processing module 350 is configured to perform beautification processing on the face located in the target area through the beautification processing function when the number of human faces included in the real-time image is multiple;
图像输出模块360,被配置为输出美颜处理后的所述实时图像。The image output module 360 is configured to output the real-time image after beauty treatment.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本公开方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。As for the device embodiment, since it basically corresponds to the method embodiment, for related parts, please refer to the part description of the method embodiment. The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. It can be understood and implemented by those skilled in the art without creative effort.
相应的,本公开还提供一种美颜处理装置,包括:Correspondingly, the present disclosure also provides a beauty treatment device, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为:Wherein, the processor is configured as:
采集实时图像;Collect real-time images;
对采集到的所述实时图像进行人脸识别,确定识别结果;Perform face recognition on the collected real-time images, and determine the recognition result;
当所述识别结果指示所述实时图像中包括需要进行美颜处理的人脸时,控制美颜处理功能处于开启状态;When the recognition result indicates that the real-time image includes a human face requiring beauty treatment, control the beauty treatment function to be turned on;
当所述识别结果指示所述实时图像中不包括需要进行美颜处理的人脸时,控制所述美颜处理功能处于关闭状态。When the recognition result indicates that the real-time image does not include a human face requiring beauty treatment, control the beauty treatment function to be in an off state.
图11是根据一示例性实施例示出的一种美颜处理装置的结构示意图。如图11所示,根据一示例性实施例示出的一种美颜处理装置1100,该装置1100可以是计算机,移动电话,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。Fig. 11 is a schematic structural diagram of a beauty treatment device according to an exemplary embodiment. As shown in FIG. 11 , according to an exemplary embodiment, a beauty treatment device 1100 is shown. The device 1100 can be a computer, a mobile phone, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, Fitness equipment, personal digital assistants and other terminals.
参照图11,装置1100可以包括以下一个或多个组件:处理组件1101,存储器1102,电源组件1103,多媒体组件1104,音频组件1105,输入/输出(I/O)的接口1106,传感器组件1107,以及通信组件1108。11, device 1100 may include one or more of the following components: processing component 1101, memory 1102, power supply component 1103, multimedia component 1104, audio component 1105, input/output (I/O) interface 1106, sensor component 1107, and a communication component 1108 .
处理组件1101通常控制装置1100的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1101可以包括一个或多个处理器1109来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1101可以包括一个或多个模块,便于处理组件1101和其它组件之间的交互。例如,处理组件1101可以包括多媒体模块,以方便多媒体组件1104和处理组件1101之间的交互。The processing component 1101 generally controls the overall operations of the device 1100, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 1101 may include one or more processors 1109 to execute instructions, so as to complete all or part of the steps of the above method. Additionally, the processing component 1101 may include one or more modules to facilitate interaction between the processing component 1101 and other components. For example, the processing component 1101 may include a multimedia module to facilitate interaction between the multimedia component 1104 and the processing component 1101 .
存储器1102被配置为存储各种类型的数据以支持在装置1100的操作。这些数据的示例包括用于在装置1100上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1102可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 1102 is configured to store various types of data to support operations at the device 1100 . Examples of such data include instructions for any application or method operating on device 1100, contact data, phonebook data, messages, pictures, videos, and the like. The memory 1102 can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件1103为装置1100的各种组件提供电力。电源组件1103可以包括电源管理系统,一个或多个电源,及其它与为装置1100生成、管理和分配电力相关联的组件。The power supply component 1103 provides power to various components of the device 1100 . Power components 1103 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for device 1100 .
多媒体组件1104包括在所述装置1100和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1104包括一个前置摄像头和/或后置摄像头。当装置1100处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 1104 includes a screen that provides an output interface between the device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 1104 includes a front camera and/or a rear camera. When the device 1100 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件1105被配置为输出和/或输入音频信号。例如,音频组件1105包括一个麦克风(MIC),当装置1100处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1102或经由通信组件1108发送。在一些实施例中,音频组件1105还包括一个扬声器,用于输出音频信号。The audio component 1105 is configured to output and/or input audio signals. For example, the audio component 1105 includes a microphone (MIC) configured to receive external audio signals when the device 1100 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 1102 or sent via communication component 1108 . In some embodiments, the audio component 1105 also includes a speaker for outputting audio signals.
I/O接口1106为处理组件1101和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 1106 provides an interface between the processing component 1101 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
传感器组件1107包括一个或多个传感器,用于为装置1100提供各个方面的状态评估。例如,传感器组件1107可以检测到装置1100的打开/关闭状态,组件的相对定位,例如所述组件为装置1100的显示器和小键盘,传感器组件1107还可以检测装置1100或装置1100一个组件的位置改变,用户与装置1100接触的存在或不存在,装置1100方位或加速/减速和装置1100的温度变化。传感器组件1107可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1107还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1107还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 1107 includes one or more sensors for providing various aspects of status assessment for device 1100 . For example, the sensor component 1107 can detect the open/closed state of the device 1100, the relative positioning of components, such as the display and keypad of the device 1100, and the sensor component 1107 can also detect a change in the position of the device 1100 or a component of the device 1100 , the presence or absence of user contact with the device 1100 , the device 1100 orientation or acceleration/deceleration and the temperature change of the device 1100 . The sensor assembly 1107 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 1107 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 1107 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
通信组件1108被配置为便于装置1100和其它设备之间有线或无线方式的通信。装置1100可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件1108经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1108还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其它技术来实现。The communication component 1108 is configured to facilitate wired or wireless communication between the apparatus 1100 and other devices. The device 1100 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1108 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1108 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置1100可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其它电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 1100 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable Gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic component implementations for performing the methods described above.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1102,上述指令可由装置1100的处理器1109执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 1102 including instructions, which can be executed by the processor 1109 of the device 1100 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
其中,当所述存储介质中的指令由所述处理器执行时,使得装置1100能够执行一种美颜处理方法,包括:Wherein, when the instructions in the storage medium are executed by the processor, the device 1100 is able to execute a beauty treatment method, including:
采集实时图像;Collect real-time images;
对采集到的所述实时图像进行人脸识别,确定识别结果;Perform face recognition on the collected real-time images, and determine the recognition result;
当所述识别结果指示所述实时图像中包括需要进行美颜处理的人脸时,控制美颜处理功能处于开启状态;When the recognition result indicates that the real-time image includes a human face requiring beauty treatment, control the beauty treatment function to be turned on;
当所述识别结果指示所述实时图像中不包括需要进行美颜处理的人脸时,控制所述美颜处理功能处于关闭状态。When the recognition result indicates that the real-time image does not include a human face requiring beauty treatment, control the beauty treatment function to be in an off state.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或者惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any modification, use or adaptation of the present disclosure. These modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
以上所述仅为本公开的较佳实施例而已,并不用以限制本公开,凡在本公开的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本公开保护的范围之内。The above descriptions are only preferred embodiments of the present disclosure, and are not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the present disclosure within the scope of protection.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610683353.5ACN106326849A (en) | 2016-08-17 | 2016-08-17 | Beauty processing method and device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610683353.5ACN106326849A (en) | 2016-08-17 | 2016-08-17 | Beauty processing method and device |
| Publication Number | Publication Date |
|---|---|
| CN106326849Atrue CN106326849A (en) | 2017-01-11 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610683353.5APendingCN106326849A (en) | 2016-08-17 | 2016-08-17 | Beauty processing method and device |
| Country | Link |
|---|---|
| CN (1) | CN106326849A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106851100A (en)* | 2017-01-20 | 2017-06-13 | 珠海市魅族科技有限公司 | A kind of photo processing method and system |
| CN107222675A (en)* | 2017-05-23 | 2017-09-29 | 维沃移动通信有限公司 | The photographic method and mobile terminal of a kind of mobile terminal |
| CN107820017A (en)* | 2017-11-30 | 2018-03-20 | 广东欧珀移动通信有限公司 | Image capturing method, device, computer-readable recording medium and electronic equipment |
| CN107993209A (en)* | 2017-11-30 | 2018-05-04 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and electronic equipment |
| CN108289172A (en)* | 2018-01-20 | 2018-07-17 | 深圳天珑无线科技有限公司 | Adjust the method, device and mobile terminal of shooting correlation function |
| CN109561215A (en)* | 2018-12-13 | 2019-04-02 | 北京达佳互联信息技术有限公司 | Method, apparatus, terminal and the storage medium that U.S. face function is controlled |
| CN110138957A (en)* | 2019-03-28 | 2019-08-16 | 西安易朴通讯技术有限公司 | Photo and video recording processing method, processing system, and electronic device |
| CN111402154A (en)* | 2020-03-10 | 2020-07-10 | 北京字节跳动网络技术有限公司 | Image beautifying method, device, electronic device, and computer-readable storage medium |
| CN113473013A (en)* | 2021-06-30 | 2021-10-01 | 展讯通信(天津)有限公司 | Display method and device for beautifying effect of image and terminal equipment |
| CN115484386A (en)* | 2021-06-16 | 2022-12-16 | 荣耀终端有限公司 | Video shooting method and electronic device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103413270A (en)* | 2013-08-15 | 2013-11-27 | 北京小米科技有限责任公司 | Method and device for image processing and terminal device |
| CN103841323A (en)* | 2014-02-20 | 2014-06-04 | 小米科技有限责任公司 | Shooting parameter allocation method and device and terminal device |
| CN104318262A (en)* | 2014-09-12 | 2015-01-28 | 上海明穆电子科技有限公司 | Method and system for replacing skin through human face photos |
| CN104732210A (en)* | 2015-03-17 | 2015-06-24 | 深圳超多维光电子有限公司 | Target human face tracking method and electronic equipment |
| CN104902177A (en)* | 2015-05-26 | 2015-09-09 | 广东欧珀移动通信有限公司 | Intelligent photographing method and terminal |
| CN105303523A (en)* | 2014-12-01 | 2016-02-03 | 维沃移动通信有限公司 | Image processing method and mobile terminal |
| CN105721770A (en)* | 2016-01-20 | 2016-06-29 | 广东欧珀移动通信有限公司 | A camera control method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103413270A (en)* | 2013-08-15 | 2013-11-27 | 北京小米科技有限责任公司 | Method and device for image processing and terminal device |
| CN103841323A (en)* | 2014-02-20 | 2014-06-04 | 小米科技有限责任公司 | Shooting parameter allocation method and device and terminal device |
| CN104318262A (en)* | 2014-09-12 | 2015-01-28 | 上海明穆电子科技有限公司 | Method and system for replacing skin through human face photos |
| CN105303523A (en)* | 2014-12-01 | 2016-02-03 | 维沃移动通信有限公司 | Image processing method and mobile terminal |
| CN104732210A (en)* | 2015-03-17 | 2015-06-24 | 深圳超多维光电子有限公司 | Target human face tracking method and electronic equipment |
| CN104902177A (en)* | 2015-05-26 | 2015-09-09 | 广东欧珀移动通信有限公司 | Intelligent photographing method and terminal |
| CN105721770A (en)* | 2016-01-20 | 2016-06-29 | 广东欧珀移动通信有限公司 | A camera control method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106851100B (en)* | 2017-01-20 | 2020-04-24 | 珠海市魅族科技有限公司 | Photo processing method and system |
| CN106851100A (en)* | 2017-01-20 | 2017-06-13 | 珠海市魅族科技有限公司 | A kind of photo processing method and system |
| CN107222675A (en)* | 2017-05-23 | 2017-09-29 | 维沃移动通信有限公司 | The photographic method and mobile terminal of a kind of mobile terminal |
| CN107820017A (en)* | 2017-11-30 | 2018-03-20 | 广东欧珀移动通信有限公司 | Image capturing method, device, computer-readable recording medium and electronic equipment |
| CN107993209A (en)* | 2017-11-30 | 2018-05-04 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and electronic equipment |
| CN107820017B (en)* | 2017-11-30 | 2020-03-27 | Oppo广东移动通信有限公司 | Image shooting method and device, computer readable storage medium and electronic equipment |
| CN108289172A (en)* | 2018-01-20 | 2018-07-17 | 深圳天珑无线科技有限公司 | Adjust the method, device and mobile terminal of shooting correlation function |
| CN109561215A (en)* | 2018-12-13 | 2019-04-02 | 北京达佳互联信息技术有限公司 | Method, apparatus, terminal and the storage medium that U.S. face function is controlled |
| CN110138957A (en)* | 2019-03-28 | 2019-08-16 | 西安易朴通讯技术有限公司 | Photo and video recording processing method, processing system, and electronic device |
| CN111402154A (en)* | 2020-03-10 | 2020-07-10 | 北京字节跳动网络技术有限公司 | Image beautifying method, device, electronic device, and computer-readable storage medium |
| CN115484386A (en)* | 2021-06-16 | 2022-12-16 | 荣耀终端有限公司 | Video shooting method and electronic device |
| CN115484386B (en)* | 2021-06-16 | 2023-10-31 | 荣耀终端有限公司 | Video shooting method and electronic equipment |
| CN113473013A (en)* | 2021-06-30 | 2021-10-01 | 展讯通信(天津)有限公司 | Display method and device for beautifying effect of image and terminal equipment |
| Publication | Publication Date | Title |
|---|---|---|
| CN106326849A (en) | Beauty processing method and device | |
| US20180091580A1 (en) | Method and apparatus for controlling device | |
| EP3136793A1 (en) | Method and apparatus for awakening electronic device | |
| CN108509232A (en) | Screen recording method, device and computer readable storage medium | |
| CN111984347B (en) | Interactive processing method, device, equipment and storage medium | |
| CN106028143A (en) | Video live broadcasting method and device | |
| CN106572299A (en) | Camera switching-on method and device | |
| CN106951884A (en) | Method, device and electronic equipment for collecting fingerprints | |
| CN106548764A (en) | Screen brightness control method and device | |
| CN106527682B (en) | Method and device for switching environment pictures | |
| CN110580688A (en) | Image processing method and device, electronic equipment and storage medium | |
| CN105653041A (en) | Display state adjusting method and device | |
| CN106502859A (en) | The method and device of control terminal equipment | |
| CN106227419A (en) | Screenshotss method and device | |
| CN104216525B (en) | Method and device for mode control of camera application | |
| WO2022077970A1 (en) | Method and apparatus for adding special effects | |
| CN107529699A (en) | Control method of electronic device and device | |
| CN106357934A (en) | Screen-locking control method and device | |
| CN107015648A (en) | Image processing method and device | |
| CN106095073A (en) | The sending method of control instruction and device | |
| CN106791394A (en) | Image processing method and device | |
| CN106292994A (en) | The control method of virtual reality device, device and virtual reality device | |
| CN106201250A (en) | Account changing method and device | |
| CN107085823A (en) | Face image processing method and device | |
| CN106604101A (en) | Live streaming interaction method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20170111 | |
| RJ01 | Rejection of invention patent application after publication |