CN107909542A - Image processing method, device, computer-readable recording medium and electronic equipment - Google Patents

Image processing method, device, computer-readable recording medium and electronic equipment Download PDF

Info

Publication number
CN107909542A
CN107909542A CN201711244125.9A CN201711244125A CN107909542A CN 107909542 A CN107909542 A CN 107909542A CN 201711244125 A CN201711244125 A CN 201711244125A CN 107909542 A CN107909542 A CN 107909542A
Authority
CN
China
Prior art keywords
face
parameter
image
beautification
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711244125.9A
Other languages
Chinese (zh)
Inventor
杜成鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711244125.9A priority Critical patent/CN107909542A/en
Publication of CN107909542A publication Critical patent/CN107909542A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

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

Abstract

本申请涉及一种图像处理方法、装置、计算机可读存储介质和电子设备。所述方法包括:获取待处理图像及对应的清晰度;根据所述清晰度获取对应的美颜参数模型,所述美颜参数模型是指用于计算美颜参数的模型;根据所述清晰度和美颜参数模型获取对应的目标美颜参数;根据所述目标美颜参数对所述待处理图像进行美颜处理。上述图像处理方法、装置、计算机可读存储介质和电子设备,提高了图像处理的准确率。

The present application relates to an image processing method, device, computer-readable storage medium and electronic equipment. The method includes: obtaining the image to be processed and the corresponding definition; obtaining the corresponding beauty parameter model according to the definition, the beauty parameter model refers to a model used to calculate the beauty parameter; according to the definition Acquiring corresponding target beautification parameters from the beautification parameter model; performing beautification processing on the image to be processed according to the target beautification parameters. The above image processing method, device, computer-readable storage medium and electronic equipment improve the accuracy of image processing.

Description

图像处理方法、装置、计算机可读存储介质和电子设备Image processing method, device, computer-readable storage medium, and electronic device

技术领域technical field

本申请涉及图像处理技术领域,特别是涉及图像处理方法、装置、计算机可读存储介质和电子设备。The present application relates to the technical field of image processing, in particular to an image processing method, device, computer-readable storage medium and electronic equipment.

背景技术Background technique

无论是在工作还是生活中,拍照都是一项必不可少的技能。为了拍出一张让人满意的照片,不仅需要在拍摄过程中对拍摄参数进行改善,还需要在拍摄完成之后对照片本身进行改善。美颜处理就是指对照片进行美化的一种方法,经过美颜处理之后,会让照片中的人物看起来更加符合人类的审美。Whether at work or in life, taking pictures is an essential skill. In order to take a satisfactory photo, it is not only necessary to improve the shooting parameters during the shooting process, but also to improve the photo itself after the shooting is completed. Beauty treatment refers to a method of beautifying photos. After beauty treatment, the characters in the photos will look more in line with human aesthetics.

发明内容Contents of the invention

本申请实施例提供一种图像处理方法、装置、计算机可读存储介质和电子设备,可以提高图像处理的准确率。Embodiments of the present application provide an image processing method, device, computer-readable storage medium, and electronic device, which can improve the accuracy of image processing.

一种图像处理方法,所述方法包括:An image processing method, the method comprising:

获取待处理图像及对应的清晰度;Obtain the image to be processed and the corresponding sharpness;

根据所述清晰度获取对应的美颜参数模型,所述美颜参数模型是指用于计算美颜参数的模型;Obtaining a corresponding beautification parameter model according to the definition, the beautification parameter model refers to a model used to calculate the beautification parameter;

根据所述清晰度和美颜参数模型获取对应的目标美颜参数;Acquiring corresponding target beauty parameters according to the definition and beauty parameter model;

根据所述目标美颜参数对所述待处理图像进行美颜处理。Perform beautification processing on the image to be processed according to the target beautification parameters.

一种图像处理装置,所述装置包括:An image processing device, the device comprising:

图像获取模块,用于获取待处理图像及对应的清晰度。The image acquisition module is used to acquire the image to be processed and the corresponding definition.

模型获取模块,用于根据所述清晰度获取对应的美颜参数模型,所述美颜参数模型是指用于计算美颜参数的模型。A model acquisition module, configured to acquire a corresponding beautification parameter model according to the clarity, and the beautification parameter model refers to a model used to calculate the beautification parameter.

参数获取模块,用于根据所述清晰度和美颜参数模型获取对应的目标美颜参数。A parameter acquisition module, configured to acquire corresponding target beauty parameters according to the definition and beauty parameter models.

美颜处理模块,用于根据所述目标美颜参数对所述待处理图像进行美颜处理。A beautification processing module, configured to perform beautification processing on the image to be processed according to the target beautification parameters.

一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

获取待处理图像及对应的清晰度;Obtain the image to be processed and the corresponding sharpness;

根据所述清晰度获取对应的美颜参数模型,所述美颜参数模型是指用于计算美颜参数的模型;Obtaining a corresponding beautification parameter model according to the definition, the beautification parameter model refers to a model used to calculate the beautification parameter;

根据所述清晰度和美颜参数模型获取对应的目标美颜参数;Acquiring corresponding target beauty parameters according to the definition and beauty parameter model;

根据所述目标美颜参数对所述待处理图像进行美颜处理。Perform beautification processing on the image to be processed according to the target beautification parameters.

一种电子设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如下步骤:An electronic device, comprising a memory and a processor, wherein computer-readable instructions are stored in the memory, and when the instructions are executed by the processor, the processor is made to perform the following steps:

获取待处理图像及对应的清晰度;Obtain the image to be processed and the corresponding sharpness;

根据所述清晰度获取对应的美颜参数模型,所述美颜参数模型是指用于计算美颜参数的模型;Obtaining a corresponding beautification parameter model according to the definition, the beautification parameter model refers to a model used to calculate the beautification parameter;

根据所述清晰度和美颜参数模型获取对应的目标美颜参数;Acquiring corresponding target beauty parameters according to the definition and beauty parameter model;

根据所述目标美颜参数对所述待处理图像进行美颜处理。Perform beautification processing on the image to be processed according to the target beautification parameters.

上述图像处理方法、装置、计算机可读存储介质和电子设备,根据待处理图像的清晰度获取对应的美颜参数模型,根据清晰度和美颜参数模型获取对应的目标美颜参数,并根据获取的目标美颜参数对待处理图像进行美颜处理。这样可以根据不同清晰度的图像进行不同的美颜处理,提高了图像处理的准确率,优化了美颜处理。The above image processing method, device, computer-readable storage medium, and electronic device obtain the corresponding beauty parameter model according to the definition of the image to be processed, obtain the corresponding target beauty parameter according to the definition and the beauty parameter model, and obtain the corresponding target beauty parameter according to the acquired The target beautification parameter performs beautification processing on the image to be processed. In this way, different beautification processes can be performed according to images of different resolutions, which improves the accuracy of image processing and optimizes the beautification process.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为一个实施例中图像处理方法的应用环境图;Fig. 1 is an application environment diagram of an image processing method in an embodiment;

图2为一个实施例中图像处理方法的流程图;Fig. 2 is a flowchart of an image processing method in an embodiment;

图3为另一个实施例中图像处理方法的流程图;Fig. 3 is the flowchart of image processing method in another embodiment;

图4为一个实施例中生成的颜色直方图;Fig. 4 is a color histogram generated in an embodiment;

图5为一个实施例中美颜系数的变化曲线图;Fig. 5 is a change curve diagram of the beauty coefficient in an embodiment;

图6为又一个实施例中图像处理方法的流程图;Fig. 6 is the flow chart of image processing method in another embodiment;

图7为另一个实施例中美颜系数的变化曲线图;Fig. 7 is a change curve diagram of the beautification coefficient in another embodiment;

图8为一个实施例中图像处理装置的结构示意图;Fig. 8 is a schematic structural diagram of an image processing device in an embodiment;

图9为一个实施例中图像处理电路的示意图。FIG. 9 is a schematic diagram of an image processing circuit in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.

可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一获取模块称为第二获取模块,且类似地,可将第二获取模块称为第一获取模块。第一获取模块和第二获取模块两者都是获取模块,但其不是同一获取模块。It can be understood that the terms "first", "second" and the like used in this application may be used to describe various elements herein, but these elements are not limited by these terms. These terms are only used to distinguish one element from another element. For example, a first acquisition module could be termed a second acquisition module, and, similarly, a second acquisition module could be termed a first acquisition module, without departing from the scope of the present application. Both the first acquisition module and the second acquisition module are acquisition modules, but they are not the same acquisition module.

图1为一个实施例中图像处理方法的应用环境图。如图1所示,该应用环境中包括用户终端102和服务器104。用户终端102中可以用于采集待处理图像,将待处理图像发送到服务器104中。服务器104接收到待处理图像之后,获取待处理图像及对应的清晰度;根据清晰度获取对应的美颜参数模型,美颜参数模型是指用于计算美颜参数的模型;根据清晰度和美颜参数模型获取对应的目标美颜参数;根据目标美颜参数对待处理图像进行美颜处理。最后服务器104将美颜处理后的待处理图像返回给用户终端102。可以理解的是,服务器也可以将获取的目标美颜参数发送给用户终端102,用户终端102根据目标美颜参数对待处理图像进行美颜处理。其中,用户终端102是处于计算机网络最外围,主要用于输入用户信息以及输出处理结果的电子设备,例如可以是个人电脑、移动终端、个人数字助理、可穿戴电子设备等。服务器104是用于响应服务请求,同时提供计算��务的设备,例如可以是一台或者多台计算机。可以理解的是,在本申请提供的其他实施例中,该图像处理方法的应用环境中可以只包括用户终端102,即用户终端102用于采集待处理图像,并将待处理图像进行美颜处理。Fig. 1 is an application environment diagram of an image processing method in an embodiment. As shown in FIG. 1 , the application environment includes a user terminal 102 and a server 104 . The user terminal 102 can be used to collect images to be processed, and send the images to be processed to the server 104 . After receiving the image to be processed, the server 104 acquires the image to be processed and the corresponding definition; obtains the corresponding beauty parameter model according to the definition, and the beauty parameter model refers to a model used to calculate the beauty parameter; The parameter model obtains the corresponding target beautification parameters; performs beautification processing on the image to be processed according to the target beautification parameters. Finally, the server 104 returns the image to be processed after the beautification process to the user terminal 102 . It can be understood that the server may also send the acquired target beautification parameters to the user terminal 102, and the user terminal 102 performs beautification processing on the image to be processed according to the target beautification parameters. Among them, the user terminal 102 is an electronic device located at the outermost edge of the computer network, mainly used for inputting user information and outputting processing results, such as a personal computer, a mobile terminal, a personal digital assistant, a wearable electronic device, and the like. The server 104 is a device for responding to service requests and providing computing services, such as one or more computers. It can be understood that, in other embodiments provided in this application, the application environment of the image processing method may only include the user terminal 102, that is, the user terminal 102 is used to collect the image to be processed, and to perform beauty treatment on the image to be processed .

图2为一个实施例中图像处理方法的流程图。如图2所示,该图像处理方法包括步骤202至步骤208。其中:Fig. 2 is a flowchart of an image processing method in an embodiment. As shown in FIG. 2 , the image processing method includes steps 202 to 208 . in:

步骤202,获取待处理图像及对应的清晰度。Step 202, acquire the image to be processed and the corresponding sharpness.

在一个实施例中,待处理图像是指需要进行美颜处理的图像。待处理图像可以是由移动终端进行采集的。移动终端上安装有可以用于拍摄的摄像头,用户可以通过移动终端发起拍照指令,移动终端在检测到拍照指令之后,通过摄像头采集拍摄图像。移动终端会将采集的图像进行存储,形成一个图像集合。可以理解的是,待处理图像还可以是通过其他途径获取的,在此不做限定。例如,待处理图像还可以是从网页中下载的,或者是从外接存储设备中导入的等等。获取待处理图像具体可以包括:接收用户输入的美颜指令,并根据美颜指令获取待处理图像,其中美颜指令中包含图像标识。图像标识是指区分不同待处理图像的唯一标识,根据图像标识获取待处理图像。例如,图像标识可以是图像名称、图像编码、图像存储地址等中的一种或多种。具体地,移动终端在获取到待处理图像之后,可以在移动终端本地进行美颜处理,也可以将待处理图像发送至服务器进行美颜处理。清晰度是指图像中纹理和边界的清晰程度,清晰度越高,越能看清图像中的细节纹理信息。In one embodiment, the image to be processed refers to an image that requires beauty treatment. The image to be processed may be collected by the mobile terminal. A camera that can be used for shooting is installed on the mobile terminal, and the user can initiate a photographing instruction through the mobile terminal. After detecting the photographing instruction, the mobile terminal collects and shoots an image through the camera. The mobile terminal will store the collected images to form an image collection. It can be understood that the image to be processed may also be acquired through other means, which is not limited here. For example, the image to be processed may also be downloaded from a webpage, or imported from an external storage device, and so on. Acquiring the image to be processed may specifically include: receiving a beautification instruction input by the user, and obtaining the image to be processed according to the beautification instruction, wherein the beautification instruction includes an image identifier. The image identification refers to a unique identification for distinguishing different images to be processed, and the image to be processed is obtained according to the image identification. For example, the image identifier may be one or more of image name, image code, image storage address, and the like. Specifically, after the mobile terminal acquires the image to be processed, it may perform beautification processing locally on the mobile terminal, or may send the image to be processed to the server for beautification processing. Clarity refers to the clarity of the texture and boundary in the image. The higher the clarity, the more clearly the detailed texture information in the image can be seen.

