[go: up one dir, main page]

CN107895352A - A kind of image processing method and mobile terminal - Google Patents

A kind of image processing method and mobile terminal Download PDF

Info

Publication number
CN107895352A
CN107895352A CN201711039553.8A CN201711039553A CN107895352A CN 107895352 A CN107895352 A CN 107895352A CN 201711039553 A CN201711039553 A CN 201711039553A CN 107895352 A CN107895352 A CN 107895352A
Authority
CN
China
Prior art keywords
image
brightness
highlight
pixel
mobile terminal
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
CN201711039553.8A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201711039553.8A priority Critical patent/CN107895352A/en
Publication of CN107895352A publication Critical patent/CN107895352A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Landscapes

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

Abstract

本发明提供了一种图像处理方法及移动终端,涉及图像处理技术领域,所述方法包括:识别原始图像中的人脸区域;对所述人脸区域进行模糊处理,得到模糊图像;对所述模糊图像中的高光部位进行提亮。本发明通过对高光部位进行提亮,使得高光部位所对应的区域能够与其他区域形成鲜明的对比以及明显的明暗差异,从而提高了图像的立体感。

The present invention provides an image processing method and a mobile terminal, which relate to the technical field of image processing. The method includes: identifying a human face area in an original image; performing blur processing on the human face area to obtain a blurred image; Brightens the highlights in the image by blurring them. In the present invention, by brightening the high light part, the area corresponding to the high light part can form sharp contrast and obvious difference between light and dark with other areas, thereby improving the three-dimensional effect of the image.

Description

一种图像处理方法及移动终端Image processing method and mobile terminal

技术领域technical field

本发明实施例涉及图像处理技术领域,尤其涉及一种图像处理方法及移动终端。The embodiments of the present invention relate to the technical field of image processing, and in particular, to an image processing method and a mobile terminal.

背景技术Background technique

随着图像技术的不断发展,用户在使用移动终端进行拍照后,一般都会使用美颜功能对拍照得到的图像进行美化,从而对图像中的瑕疵进行处理,得到美化后的图像。With the continuous development of image technology, users generally use a beautification function to beautify the image obtained after taking a photo with a mobile terminal, so as to process defects in the image and obtain a beautified image.

相关技术中,当用户触发对图像进行美化的操作时,移动终端可以响应于用户触发的操作,通过对图像中的皮肤纹理进行绘制修饰、降低反差等处理,使得图像中的皮肤更加平滑,得到美化后的图像,完成对图像的美化。In related technologies, when a user triggers an operation to beautify an image, the mobile terminal may respond to the user-triggered operation by rendering and modifying the skin texture in the image, reducing contrast, etc., to make the skin in the image smoother, and obtain After beautifying the image, complete the beautification of the image.

但是,在对图像进行绘制修饰、降低反差等处理后,图像的轮廓和阴影不清晰,容易造成图像的立体感不足。However, after the image is processed by drawing modification, contrast reduction, etc., the outline and shadow of the image are not clear, which may easily cause insufficient three-dimensional effect of the image.

发明内容Contents of the invention

本发明实施例提供一种图像处理方法及移动终端,以解决图像的立体感不足的问题。Embodiments of the present invention provide an image processing method and a mobile terminal, so as to solve the problem of insufficient three-dimensional effect of images.

为了解决上述技术问题,本发明是这样实现的:一种图像处理方法,包括:In order to solve the above-mentioned technical problems, the present invention is achieved in that a kind of image processing method comprises:

识别原始图像中的人脸区域;Identify the face area in the original image;

对所述人脸区域进行模糊处理,得到模糊图像;blurring the face area to obtain a blurred image;

对所述模糊图像中的高光部位进行提亮。Brighten the highlight parts in the blurred image.

第一方面,本发明实施例还提供了一种移动终端,所述移动终端包括:In the first aspect, an embodiment of the present invention also provides a mobile terminal, where the mobile terminal includes:

识别模块,用于识别原始图像中的人脸区域;A recognition module is used to recognize the face area in the original image;

模糊处理模块,用于对所述人脸区域进行模糊处理,得到模糊图像;A blur processing module, configured to perform blur processing on the face area to obtain a blur image;

提亮模块,用于对所述模糊图像中的高光部位进行提亮。The brightening module is used to brighten the highlight parts in the blurred image.

第二方面,本发明实施例提供了一种移动终端,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上述图像处理方法中任一项所述的图像处理方法的步骤。In the second aspect, an embodiment of the present invention provides a mobile terminal, including a processor, a memory, and a computer program stored on the memory and operable on the processor, and the computer program is executed by the processor When implementing the steps of the image processing method described in any one of the above image processing methods.

第三方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如上述图像处理方法中任一项所述的图像处理方法的步骤。In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the image processing method described in any one of the above-mentioned image processing methods can be implemented. The steps of the image processing method described above.

本发明实施例通过对高光部位进行提亮,使得高光部位所对应的区域能够与其他区域形成鲜明的对比以及明显的明暗差异,从而提高了图像的立体感。In the embodiment of the present invention, by brightening the highlight part, the region corresponding to the highlight part can form a sharp contrast and obvious difference between light and dark with other regions, thereby improving the three-dimensional effect of the image.

附图说明Description of drawings

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

图1是本发明实施例提供的一种图像处理方法的步骤流程图;Fig. 1 is a flow chart of the steps of an image processing method provided by an embodiment of the present invention;

图2是本发明实施例提供的一种图像处理方法的步骤流程图;Fig. 2 is a flow chart of steps of an image processing method provided by an embodiment of the present invention;

图3是本发明实施例提供的一种移动终端的结构框图;FIG. 3 is a structural block diagram of a mobile terminal provided by an embodiment of the present invention;

图4是本发明实施例提供的一种移动终端的硬件结构示意图。Fig. 4 is a schematic diagram of a hardware structure of a mobile terminal provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

实施例一Embodiment one