步骤204,根据清晰度获取对应的美颜参数模型,美颜参数模型是指用于计算美颜参数的模型。In step 204, a corresponding beauty parameter model is obtained according to the definition, and the beauty parameter model refers to a model used to calculate the beauty parameter.

具体地,美颜参数模型是指用于计算美颜参数的模型,一般来说美颜参数模型可以表示为一个函数模型,该函数模型可以表示输入变量和输出结果的函数关系。可以理解的是,这种函数关系可以是线性的,也可以是非线性的。将输入变量输入到该函数模型中,可以获取对应输出的输出结果。例如,该函数模型可以表示为Y=X+1,其中,Y为输出结果,X为输入的变量。那么当输入变量X为1时,对应得到的输出结果Y就为2。预先建立清晰度与美颜参数模型的对应关系,根据清晰度可以获取对应的美颜参数模型。当清晰度不同时,获取的美颜参数模型可以不同,从而实现根据不同的清晰度,采用不同的美颜参数模型来计算目标美颜参数。Specifically, the beautification parameter model refers to a model used to calculate the beautification parameters. Generally speaking, the beautification parameter model can be expressed as a function model, and the function model can represent the functional relationship between input variables and output results. It can be understood that this functional relationship can be linear or non-linear. Input the input variable into the function model, and the output result corresponding to the output can be obtained. For example, the function model can be expressed as Y=X+1, where Y is the output result and X is the input variable. Then when the input variable X is 1, the corresponding output result Y is 2. The corresponding relationship between the sharpness and the beauty parameter model is established in advance, and the corresponding beauty parameter model can be obtained according to the sharpness. When the definition is different, the acquired beauty parameter models may be different, so that different beauty parameter models are used to calculate target beauty parameters according to different resolutions.

步骤206,根据清晰度和美颜参数模型获取对应的目标美颜参数。Step 206, obtain corresponding target beauty parameters according to the definition and beauty parameter models.

一般来说,清晰度可以表示图像中细节信息的清晰程度,如果图像的清晰度太低,那么说明图像中就丢失了很多细节信息。而在对图像进行美颜处理的时候,往往会对图像的细节信息造成一定的影响。比如,在对图像进行磨皮处理的时候,会使图像中的皮肤的纹理变得比较光滑,同时也导致头发丝的纹理变得不清晰,或者五官变得模糊等情况。如果图像本身的清晰度不高,则在对图像进行美颜处理的时候,就更容易导致图像丢失的细节信息更多,图像失真更加严重,使图像失去美感。因此,为了能够更加精确地对图像进行美颜处理,可以预先建立图像清晰度和目标美颜参数的对应关系,根据清晰度获取对应的目标美颜参数。Generally speaking, sharpness can indicate the clarity of detail information in the image. If the sharpness of the image is too low, it means that a lot of detail information is lost in the image. However, when the image is beautified, the detailed information of the image is often affected to a certain extent. For example, when dermabrasion processing is performed on an image, the texture of the skin in the image will become smoother, and at the same time, the texture of the hair strands will become unclear, or the facial features will become blurred. If the definition of the image itself is not high, when the image is beautified, it is more likely to cause the image to lose more detail information, the image distortion is more serious, and the image loses its beauty. Therefore, in order to beautify the image more accurately, the corresponding relationship between the image definition and the target beauty parameter can be established in advance, and the corresponding target beauty parameter can be obtained according to the definition.

在本申请提供的实施例中,目标美颜参数是指对待处理图像进行美颜处理的参数。美颜处理就是指对图像进行美化的一种方法。例如,美颜处理可以是对图像中的人像进行美白、磨皮处理,也可以是指对人像进行美妆、瘦脸、瘦身等处理。美颜参数模型可表示清晰度和美颜参数之间的函数关系。获取到清晰度和美颜参数模型之后,将清晰度作为美颜参数模型的输入变量,通过美颜参数模型进行计算,得到的输出结果即为目标美颜参数。In the embodiments provided in this application, the target beautification parameters refer to parameters for performing beautification processing on the image to be processed. Beautification refers to a method of beautifying images. For example, the beautification process may be whitening or skin smoothing on the portrait in the image, or it may refer to performing cosmetic, face-lifting, and body-slimming treatments on the portrait. A beauty parameter model can represent the functional relationship between sharpness and beauty parameters. After obtaining the sharpness and beauty parameter model, the sharpness is used as the input variable of the beauty parameter model, and the calculation is performed through the beauty parameter model, and the output result obtained is the target beauty parameter.

步骤208,根据目标美颜参数对待处理图像进行美颜处理。Step 208, perform beautification processing on the image to be processed according to the target beautification parameters.

获取到目标美颜参数之后,根据目标美颜参数对待处理图像进行美颜处理。可以理解的是,可以是针对整张图像进行美颜处理,也可以只对图像中的某一个区域进行美颜处理。例如,美白处理可以针对整张图像进行处理,提高整张图像的亮度,也可以只是针对皮肤区域进行处理,瘦脸处理可以只是针对人脸区域进行���处理。可以理解的是,待处理图像是由若干个像素点构成的,每个像素点可以由多个颜色通道构成,每个颜色通道表示一个颜色分量。例如,图像可以由RGB(Red Green Blue,红,绿,蓝)三通道构成,也可以是由HSV(Hue Saturation Value,色调,饱和度,明度)三通道构成,还可以是由CMY(CyanMagenta Yellow,洋红,青,黄)三通道构成。则在对待处理图像进行美颜处理的时候,可以分别对待处理图像的各个颜色通道进行美颜处理,每个颜色通道的处理程度可以不相同。具体地,获取待处理图像的各个颜色通道对应的清晰度;根据各个颜色通道的清晰度获取对应的美颜参数模型;根据清晰度和美颜参数模型分别获取各个颜色通道的对应的目标美颜参数;根据目标美颜参数对待处理图像的各个颜色通道进行美颜处理。After the target beautification parameters are acquired, the image to be processed is beautified according to the target beautification parameters. It can be understood that the beautification process can be performed on the entire image, or only on a certain area in the image. For example, the whitening process can be performed on the entire image to increase the brightness of the entire image, or it can be performed only on the skin area, and the face thinning process can only be performed on the face area. It can be understood that the image to be processed is composed of several pixels, each pixel may be composed of multiple color channels, and each color channel represents a color component. For example, an image can be composed of three channels of RGB (Red Green Blue, red, green, blue), or it can be composed of three channels of HSV (Hue Saturation Value, hue, saturation, lightness), or it can be composed of CMY (CyanMagenta Yellow , magenta, cyan, yellow) composed of three channels. Then, when performing beautification processing on the image to be processed, beautification processing may be performed on each color channel of the image to be processed, and the processing degree of each color channel may be different. Specifically, obtain the definition corresponding to each color channel of the image to be processed; obtain the corresponding beauty parameter model according to the definition of each color channel; obtain the corresponding target beauty parameters of each color channel according to the definition and the beauty parameter model ; Perform beauty treatment on each color channel of the image to be processed according to the target beauty parameters.

上述实施例提供的图像处理方法,根据待处理图像的清晰度获取对应的美颜参数模型,根据清晰度和美颜参数模型获取对应的目标美颜参数,并根据获取的目标美颜参数对待处理图像进行美颜处理。这样可以根据不同清晰度的图像进行不同的美颜处理,提高了图像处理的准确率,优化了美颜处理。In the image processing method provided in the above embodiments, the corresponding beauty parameter model is obtained according to the definition of the image to be processed, the corresponding target beauty parameter is obtained according to the definition and the beauty parameter model, and the image to be processed is obtained according to the acquired target beauty parameter model. Perform beauty treatment. In this way, different beautification processes can be performed according to images of different resolutions, which improves the accuracy of image processing and optimizes the beautification process.

图3为另一个实施例中图像处理方法的流程图。如图3所示,该图像处理方法包括步骤302至步骤310。其中:Fig. 3 is a flowchart of an image processing method in another embodiment. As shown in FIG. 3 , the image processing method includes step 302 to step 310 . in:

步骤302,获取待处理图像中的目标区域,并计算目标区域对应的清晰度。Step 302, acquire the target area in the image to be processed, and calculate the sharpness corresponding to the target area.

若在服务器上进行美颜处理,则各个移动终端可以将待处理图像发送到服务器,服务器在接收到该待处理图像之后,对待处理图像中的待处理图像进行美颜处理。移动终端发送待处理图像时,同时发送对应的终端标识,服务器处理完成之后,根据终端标识查找对应的移动终端,把处理完成之后的待处理图像发送到移动终端。其中,终端标识是指用户终端的唯一标识。例如,终端标识可以是IP(Internet Protocol,网络之间互连的协议)地址、MAC(Media Access Control,媒体访问控制)地址等中的至少一种。If the beautification process is performed on the server, each mobile terminal may send the image to be processed to the server, and after receiving the image to be processed, the server performs beautification processing on the image to be processed among the images to be processed. When the mobile terminal sends the image to be processed, it sends the corresponding terminal ID at the same time. After the server completes the processing, it searches for the corresponding mobile terminal according to the terminal ID, and sends the image to be processed after the processing is completed to the mobile terminal. Wherein, the terminal identifier refers to a unique identifier of the user terminal. For example, the terminal identifier may be at least one of an IP (Internet Protocol, protocol for interconnecting networks) address, a MAC (Media Access Control, media access control) address, and the like.

目标区域一般是用户比较关注的区域,具体可以是指待处理图像中需要进行美颜处理的区域。例如,目标区域可以是指人脸区域、人像区域、皮肤区域、嘴唇区域、头发区域等,在此不做限定。可以理解的是,待处理图像是由若干个像素点构成的,目标区域则是由待处理图像中的若干个像素点构成的。目标区域对应的区域面积是指目标区域所占面积的大小,可以表示为目标区域内所包含的像素点的总数量,也可以表示为目标区域与对应的待处理图像的面积比例。目标区域一般在图像中表现为独立的连通区域,连通区域是指一个封闭的区域。例如,图像中的每一张人脸会对应一个独立的连通区域,当图像中存在多张人脸的时候,就会存在多个连通区域,每一张人脸对应一个独立的连通区域。The target area is generally an area that the user pays more attention to, and specifically may refer to an area that needs to be beautified in the image to be processed. For example, the target area may refer to a face area, a portrait area, a skin area, a lip area, a hair area, etc., which are not limited herein. It can be understood that the image to be processed is composed of several pixels, and the target area is composed of several pixels in the image to be processed. The area area corresponding to the target area refers to the size of the area occupied by the target area, which can be expressed as the total number of pixels contained in the target area, or as the area ratio of the target area to the corresponding image to be processed. The target area generally appears as an independent connected area in the image, and the connected area refers to a closed area. For example, each face in the image corresponds to an independent connected region. When there are multiple faces in the image, there will be multiple connected regions, and each face corresponds to an independent connected region.