参照图1,示出了本发明实施例的一种图像处理方法的步骤流程图,具体可以包括如下步骤:Referring to FIG. 1 , it shows a flow chart of steps of an image processing method according to an embodiment of the present invention, which may specifically include the following steps:

步骤101,识别原始图像中的人脸区域。Step 101, identifying the face area in the original image.

其中,该原始图像为需要进行处理,但是尚未进行处理的图像。而且,该原始图像可以为经过美化后的图像,也可以为未经过美化的图像,本发明实施例对此不做限定。例如,该原始图像可以为经过美颜效果处理的图像,也可以为未经美颜效果处理的图像。Wherein, the original image is an image that needs to be processed but has not been processed. Moreover, the original image may be a beautified image or an unbeautified image, which is not limited in this embodiment of the present invention. For example, the original image may be an image processed with a beautifying effect, or an image not processed with a beautifying effect.

由于在对图像的处理过程中,需要针对图像中的人脸区域进行处理,以提高图像的立体感。因此,当移动终端检测到用户触发的处理选项后,需要先对原始图像中的人脸区域进行识别,得到原始图像中的人脸区域,以便在后续步骤中对识别得到的人脸区域进行处理。Because in the process of image processing, it is necessary to process the face area in the image to improve the three-dimensional effect of the image. Therefore, when the mobile terminal detects the processing option triggered by the user, it needs to first identify the face area in the original image to obtain the face area in the original image, so that the recognized face area can be processed in subsequent steps .

步骤102,对人脸区域进行模糊处理,得到模糊图像。Step 102, blurring the face area to obtain a blurred image.

移动终端在识别得到人脸区域后,可以对人脸区域中的各个像素进行模糊处理,使得人脸区域中的各个像素更加接近,从而产生模糊效果,得到模糊图像。After the mobile terminal recognizes the face area, it can perform blur processing on each pixel in the face area, so that each pixel in the face area is closer to each other, thereby producing a blur effect and obtaining a blurred image.

具体地,移动终端可以以人脸区域中的某个像素为圆心,按照预先设置的处理半径,将圆形范围内每个像素的参数值进行平均处理,使得圆形范围内各个像素的参数值更加接近,达到模糊处理的效果。Specifically, the mobile terminal can take a certain pixel in the face area as the center of the circle, and according to the preset processing radius, average the parameter values of each pixel in the circular range, so that the parameter values of each pixel in the circular range Closer, to achieve the effect of blurring.

进一步地,移动终端可以将人脸区域中的每个像素作为圆心,并按照相同的处理半径对圆形范围内的像素进行模糊处理,最后实现对人脸区域中的每个像素都进行了多次模糊处理,得到对人脸区域模糊处理后的模糊图像。Further, the mobile terminal can use each pixel in the face area as the center of the circle, and perform blurring processing on the pixels in the circle range according to the same processing radius, and finally realize multiple blurring processes for each pixel in the face area. The second blurring process is performed to obtain the blurred image after blurring the face area.

需要说明的是,移动终端还可以采用正态分布取权值的方式对识别得到的人脸区域进行模糊处理,也可以采用其他方式进行模糊处理,本发明实施例对此不做限定。It should be noted that, the mobile terminal may also use a normal distribution method to obtain weights to perform blurring processing on the recognized face area, or may use other methods to perform blurring processing, which is not limited in this embodiment of the present invention.

步骤103,对模糊图像中的高光部位进行提亮。Step 103, brighten the highlight parts in the blurred image.

为了提高原始图像的立体感,需要对模糊图像中的高光部位进行提亮,也即是将高光部位所对应的像素的亮度进行提高,使得亮度提高后的像素能够与其他像素形成较为明显的明暗差异,从而提升模糊原始图像的立体感。In order to improve the three-dimensionality of the original image, it is necessary to brighten the highlights in the blurred image, that is, to increase the brightness of the pixels corresponding to the highlights, so that the pixels with increased brightness can form a more obvious light and shade with other pixels. difference, thereby enhancing the stereoscopic effect of the blurred original image.

具体地,移动终端可以先对模糊图像中每个像素的亮度进行统计,将亮度参数值大于预设阈值的像素作为高亮像素,从而得到多个高亮像素,由多个高亮像素组合得到模糊图像中的高光部位。再对高光部位对应的每个像素的亮度参数值进行提高,也即是对高亮像素的亮度参数值进行提高,使得高亮像素在原来的基础上亮度再次得到提高,完成对高光部位的提亮,进而将提亮后的像素与原始图像进行合成,使得合成后的图像中明暗差异较为明显,从而提高了原始图像的立体感。Specifically, the mobile terminal can first count the brightness of each pixel in the blurred image, and use pixels whose brightness parameter value is greater than a preset threshold as highlighted pixels, thereby obtaining multiple highlighted pixels, which can be obtained by combining multiple highlighted pixels Blur the highlights in the image. Then increase the brightness parameter value of each pixel corresponding to the highlight part, that is, increase the brightness parameter value of the highlight pixel, so that the brightness of the highlight pixel can be improved again on the original basis, and complete the improvement of the highlight part. Brightness, and then synthesize the brightened pixels with the original image, so that the difference between light and dark in the synthesized image is more obvious, thereby improving the three-dimensional effect of the original image.

综上所述,本发明实施例通过对高光部位进行提亮,使得高光部位所对应的区域能够与其他区域形成鲜明的对比以及明显的明暗差异,从而提高了图像的立体感。To sum up, the embodiment of the present invention brightens the highlight parts, so that the region corresponding to the highlight parts can form a sharp contrast and obvious difference between light and dark with other regions, thereby improving the three-dimensional effect of the image.

实施例二Embodiment two

参照图2,示出了本发明实施例的一种图像处理方法的步骤流程图,具体可以包括如下步骤:Referring to FIG. 2 , it shows a flow chart of the steps of an image processing method according to an embodiment of the present invention, which may specifically include the following steps:

步骤201,识别原始图像中的人脸区域。Step 201, identifying the face area in the original image.

本步骤201与步骤101类似,在此不再赘述。This step 201 is similar to step 101 and will not be repeated here.

步骤202,对人脸区域进行模糊处理,得到模糊图像。Step 202, blurring the face area to obtain a blurred image.

为了方便后续步骤提取得到人脸区域中亮度较高的像素,移动终端可以先对原始图像进行去色处理,使得原始图像由彩色转换为包括黑白灰三色的灰度图像,再对灰度图像进行模糊处理,得到模糊图像。也即是,移动终端可以先对人脸区域进行去色处理,得到灰度图像,再对该灰度图像进行模糊处理,得到模糊图像。In order to facilitate the extraction of pixels with higher brightness in the face area in the subsequent steps, the mobile terminal can decolorize the original image first, so that the original image is converted from color to a grayscale image including black, white and gray, and then the grayscale image Perform blur processing to obtain a blurred image. That is, the mobile terminal may first perform decolorization processing on the face area to obtain a grayscale image, and then perform blurring processing on the grayscale image to obtain a blurred image.

具体地,移动终端可以对识别得到的人脸区域进行去色处理,使得人脸区域中由多个色彩参数构成的彩色像素转换为亮度不同的灰度像素,从而得到灰度图像。Specifically, the mobile terminal may perform decolorization processing on the recognized face area, so that color pixels in the face area formed by multiple color parameters are converted into grayscale pixels with different brightness, thereby obtaining a grayscale image.

其中,该灰度像素可以由最暗的黑色像素转换为最亮的白色像素,灰度像素的亮度可以根据原始图像中像素的亮度进行确定。Wherein, the grayscale pixel can be converted from the darkest black pixel to the brightest white pixel, and the brightness of the grayscale pixel can be determined according to the brightness of the pixel in the original image.

去色得到灰度图像后,可以采用与步骤102类似的方式对灰度图像进行模糊处理,得到模糊图像,在此不再赘述。After decolorizing to obtain the grayscale image, the grayscale image may be blurred in a manner similar to step 102 to obtain a blurred image, which will not be repeated here.

步骤203,降低模糊图像中低亮像素的亮度,得到高光图像。Step 203, reducing the brightness of low-brightness pixels in the blurred image to obtain a high-brightness image.

其中,该低亮像素为亮度小于第一预设阈值的像素。例如,可以将像素的亮度分为0至255个等级,像素的亮度等级越高,则说明像素越亮。因此,第一预设阈值可以设置为200,相应的,移动终端可以对亮度小于200的像素进行调整,将相应像素的亮度降低为0,则可以得到高光图像。Wherein, the low-brightness pixel is a pixel whose brightness is smaller than a first preset threshold. For example, the brightness of a pixel can be classified into levels ranging from 0 to 255, and the higher the brightness level of a pixel, the brighter the pixel. Therefore, the first preset threshold can be set to 200. Correspondingly, the mobile terminal can adjust the pixels whose luminance is less than 200, and reduce the luminance of the corresponding pixel to 0, so that a highlight image can be obtained.

而且,由于可以采用不同的色彩空间对模糊图像中的像素进行表示,因此可以采用不同的方式调节模糊图像中低亮像素的亮度。例如,移动终端可以调整模糊图像的色阶,得到高光图像;或者,移动终端还可以调整模糊图像对应的色调曲线,得到高光图像,当然还可以采用其他方式调整模糊图像中低亮像素的亮度,本发明实施例对此不作限定。Moreover, since different color spaces can be used to represent pixels in the blurred image, brightness of low-brightness pixels in the blurred image can be adjusted in different ways. For example, the mobile terminal can adjust the color scale of the blurred image to obtain a high-light image; or, the mobile terminal can also adjust the tone curve corresponding to the blurred image to obtain a high-light image. Of course, other methods can be used to adjust the brightness of low-brightness pixels in the blurred image. This embodiment of the present invention does not limit it.

具体地,移动终端在获取模糊图像后,可以获取模糊图像中每个像素的亮度,并判断每个像素的亮度是否小于第一预设阈值,如果某个模糊图像的色阶小于第一预设阈值,则说明该像素属于低亮像素,需要将该像素的亮度调整至最低,则该像素呈现为黑色,使得模糊图像中仅包括亮度大于第一预设阈值的像素,得到高光图像。Specifically, after acquiring the blurred image, the mobile terminal can acquire the brightness of each pixel in the blurred image, and judge whether the brightness of each pixel is less than the first preset threshold, if the color level of a certain blurred image is less than the first preset threshold threshold, it means that the pixel is a low-brightness pixel, and the brightness of the pixel needs to be adjusted to the minimum, then the pixel appears black, so that only pixels with brightness greater than the first preset threshold are included in the blurred image, and a high-light image is obtained.

步骤204,将高光图像中的高亮像素作为高光部位对应的像素。Step 204, use the highlighted pixels in the highlighted image as the pixels corresponding to the highlighted parts.

与步骤203的举例相应的是,可以将像素的亮度分为0至255个等级,高亮像素可以为亮度大于第二预设阈值的像素。例如,第二预设阈值可以设置为235,则高亮像素即为亮度大于235的像素。Corresponding to the example of step 203, the brightness of the pixels may be classified into levels ranging from 0 to 255, and the highlighted pixels may be pixels whose brightness is greater than a second preset threshold. For example, the second preset threshold can be set to 235, then the highlighted pixels are pixels with brightness greater than 235.

移动终端获取高亮图像后,可以对高亮图像中每个像素的亮度进行判断,当某个像素亮度大于第二预设阈值时,则可以将该像素确定为高亮像素,从而得到多个高亮像素,最后由多个高亮像素组合得到高光图像中的高光部位,以便在后续步骤中对该高光部位进行调整。After the mobile terminal obtains the highlighted image, it can judge the brightness of each pixel in the highlighted image. When the brightness of a certain pixel is greater than the second preset threshold, the pixel can be determined as a highlighted pixel, thereby obtaining multiple The highlighted pixels are finally combined to obtain a highlight part in the highlight image by combining a plurality of highlight pixels, so that the highlight part can be adjusted in a subsequent step.