获取目标区域可以包括:检测待处理图像中的人脸区域,并根据人脸区域获取对应的目标区域。具体地,目标区域可以是指待处理图像中的人脸区域、人像区域、皮肤区域、嘴唇区域、头发区域、五官区域等,在本实施例中不做限定。人脸区域是指待处理图像中人脸所在的区域。可以通过人脸检测算法获取待处理图像的人脸区域,人脸检测算法可以包括基于几何特征的检测方法、特征脸检测方法、线性判别分析方法、基于隐马尔柯夫模型检测方法等,在此不做限定。人像区域是指待处理图像中的整个人像所在的区域。则获取人像区域的方法具体可以包括:获取待处理图像的深度信息;检测待处理图像中的人脸区域,并根据人脸区域和深度信息获取待处理图像中的人像区域。可以理解的是,通过图像采集装置采集图像的时候,可以同时获取图像对应的深度图,深度图中的像素点与图像中的像素点对应。深度图中的像素点表示图像中对应像素的深度信息,深度信息即为像素点对应的物体到图像采集装置的深度信息。一般认为人像与人脸在同一垂��平面上,人像到图像采集装置的深度信息与人脸到图像采集装置的深度信息的取值在同一范围内。因此,在获取人脸区域后,可以从深度图中获取人脸区域对应的深度信息,然后根据人脸区域对应的深度信息可以获取人像区域对应的深度信息,然后根据人像区域对应的深度信息即可获取到待处理图像中的人像区域。Obtaining the target area may include: detecting a face area in the image to be processed, and acquiring a corresponding target area according to the face area. Specifically, the target area may refer to a face area, portrait area, skin area, lip area, hair area, facial features area, etc. in the image to be processed, which is not limited in this embodiment. The face area refers to the area where the face is located in the image to be processed. The face area of the image to be processed can be obtained through a face detection algorithm. The face detection algorithm can include a detection method based on geometric features, an eigenface detection method, a linear discriminant analysis method, a detection method based on a hidden Markov model, etc. Herein No limit. The portrait area refers to the area where the entire portrait in the image to be processed is located. The method for obtaining the portrait region may specifically include: obtaining depth information of the image to be processed; detecting the face region in the image to be processed, and obtaining the portrait region in the image to be processed according to the face region and depth information. It can be understood that when an image is captured by the image capture device, a depth map corresponding to the image can be acquired at the same time, and pixels in the depth map correspond to pixels in the image. The pixels in the depth map represent the depth information of the corresponding pixels in the image, and the depth information is the depth information from the object corresponding to the pixels to the image acquisition device. It is generally believed that the portrait and the face are on the same vertical plane, and the depth information from the portrait to the image acquisition device is within the same range as the depth information from the face to the image acquisition device. Therefore, after obtaining the face area, the depth information corresponding to the face area can be obtained from the depth map, and then the depth information corresponding to the portrait area can be obtained according to the depth information corresponding to the face area, and then according to the depth information corresponding to the portrait area, that is The portrait area in the image to be processed can be obtained.

具体地,皮肤区域是指皮肤所在的区域。皮肤区域可以分为人脸皮肤区域和人像皮肤区域,人脸皮肤区域是指人脸部皮肤所在的区域,人像皮肤区域包括脸部和躯干皮肤所在的区域。根据人脸区域获取对应的人脸皮肤区域的方法具体可以包括:根据人脸区域对应的颜色信息生成颜色直方图;获取颜色直方图中的峰值及对应的颜色区间;根据颜色区间划分皮肤颜色区间,将人脸区域中皮肤颜色区间所对应的区域作为人脸皮肤区域。然后将人像区域中皮肤颜色区间所对应的区域作为人像皮肤区域。颜色直方图用于描述不同色彩在人脸区域中所占的比例,颜色信息是指用来表示图像的色彩的相关参数。例如,在HSV颜色空间中,颜色信息可以包括图像中色彩的H(Hue,色调)、S(Saturation,饱和度)及V(Value,明度)等信息。获取人脸区域对应的颜色信息,可将颜色信息划分为多个小的颜色区间,并分别计算人脸区域中落入各个颜色区间的像素点的数量,从而得到颜色直方图。其中,颜色直方图可以是RGB颜色直方图、HSV颜色直方图或是YUV颜色直方图等,并不限于此。在HSV颜色空间中,分量可包括H(Hue,色调)、S(Saturation,饱和度)及V(Value,明度),H表示角度度量,取值范围为0°~360°,从红色开始按逆时针方向计算,红色为0°,绿色为120°,蓝色为240°;S表示颜色接近光谱色的程度,光谱色所占的比例越大,颜色接近光谱色的程度就越高,颜色的饱和度也越高,饱和度高,颜色一般深而艳;V表示颜色明亮的程度,对于光源色,明度值与发光体的光亮度有关;对于物体色,此值和物体的透射比或反射比有关,V通常取值范围为0%(黑)到100%(白)。具体地,生成HSV颜色直方图的方法可以包括:将人脸区域从RGB颜色空间转换至HSV颜色空间;分别对HSV中的H、S、V三个分量进行量化,并将量化后的H、S、V三个分量合成一维的特征向量;根据人脸区域中各个像素点在HSV颜色空间中的值,确定像素点在H、S、V三个分量的量化级别;根据像素点的量化级别计算对应的特征向量,并根据特征向量统计在各个量化级别上分布的像素点的数量;根据统计结果生成颜色直方图。Specifically, the skin area refers to the area where the skin is located. The skin area can be divided into a face skin area and a portrait skin area. The face skin area refers to the area where the face skin is located, and the portrait skin area includes the area where the face and torso skin are located. The method for obtaining the corresponding human face skin area according to the human face area may specifically include: generating a color histogram according to the color information corresponding to the human face area; obtaining the peak value and the corresponding color interval in the color histogram; dividing the skin color interval according to the color interval , taking the area corresponding to the skin color interval in the face area as the face skin area. Then, the area corresponding to the skin color interval in the portrait area is taken as the portrait skin area. The color histogram is used to describe the proportion of different colors in the face area, and the color information refers to related parameters used to represent the color of the image. For example, in the HSV color space, the color information may include information such as H (Hue, hue), S (Saturation, saturation) and V (Value, lightness) of the color in the image. To obtain the color information corresponding to the face area, the color information can be divided into multiple small color intervals, and the number of pixels falling into each color interval in the face area is calculated respectively, so as to obtain the color histogram. Wherein, the color histogram may be an RGB color histogram, an HSV color histogram, or a YUV color histogram, etc., but is not limited thereto. In the HSV color space, the components can include H (Hue, hue), S (Saturation, saturation) and V (Value, lightness). Calculated counterclockwise, red is 0°, green is 120°, and blue is 240°; S indicates the degree of color close to spectral color, the larger the proportion of spectral color, the higher the degree of color close to spectral color, the color The higher the saturation, the higher the saturation, the color is generally deep and bright; V indicates the degree of brightness of the color. For the color of the light source, the brightness value is related to the brightness of the illuminant; for the object color, this value is related to the transmittance of the object or Relevant to reflectance, V usually ranges from 0% (black) to 100% (white). Specifically, the method for generating the HSV color histogram may include: converting the face area from the RGB color space to the HSV color space; respectively quantizing the three components of H, S, and V in the HSV, and converting the quantized H, The three components of S and V synthesize a one-dimensional feature vector; according to the value of each pixel in the face area in the HSV color space, determine the quantization level of the pixel in the three components of H, S, and V; according to the quantization of the pixel The level calculates the corresponding eigenvector, and counts the number of pixels distributed on each quantization level according to the eigenvector; generates a color histogram according to the statistical result.

其中,特征向量的取值可在0~255之间,共256个值,也即可将HSV颜色空间划分为256个颜色区间,每个颜色区间对应一个特征向量的值。例如,可将H分量量化为16级,将S分量及V分量分别量化为4级,合成一维的特征向量可如下式所示:Wherein, the value of the feature vector can be between 0 and 255, a total of 256 values, that is, the HSV color space can be divided into 256 color intervals, and each color interval corresponds to a value of the feature vector. For example, the H component can be quantized to 16 levels, the S component and the V component can be quantized to 4 levels respectively, and the synthesized one-dimensional feature vector can be shown in the following formula:

L=H*QS*QV+S*QV+V;L=H*Q S *Q V +S*Q V +V;

L表示量化后的H、S及V三个分量合成的一维的特征向量;QS表示S分量的量化级数,QV表示V分量的量化级数。波峰指的是在颜色直方图形成的一段波内波幅的最大值,可通过求取颜色直方图中各个点的一阶差分进行确定,峰值则为波峰上的最大值。获取到颜色直方图中的峰值之后,获取峰值对应的量化的颜色区间,该颜色区间可以是HSV颜色空间中与峰值对应的特征向量的值。图4为一个实施例中生成的颜色直方图。如图4所示,颜色直方图的纵轴表示像素点的分布情况,即对应颜色区间的像素点的数量。横轴表示HSV颜色空间的特征向量,也即HSV颜色空间划分的多个颜色区间。可以看出,图4中的颜色直方图包含波峰402,波峰402对应的峰值为850,该峰值对应的颜色区间为150,也即统计图像中有850个像素点的特征向量值为150。L represents the one-dimensional feature vector synthesized by the quantized H, S, and V components; Q S represents the quantization level of the S component, and Q V represents the quantization level of the V component. The peak refers to the maximum value of the wave amplitude in a section formed by the color histogram, which can be determined by calculating the first-order difference of each point in the color histogram, and the peak value is the maximum value on the peak. After the peak value in the color histogram is obtained, a quantized color interval corresponding to the peak value is obtained, and the color interval may be a value of an eigenvector corresponding to the peak value in the HSV color space. Figure 4 is a color histogram generated in one embodiment. As shown in FIG. 4 , the vertical axis of the color histogram represents the distribution of pixels, that is, the number of pixels corresponding to the color interval. The horizontal axis represents the feature vector of the HSV color space, that is, multiple color intervals divided by the HSV color space. It can be seen that the color histogram in FIG. 4 includes peak 402, the peak value corresponding to peak 402 is 850, and the color interval corresponding to this peak value is 150, that is, there are 850 pixels in the statistical image with eigenvector values of 150.

根据颜色直方图的峰值对应的颜色区间划分人脸区域的皮肤颜色区间,可预先设定皮肤颜色区间的范围值,再根据峰值对应的颜色区间及预设的范围值计算皮肤颜色区间。将人脸区域中皮肤颜色区间所对应的区域作为人脸皮肤区域。可选地,计算机设备可将峰值对应的颜色区间与预设的范围值相乘,其中,预设的范围值可包括上限值与下限值,可将峰值对应的颜色区间分别与上限值及下限值相乘,得到皮肤颜色区间。例如,计算机设备可预先设定皮肤颜色区间的范围值为80%~120%,若颜色直方图的峰值对应的颜色区间为150的值,则可计算得到皮肤颜色区间为120~180。计算机设备可获取人脸区域中各个像素点在HSV颜色空间的特征向量,并判断特征向量是否落入皮肤颜色区间,若落入,则可将对应的像素点定义为人脸皮肤区域的像素点。例如,计算得到皮肤颜色区间为120~180,则计算机设备可将人脸区域中在HSV颜色空间的特征向量在120~180之间的像素点,定义为人脸皮肤区域中的像素点。The skin color interval of the face area is divided according to the color interval corresponding to the peak value of the color histogram, the range value of the skin color interval can be preset, and the skin color interval is calculated according to the color interval corresponding to the peak value and the preset range value. The area corresponding to the skin color interval in the face area is taken as the face skin area. Optionally, the computer device can multiply the color interval corresponding to the peak value by a preset range value, wherein the preset range value can include an upper limit value and a lower limit value, and the color interval corresponding to the peak value can be divided by the upper limit value and the upper limit value respectively. Multiply the value and the lower limit value to get the skin color range. For example, the computer device can pre-set the skin color range as 80%-120%. If the color range corresponding to the peak value of the color histogram is 150, the skin color range can be calculated as 120-180. The computer device can obtain the feature vector of each pixel in the face area in the HSV color space, and judge whether the feature vector falls into the skin color interval, and if it falls, the corresponding pixel can be defined as the pixel of the face skin area. For example, if the calculated skin color range is 120-180, then the computer device can define the pixel points in the face area with feature vectors between 120-180 in the HSV color space as pixels in the face skin area.

步骤304,确定清晰度所处的参数区间,获取参数区间对应的美颜参数模型。Step 304, determine the parameter interval where the sharpness is located, and obtain the beautification parameter model corresponding to the parameter interval.