步骤205,提高高亮像素的亮度。Step 205, increasing brightness of highlighted pixels.

移动终端在确定高光图像中的高光部位后,可以对该高光部位进行提亮,也即是,对高光图像中的高亮像素的亮度进行提高,调节完成后即可将调节后的高光图像与原始图像进行合成,使得调整后的高亮像素能够与原始图像中的其他像素形成比较明显的差异,从而提高原始图像的立体感。After determining the highlight part in the highlight image, the mobile terminal can brighten the highlight part, that is, increase the brightness of the highlight pixel in the highlight image, and after the adjustment is completed, the adjusted highlight image and The original image is synthesized so that the adjusted highlighted pixels can form a relatively obvious difference with other pixels in the original image, thereby improving the stereoscopic effect of the original image.

而且,移动终端可以检测用户触发的调整操作,当检测到用户触发调整操作时,则可以根据该调整操作对高光部位进行提亮,使得调整后的亮度可以根据用户触发的调整操作进行控制,进而更加符合用户的需求。Moreover, the mobile terminal can detect the adjustment operation triggered by the user, and when it detects the adjustment operation triggered by the user, it can brighten the highlight part according to the adjustment operation, so that the adjusted brightness can be controlled according to the adjustment operation triggered by the user, and then It is more in line with the needs of users.

另外,与步骤203相应的,由于可以采用不同方式将模糊图像中低亮像素的亮度调整至最低,也可以采用不同的方式将高光图像中的高亮像素的亮度调高。In addition, corresponding to step 203, since the brightness of the low-brightness pixels in the blurred image can be adjusted to the minimum in different ways, the brightness of the high-brightness pixels in the high-brightness image can also be adjusted up in different ways.

可选的,移动终端可以提高高亮像素在色调-饱和度-明度色彩空间中明度的参数值;或者,移动终端还可以提高高亮像素在红-绿-蓝色彩空间中红、绿和蓝的参数值,使得高亮像素的亮度等级得到提高。Optionally, the mobile terminal can increase the brightness parameter value of the highlighted pixel in the hue-saturation-brightness color space; or, the mobile terminal can also increase the red, green and blue values of the highlighted pixel in the red-green-blue color space. The parameter value of , so that the brightness level of the highlighted pixel is improved.

综上所述,本发明实施例提供的图像处理方法,通过识别原始图像中的人脸区域,并对人脸区域进行模糊处理,得到模糊图像,最后对模糊图像中的高光部位进行提亮。通过对原始图像进行处理得到模糊图像,再对模糊图像中的高光部位进行提亮,使得高光部位所对应的区域能够与其他区域形成比较鲜明的对比,得到较为明显的明暗差异,从而解决了原始图像立体感不足的问题,提高了原始图像的立体感。To sum up, the image processing method provided by the embodiment of the present invention obtains a blurred image by identifying the face area in the original image and performing blurring processing on the face area, and finally brightens the highlight parts in the blurred image. The blurred image is obtained by processing the original image, and then the highlight parts in the blurred image are brightened, so that the area corresponding to the highlight part can form a sharper contrast with other areas, and a more obvious difference between light and shade is obtained, thus solving the original problem. The problem of insufficient three-dimensionality of the image improves the three-dimensionality of the original image.

进一步地,通过降低模糊图像中低亮像素的亮度,得到高光图像,并对高光图像中高亮像素的亮度进行提高,可以更加准确的确定模糊图像中的高光部位,进而提高高亮像素的亮度的准确性。Further, by reducing the brightness of the low-brightness pixels in the blurred image to obtain a high-light image, and increasing the brightness of the high-brightness pixels in the high-light image, the high-light parts in the blurred image can be more accurately determined, and then the brightness of the high-brightness pixels can be improved. accuracy.

进一步地,通过调整模糊图像的色阶或者调整模糊图像对应的色调曲线,可以通过多种方式对模糊图像中低亮像素的亮度进行调整,从而得到高光图像,提高了调整模糊图像的灵活性。Furthermore, by adjusting the color scale of the blurred image or adjusting the tone curve corresponding to the blurred image, the brightness of the low-brightness pixels in the blurred image can be adjusted in various ways to obtain a high-light image, which improves the flexibility of adjusting the blurred image.

进一步地,通过不同的色彩空间对高光图像的亮度进行调整,从而增加了调整亮度的方式,提高了调整亮度的灵活性。Further, the brightness of the highlight image is adjusted through different color spaces, thereby increasing the way of adjusting the brightness and improving the flexibility of adjusting the brightness.

进一步地,通过对人脸区域进行去色处理,得到灰度图像,再对灰度图像进行模糊处理,得到模糊图像,可以减少移动终端进行模糊处理的工作量,仅需对少量的参数值进行计算即可得到模糊图像,提高了获取模糊图像的效率。Furthermore, by performing decolorization processing on the face area to obtain a grayscale image, and then blurring the grayscale image to obtain a blurred image, the workload of blurring processing on the mobile terminal can be reduced, and only a small number of parameter values need to be processed. The fuzzy image can be obtained through calculation, and the efficiency of obtaining the fuzzy image is improved.

进一步地,根据用户触发的调整操作,对高光图像的亮度进行调整,使得调整的亮度更加符合用户的期望,从而可以提高用户粘性。Further, according to the adjustment operation triggered by the user, the brightness of the highlight image is adjusted so that the adjusted brightness is more in line with the user's expectation, thereby improving user stickiness.

实施例三Embodiment three

参照图3,示出了本发明实施例的一种移动终端的结构框图,具体可以包括:Referring to FIG. 3 , it shows a structural block diagram of a mobile terminal according to an embodiment of the present invention, which may specifically include:

识别模块301,用于识别原始图像中的人脸区域;Recognition module 301, for recognizing the face region in the original image;

模糊处理模块302,用于对该人脸区域进行模糊处理,得到模糊图像;The blur processing module 302 is used to perform blur processing on the face area to obtain a blur image;

提亮模块303,用于对该模糊图像中的高光部位进行提亮。The brightening module 303 is configured to brighten the highlight parts in the blurred image.

可选的,该提亮模块303包括:Optionally, the brightening module 303 includes:

降低子模块,用于降低该模糊图像中低亮像素的亮度,得到高光图像,该低亮像素为亮度小于第一预设阈值的像素。The reducing sub-module is used to reduce the brightness of low-brightness pixels in the blurred image to obtain a high-brightness image, and the low-brightness pixels are pixels whose brightness is smaller than a first preset threshold.

确定子模块,用于将该高光图像中的高亮像素作为该高光部位对应的像素,该高亮像素为亮度大于第二预设阈值的像素;A determining submodule, configured to use the highlight pixel in the highlight image as the pixel corresponding to the highlight part, where the highlight pixel is a pixel whose brightness is greater than a second preset threshold;

提高子模块,用于提高该高亮像素的亮度。The increasing sub-module is used to increase the brightness of the highlighted pixel.

可选的,该降低子模块包括:Optionally, the lowering submodule includes:

第一调整单元,用于调整该模糊图像的色阶,得到该高光图像;a first adjustment unit, configured to adjust the color scale of the blurred image to obtain the highlight image;

或者,第二调整单元,用于调整该模糊图像对应的色调曲线,得到该高光图像。Alternatively, the second adjustment unit is configured to adjust the tone curve corresponding to the blurred image to obtain the highlight image.

可选的,该提高子模块包括:Optionally, the improved submodule includes:

第一提高单元,用于提高该高亮像素在色调-饱和度-明度色彩空间中明度的参数值;The first improving unit is used to increase the parameter value of the brightness of the highlighted pixel in the hue-saturation-brightness color space;

或者,第二提高单元,用于提高该高亮像素在红-绿-蓝色彩空间中红、绿和蓝的参数值。Or, the second improving unit is configured to increase the red, green and blue parameter values of the highlighted pixel in the red-green-blue color space.

可选的,该模糊处理模块302包括:Optionally, the obfuscation processing module 302 includes:

去色子模块,用于对该人脸区域进行去色处理,得到灰度图像;The decolorization sub-module is used to decolorize the face area to obtain a grayscale image;

模糊子模块,用于对该灰度图像进行模糊处理,得到该模糊图像。The fuzzy sub-module is used to perform fuzzy processing on the grayscale image to obtain the fuzzy image.

可选的,该提亮模块303包括:Optionally, the brightening module 303 includes:

检测子模块,用于检测用户触发的调整操作;The detection sub-module is used to detect the adjustment operation triggered by the user;

提亮子模块,用于当检测到用户触发该调整操作时,根据该调整操作对该高光部位进行提亮。The brightening sub-module is configured to brighten the highlight part according to the adjustment operation when it is detected that the user triggers the adjustment operation.

本发明实施例提供的移动终端能够实现图1至图2的方法实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The mobile terminal provided by the embodiment of the present invention can implement various processes implemented by the mobile terminal in the method embodiments shown in FIG. 1 to FIG. 2 , and details are not repeated here to avoid repetition.

综上所述,本发明实施例提供的移动终端,通过对高光部位进行提亮,使得高光部位所对应的区域能够与其他区域形成鲜明的对比以及明显的明暗差异,从而提高了图像的立体感。To sum up, the mobile terminal provided by the embodiment of the present invention, by brightening the highlight part, enables the area corresponding to the highlight part to form a sharp contrast and obvious difference between light and dark with other areas, thereby improving the three-dimensional effect of the image. .

图4为实现本发明各个实施例的一种移动终端的硬件结构示意图,该移动终端400包括但不限于:射频单元401、网络模块402、音频输出单元403、输入单元404、传感器405、显示单元406、用户输入单元407、接口单元408、存储器409、处理器410、以及电源411等部件。本领域技术人员可以理解,图4中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,移动终端包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。4 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention, the mobile terminal 400 includes but not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, and a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , a processor 410 , and a power supply 411 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 4 does not constitute a limitation on the mobile terminal, and the mobile terminal may include more or less components than shown in the figure, or combine some components, or different components layout. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle terminal, a wearable device, and a pedometer.

其中,处理器410,用于识别原始图像中的人脸区域;Wherein, the processor 410 is used to identify the face area in the original image;

处理器410,用于对所述人脸区域进行模糊处理,得到模糊图像;A processor 410, configured to perform blurring processing on the face area to obtain a blurred image;

处理器410,用于对所述模糊图像中的高光部位进行提亮。The processor 410 is configured to brighten highlight parts in the blurred image.

综上所述,本发明实施例提供的移动终端,通过识别原始图像中的人脸区域,并对人脸区域进行模糊处理,得到模糊图像,最后对模糊图像中的高光部位进行提亮。通过对原始图像进行处理得到模糊图像,再对模糊图像中的高光部位进行提亮,使得高光部位所对应的区域能够与其他区域形成比较鲜明的对比,得到较为明显的明暗差异,从而解决了原始图像立体感不足的问题,提高了原始图像的立体感。To sum up, the mobile terminal provided by the embodiment of the present invention obtains a blurred image by identifying the face area in the original image and blurring the face area, and finally brightens the highlight part in the blurred image. The blurred image is obtained by processing the original image, and then the highlight parts in the blurred image are brightened, so that the area corresponding to the highlight part can form a sharper contrast with other areas, and a more obvious difference between light and shade is obtained, thus solving the original problem. The problem of insufficient three-dimensionality of the image improves the three-dimensionality of the original image.