获取目标区域对应的清晰度,并根据目标区域的清晰度获取目标美颜参数。一般来说,目标区域是用户比较关注的区域,根据目标区域的清晰度获取的美颜参数更加准确。如果目标区域的清晰度比较低,美颜处理之后很容易导致细节信息的丢失,降低图像的美感。在进行美颜处理的时候可以考虑相应地减轻美颜处理的程度,这样更好地保留一些细节信息,不会导致图像的失真。具体地,将清晰度划分为不同的参数区间,当清晰度在不同的参数区间时,对应进行不同程度的美颜处理。例如,清晰度的取值可以为0~1,取值越大,表示图像越清晰。将清晰度进行划分为不同的区间,每一个区间对应一个美颜参数模型。假设将清晰度分为0~0.2、0.2~0.6、0.6~0.8和0.8~1等四个区间,分别对应模型1、模型2、模型3、和模型4。则当目标区域的清晰度为0.5时,获取的美颜参数模型就为模型2。Obtain the sharpness corresponding to the target area, and obtain the target beautification parameters according to the sharpness of the target area. Generally speaking, the target area is the area that the user pays more attention to, and the beautification parameters obtained according to the definition of the target area are more accurate. If the definition of the target area is relatively low, it is easy to cause loss of detail information after beautification processing, reducing the beauty of the image. When performing beautification processing, you can consider reducing the degree of beautification processing accordingly, so as to better retain some detail information without causing image distortion. Specifically, the sharpness is divided into different parameter intervals, and when the sharpness is in different parameter intervals, different degrees of beautification processing are performed correspondingly. For example, the value of the sharpness can be 0 to 1, and the larger the value, the clearer the image. The sharpness is divided into different intervals, and each interval corresponds to a beauty parameter model. Assume that the sharpness is divided into four intervals of 0-0.2, 0.2-0.6, 0.6-0.8, and 0.8-1, corresponding to model 1, model 2, model 3, and model 4 respectively. Then when the sharpness of the target area is 0.5, the obtained beauty parameter model is model 2.

步骤306,获取美颜基础参数。Step 306, acquire the basic parameters of beautification.

步骤308,根据清晰度和美颜参数模型计算美颜系数,并根据美颜基础参数和美颜系数获取目标美颜参数。Step 308, calculate the beautification coefficient according to the definition and the beautification parameter model, and obtain the target beautification parameter according to the basic beautification parameters and the beautification coefficient.

具体地,待处理图像可以存在多个目标区域,例如待处理图像中存在多个人脸,则将每一张人脸所在的区域作为一个独立的目标区域,多张人脸就对应多个目标区域。美颜基础参数是指进行美颜处理的参考值,美颜基础参数可以是用户预先设定的一个固定参数值,也可以是与目标区域对应的。根据目标区域获取对应的美颜基础参数,不同的目标区域可以对应同一个美颜基础参数,也可以对应不同的美颜基础参数。根据清晰度和美颜参数模型计算美颜系数,然后根据美颜基础参数和美颜系数获取目标美颜参数。其中,美颜系数是指获取美颜参数的权重。Specifically, there may be multiple target areas in the image to be processed. For example, if there are multiple faces in the image to be processed, the area where each face is located is regarded as an independent target area, and multiple faces correspond to multiple target areas. . The basic beautification parameter refers to a reference value for beautification processing. The basic beautification parameter may be a fixed parameter value preset by the user, or may be corresponding to a target area. The corresponding basic beautification parameters are obtained according to the target area, and different target areas may correspond to the same basic beautification parameter, or may correspond to different basic beautification parameters. Calculate the beautification coefficient according to the definition and beautification parameter model, and then obtain the target beautification parameters according to the basic beautification parameters and beautification coefficient. Wherein, the beautification coefficient refers to the weight for obtaining the beautification parameter.

举例来说,假设美颜基础参数为Param,美颜系数为Factor,计算的目标区域的清晰度为Clarity。将清晰度Clarity划分为三个参数区域,分别为Clarity<stdClaritymin,stdClaritymin<Clarity<stdClaritymax,Clarity>stdClaritymax。则美颜系数的计算公式如下:For example, suppose the basic beautification parameter is Param, the beautification coefficient is Factor, and the calculated definition of the target area is Clarity. The clarity Clarity is divided into three parameter areas, namely Clarity<stdClarity min , stdClarity min <Clarity<stdClarity max , Clarity>stdClarity max . The formula for calculating the beauty coefficient is as follows:

根据上述公式可以计算美颜系数,然后根据基础美颜参数和美颜系数计算得到目标美颜参数adjustParam,如下式:The beautification coefficient can be calculated according to the above formula, and then the target beautification parameter adjustParam can be calculated according to the basic beautification parameters and beautification coefficient, as follows:

adjustParam=Param*FactorT adjustParam=Param*Factor T

图5为一个实施例中美颜系数的变化曲线图。如图5所示,美颜系数的变化呈阶梯性增长,一共分为三个阶段,第一阶段:当Clarity<stdClaritymin时,美颜系数取值不变;第二阶段:当stdClaritymin<Clarity<stdClaritymax时,美颜系数和清晰度呈线性增长关系;第三阶段:当Clarity>stdClaritymax时,美颜系数保持不变。Fig. 5 is a graph showing the variation of the beautification coefficient in an embodiment. As shown in Figure 5, the beauty coefficient changes in a stepwise manner, which is divided into three stages. The first stage: when Clarity<stdClarity min , the beauty coefficient remains unchanged; the second stage: when stdClarity min <stdClarity min When Clarity<stdClarity max , the beautification factor and the sharpness increase linearly; the third stage: when Clarity>stdClarity max , the beautification factor remains unchanged.

步骤310,根据目标美颜参数对待处理图像进行美颜处理。Step 310, perform beautification processing on the image to be processed according to the target beautification parameters.

具体地,根据目标美颜参数对待处理图像中的目标区域进行美颜处理。在获取到目标区域之后,可以对每一个目标区域建立一个区域标识,然后建立区域标识、位置坐标和目标美颜参数的关系,根据位置坐标获取对应的目标区域,然后根据对应的目标美颜参数对目标区域进行美颜出来。例如,检测到待��理图像“pic.jpg”中包含人脸1、人脸2和人脸3等三个人脸区域,对应的人脸标识分别为face1、face2和face3,对应的目标美颜参数分别为1级美白、2级美白和1级祛痘。Specifically, the beautification process is performed on the target area in the image to be processed according to the target beautification parameters. After the target area is obtained, an area identification can be established for each target area, and then the relationship between the area identification, position coordinates and target beauty parameters can be established, and the corresponding target area can be obtained according to the position coordinates, and then the corresponding target beauty parameters can be obtained according to the corresponding target area. Beautify the target area. For example, it is detected that the to-be-processed image "pic.jpg" contains three face areas, including face 1, face 2, and face 3, and the corresponding face identifiers are face1, face2, and face3 respectively, and the corresponding target beautification parameters They are level 1 whitening, level 2 whitening and level 1 acne removal.

上述实施例提供的图像处理方法,首先获取待处理图像中的目标区域,根据待处理图像中目标区域对应的清晰度获取美颜参数模型。然后根据清晰度和美颜参数模型获取对应的目标美颜参数,再根据获取的目标美颜参数对待处理图像进行美颜处理。这样可以根据图像中目标区域的不同清晰度进行不同的美颜处理,提高了图像处理的准确率,优化了美颜处理。In the image processing method provided by the above-mentioned embodiments, firstly, the target area in the image to be processed is obtained, and a beautification parameter model is obtained according to the definition corresponding to the target area in the image to be processed. Then obtain the corresponding target beauty parameters according to the definition and beauty parameter model, and then perform beauty processing on the image to be processed according to the acquired target beauty parameters. In this way, different beautification processes can be performed according to different resolutions of the target areas in the image, which improves the accuracy of image processing and optimizes the beautification process.

图6为又一个实施例中图像处理方法的���程图。如图6所示,该图像处理方法包括步骤602至步骤612。其中:Fig. 6 is a flowchart of an image processing method in yet another embodiment. As shown in FIG. 6 , the image processing method includes step 602 to step 612 . in:

步骤602,获取待处理图像及对应的清晰度。Step 602, acquire the image to be processed and the corresponding sharpness.

待处理图像中的目标区域可以为一个或多个,例如待处理图像中可以有一张人脸,也可以有多张人脸,将人脸所在的区域作为目标区域。可以理解的是,待处理图像中也可以不存在目标区域。待处理图像中的目标区域可以通过区域标记进行获取,也可以直接在待处理图像中进行检测得到。区域标记是指待处理图像中用于表示目标区域的范围的标记,例如在待处理图像中用红色矩形框将目标区域进行标记,该红色矩形框中的区域就认为是目标区域。将待处理图像中的目标区域单独提取出来,并与待处理图像的图像标识和位置坐标建立对应关系,如果一张待处理图像中存在多个目标区域,则将每个目标区域单独与图像标识和位置坐标建立对应关系。其中,位置坐标是指表示目标区域在待处理图像中的位置的坐标。例如,位置坐标可以是目标区域中心位置在待处理图像中的位置的坐标,也可以是左上角位置在待处理图像中的位置的坐标。对目标区域处理完之后,通过图像标识查找对应的待处理图像,然后通过位置坐标查找该目标区域在该待处理图像中的具体位置,将该目标区域进行还原。There may be one or more target areas in the image to be processed. For example, there may be one human face or multiple human faces in the image to be processed, and the area where the human face is located is used as the target area. It can be understood that there may be no target area in the image to be processed. The target area in the image to be processed can be obtained by region marking, or directly detected in the image to be processed. The area mark refers to a mark used to indicate the range of the target area in the image to be processed. For example, the target area is marked with a red rectangular frame in the image to be processed, and the area in the red rectangular frame is considered as the target area. Separately extract the target area in the image to be processed, and establish a corresponding relationship with the image identification and position coordinates of the image to be processed. If there are multiple target areas in an image to be processed, each target area is individually associated with the image identification Establish a corresponding relationship with the position coordinates. Wherein, the position coordinate refers to the coordinate indicating the position of the target region in the image to be processed. For example, the position coordinates may be the coordinates of the position of the center of the target area in the image to be processed, or the coordinates of the position of the upper left corner in the image to be processed. After the target area is processed, the corresponding image to be processed is found through the image identification, and then the specific position of the target area in the image to be processed is found through the position coordinates, and the target area is restored.

步骤604,根据清晰度获取对应的美颜参数模型,美颜参数模型是指用于计算美颜参数的模型。Step 604: Acquire a corresponding beauty parameter model according to the definition, where the beauty parameter model refers to a model used to calculate the beauty parameter.

在一个实施例中,计算清晰度的算法可以包括空间域梯度算法、频域分析法等。常见的空间域梯度算法包括Brenner算法、Tenengrad算法、SMD算法等算法。频域分析法可以通过统计频域中的高频分量计算清晰度,高频分量越高,图像越清晰。以Tenengrad算法为例,采用Sobel梯度算子分别计算水平和垂直方向上的梯度值,则基于Tenengrad的图像清晰度定义如下:In an embodiment, the algorithm for calculating sharpness may include a spatial domain gradient algorithm, a frequency domain analysis method, and the like. Common spatial domain gradient algorithms include Brenner algorithm, Tenengrad algorithm, SMD algorithm and other algorithms. The frequency domain analysis method can calculate the sharpness by counting the high-frequency components in the frequency domain. The higher the high-frequency components, the clearer the image. Taking the Tenengrad algorithm as an example, the Sobel gradient operator is used to calculate the gradient values in the horizontal and vertical directions respectively, and the image definition based on Tenengrad is defined as follows:

其中,T是给定的边缘检测阈值,Gx和Gy分别是像素点(x,y)处Sobel水平和垂直方向边缘检测算子的卷积,可以通过以下Sobel梯度算子模板来检测边缘:Among them, T is a given edge detection threshold, Gx and Gy are the convolution of the Sobel horizontal and vertical edge detection operators at the pixel point (x, y) respectively, and the edge can be detected by the following Sobel gradient operator template:

步骤606,获取待处理图像中人脸区域对应的人物属性特征,并根据人物属性特征获取对应的美颜基础参数,其中美颜基础参数包括第一美颜基础参数和第二美颜基础参数。Step 606: Obtain the character attribute features corresponding to the face area in the image to be processed, and obtain the corresponding basic beautification parameters according to the character attribute features, where the basic beautification parameters include the first basic beautification parameter and the second basic beautification parameter.