应理解的是,本发明实施例中,射频单元401可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器410处理;另外,将上行的数据发送给基站。通常,射频单元401包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元401还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 can be used for receiving and sending signals during sending and receiving information or during a call. Specifically, the downlink data from the base station is received and processed by the processor 410; Uplink data is sent to the base station. Generally, the radio frequency unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 401 can also communicate with the network and other devices through a wireless communication system.

移动终端通过网络模块402为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The mobile terminal provides users with wireless broadband Internet access through the network module 402, such as helping users send and receive emails, browse web pages, and access streaming media.

音频输出单元403可以将射频单元401或网络模块402接收的或者在存储器409中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元403还可以提供与移动终端400执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元403包括扬声器、蜂鸣器以及受话器等。The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 can also provide audio output related to a specific function performed by the mobile terminal 400 (eg, call signal reception sound, message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.

输入单元404用于接收音频或视频信号。输入单元404可以包括图形处理器(Graphics Processing Unit,GPU)4041和麦克风4042,图形处理器4041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元406上。经图形处理器4041处理后的图像帧可以存储在存储器409(或其它存储介质)中或者经由射频单元401或网络模块402进行发送。麦克风4042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元401发送到移动通信基站的格式输出。The input unit 404 is used for receiving audio or video signals. The input unit 404 can include a graphics processing unit (Graphics Processing Unit, GPU) 4041 and a microphone 4042, and the graphics processing unit 4041 is used for still pictures or video images obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The data is processed. The processed image frames may be displayed on the display unit 406 . The image frames processed by the graphics processor 4041 may be stored in the memory 409 (or other storage media) or sent via the radio frequency unit 401 or the network module 402 . The microphone 4042 can receive sound, and can process such sound into audio data. The processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 401 for output in the case of a phone call mode.

移动终端400还包括至少一种传感器405,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板4061的亮度,接近传感器可在移动终端400移动到耳边时,关闭显示面板4061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器405还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The mobile terminal 400 also includes at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 4061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 4061 and the display panel 4061 when the mobile terminal 400 moves to the ear / or backlighting. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is still, and can be used to identify the posture of mobile terminals (such as horizontal and vertical screen switching, related games, etc.) , magnetometer posture calibration), vibration recognition-related functions (such as pedometer, knocking), etc.; the sensor 405 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.

显示单元406用于显示由用户输入的信息或提供给用户的信息。显示单元406可包括显示面板4061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板4061。The display unit 406 is used to display information input by the user or information provided to the user. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.

用户输入单元407可用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元407包括触控面板4071以及其他输入设备4072。触控面板4071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板4071上或在触控面板4071附近的操作)。触控面板4071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器410,接收处理器410发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板4071。除了触控面板4071,用户输入单元407还可以包括其他输入设备4072。具体地,其他输入设备4072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 407 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the mobile terminal. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072 . The touch panel 4071, also referred to as a touch screen, can collect touch operations of the user on or near it (for example, the user uses any suitable object or accessory such as a finger or a stylus on the touch panel 4071 or near the touch panel 4071). operate). The touch panel 4071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the For the processor 410, receive the command sent by the processor 410 and execute it. In addition, the touch panel 4071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 4071 , the user input unit 407 may also include other input devices 4072 . Specifically, other input devices 4072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.

进一步的,触控面板4071可覆盖在显示面板4061上,当触控面板4071检测到在其上或附近的触摸操作后,传送给处理器410以确定触摸事件的类型,随后处理器410根据触摸事件的类型在显示面板4061上提供相应的视觉输出。虽然在图4中,触控面板4071与显示面板4061是作为两个独立的部件来实现移动终端的输入和输出功能,但是在某些实施例中,可以将触控面板4071与显示面板4061集成而实现移动终端的输入和输出功能,具体此处不做限定。Furthermore, the touch panel 4071 can be covered on the display panel 4061, and when the touch panel 4071 detects a touch operation on or near it, it will be sent to the processor 410 to determine the type of the touch event, and then the processor 410 will The type of event provides a corresponding visual output on the display panel 4061 . Although in FIG. 4, the touch panel 4071 and the display panel 4061 are used as two independent components to realize the input and output functions of the mobile terminal, in some embodiments, the touch panel 4071 and the display panel 4061 can be integrated. The implementation of the input and output functions of the mobile terminal is not specifically limited here.

接口单元408为外部装置与移动终端400连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元408可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端400内的一个或多个元件或者可以用于在移动终端400和外部装置之间传输数据。The interface unit 408 is an interface for connecting an external device to the mobile terminal 400 . For example, an external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 408 can be used to receive input from an external device (for example, data information, power, etc.) transfer data between devices.

存储器409可用于存储软件程序以及各种数据。存储器409可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器409可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 409 can be used to store software programs as well as various data. The memory 409 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of mobile phones (such as audio data, phonebook, etc.), etc. In addition, the memory 409 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.

处理器410是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器409内的软件程序和/或模块,以及调用存储在存储器409内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。处理器410可包括一个或多个处理单元;优选的,处理器410可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器410中。The processor 410 is the control center of the mobile terminal, which uses various interfaces and lines to connect various parts of the entire mobile terminal, by running or executing software programs and/or modules stored in the memory 409, and calling data stored in the memory 409 , execute various functions of the mobile terminal and process data, so as to monitor the mobile terminal as a whole. The processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem The processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 410 .

移动终端400还可以包括给各个部件供电的电源411(比如电池),优选的,电源411可以通过电源管理系统与处理器410逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile terminal 400 can also include a power supply 411 (such as a battery) for supplying power to various components. Preferably, the power supply 411 can be logically connected to the processor 410 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. and other functions.

另外,移动终端400包括一些未示出的功能模块,在此不再赘述。In addition, the mobile terminal 400 includes some functional modules not shown, which will not be repeated here.