人物属性特征是指表示图像中人物的人物属性的特征,例如人物属性特征可以是指性别特征、年龄特征、人种特征等中的一种或多种。具体地,获取待处理图像中的人脸区域,然后根据人脸区域来识别对应的人物属性特征。更进一步地,获取待处理图像中的人脸区域,通过特征识别模型获取人脸区域对应的人物属性特征。其中,特征识别模型是指识别人物属性特征的模型,特征识别模型是通过人脸样本集合训练得到的。人脸样本集合是指由若干张人脸图像构成的图像集合,根据人脸样本集合训练得到特征识别模型,一般地人脸样本集合中的人脸图像越多,训练得到的特征识别模型越精确。例如,在监督学习中,将人脸样本集合中的每一张人脸图像打上相应的标签,用于标记人脸图像的类型,通过对人脸样本集合的训练可以得到特征识别模型。特征识别模型可以将人脸区域进行分类,得到对应的人物属性特征。例如,将人脸区域可以分为黄种人、黑种人和白种人,那么得到的对应的人物属性特征就是黄种人、黑种人或白种人中的一种。也就是说,通过特征识别模型进行分类是基于同一标准的。若要得到人脸区域的不同维度的人物属性特征,则可以通过不同的特征识别模型分别进行获取。The character attribute feature refers to the feature representing the character attribute of the person in the image, for example, the character attribute feature may refer to one or more of gender characteristics, age characteristics, ethnic characteristics, and the like. Specifically, the face area in the image to be processed is acquired, and then the corresponding character attribute features are identified according to the face area. Furthermore, the face area in the image to be processed is obtained, and the character attribute features corresponding to the face area are obtained through the feature recognition model. Wherein, the feature recognition model refers to a model that recognizes the attribute characteristics of a person, and the feature recognition model is obtained through training a set of face samples. A face sample set refers to an image set composed of several face images. The feature recognition model is obtained by training the face sample set. Generally, the more face images in the face sample set, the more accurate the trained feature recognition model is. . For example, in supervised learning, each face image in the face sample set is marked with a corresponding label to mark the type of face image, and a feature recognition model can be obtained by training the face sample set. The feature recognition model can classify the face area to obtain the corresponding character attribute features. For example, if the face area can be divided into yellow race, black race and white race, then the obtained corresponding character attribute feature is one of yellow race, black race or white race. That is, classification by feature recognition models is based on the same criteria. If you want to obtain the character attribute features of different dimensions in the face area, you can obtain them separately through different feature recognition models.

具体地,人物属性特征可以包括人种特征参数、性别特征参数、年龄特征参数、肤色特征参数、肤质特征参数、脸型特征参数、妆容特征参数,在此不做限定。例如,通过人种识别模型得到人脸区域对应的人种特征参数,根据年龄识别模型得到人脸区域对应的年龄特征参数,根据性别识别模型得到人脸区域对应的性别特征参数。预先建立人物属性特征与美颜基础参数之间的关系,根据人物属性特征去获取对应的美颜基础参数。例如,人物属性特征可以包括男性和女性,当识别人脸为男性时,对应的美颜基础参数磨皮处理,当识别人脸为女性时,对应的美颜基础参数为美白处理。人物属性特征与美颜基础参数之间的对应关系,可以是用户设置的,也可以是系统通过大数据进行学习得到的。Specifically, the character attribute features may include race feature parameters, gender feature parameters, age feature parameters, skin color feature parameters, skin quality feature parameters, face shape feature parameters, and makeup feature parameters, which are not limited here. For example, the race characteristic parameters corresponding to the face region are obtained through the race recognition model, the age characteristic parameters corresponding to the face region are obtained according to the age recognition model, and the gender characteristic parameters corresponding to the face region are obtained according to the gender recognition model. Pre-establish the relationship between the character attribute characteristics and the basic beauty parameters, and obtain the corresponding basic beauty parameters according to the character attributes. For example, the character attribute features may include male and female. When the recognized face is male, the corresponding basic parameters of beautification are skin smoothing. When the recognized face is female, the corresponding basic parameters of beautification are whitening. The correspondence between character attributes and basic beauty parameters can be set by the user, or learned by the system through big data.

步骤608,根据清晰度和美颜参数模型计算美颜系数,根据第一美颜基础参数和美颜系数获取对应的第一美颜参数,并将第二美颜基础参数作为第二美颜参数。Step 608: Calculate the beautification coefficient according to the definition and the beautification parameter model, obtain the corresponding first beautification parameter according to the first beautification basic parameter and the beautification coefficient, and use the second beautification basic parameter as the second beautification parameter.

美颜处理可以包括磨皮、瘦脸、大眼、祛斑、祛黑眼圈、美白提亮、锐化、红唇、亮眼等不同的处理,而其中一部分处理会导致细节信息的丢失,会受到清晰度的影响,而一部分处理不会导致细节信息的丢失,因此与清晰度没有直接关联。例如,磨皮、瘦脸、大眼、祛斑、祛黑眼圈等处理会改变人脸的尺寸,就会对图像的细节信息造成改变,若清晰度低的情况系啊,再对人脸进行磨皮、瘦脸等处理,就可能会造成图像丢失更多的细节信息,导致图像严重失真;而美白提亮、锐化、红唇、亮眼等处理是对颜色信息进行处理,就不会影响图像的细节信息。则目标美颜参数可以包括第一美颜参数和第二美颜参数,第一美颜参数会受到清晰度的影响,与清晰度存在对应关系,第二美颜参数则不会受到清晰度的影响。具体地,美颜基础参数包括第一美颜基础参数和第二美颜基础参数。根据清晰度和美颜参数模型计算美颜系数,根据第一美颜基础参数和美颜系数获取对应的第一美颜参数,并将第二美颜基础参数作为第二美颜参数。Beautification treatments can include different treatments such as skin smoothing, face slimming, big eyes, freckle removal, dark circles removal, whitening and brightening, sharpening, red lips, bright eyes, etc. Some of the treatments will cause the loss of detailed information and will be subject to clear The effect of sharpness, and some processing will not cause the loss of detail information, so it is not directly related to sharpness. For example, skin resurfacing, face thinning, big eyes, freckle removal, dark circles removal, etc. will change the size of the face, and will change the details of the image. , thin face and other processing may cause the image to lose more detailed information, resulting in serious image distortion; while whitening and brightening, sharpening, red lips, bright eyes and other processing are processing color information, and will not affect the image. Details. The target beautification parameters may include the first beautification parameter and the second beautification parameter. The first beautification parameter will be affected by the sharpness, and there is a corresponding relationship with the sharpness. The second beautification parameter will not be affected by the sharpness. influences. Specifically, the basic beauty parameters include first basic beauty parameters and second basic beauty parameters. The beautification coefficient is calculated according to the definition and the beautification parameter model, the corresponding first beautification parameter is obtained according to the first beautification basic parameter and the beautification coefficient, and the second beautification basic parameter is used as the second beautification parameter.

更进一步地,当清晰度低于某个值的时候,可以不对目标区域进行美颜处理,或者进行一部分处理。例如,只对目标区域进行小程度的美白处理,这样可以保证处理后的图像失真不会太严重。则可以设置一个参数阈值,同时将美颜系数分为第一美颜系数和第二美颜系数。当清晰度大于该参数阈值时,根据清晰度和美颜参数模型计算第一美颜系数,根据第一美颜基础参数和第一美颜系数获取对应的第一美颜参数,并将第二美颜基础参数作为第二美颜参数。当清晰度小于该参数阈值时,获取第一美颜系数和第二美颜系数,根据第一美颜系数和第一美颜基础参数获取第一美颜参数,根据第二美颜系数和第二美颜基础参数获取第二美颜参数。其中,第一美颜参数和第二美颜参数为设定的一个较小的值,则最后获取的第一美颜系数和第二美颜系数就会是一个比较小的值。Furthermore, when the sharpness is lower than a certain value, the target area may not be beautified, or a part of the treatment may be performed. For example, only a small degree of whitening process is applied to the target area, which can ensure that the processed image will not be too distorted. Then a parameter threshold can be set, and the beautification factor can be divided into a first beautification factor and a second beautification factor. When the sharpness is greater than the parameter threshold, the first beautification coefficient is calculated according to the sharpness and the beautification parameter model, and the corresponding first beautification parameter is obtained according to the first beautification basic parameter and the first beautification coefficient, and the second beautification parameter is calculated. The basic color parameter is used as the second beauty parameter. When the clarity is less than the parameter threshold, obtain the first beauty coefficient and the second beauty coefficient, obtain the first beauty parameter according to the first beauty coefficient and the first basic parameter of beauty, and obtain the first beauty parameter according to the second beauty coefficient and the first Second beautification basic parameter Get the second beautification parameter. Wherein, the first beautification parameter and the second beautification parameter are set to a relatively small value, then the first beautification coefficient and the second beautification coefficient obtained finally will be relatively small values.

步骤610,根据第一美颜参数和第二美颜参数获取目标美颜参数。Step 610, acquiring target beauty parameters according to the first beauty parameters and the second beauty parameters.

在一个实施例中,假设美颜基础参数为defaultParam,其中美颜基础参数分为第一美颜基础参数adjustParam和第二美颜基础参数unchangedParam。美颜处理可以分别包括磨皮、瘦脸、大眼、祛斑、祛黑眼圈、美白提亮、锐化、红唇、亮眼等处理,则:In one embodiment, assume that the basic beauty parameter is defaultParam, where the basic beauty parameter is divided into a first basic beauty parameter adjustParam and a second basic beauty parameter unchangedParam. Beautification treatments can include skin resurfacing, face-lifting, big eyes, freckle removal, dark circles removal, whitening and brightening, sharpening, red lips, eye brightening, etc., then:

defaultParam=[adjustParam|unchangedParam];defaultParam = [adjustParam|unchangedParam];

djustParam=[softenP,faceSlenderP,eyeLargerP,deblemishP,depouchP];adjustParam = [softenP, faceSlenderP, eyeLargerP, deblemishP, depouchP];

unchangedParam=[skinBrightenP,sharpP,lipP,eyeBrightenP];unchangedParam = [skinBrightenP, sharpP, lipP, eyeBrightenP];

其中,softenP表示磨皮基础参数,faceSlenderP表示瘦脸基础参数,eyeLargerP表示大眼基础参数,deblemishP表示祛斑基础参数,depouchP表示祛黑眼圈基础参数。skinBrightenP美白提亮基础参数,sharpP锐化基础参数,lipP表示红唇基础参数,eyeBrightenP表示亮眼基础参数。Among them, softenP represents the basic parameters of skin smoothing, faceSlenderP represents the basic parameters of thin face, eyeLargerP represents the basic parameters of large eyes, deblemishP represents the basic parameters of freckle removal, and depouchP represents the basic parameters of removing dark circles. skinBrightenP is the basic parameters for whitening and brightening, sharpP is the basic parameters for sharpening, lipP is the basic parameters for red lips, and eyeBrightenP is the basic parameters for brightening eyes.

假设美颜系数为Factor,美颜系数包括第一美颜系数adjustFactor和第二美颜系数unchangedFactor。根据第一美颜系数和第一美颜基础参数可以获取第一美颜参数,根据第二美颜系数和第二美颜基础参数可以获取第二美颜参数。Assuming that the beautification factor is Factor, the beautification factor includes a first beautification factor adjustFactor and a second beautification factor unchangedFactor. The first beautification parameter can be obtained according to the first beautification coefficient and the first basic beautification parameter, and the second beautification parameter can be obtained according to the second beautification coefficient and the second basic beautification parameter.

Factor=[adjustFactor|unchangedFactor];Factor = [adjustFactor|unchangedFactor];

adjustFactor=[softenF,faceSlenderF,eyeLargerF,deblemishF,depouchF];adjustFactor = [softenF, faceSlenderF, eyeLargerF, deblemishF, depouchF];

unchangedFactor=[skinBrightenF,sharpF,lipF,eyeBrightenF];unchangedFactor = [skinBrightenF, sharpF, lipF, eyeBrightenF];

其中,softenF表示磨皮系数,faceSlenderF表示瘦脸系数,eyeLargerF表示大眼系数,deblemishF表示祛斑系数,depouchF表示祛黑眼圈系数。skinBrightenF美白提亮系数,sharpF锐化系数,lipF表示红唇系数,eyeBrightenF表示亮眼系数。Among them, softenF represents the skin smoothing coefficient, faceSlenderF represents the face thinning coefficient, eyeLargerF represents the large eye coefficient, deblemishF represents the freckle removal coefficient, and depouchF represents the dark circle removal coefficient. skinBrightenF is a whitening and brightening factor, sharpF is a sharpening factor, lipF is a red lip factor, and eyeBrightenF is a brightening factor.