优选的,本发明实施例还提供一种移动终端,包括处理器410,存储器409,存储在存储器409上并可在所述处理器410上运行的计算机程序,该计算机程序被处理器410执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, the embodiment of the present invention also provides a mobile terminal, including a processor 410, a memory 409, a computer program stored in the memory 409 and operable on the processor 410, when the computer program is executed by the processor 410 Each process of the above embodiment of the image processing method can achieve the same technical effect, so in order to avoid repetition, details are not repeated here.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述图像处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。The embodiment of the present invention also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the above-mentioned image processing method embodiment is realized, and the same technology can be achieved. Effect, in order to avoid repetition, will not repeat them here. Wherein, the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in various embodiments of the present invention.

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。Embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementations, and the above-mentioned specific implementations are only illustrative, rather than restrictive, and those of ordinary skill in the art will Under the enlightenment of the present invention, without departing from the gist of the present invention and the protection scope of the claims, many forms can also be made, all of which belong to the protection of the present invention.

Claims (10)

1.一种图像处理方法,应用于移动终端,其特征在于,所述方法包括:1. A kind of image processing method, is applied to mobile terminal, is characterized in that, described method comprises: 识别原始图像中的人脸区域;Identify the face area in the original image; 对所述人脸区域进行模糊处理,得到模糊图像;blurring the face area to obtain a blurred image; 对所述模糊图像中的高光部位进行提亮。Brighten the highlight parts in the blurred image. 2.根据权利要求1所述的方法,其特征在于,所述对所述模糊图像中的高光部位进行提亮,包括:2. The method according to claim 1, wherein the highlighting of the blurred image comprises: 降低所述模糊图像中低亮像素的亮度,得到高光图像,所述低亮像素为亮度小于第一预设阈值的像素。reducing the brightness of low-brightness pixels in the blurred image to obtain a high-brightness image, and the low-brightness pixels are pixels whose brightness is less than a first preset threshold. 将所述高光图像中的高亮像素作为所述高光部位对应的像素,所述高亮像素为亮度大于第二预设阈值的像素;Using a highlight pixel in the highlight image as a pixel corresponding to the highlight part, the highlight pixel is a pixel whose brightness is greater than a second preset threshold; 提高所述高亮像素的亮度。Increase the brightness of the highlighted pixels. 3.根据权利要求2所述的方法,其特征在于,所述降低所述模糊图像中低亮像素的亮度,得到高光图像,包括:3. The method according to claim 2, wherein the reducing the brightness of low-brightness pixels in the blurred image to obtain a high-light image comprises: 调整所述模糊图像的色阶,得到所述高光图像;adjusting the color scale of the blurred image to obtain the highlight image; 或者,调整所述模糊图像对应的色调曲线,得到所述高光图像。Alternatively, the tone curve corresponding to the blurred image is adjusted to obtain the highlight image. 4.根据权利要求2所述的方法,其特征在于,所述提高所述高亮像素的亮度,包括:4. The method according to claim 2, wherein said increasing the brightness of said highlighted pixel comprises: 提高所述高亮像素在色调-饱和度-明度色彩空间中明度的参数值;Improve the parameter value of the brightness of the highlighted pixel in the hue-saturation-brightness color space; 或者,提高所述高亮像素在红-绿-蓝色彩空间中红、绿和蓝的参数值。Or, increase the red, green and blue parameter values of the highlighted pixel in the red-green-blue color space. 5.一种移动终端,其特征在于,所述移动终端包括:5. A mobile terminal, characterized in that the mobile terminal comprises: 识别模块,用于识别原始图像中的人脸区域;A recognition module is used to recognize the face area in the original image; 模糊处理模块,用于对所述人脸区域进行模糊处理,得到模糊图像;A blur processing module, configured to perform blur processing on the face area to obtain a blur image; 提亮模块,用于对所述模糊图像中的高光部位进行提亮。The brightening module is used to brighten the highlight parts in the blurred image. 6.根据权利要求5所述的移动终端,其特征在于,所述提亮模块包括:6. The mobile terminal according to claim 5, wherein the highlighting module comprises: 降低子模块,用于降低所述模糊图像中低亮像素的亮度,得到高光图像,所述低亮像素为亮度小于第一预设阈值的像素。The reducing sub-module is used to reduce the brightness of low-brightness pixels in the blurred image to obtain a high-brightness image, and the low-brightness pixels are pixels whose brightness is smaller than a first preset threshold. 确定子模块,用于将所述高光图像中的高亮像素作为所述高光部位对应的像素,所述高亮像素为亮度大于第二预设阈值的像素;A determining submodule, configured to use a highlight pixel in the highlight image as a pixel corresponding to the highlight part, where the highlight pixel is a pixel whose brightness is greater than a second preset threshold; 提高子模块,用于提高所述高亮像素的亮度。The improving sub-module is used to increase the brightness of the highlighted pixel. 7.根据权利要求6所述的移动终端,其特征在于,所述降低子模块包括:7. The mobile terminal according to claim 6, wherein the lowering submodule comprises: 第一调整单元,用于调整所述模糊图像的色阶,得到所述高光图像;a first adjustment unit, configured to adjust the color scale of the blurred image to obtain the highlight image; 或者,第二调整单元,用于调整所述模糊图像对应的色调曲线,得到所述高光图像。Alternatively, the second adjustment unit is configured to adjust the tone curve corresponding to the blurred image to obtain the highlight image. 8.根据权利要求6所述的移动终端,其特征在于,所述提高子模块包括:8. The mobile terminal according to claim 6, wherein the improving submodule comprises: 第一提高单元,用于提高所述高亮像素在色调-饱和度-明度色彩空间中明度的参数值;The first improving unit is used to increase the parameter value of the brightness of the highlighted pixel in the hue-saturation-brightness color space; 或者,第二提高单元,用于提高所述高亮像素在红-绿-蓝色彩空间中红、绿和蓝的参数值。Or, the second improving unit is configured to increase the red, green and blue parameter values of the highlighted pixel in the red-green-blue color space. 9.一种移动终端,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至4中任一项所述的图像处理方法的步骤。9. A mobile terminal, characterized by comprising a processor, a memory, and a computer program stored on the memory and operable on the processor, when the computer program is executed by the processor, the The steps of the image processing method described in any one of claims 1 to 4. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1至4中任一项所述的图像处理方法的步骤。10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the image according to any one of claims 1 to 4 is realized The steps of the processing method.
CN201711039553.8A 2017-10-30 2017-10-30 A kind of image processing method and mobile terminal Pending CN107895352A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711039553.8A CN107895352A (en) 2017-10-30 2017-10-30 A kind of image processing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711039553.8A CN107895352A (en) 2017-10-30 2017-10-30 A kind of image processing method and mobile terminal