获取的待处理图像的清晰度为Clarity,则可以通过大数据分析最佳清晰度的取值范围,也可以由用户自定义该取值范围。假设定义最佳清晰度的取值范围为[stdClaritymin,stdClaritymax],清晰度在该取值范围内时,可以直接将第一美颜基础参数作为第一美颜参数,即第一美颜系数adjustFactor就为[1,1,1,1,1]。���清晰度������该取值范围时,可以通过一个函数来获取对应的美颜系数,一般地清晰度越小,第一美颜系数越小,清晰度越大,第一美颜系数越大。为了避免美颜处理程度过深或过浅,可以对清晰度设置一个下限值minClarity和一个上限值maxClarity,当清晰度大于该上限值或低于该下限值时,第一美颜系数的取值不变。具体地,可以自定义该上限值和下限值,假设定义该下限值和上限值分别为minClarity=0.25*stdClaritymin,maxClarity=1.75*stdClaritymax,则,获取第一美颜系数的公式如下:If the acquired clarity of the image to be processed is Clarity, the value range of the best clarity can be analyzed through big data, or the value range can be customized by the user. Assume that the value range for defining the best clarity is [stdClarity min , stdClarity max ]. The coefficient adjustFactor is [1,1,1,1,1]. When the sharpness exceeds this value range, a function can be used to obtain the corresponding beautification coefficient. Generally, the smaller the sharpness is, the smaller the first beautification coefficient is, and the larger the sharpness is, the larger the first beautification coefficient is. In order to prevent the beautification process from being too deep or too shallow, you can set a lower limit value minClarity and an upper limit value maxClarity for the sharpness. When the sharpness is greater than the upper limit value or lower than the lower limit value, the first beautification The value of the coefficient remains unchanged. Specifically, the upper limit and the lower limit can be customized, assuming that the lower limit and the upper limit are defined as minClarity=0.25*stdClarity min and maxClarity=1.75*stdClarity max respectively, then the first beauty coefficient can be obtained The formula is as follows:

当清晰度Clarity大于minClarity时,可以根据上式可以获取第一美颜系数,根据第一美颜系数可以第一美颜基础参数可以获取第一美颜参数,将第二美颜基础参数直接作为第二美颜参数,也即第二美颜系数为[1,1,1,1]。当清晰度Clarity小于minClarity时,可以选择不对目标区域进行美颜处理,也可以对目标区域进行小程度的美颜处理。定义第一美颜系数和第二美颜系数为较小的值,根据获取的第一美颜系数和第一美颜基础参数获取第一美颜参数,并根据获取的第二美颜系数和第二美颜基础参数获取第二美颜参数,那么得到的第一美颜参数和第二美颜参数也是一个较小的值。例如,当Clarity小于minClarity时,可以令第一美颜系数为adjustFactor=[0.5,0,0,0,0],第二美颜系数为unchangedFactor=[0,0,0,0]。根据获取的美颜系数和美颜基础参数获取对应的目标美颜参数,则目标美颜参数adjustParam即为:When the clarity Clarity is greater than minClarity, the first beautification coefficient can be obtained according to the above formula, the first beautification parameter can be obtained according to the first beautification coefficient and the first beautification basic parameter, and the second beautification basic parameter can be directly used as The second beautification parameter, that is, the second beautification coefficient is [1, 1, 1, 1]. When the clarity Clarity is less than minClarity, you can choose not to perform beautification processing on the target area, or perform a small degree of beautification processing on the target area. Define the first beautification coefficient and the second beautification coefficient as smaller values, obtain the first beautification parameter according to the obtained first beautification coefficient and the first beautification basic parameter, and obtain the second beautification coefficient and The second beautification basic parameter obtains the second beautification parameter, then the obtained first beautification parameter and the second beautification parameter are also a smaller value. For example, when Clarity is smaller than minClarity, the first beauty factor can be adjustedFactor=[0.5,0,0,0,0], and the second beauty factor can be unchangedFactor=[0,0,0,0]. Obtain the corresponding target beauty parameters according to the obtained beauty coefficient and basic beauty parameters, then the target beauty parameter adjustParam is:

adjustParam=defaultParam*FactorT adjustParam=defaultParam*Factor T

图7为另一个实施例中美颜系数的变化曲线图。如图7所示,当清晰度Clarity大于minClarity时,第一美颜系数的变化呈阶梯性增长,一共分为四个阶段,第一阶段:当minClarity<Clarity<stdClaritymin时,第一美颜系数和清晰度呈线性增长;第二阶段:当stdClaritymin<Clarity<stdClaritymax时,第一美颜系数保持不变;第三阶段:当stdClaritymax<Clarity<maxClarity时,第一美颜系数和清晰度呈线性增长;第四阶段:当Clarity>maxClarity时,第一美颜系数保持不变。Fig. 7 is a graph showing the variation of the beautification factor in another embodiment. As shown in Figure 7, when the clarity Clarity is greater than minClarity, the change of the first beautification coefficient increases stepwise, which is divided into four stages. The first stage: when minClarity<Clarity<stdClarity min , the first beautification coefficient The coefficient and clarity increase linearly; the second stage: when stdClarity min <Clarity<stdClarity max , the first beauty coefficient remains unchanged; the third stage: when stdClarity max <Clarity<maxClarity, the first beauty coefficient and The clarity increases linearly; the fourth stage: when Clarity>maxClarity, the first beauty coefficient remains unchanged.

步骤612,根据目标美颜参数对待处理图像进行美颜处理。Step 612, perform beautification processing on the image to be processed according to the target beautification parameters.

系统中可以包括多个美颜模块,每个美颜模块可以进行一种美颜处理。例如,系统中可以包括磨皮模块、美白模块、大眼模块、瘦脸模块、肤色调整模块,可以分别对待处理图像进行磨皮处理、美白处理、大眼处理、瘦脸处理、肤色调整处理。在一个实施例中,各个美颜模块可以是一个代码函数模块,通过该代码函数模块来实现对图像的美颜处理。每个代码函数模块都对应一个标志位,通过该标志位来决定是否进行对应的处理。例如,每个美颜模块都对应一个标志位Stat,当该标志位Stat的取值为1或ture时,说明需要进行该美颜模块对应的美颜处理;当该标志位Stat的取值为0或fals时,说明不需要进行该美颜模块对应的美颜处理。The system can include multiple beautifying modules, and each beautifying module can perform a kind of beautifying treatment. For example, the system may include a skin-removal module, a whitening module, an eye-enlargement module, a face-slimming module, and a skin tone adjustment module, which can respectively perform skin-removal processing, whitening processing, eye enlargement processing, face-slimming processing, and skin color adjustment processing on the image to be processed. In one embodiment, each beautification module may be a code function module, and the beautification process on the image is realized through the code function module. Each code function module corresponds to a flag bit, which is used to determine whether to perform corresponding processing. For example, each beauty module corresponds to a flag bit Stat. When the value of the flag bit Stat is 1 or true, it indicates that the beauty treatment corresponding to the beauty module needs to be performed; when the value of the flag bit Stat is When it is 0 or false, it means that the beauty treatment corresponding to the beauty module does not need to be performed.

具体地,根据目标美颜参数对各个美颜模块的标志位进行赋值,根据标志位获取用于美颜处理的美颜模块,并将目标美颜参数��入到获取的各个美颜模块中对待处理图像进行美颜处理。例如,目标美颜参数中包括对人脸进行美白处理,则将美白模块对应的标志位赋值为1,若不需要进行大眼处理,则将大眼模块对应的标志位赋值为0。在进行美颜处理的时候,遍历各个美颜模块根据标志位判断是否需要进行对应的处理。可以理解的是,各个美颜模块进行的美颜处理是相互独立,互不影响的。假设图像需要进行多种美颜处理,则可以依次通过各个美颜模块进行处理,得到最终的美颜图像。Specifically, assign a value to the flag bits of each beauty-beautification module according to the target beauty-beautification parameters, obtain the beauty-beauty modules used for beauty-beauty processing according to the flag bits, and input the target beauty-beauty parameters into each acquired beauty-beauty module to be processed The image is beautified. For example, if the target beautification parameters include whitening the face, assign a value of 1 to the flag corresponding to the whitening module, and assign a value of 0 to the flag corresponding to the eye enlargement module if no eye-enlargement processing is required. When performing beautification processing, each beautification module is traversed to determine whether corresponding processing is required according to the flag bit. It is understandable that the beauty treatment performed by each beauty module is independent of each other and does not affect each other. Assuming that the image requires multiple beautification processes, each beautification module can be processed sequentially to obtain the final beautification image.

当待处理图像中存在多个目标区域的时候,可以遍历每一个目标区域,并获取每一个目标区域对应的目标美颜参数,根据获取的目标美颜参数分别对目标区域进行美颜处理。若只对待处理图像中的目标区域进行美颜处理,而未对待处理图像中除目标区域之外的剩余区域做美颜处理,在处理之后可能会导致目标区域和剩余区域之间有明显的差异。例如,对目标区域进行美白处理之后,目标区域的亮度明显比剩余区域的亮度高,这样使图像看起来很不自然。那么可以在生成的美颜图像中,将目标区域的边界进行过渡处理,使得到的美颜图像看起来更加自然。When there are multiple target areas in the image to be processed, each target area may be traversed, and the target beautification parameters corresponding to each target area may be obtained, and the target areas may be beautified according to the acquired target beautification parameters. If only the target area in the image to be processed is beautified, but the remaining area in the image to be processed is not processed, there may be a significant difference between the target area and the remaining area after processing. . For example, after whitening is performed on the target area, the brightness of the target area is obviously higher than that of the remaining area, which makes the image look unnatural. Then, in the generated beautification image, the boundary of the target area can be transitioned, so that the obtained beautification image looks more natural.

上述实施例提供的图像处理方法,首先获取待处理图像的清晰度,根据清晰度获取美颜参数模型。然后根据清晰度和美颜参数模型获取对应的目标美颜参数,再根据获取的目标美颜参数对待处理图像进行美颜处理。这样可以根据图像的不同清晰度进行不同的美颜处理,提高了图像处理的准确率,优化了美颜处理。In the image processing method provided by the above embodiments, firstly, the sharpness of the image to be processed is obtained, and a beautification parameter model is obtained according to the sharpness. Then obtain the corresponding target beauty parameters according to the definition and beauty parameter model, and then perform beauty processing on the image to be processed according to the acquired target beauty parameters. In this way, different beautification processes can be performed according to different resolutions of the images, which improves the accuracy of image processing and optimizes the beautification process.

图8为一个实施例中图像处理装置的结构示意图。如图8所示,该图像处理装置800包括图像获取模块802、模型获取模块804、参数获取模块806和美颜处理模块808。其中:Fig. 8 is a schematic structural diagram of an image processing device in an embodiment. As shown in FIG. 8 , the image processing device 800 includes an image acquisition module 802 , a model acquisition module 804 , a parameter acquisition module 806 and a beautification processing module 808 . in:

图像获取模块802,用于获取待处理图像及对应的清晰度。The image acquisition module 802 is configured to acquire the image to be processed and the corresponding sharpness.

模型获取模块804,用于根据所述清晰度获取对应的美颜参数模型,所述美颜参数模型是指用于计算美颜参数的模型。The model acquiring module 804 is configured to acquire a corresponding beautification parameter model according to the definition, and the beautification parameter model refers to a model used to calculate the beautification parameter.

参数获取模块806,用于根据所述清晰度和美颜参数模型获取对应的目标美颜参数。A parameter acquisition module 806, configured to acquire corresponding target beauty parameters according to the definition and beauty parameter models.

美颜处理模块808,用于根据所述目标美颜参数对所述待处理图像进行美颜处理。A beautification processing module 808, configured to perform beautification processing on the image to be processed according to the target beautification parameters.

上述实施例提供的图像处理装置,根据待处理图像的清晰度获取对应的美颜参数模型,根据清晰度和美颜参数模型获取对应的目标美颜参数,并根据获取的目标美颜参数对待处理图像进行美颜处理。这样可以根据不同清晰度的图像进行不同的美颜处理,提高了图像处理的准确率,优化了美颜处理。The image processing device provided in the above embodiment obtains the corresponding beauty parameter model according to the definition of the image to be processed, obtains the corresponding target beauty parameter according to the definition and the beauty parameter model, and obtains the image to be processed according to the acquired target beauty parameter model. Perform beauty treatment. In this way, different beautification processes can be performed according to images of different resolutions, which improves the accuracy of image processing and optimizes the beautification process.

在一个实施例中,图像获取模块802还用于获取待处理图像中的目标区域,并计算所述目标区域对应的清晰度。In one embodiment, the image acquisition module 802 is further configured to acquire a target area in the image to be processed, and calculate the sharpness corresponding to the target area.

在一个实施例中,图像获取模块802还用于检测待处理图像中的人脸区域,并根据所述人脸区域获取对应的目标区域。In one embodiment, the image acquiring module 802 is further configured to detect a face area in the image to be processed, and acquire a corresponding target area according to the face area.

在一个实施例中,模型获取模块804还用于确定所述清晰度所处的参数区间,获取所述参数区间对应的美颜参数模型。In one embodiment, the model obtaining module 804 is further configured to determine the parameter range in which the sharpness is located, and obtain a beauty parameter model corresponding to the parameter range.

在一个实施例中,参数获取模块806还用于获取美颜基础参数;根据所述清晰度和美颜参数模型计算美颜系数,并根据所述美颜基础参数和美颜系数获取目标美颜参数。In one embodiment, the parameter acquiring module 806 is also used to acquire basic beautification parameters; calculate a beautification coefficient according to the definition and beautification parameter model, and obtain target beautification parameters according to the basic beautification parameters and beautification coefficients.

在一个实施例中,参数获取模块806还用于获取所述待处理图像中人脸区域对应的人物属性特征,并根据所述人物属性特征获取对应的美颜基础参数。In one embodiment, the parameter acquiring module 806 is further configured to acquire the character attribute features corresponding to the face area in the image to be processed, and acquire the corresponding basic beautification parameters according to the character attribute features.

在一个实施例中,参数获取模块806还用于根据所述清晰度和美颜参数模型计算美颜系数,根据所述第一美颜基础参数和美颜系数获取对应的第一美颜参数,并将所述第二美颜基础参数作为第二美颜参数;根据所述第一美颜参数和第二美颜参数获取目标美颜参数。In one embodiment, the parameter acquisition module 806 is further configured to calculate the beautification coefficient according to the definition and the beautification parameter model, obtain the corresponding first beautification parameter according to the first beautification basic parameter and the beautification coefficient, and The second basic beautification parameter is used as a second beautification parameter; and a target beautification parameter is obtained according to the first beautification parameter and the second beautification parameter.

上述图像处理装置中各个模块的划分仅用于举例说明,在其他实施例中,可将图像处理装置按照需要划分为不同的模块,以完成上述图像处理装置的全部或部分功能。The division of each module in the above image processing device is for illustration only. In other embodiments, the image processing device may be divided into different modules as required to complete all or part of the functions of the above image processing device.

本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机程序的非易失性计算机可读存储介质,当所述计算机程序被一个或多个处理器执行时,使得所述处理器执行以下步骤:The embodiment of the present application also provides a computer-readable storage medium. One or more non-transitory computer-readable storage media containing a computer program that, when executed by one or more processors, causes the processors to:

获取待处理图像及对应的清晰度;Obtain the image to be processed and the corresponding sharpness;

根据所述清晰度获取对应的美颜参数模型,所述美颜参数模型是指用于计算美颜参数的模型;Obtaining a corresponding beautification parameter model according to the definition, the beautification parameter model refers to a model used to calculate the beautification parameter;

根据所述清晰度和美颜参数模型获取对应的目标美颜参数;Acquiring corresponding target beauty parameters according to the definition and beauty parameter model;

根据所述目标美颜参数对所述待处理图像进行美颜处理。Perform beautification processing on the image to be processed according to the target beautification parameters.

在一个实施例中,所述处理器执行的所述获取待处理图像及对应的清晰度包括:In one embodiment, the acquiring the image to be processed and the corresponding sharpness performed by the processor includes:

获取待处理图像中的目标区域,并计算所述目标区域对应的清晰度。A target area in the image to be processed is acquired, and a sharpness corresponding to the target area is calculated.

在一个实施例中,所述处理器执行的所述获取待处理图像中的目标区域包括:In one embodiment, the acquiring the target area in the image to be processed performed by the processor includes:

检测待处理图像中的人脸区域,并根据所述人脸区域获取对应的目标区域。Detect the face area in the image to be processed, and obtain the corresponding target area according to the face area.

在一个实施例中,所述处理器执行的所述根据所述清晰度获取对应的美颜参数模型包括:In one embodiment, the obtaining the corresponding beauty parameter model according to the definition performed by the processor includes:

确定所述清晰度所处的参数区间,获取所述参数区间对应的美颜参数模型。Determine the parameter interval where the sharpness is located, and obtain a beautification parameter model corresponding to the parameter interval.

在一个实施例中,所述处理器执行的所述根据所述清晰度和美颜参数模型获取对应的目标美颜参数包括:In one embodiment, the acquiring corresponding target beauty parameters according to the sharpness and beauty parameter model performed by the processor includes:

获取美颜基础参数;Obtain the basic parameters of beauty;

根据所述清晰度和美颜参数模型计算美颜系数,并根据所述美颜基础参数和美颜系数获取目标美颜参数。A beautification coefficient is calculated according to the definition and a beautification parameter model, and a target beautification parameter is obtained according to the basic beautification parameters and the beautification coefficient.

在一个实施例中,所述处理器执行的所述获取美颜基础参数包括:In one embodiment, the acquisition of basic beauty parameters performed by the processor includes:

获取所述待处理图像中人脸区域对应的人物属性特征,并根据所述人物属性特征获取对应的美颜基础参数。Obtain the character attribute features corresponding to the face area in the image to be processed, and acquire the corresponding basic beautification parameters according to the character attribute features.

在一个实施例中,所述处理器执行的所述根据所述清晰度和美颜参数模型获取对应的目标美颜参数包括:In one embodiment, the acquiring corresponding target beauty parameters according to the sharpness and beauty parameter model performed by the processor includes:

根据所述清晰度和美颜参数模型���算美颜系数,根据所述第一美颜基础参数和美颜系数获取对应的第一美颜参数,并将所述第二美颜基础参数作为第二美颜参数;Calculate the beautification coefficient according to the definition and the beautification parameter model, obtain the corresponding first beautification parameter according to the first beautification basic parameter and the beautification coefficient, and use the second beautification basic parameter as the second beautification parameter;

根据所述第一美颜参数和第二美颜参数获取目标美颜参数。Acquiring target beauty parameters according to the first beauty parameters and the second beauty parameters.

本申请实施例还提供一种电子设备。上述电子设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image SignalProcessing,图像信号处理)管线的各种处理单元。图9为一个实施例中图像处理电路的示意图。如图9所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。The embodiment of the present application also provides an electronic device. The above-mentioned electronic device includes an image processing circuit, and the image processing circuit may be implemented by hardware and/or software components, and may include various processing units defining an ISP (Image Signal Processing, image signal processing) pipeline. FIG. 9 is a schematic diagram of an image processing circuit in one embodiment. As shown in FIG. 9 , for ease of description, only various aspects of the image processing technology related to the embodiment of the present application are shown.

如图9所示,图像处理电路包括ISP处理器940和控制逻辑器950。成像设备910捕捉的图像数据首先由ISP处理器940处理,ISP处理器940对图像数据进行分析以捕捉可用于确定和/或成像设备910的一个或多个控制参数的图像统计信息。成像设备910可包括具有一个或多个透镜912和图像传感器914的照相机。图像传感器914可包括色彩滤镜阵列(如Bayer滤镜),图像传感器914可获取用图像传感器914的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器940处理的一组原始图像数据。传感器920(如陀螺仪)可基于传感器920接口类型把采集的图像处理的参数(如防抖参数)提供给ISP处理器940。传感器920接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口或上述接口的组合。As shown in FIG. 9 , the image processing circuit includes an ISP processor 940 and a control logic 950 . Image data captured by imaging device 910 is first processed by ISP processor 940 , which analyzes the image data to capture image statistics that may be used to determine and/or control one or more parameters of imaging device 910 . Imaging device 910 may include a camera having one or more lenses 912 and an image sensor 914 . Image sensor 914 may include a color filter array (such as a Bayer filter), and image sensor 914 may obtain light intensity and wavelength information captured with each imaging pixel of image sensor 914 and provide a set of raw images that may be processed by ISP processor 940. image data. The sensor 920 (such as a gyroscope) may provide the collected image processing parameters (such as anti-shake parameters) to the ISP processor 940 based on the interface type of the sensor 920 . The interface of the sensor 920 may utilize a SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above interfaces.

此外,图像传感器914也可将原始图像数据发送给传感器920,传感器920可基于传感器920接口类型把原始图像数据提供给ISP处理器940,或者传感器920将原始图像数据存储到图像存储器930中。Additionally, image sensor 914 may also send raw image data to sensor 920 , which may provide raw image data to ISP processor 940 based on the sensor 920 interface type, or sensor 920 may store raw image data in image memory 930 .

ISP处理器940按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器940可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。The ISP processor 940 processes raw image data on a pixel-by-pixel basis in various formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 940 may perform one or more image processing operations on raw image data, gather statistical information about the image data. Among other things, image processing operations can be performed with the same or different bit depth precision.

ISP处理器940还可从图像存储器930接收图像数据。例如,传感器920接口将原始图像数据发送给图像存储器930,图像存储器930中的原始图像数据再提供给ISP处理器940以供处理。图像存储器930可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。ISP processor 940 may also receive image data from image memory 930 . For example, the sensor 920 interface sends raw image data to the image memory 930, and the raw image data in the image memory 930 is provided to the ISP processor 940 for processing. The image memory 930 may be a part of a memory device, a storage device, or an independent dedicated memory in an electronic device, and may include a DMA (Direct Memory Access) feature.

当接收到来自图像传感器914接口或来自传感器920接口或来自图像存储器930的原始图像数据时,ISP处理器940可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器930,以便在被显示之前进行另外的处理。ISP处理器940还可从图像存储器930接收处理数据,对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。处理后的图像数据可输出给显示器980,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进���步处理。此外,ISP处理器940的输出还可发送给图像存储器930,且显示器980可从图像存储器930读取图像数据。在一个实施例中,图像存储器930可被配置为实现一个或多个帧缓冲器。此外,ISP处理器940的输出可发送给编码器/解码器970,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器980设备上之前解压缩。When receiving raw image data from the image sensor 914 interface or from the sensor 920 interface or from the image memory 930, the ISP processor 940 may perform one or more image processing operations, such as temporal filtering. The processed image data may be sent to image memory 930 for additional processing before being displayed. The ISP processor 940 may also receive processed data from the image memory 930 on which to perform image data processing in the raw domain and in the RGB and YCbCr color spaces. The processed image data may be output to the display 980 for viewing by the user and/or further processed by a graphics engine or a GPU (Graphics Processing Unit, graphics processor). In addition, the output of the ISP processor 940 can also be sent to the image memory 930 , and the display 980 can read image data from the image memory 930 . In one embodiment, image memory 930 may be configured to implement one or more frame buffers. Also, the output of the ISP processor 940 may be sent to an encoder/decoder 970 for encoding/decoding image data. The encoded image data may be saved and decompressed prior to display on the display 980 device.

ISP处理器940处理图像数据的步骤包括:对图像数据进行VFE(Video Front End,视频前端)处理和CPP(Camera Post Processing,摄像头后处理)处理。对图像数据的VFE处理可包括修正图像数据的对比度或亮度、修改以数字方式记录的光照状态数据、对图像数据进行补偿处理(如白平衡,自动增益控制,γ校正等)、对图像数据进行滤波处理等。对图像数据的CPP处理可包括对图像进行缩放、向每个路径提供预览帧和记录帧。其中,CPP可使用不同的编解码器来处理预览帧和记录帧。ISP处理器940处理后的图像数据可发送给美颜模块960,以便在被显示之前对图像进行美颜处理。美颜模块960对图像数据美颜处理可包括:美白、祛斑、磨皮、瘦脸、祛痘、增大眼睛等。其中,美颜模块960可为移动终端中CPU(Central Processing Unit,中央处理器)、GPU或协处理器等。美颜模块960处理后的数据可发送给编码器/解码器970,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器980设备上之前解压缩。其中,美颜模块960还可位于编码器/解码器970与显示器980之间,即美颜模块对已成像的图像进行美颜处理。上述编码器/解码器970可为移动终端中CPU、GPU或协处理器等。The steps for the ISP processor 940 to process the image data include: performing VFE (Video Front End, video front end) processing and CPP (Camera Post Processing, camera post processing) processing on the image data. VFE processing of image data may include correction of contrast or brightness of image data, modification of digitally recorded light state data, compensation processing of image data (such as white balance, automatic gain control, gamma correction, etc.), filter processing, etc. CPP processing of image data may include scaling the image, providing preview frames and recording frames for each path. Among them, CPP can use different codecs to process preview frames and record frames. The image data processed by the ISP processor 940 can be sent to the beautifying module 960 so as to perform beautifying processing on the image before being displayed. The beautification module 960 can perform beautification processing on image data, including: whitening, freckle removal, skin smoothing, face thinning, acne removal, eye enlargement, etc. Wherein, the beautifying module 960 may be a CPU (Central Processing Unit, central processing unit), a GPU, or a co-processor in the mobile terminal. The data processed by the beauty module 960 can be sent to the encoder/decoder 970 for encoding/decoding image data. The encoded image data may be saved and decompressed prior to display on the display 980 device. Wherein, the beautification module 960 may also be located between the encoder/decoder 970 and the display 980, that is, the beautification module performs beautification processing on the imaged image. The aforementioned encoder/decoder 970 may be a CPU, a GPU, or a coprocessor in a mobile terminal.