Publications (1)

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

Family

ID=61804086

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711039553.8A Pending CN107895352A (en) 2017-10-30 2017-10-30 A kind of image processing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN107895352A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596828A (en) * 2018-04-18 2018-09-28 网易(杭州)网络有限公司 Image floodlight processing method and device, electronic equipment, storage medium
CN109118427A (en) * 2018-09-07 2019-01-01 Oppo广东移动通信有限公司 Image light efficiency treating method and apparatus, electronic equipment, storage medium
CN109145930A (en) * 2018-08-23 2019-01-04 陕西师范大学 It is a kind of based on semi-supervised image significance detection method
CN109859115A (en) * 2018-12-28 2019-06-07 努比亚技术有限公司 A kind of image processing method, terminal and computer readable storage medium
CN110751593A (en) * 2019-09-25 2020-02-04 北京迈格威科技有限公司 Image blurring processing method and device
CN110827204A (en) * 2018-08-14 2020-02-21 阿里巴巴集团控股有限公司 Image processing method and device and electronic equipment
CN111127337A (en) * 2019-11-28 2020-05-08 稿定(厦门)科技有限公司 Image local area highlight adjusting method, medium, equipment and device
CN111835937A (en) * 2020-06-30 2020-10-27 维沃移动通信有限公司 Image processing method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392409A (en) * 2014-12-01 2015-03-04 厦门美图之家科技有限公司 Acceleration method for beautifying image
CN105512605A (en) * 2015-11-23 2016-04-20 小米科技有限责任公司 Face image processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104392409A (en) * 2014-12-01 2015-03-04 厦门美图之家科技有限公司 Acceleration method for beautifying image
CN105512605A (en) * 2015-11-23 2016-04-20 小米科技有限责任公司 Face image processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张玉忠: "《基础摄影与实训》", 31 August 2010, 人民美术出版社 *
耿洪杰: "时尚妆容美容术", 《数码暗房》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596828A (en) * 2018-04-18 2018-09-28 网易(杭州)网络有限公司 Image floodlight processing method and device, electronic equipment, storage medium
CN108596828B (en) * 2018-04-18 2022-03-18 网易(杭州)网络有限公司 Image floodlight processing method and device, electronic equipment and storage medium
CN110827204A (en) * 2018-08-14 2020-02-21 阿里巴巴集团控股有限公司 Image processing method and device and electronic equipment
CN110827204B (en) * 2018-08-14 2022-10-04 阿里巴巴集团控股有限公司 Image processing method and device and electronic equipment
CN109145930A (en) * 2018-08-23 2019-01-04 陕西师范大学 It is a kind of based on semi-supervised image significance detection method
CN109118427A (en) * 2018-09-07 2019-01-01 Oppo广东移动通信有限公司 Image light efficiency treating method and apparatus, electronic equipment, storage medium
CN109118427B (en) * 2018-09-07 2023-05-05 Oppo广东移动通信有限公司 Image light effect processing method and device, electronic equipment and storage medium
CN109859115A (en) * 2018-12-28 2019-06-07 努比亚技术有限公司 A kind of image processing method, terminal and computer readable storage medium
CN110751593A (en) * 2019-09-25 2020-02-04 北京迈格威科技有限公司 Image blurring processing method and device
CN111127337A (en) * 2019-11-28 2020-05-08 稿定(厦门)科技有限公司 Image local area highlight adjusting method, medium, equipment and device
CN111127337B (en) * 2019-11-28 2023-02-10 稿定(厦门)科技有限公司 Image local area highlight adjusting method, medium, equipment and device
CN111835937A (en) * 2020-06-30 2020-10-27 维沃移动通信有限公司 Image processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN107256555B (en) Image processing method, device and storage medium
CN107895352A (en) A kind of image processing method and mobile terminal
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN107977652B (en) Method for extracting screen display content and mobile terminal
CN108492246B (en) Image processing method and device and mobile terminal
TW201903713A (en) Image processing method, device, computer readable storage medium and mobile terminal
CN107908383A (en) A kind of screen color method of adjustment, device and mobile terminal
CN107817939A (en) A kind of image processing method and mobile terminal
CN107958470A (en) A kind of color correcting method, mobile terminal
CN108040209B (en) Shooting method and mobile terminal
CN108234882A (en) A kind of image weakening method and mobile terminal
JP7467667B2 (en) Detection result output method, electronic device and medium
CN108184037A (en) A kind of method for displaying image and mobile terminal
CN108320263A (en) A kind of method, device and mobile terminal of image procossing
CN108037966A (en) A kind of interface display method, device and mobile terminal
CN108198127A (en) A kind of image processing method, device and mobile terminal
CN107730460A (en) A kind of image processing method and mobile terminal
CN109727212B (en) Image processing method and mobile terminal
CN108513067A (en) A kind of filming control method and mobile terminal
CN107845363A (en) A kind of display control method and mobile terminal
CN110059627A (en) A kind of display control method and terminal
CN108038889A (en) The processing method and mobile terminal of a kind of image color cast
CN109639981B (en) Image shooting method and mobile terminal
CN107729100A (en) A kind of interface display control method and mobile terminal
CN108322639A (en) A kind of method, apparatus and mobile terminal of image procossing

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180410