ISP处理器940确定的统计数据可发送给控制逻辑器950单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜912阴影校正等图像传感器914统计信息。控制逻辑器950可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备910的控制参数以及ISP处理器940的控制参数。例如,成像设备910的控制参数可包括传感器920控制参数(例如增益、曝光控制的积分时间)、照相机闪光控制参数、透镜912控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜912阴影校正参数。The statistics determined by the ISP processor 940 may be sent to the control logic 950 unit. For example, statistics may include image sensor 914 statistics such as auto exposure, auto white balance, auto focus, flicker detection, black level compensation, lens 912 shading correction, etc. Control logic 950 may include a processor and/or a microcontroller that executes one or more routines (e.g., firmware) that determine control parameters of imaging device 910 and ISP processing based on received statistical data. The control parameters of the device 940. For example, control parameters of imaging device 910 may include sensor 920 control parameters (eg, gain, integration time for exposure control), camera flash control parameters, lens 912 control parameters (eg, focal length for focus or zoom), or combinations of these parameters. ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (eg, during RGB processing), as well as lens 912 shading correction parameters.

运用图9中图像处理技术可实现上述实施例提供的图像处理方法。The image processing method provided in the above embodiment can be implemented by using the image processing technology in FIG. 9 .

一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例提供的图像处理方法。A computer program product containing instructions, when running on a computer, causes the computer to execute the image processing method provided by the above embodiments.

本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。���失性存储器可包括���机���取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any reference to memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Suitable nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Chain Synchlink DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the patent scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of protection of the patent application should be based on the appended claims.

Claims (10)

  1. A kind of 1. image processing method, it is characterised in that the described method includes:
    Obtain pending image and corresponding clarity;
    Corresponding U.S. face parameter model is obtained according to the clarity, U.S.'s face parameter model refers to be used to calculate U.S. face parameter Model;
    Corresponding target U.S. face parameter is obtained according to the clarity and U.S. face parameter model;
    U.S. face processing carries out the pending image according to target U.S. face parameter.
  2. 2. image processing method according to claim 1, it is characterised in that the pending image and corresponding clear of obtaining Clear degree includes:
    The target area in pending image is obtained, and calculates the corresponding clarity in the target area.
  3. 3. image processing method according to claim 2, it is characterised in that the target area obtained in pending image Domain includes:
    The human face region in pending image is detected, and corresponding target area is obtained according to the human face region.
  4. 4. image processing method according to claim 1, it is characterised in that described corresponding according to clarity acquisition U.S. face parameter model includes:
    Determine the parameter section residing for the clarity, obtain the corresponding U.S. face parameter model in the parameter section.
  5. 5. image processing method according to any one of claims 1 to 4, it is characterised in that described according to the clarity Obtaining corresponding target U.S. face parameter with U.S. face parameter model includes:
    Obtain U.S. face underlying parameter;
    U.S. face coefficient is calculated according to the clarity and U.S. face parameter model, and according to the U.S. face underlying parameter and U.S. face coefficient Obtain target U.S. face parameter.
  6. 6. image processing method according to claim 5, it is characterised in that U.S.'s face underlying parameter that obtains includes:
    The corresponding character attribute feature of human face region in the pending image is obtained, and is obtained according to the character attribute feature Corresponding U.S.'s face underlying parameter.
  7. 7. image processing method according to claim 5, it is characterised in that U.S.'s face underlying parameter includes the first U.S. face Underlying parameter and the second U.S. face underlying parameter;
    It is described to obtain corresponding target U.S. face parameter according to the clarity and U.S. face parameter model and include:
    U.S. face coefficient is calculated according to the clarity and U.S. face parameter model, according to the described first U.S. face underlying parameter and U.S. face system Number obtains the corresponding first U.S. face parameter, and using the described second U.S. face underlying parameter as the second U.S. face parameter;
    According to the described first U.S. face parameter and second U.S. face parameter acquiring target U.S. face parameter.
  8. 8. a kind of image processing apparatus, it is characterised in that described device includes:
    Image collection module, for obtaining pending image and corresponding clarity;
    Model acquisition module, for obtaining corresponding U.S. face parameter model according to the clarity, U.S.'s face parameter model is Refer to the model for being used for calculating U.S. face parameter;
    Parameter acquisition module, for obtaining corresponding target U.S. face parameter according to the clarity and U.S. face parameter model;
    U.S. face processing module, for carrying out U.S. face processing to the pending image according to target U.S. face parameter.
  9. 9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program quilt The image processing method as any one of claim 1 to 7 is realized when processor performs.
  10. 10. a kind of electronic equipment, including memory and processor, computer-readable instruction is stored in the memory, it is described When instruction is performed by the processor so that the processor performs the image procossing as any one of claim 1 to 7 Method.
CN201711244125.9A 2017-11-30 2017-11-30 Image processing method, device, computer-readable recording medium and electronic equipment Pending CN107909542A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711244125.9A CN107909542A (en) 2017-11-30 2017-11-30 Image processing method, device, computer-readable recording medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711244125.9A CN107909542A (en) 2017-11-30 2017-11-30 Image processing method, device, computer-readable recording medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN107909542A true CN107909542A (en) 2018-04-13

Family

ID=61848352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711244125.9A Pending CN107909542A (en) 2017-11-30 2017-11-30 Image processing method, device, computer-readable recording medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN107909542A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685741A (en) * 2018-12-28 2019-04-26 北京旷视科技有限公司 A kind of image processing method, device and computer storage medium
CN111031239A (en) * 2019-12-05 2020-04-17 Oppo广东移动通信有限公司 Image processing method and apparatus, electronic device and computer-readable storage medium
CN111739086A (en) * 2020-06-30 2020-10-02 上海商汤智能科技有限公司 Method and device for measuring area, electronic device and storage medium
CN112118457A (en) * 2019-06-20 2020-12-22 腾讯科技(深圳)有限公司 Live broadcast data processing method and device, readable storage medium and computer equipment
CN112561822A (en) * 2020-12-17 2021-03-26 苏州科达科技股份有限公司 Beautifying method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6413679A (en) * 1987-07-07 1989-01-18 Sharp Kk Writing control circuit for picture memory
CN103208129A (en) * 2013-04-23 2013-07-17 董昊程 Portable editor and edition method for processing camera photo
CN104537630A (en) * 2015-01-22 2015-04-22 厦门美图之家科技有限公司 Method and device for image beautifying based on age estimation
CN104967784A (en) * 2015-07-02 2015-10-07 广东欧珀移动通信有限公司 Method for mobile terminal to invoke underlying effect mode of camera function and mobile terminal
CN106161962A (en) * 2016-08-29 2016-11-23 广东欧珀移动通信有限公司 An image processing method and terminal
CN106210516A (en) * 2016-07-06 2016-12-07 广东欧珀移动通信有限公司 A camera processing method and terminal
US20170213327A1 (en) * 2016-01-21 2017-07-27 Astral Images Corporation Method and system for processing image content for enabling high dynamic range (uhd) output thereof and computer-readable program product comprising uhd content created using same

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6413679A (en) * 1987-07-07 1989-01-18 Sharp Kk Writing control circuit for picture memory
CN103208129A (en) * 2013-04-23 2013-07-17 董昊程 Portable editor and edition method for processing camera photo
CN104537630A (en) * 2015-01-22 2015-04-22 厦门美图之家科技有限公司 Method and device for image beautifying based on age estimation
CN104967784A (en) * 2015-07-02 2015-10-07 广东欧珀移动通信有限公司 Method for mobile terminal to invoke underlying effect mode of camera function and mobile terminal
US20170213327A1 (en) * 2016-01-21 2017-07-27 Astral Images Corporation Method and system for processing image content for enabling high dynamic range (uhd) output thereof and computer-readable program product comprising uhd content created using same
CN106210516A (en) * 2016-07-06 2016-12-07 广东欧珀移动通信有限公司 A camera processing method and terminal
CN106161962A (en) * 2016-08-29 2016-11-23 广东欧珀移动通信有限公司 An image processing method and terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SRUTHY SURAN 等: "Automatic aesthetic quality assessment of photographic images using deep convolutional neural network", 《 2016 INTERNATIONAL CONFERENCE ON INFORMATION SCIENCE (ICIS)》 *
欧阳杰臣 等: "基于Android人脸美化App的研究与实现", 《计算机技术与发展》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685741A (en) * 2018-12-28 2019-04-26 北京旷视科技有限公司 A kind of image processing method, device and computer storage medium
CN109685741B (en) * 2018-12-28 2020-12-11 北京旷视科技有限公司 An image processing method, device and computer storage medium
CN112118457A (en) * 2019-06-20 2020-12-22 腾讯科技(深圳)有限公司 Live broadcast data processing method and device, readable storage medium and computer equipment
CN112118457B (en) * 2019-06-20 2022-09-09 腾讯科技(深圳)有限公司 Live broadcast data processing method and device, readable storage medium and computer equipment
CN111031239A (en) * 2019-12-05 2020-04-17 Oppo广东移动通信有限公司 Image processing method and apparatus, electronic device and computer-readable storage medium
CN111031239B (en) * 2019-12-05 2021-06-18 Oppo广东移动通信有限公司 Image processing method and apparatus, electronic device and computer-readable storage medium
CN111739086A (en) * 2020-06-30 2020-10-02 上海商汤智能科技有限公司 Method and device for measuring area, electronic device and storage medium
CN111739086B (en) * 2020-06-30 2024-12-10 上海商汤智能科技有限公司 Method and device for measuring area, electronic device and storage medium
CN112561822A (en) * 2020-12-17 2021-03-26 苏州科达科技股份有限公司 Beautifying method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107993209B (en) Image processing method, apparatus, computer-readable storage medium and electronic device
EP3477931B1 (en) Image processing method and device, readable storage medium and electronic device
JP7027537B2 (en) Image processing methods and equipment, electronic devices, and computer-readable storage media
CN107730445B (en) Image processing method, image processing apparatus, storage medium, and electronic device
CN107800966B (en) Image processing method, apparatus, computer-readable storage medium and electronic device
CN107862659B (en) Image processing method, image processing device, computer equipment and computer readable storage medium
CN107730446B (en) Image processing method, image processing device, computer equipment and computer readable storage medium
CN107862657A (en) Image processing method, device, computer equipment and computer-readable recording medium
CN107742274A (en) Image processing method, device, computer-readable storage medium, and electronic device
CN107862663A (en) Image processing method, device, readable storage medium and computer equipment
CN107563976B (en) Beauty parameter obtaining method and device, readable storage medium and computer equipment
CN107886484A (en) Beautifying method, device, computer readable storage medium and electronic device
CN108009999A (en) Image processing method, device, computer-readable storage medium, and electronic device
CN107451969A (en) Image processing method, device, mobile terminal, and computer-readable storage medium
CN107800965B (en) Image processing method, image processing device, computer-readable storage medium and computer equipment
CN107911625A (en) Light measuring method, light measuring device, readable storage medium and computer equipment
CN107945135A (en) Image processing method, device, storage medium and electronic equipment
CN107945106B (en) Image processing method, apparatus, electronic device, and computer-readable storage medium
CN107730444A (en) Image processing method, device, readable storage medium storing program for executing and computer equipment
CN107862658B (en) Image processing method, apparatus, computer-readable storage medium and electronic device
CN108022207A (en) Image processing method, device, storage medium and electronic equipment
CN108717530A (en) Image processing method, device, computer readable storage medium and electronic equipment
CN107909542A (en) Image processing method, device, computer-readable recording medium and electronic equipment
CN107862654A (en) Image processing method, device, computer-readable storage medium, and electronic device
CN107578372B (en) Image processing method, apparatus, computer-readable storage medium and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Country or region before: China

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180413