[go: up one dir, main page]

CN106357978A - Image output method, device and terminal - Google Patents

Image output method, device and terminal Download PDF

Info

Publication number
CN106357978A
CN106357978A CN201610802926.1A CN201610802926A CN106357978A CN 106357978 A CN106357978 A CN 106357978A CN 201610802926 A CN201610802926 A CN 201610802926A CN 106357978 A CN106357978 A CN 106357978A
Authority
CN
China
Prior art keywords
image
acquired
brightness
preset
captured image
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.)
Granted
Application number
CN201610802926.1A
Other languages
Chinese (zh)
Other versions
CN106357978B (en
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 CN201610802926.1A priority Critical patent/CN106357978B/en
Publication of CN106357978A publication Critical patent/CN106357978A/en
Application granted granted Critical
Publication of CN106357978B publication Critical patent/CN106357978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

本发明实施例公开了一种图像输出方法、装置及终端,其中,该方法包括:检测终端的采集图像中是否包括人脸图像;若包括人脸图像,则按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差;当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像。实施本发明实施例,能够提升终端输出的拍摄图像的质量。

The embodiment of the present invention discloses an image output method, device and terminal, wherein the method comprises: detecting whether a face image is included in a captured image of a terminal; if a face image is included, obtaining the brightness difference between pixels in the face image according to a preset pixel interval; when the brightness difference between pixels in the face image obtained satisfies a preset image output condition, outputting the captured image. The implementation of the embodiment of the present invention can improve the quality of the captured image output by the terminal.

Description

图像输出方法、装置及终端Image output method, device and terminal

技术领域technical field

本发明涉及电子技术领域,尤其涉及一种图像输出方法、装置及终端。The present invention relates to the field of electronic technology, in particular to an image output method, device and terminal.

背景技术Background technique

随着终端技术以及图像处理技术的不断发展,终端如手机上的拍照功能使用越来越频繁,如自拍的使用越来越多,给用户记录生活带来方便。在实际拍摄时,由于通过前置摄像头自拍时一般是没有对焦的,要拍出一张清晰的自拍照就需要手机处于稳定状态,如果手机稍微有点晃动,则可能导致拍照模糊,使得自拍图像质量较差。With the continuous development of terminal technology and image processing technology, the camera function of terminals such as mobile phones is used more and more frequently, such as the use of Selfie more and more, which brings convenience to users to record their lives. In actual shooting, since the selfie is generally not focused when taking a selfie through the front camera, the mobile phone needs to be in a stable state to take a clear selfie. If the mobile phone is slightly shaken, it may cause the picture to be blurred, which will affect the image quality of the selfie. poor.

发明内容Contents of the invention

本发明实施例提供了一种图像输出方法、装置及终端,能够提升终端输出的拍摄图像的质量。Embodiments of the present invention provide an image output method, device, and terminal, which can improve the quality of captured images output by the terminal.

第一方面,本发明实施例公开了一种图像输出方法,包括:In the first aspect, the embodiment of the present invention discloses an image output method, including:

检测终端的采集图像中是否包括人脸图像;Detect whether the captured image of the terminal includes a face image;

若包括人脸图像,则按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差;If a face image is included, the brightness difference between pixels in the face image is obtained according to a preset pixel interval;

当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像。When the brightness difference between pixels in the acquired face image satisfies a preset image output condition, the acquired image is output.

第二方面,本发明实施例还公开了一种图像输出装置,包括:In the second aspect, the embodiment of the present invention also discloses an image output device, including:

图像检测模块,用于检测终端的采集图像中是否包括人脸图像;An image detection module, configured to detect whether a face image is included in the captured image of the terminal;

获取模块,用于在所述图像检测模块检测到所述采集图像中包括人脸图像时,按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差;An acquisition module, configured to acquire the brightness difference between pixels in the face image according to a preset pixel interval when the image detection module detects that the captured image includes a face image;

图像输出模块,用于在所述获取模块获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像。An image output module, configured to output the captured image when the brightness difference between pixels in the face image acquired by the acquisition module satisfies a preset image output condition.

第三方面,本发明实施例还公开了一种终端,包括输出装置、存储器和处理器,所述处理器分别与所述输出装置及所述存储器连接;其中,In the third aspect, the embodiment of the present invention also discloses a terminal, including an output device, a memory, and a processor, and the processor is respectively connected to the output device and the memory; wherein,

所述存储器用于存储应用程序;The memory is used to store application programs;

所述处理器用于调用所述存储器中存储的应用程序执行:The processor is used to invoke the application program stored in the memory to execute:

检测终端的采集图像中是否包括人脸图像;Detect whether the captured image of the terminal includes a face image;

若包括人脸图像,则按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差;If a face image is included, the brightness difference between pixels in the face image is obtained according to a preset pixel interval;

当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,通过所述输出装置输出所述采集图像。When the brightness difference between the pixels in the acquired face image satisfies a preset image output condition, the acquired image is output through the output device.

采用本发明实施例,具有如下有益效果:Adopting the embodiment of the present invention has the following beneficial effects:

在本发明实施例中,可通过检测终端的采集图像中是否包括人脸图像,并检测到包括人脸图像时,按照预设的像素间隔获取该人脸图像中的像素之间的亮度差,从而可在获取的人脸图像中像素的亮度差满足预设的图像输出条件时,将该采集图像作为拍摄图像输出,由此提升了终端输出的拍摄图像的质量。In the embodiment of the present invention, by detecting whether the collected image of the terminal includes a human face image, and when it is detected that the human face image is included, the brightness difference between the pixels in the human face image is obtained according to a preset pixel interval, Therefore, when the brightness difference of pixels in the acquired face image satisfies the preset image output condition, the captured image can be output as a captured image, thereby improving the quality of the captured image output by the terminal.

附图说明Description of drawings

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

图1是本发明实施例提供的一种图像输出方法的流程示意图;FIG. 1 is a schematic flowchart of an image output method provided by an embodiment of the present invention;

图2是本发明实施例提供的另一种图像输出方法的流程示意图;FIG. 2 is a schematic flowchart of another image output method provided by an embodiment of the present invention;

图3是本发明实施例提供的又一种图像输出方法的流程示意图;FIG. 3 is a schematic flowchart of another image output method provided by an embodiment of the present invention;

图4是本发明实施例提供的一种图像输出装置的结构示意图;FIG. 4 is a schematic structural diagram of an image output device provided by an embodiment of the present invention;

图5是本发明实施例提供的另一种图像输出装置的结构示意图;FIG. 5 is a schematic structural diagram of another image output device provided by an embodiment of the present invention;

图6是本发明实施例提供的一种终端的结构示意图。Fig. 6 is a schematic structural diagram of a terminal provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。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 making creative efforts belong to the protection scope of the present invention.

本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”等是用于区别不同对象,而非用于描述特定顺序。此外,术语“包括”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或模块的过程、方法、系统、产品或设备没有限定于已列出的步骤或模块,而是可选地还包括没有列出的步骤或模块,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或模块。The terms "first", "second", and "third" in the specification and claims of the present invention and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the term "comprise", as well as any variations thereof, is intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but optionally also includes steps or modules that are not listed, or optionally includes For other steps or modules inherent in these processes, methods, products or devices.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.

应理解,本发明实施例的技术方案可具体应用于手机(如Android手机、iOS手机等)、平板电脑、移动互联网设备(Mobile Internet Devices,简称“MID”)、个人数字助理(Personal Digital Assistant,简称“PDA”)、摄像机、照相机等具有拍摄功能的终端(Terminal)中。该终端还可称为用户设备(User Equipment,简称为“UE”)、移动终端、无线终端或移动台(Mobile Station,简称为“MS”)等等,本发明实施例不做限定。It should be understood that the technical solutions of the embodiments of the present invention can be specifically applied to mobile phones (such as Android mobile phones, iOS mobile phones, etc.), tablet computers, mobile Internet devices (Mobile Internet Devices, referred to as "MID"), personal digital assistants (Personal Digital Assistant, "PDA" for short), video cameras, cameras and other terminals with shooting functions. The terminal may also be called a user equipment (User Equipment, "UE" for short), a mobile terminal, a wireless terminal, or a mobile station (Mobile Station, "MS" for short), etc., which are not limited in this embodiment of the present invention.

本发明实施例公开了一种图像输出方法、装置及终端,能够提升终端输出的拍摄图像的质量。以下分别详细说明。The embodiment of the present invention discloses an image output method, device and terminal, which can improve the quality of captured images output by the terminal. Each will be described in detail below.

请参阅图1,图1是本发明实施例提供的一种图像输出方法的流程示意图。具体的,本发明实施例的所述方法可具体应用于上述的终端中。如图1所示,本发明实施例的所述图像输出方法可以包括以下步骤:Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of an image output method provided by an embodiment of the present invention. Specifically, the method in the embodiment of the present invention may be specifically applied to the above-mentioned terminal. As shown in Figure 1, the image output method in the embodiment of the present invention may include the following steps:

101、检测终端的采集图像中是否包括人脸图像。101. Detect whether the image collected by the terminal includes a human face image.

具体实施例中,在拍摄人物图像时,一般会通过预设算法来采集人像区域,如进行自拍时,会通过人脸识别算法识别出人脸区域,然后以人脸区域进行亮度拉升,从而提升人脸区域的拉亮,以突出人脸,也即进行FACE AE。由此,可通过检测终端采集图像是否包括人脸图像,根据人脸图像中的亮暗差获取清晰度较高的拍摄图像,以降低因手抖等原因导致终端不稳定而引起的拍摄图像模糊的问题。In a specific embodiment, when shooting a person image, the portrait area is generally collected through a preset algorithm. For example, when taking a selfie, the face area will be identified through a face recognition algorithm, and then the brightness of the face area is used to increase the brightness, thereby Increase the highlighting of the face area to highlight the face, that is, perform FACE AE. Therefore, by detecting whether the image collected by the terminal includes a face image, a higher-definition captured image can be obtained according to the difference between brightness and darkness in the face image, so as to reduce the blurring of the captured image caused by terminal instability due to hand shake and other reasons The problem.

102、若包括人脸图像,则按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差。102. If a face image is included, acquire a brightness difference between pixels in the face image according to a preset pixel interval.

具体的,由于人像的皮肤的特殊性,人脸图像中的相邻像素(不间隔像素)的亮度可能差别较小,由此,可预设一个像素间隔,获取按照该像素间隔间隔一个或多个像素的像素之间的亮度差,以提升图像清晰度检测的准确性。可选的,该像素间隔可根据不同的拍摄环境条件分别设置得到,或者根据用户需求自定义设置得到,等等,本发明实施例不做限定。Specifically, due to the particularity of the skin of the portrait, the brightness difference between adjacent pixels (non-spaced pixels) in the face image may be small, thus, a pixel interval can be preset, and one or more pixel intervals can be obtained according to the pixel interval. The brightness difference between pixels of each pixel is used to improve the accuracy of image sharpness detection. Optionally, the pixel interval can be set separately according to different shooting environment conditions, or can be customized according to user requirements, etc., which are not limited in this embodiment of the present invention.

103、当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像。103. When the brightness difference between pixels in the acquired face image satisfies a preset image output condition, output the acquired image.

可选的,所述当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像,可以具体为:将所述亮度差与预设亮度阈值进行比较,并根据比较结果从所述终端获取的至少一张采集图像中筛选出清晰度最高的采集图像;将筛选出的所述采集图像作为拍摄图像,并输出所述拍摄图像。Optionally, when the brightness difference between the pixels in the acquired face image satisfies the preset image output condition, outputting the captured image may be specifically: combining the brightness difference with the preset brightness Comparing the thresholds, and screening the captured image with the highest definition from at least one captured image acquired by the terminal according to the comparison result; using the filtered captured image as a captured image, and outputting the captured image.

其中,该亮度阈值可预先设置得到。可选的,可预先采集用户人脸图像,并按照预设的像素间隔获取所述用户人脸图像中的像素之间的亮度差;通过计算所述用户人脸图像中的像素的亮度差的平均值,并将所述平均值设置为所述预设亮度阈值。具体的,该亮度阈值可以是通过采集不同环境条件(如环境光强度不同)下的用户人脸图像,并通过调整预设的像素间隔后筛选出较佳清晰度的图像而确定出的,比如将该较佳清晰度人脸图像的像素亮度差平均值作为该亮度阈值进行存储。其中,该亮度阈值可设置与该像素间隔相对应,即不同的像素间隔可对应不同的亮度阈值。或者,还可根据用户对终端输出图像的清晰度需求自定义设置该亮度阈值。Wherein, the brightness threshold can be preset. Optionally, the user's face image can be collected in advance, and the brightness difference between the pixels in the user's face image can be obtained according to a preset pixel interval; by calculating the brightness difference of the pixels in the user's face image the average value, and set the average value as the preset brightness threshold. Specifically, the brightness threshold can be determined by collecting user face images under different environmental conditions (such as different ambient light intensities), and filtering out images with better clarity after adjusting the preset pixel interval, such as The average value of pixel brightness differences of the face image with better definition is stored as the brightness threshold. Wherein, the brightness threshold can be set corresponding to the pixel interval, that is, different pixel intervals can correspond to different brightness thresholds. Alternatively, the brightness threshold can also be customized and set according to the user's requirement for the clarity of the terminal output image.

具体的,可通过将获取的人脸图像中的像素之间的亮度差与该预设亮度阈值进行比较,来确定图像清晰度,从而在终端采集的多张图像中确定出最为清晰的一张采集图像作为拍摄图像输出,以提升输出图像清晰度。Specifically, the image sharpness can be determined by comparing the brightness difference between the pixels in the acquired face image with the preset brightness threshold, so as to determine the clearest one among the multiple images collected by the terminal The captured image is output as a captured image to improve the clarity of the output image.

在本发明实施例中,可通过检测终端的采集图像中是否包括人脸图像,并检测到包括人脸图像时,按照预设的像素间隔获取该人脸图像中的像素之间的亮度差,从而可在获取的人脸图像中像素的亮度差满足预设的图像输出条件时,将该采集图像作为拍摄图像输出,由此提升了终端输出的拍摄图像的质量。In the embodiment of the present invention, by detecting whether the collected image of the terminal includes a human face image, and when it is detected that the human face image is included, the brightness difference between the pixels in the human face image is obtained according to a preset pixel interval, Therefore, when the brightness difference of pixels in the acquired face image satisfies the preset image output condition, the captured image can be output as a captured image, thereby improving the quality of the captured image output by the terminal.

进一步的,请参阅图2,图2是本发明实施例提供的另一种图像输出方法的流程示意图。具体的,如图2所示,本发明实施例的所述图像输出方法可以包括以下步骤:Further, please refer to FIG. 2 , which is a schematic flowchart of another image output method provided by an embodiment of the present invention. Specifically, as shown in FIG. 2, the image output method in the embodiment of the present invention may include the following steps:

201、检测终端的采集图像中是否包括人脸图像。201. Detect whether the image collected by the terminal includes a face image.

202、若包括人脸图像,则按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差。202. If a face image is included, acquire a brightness difference between pixels in the face image according to a preset pixel interval.

203、检测所述亮度差是否低于预设的第一亮度阈值。203. Detect whether the brightness difference is lower than a preset first brightness threshold.

其中,该第一亮度阈值可预先设置得到。比如,该第一亮度阈值可以是用于确定像素点模糊的亮度阈值,终端可预先设置有不同环境条件下的亮度阈值,且该第一亮度阈值可以是存储的与当前环境条件相匹配的亮度阈值。Wherein, the first brightness threshold can be preset. For example, the first brightness threshold may be a brightness threshold used to determine blurred pixels, the terminal may be preset with brightness thresholds under different environmental conditions, and the first brightness threshold may be a stored brightness matching the current environmental conditions threshold.

204、分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差低于所述第一亮度阈值的第二数目。204. Count respectively the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the number of facial images included in the captured image whose brightness difference is lower than the first brightness threshold Two numbers.

205、计算所述第二数目与所述第一数目的第一比值。205. Calculate a first ratio of the second number to the first number.

具体的,针对终端采集的多张图像的每一图像,可分别统计每一图像中获取了像素亮度差的获取次数(也就是与第一亮度阈值进行比较的比较次数),即第一数目,并统计该获取次数中亮度差低于该第一亮度阈值的次数,即第二数目,从而可通过计算第二数目与第一数目的比值(即第一比值)确定该多张图像的模糊程度。也即,该比值越大,图像越模糊,反之,则图像越清晰。Specifically, for each of the plurality of images collected by the terminal, the number of acquisitions of pixel brightness differences in each image (that is, the number of comparisons with the first brightness threshold), that is, the first number, may be counted separately, And count the number of times that the brightness difference is lower than the first brightness threshold in the number of acquisition times, that is, the second number, so that the blurring degree of the multiple images can be determined by calculating the ratio of the second number to the first number (that is, the first ratio) . That is, the larger the ratio, the blurrier the image, and vice versa, the clearer the image.

206、从获取的至少一张采集图像中筛选出所述第一比值最小的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。206. Select the acquired image with the smallest first ratio from the acquired at least one acquired image, and use the screened acquired image as the acquired image with the highest definition in the at least one acquired image.

进一步的,根据该多张采集图像中每张图像对应的第一比值,即模糊程度参数,即可从中筛选出模糊程度最低,即第一比值最小的采集图像作为拍摄图像输出,从而可较准确地确定出最为清晰的图像。Further, according to the first ratio corresponding to each of the plurality of collected images, that is, the blur degree parameter, the collected image with the lowest degree of blur, that is, the smallest first ratio can be selected and output as the captured image, so that it can be more accurate. to determine the clearest image possible.

207、将筛选出的所述采集图像作为拍摄图像,并输出所述拍摄图像。207. Use the filtered collected image as a captured image, and output the captured image.

举例来说,假设该第一亮度阈值设置为70,可将人脸图像中按照预设像素间隔如间隔两个像素的像素亮度差与该70进行比较,获取比较次数,即第一数目,以及统计低于该70的次数,即第二数目。第二数目与第一数目的比值(如可转换为百分比)越大,则图像越模糊,因像素的亮度差比较小时,模糊的因素占据较多,由此可将百分比参数越小的图像确定为需要输出的清晰度最高的图像,并输出该清晰度最高的图像,以获取得到最清晰的自拍图像。For example, assuming that the first brightness threshold is set to 70, the pixel brightness difference in the face image according to a preset pixel interval, such as two pixels apart, can be compared with this 70 to obtain the number of comparisons, that is, the first number, and The number of times below this 70 is counted, which is the second number. The larger the ratio of the second number to the first number (for example, it can be converted into a percentage), the more blurred the image, because the brightness difference of the pixel is relatively small, and the blurring factor occupies more, so the image with a smaller percentage parameter can be determined It is necessary to output the image with the highest resolution, and output the image with the highest resolution, so as to obtain the clearest selfie image.

进一步可选的,在按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差之前,还可进一步检测终端当前的拍摄模式是否为自拍模式,若为自拍模式,则可触发执行本发明实施例的技术方案。Optionally, before obtaining the brightness difference between the pixels in the face image according to the preset pixel interval, it is also possible to further detect whether the current shooting mode of the terminal is a Selfie mode, and if it is a Selfie mode, trigger Implement the technical solutions of the embodiments of the present invention.

在本发明实施例中,可在终端的采集图像中包括人脸图像,如进行自拍时,按照预设的像素间隔获取该人脸图像中的像素之间的亮度差,并将获取的亮度差与预设的第一亮度阈值进行比较,从而可将低于该第一亮度阈值的次数与比较总次数的比值最小的采集图像作为拍摄图像输出,由此提升了终端输出的拍摄图像的质量,提升了图像清晰度。In the embodiment of the present invention, the face image can be included in the collected image of the terminal. For example, when taking a selfie, the brightness difference between the pixels in the face image is obtained according to the preset pixel interval, and the obtained brightness difference Compared with the preset first brightness threshold, the captured image with the smallest ratio of the number of times lower than the first brightness threshold to the total number of comparisons can be output as a captured image, thereby improving the quality of the captured image output by the terminal, Improved image clarity.

进一步的,请参阅图3,图3是本发明实施例提供的又一种图像输出方法的流程示意图。具体的,如图3所示,本发明实施例的所述图像输出方法可以包括以下步骤:Further, please refer to FIG. 3 , which is a schematic flowchart of another image output method provided by an embodiment of the present invention. Specifically, as shown in FIG. 3, the image output method in the embodiment of the present invention may include the following steps:

301、检测终端的采集图像中是否包括人脸图像。301. Detect whether the image collected by the terminal includes a face image.

302、若包括人脸图像,则按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差。302. If a face image is included, acquire a brightness difference between pixels in the face image according to a preset pixel interval.

303、检测所述亮度差是否高于预设的第二亮度阈值。303. Detect whether the brightness difference is higher than a preset second brightness threshold.

其中,该第二亮度阈值可预先设置得到。比如,该第二亮度阈值可以是用于确定像素点清晰的亮度阈值,终端可预先设置有不同环境条件下的亮度阈值,且该第一亮度阈值可以是存储的与当前环境条件相匹配的亮度阈值。进一步可选的,该第二亮度阈值可设置为与上述的第一亮度阈值相同或不同,若不同,则终端可预先根据不同的环境条件分别设置得到该第一亮度阈值和第二亮度阈值。Wherein, the second brightness threshold can be preset. For example, the second brightness threshold may be a brightness threshold used to determine that pixels are clear, the terminal may be preset with brightness thresholds under different environmental conditions, and the first brightness threshold may be a stored brightness that matches the current environmental conditions threshold. Further optionally, the second brightness threshold may be set to be the same as or different from the above-mentioned first brightness threshold. If different, the terminal may set the first brightness threshold and the second brightness threshold respectively according to different environmental conditions in advance.

304、分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差高于所述第二亮度阈值的第三数目。304. Count respectively the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the first number of brightness differences higher than the second brightness threshold in the face images included in the captured image Three numbers.

305、计算所述第三数目与所述第一数目的第二比值。305. Calculate a second ratio of the third number to the first number.

具体的,针对终端采集的多张图像的每一图像,可分别统计每一图像中获取了像素亮度差的获取次数,即第一数目,并统计该获取次数中亮度差高于该第二亮度阈值的次数,即第三数目,从而可通过计算第三数目与第一数目的比值(即第二比值)确定该多张图像的清晰程度。也即,该比值越大,图像越清晰,反之,则图像越模糊。Specifically, for each image of the plurality of images collected by the terminal, the number of times the pixel brightness difference is obtained in each image can be counted separately, that is, the first number, and the number of times the brightness difference is higher than the second brightness in the number of times of acquisition can be counted. The number of times of the threshold is the third number, so the clarity of the multiple images can be determined by calculating the ratio of the third number to the first number (ie the second ratio). That is, the larger the ratio, the clearer the image, and vice versa, the blurrier the image.

306、从获取的至少一张采集图像中筛选出所述第二比值最大的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。306. Select the acquired image with the largest second ratio from the acquired at least one acquired image, and use the screened acquired image as the acquired image with the highest definition in the at least one acquired image.

进一步的,根据该多张采集图像中每张图像对应的第二比值,即清晰程度参数,即可从中筛选出清晰程度最高,即第二比值最大的采集图像作为拍摄图像输出,从而可较准确地确定出最为清晰的图像。Further, according to the second ratio corresponding to each image in the plurality of collected images, that is, the clarity parameter, the collected image with the highest clarity, that is, the second ratio with the largest value can be selected as the captured image output, so as to be more accurate. to determine the clearest image possible.

307、将筛选出的所述采集图像作为拍摄图像,并输出所述拍摄图像。307. Use the filtered collected image as a captured image, and output the captured image.

举例来说,假设该第二亮度阈值设置为150,可将人脸图像中按照预设像素间隔如间隔3个像素的像素亮度差与该150进行比较,获取比较次数,即第一数目,以及统计高于该150的次数,即第三数目。第三数目与第一数目的比值(如可转换为百分比)越大,则图像越清晰,因像素的亮度差比较小时,模糊的因素占据较多,由此可将百分比参数越大的图像确定为需要输出的清晰度最高的图像,并输出该清晰度最高的图像,以获取得到最清晰的自拍图像。For example, assuming that the second brightness threshold is set to 150, the pixel brightness difference in the face image according to a preset pixel interval, such as an interval of 3 pixels, can be compared with the 150 to obtain the number of comparisons, that is, the first number, and The number of times higher than this 150 is counted, which is the third number. The larger the ratio of the third number to the first number (for example, it can be converted into a percentage), the clearer the image, because the brightness difference of the pixel is relatively small, and the blurring factor occupies more, so the image with a larger percentage parameter can be determined It is necessary to output the image with the highest resolution, and output the image with the highest resolution, so as to obtain the clearest selfie image.

进一步可选的,在按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差之前,还可进一步检测终端当前的拍摄模式是否为自拍模式,若为自拍模式,则可触发执行本发明实施例的技术方案。Optionally, before obtaining the brightness difference between the pixels in the face image according to the preset pixel interval, it is also possible to further detect whether the current shooting mode of the terminal is a Selfie mode, and if it is a Selfie mode, trigger Implement the technical solutions of the embodiments of the present invention.

在本发明实施例中,可在终端的采集图像中包括人脸图像,如进行自拍时,按照预设的像素间隔获取该人脸图像中的像素之间的亮度差,并将获取的亮度差与预设的第二亮度阈值进行比较,从而可将高于该第二亮度阈值的次数与比较总次数的比值最大的采集图像作为拍摄图像输出,由此提升了终端输出的拍摄图像的质量,提升了图像清晰度。In the embodiment of the present invention, the face image can be included in the collected image of the terminal. For example, when taking a selfie, the brightness difference between the pixels in the face image is obtained according to the preset pixel interval, and the obtained brightness difference Compared with the preset second brightness threshold, the collected image with the largest ratio of the number of times higher than the second brightness threshold to the total number of comparisons can be output as the captured image, thereby improving the quality of the captured image output by the terminal, Improved image clarity.

请参阅图4,图4是本发明实施例提供的一种图像输出装置10的结构示意图。具体的,本发明实施例的所述装置10可设置于上述的终端中。如图4所示,本发明实施例的所述图像输出装置10可以包括图像检测模块11、获取模块12以及图像输出模块13。其中,Please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of an image output device 10 provided by an embodiment of the present invention. Specifically, the device 10 in the embodiment of the present invention may be set in the above-mentioned terminal. As shown in FIG. 4 , the image output device 10 of the embodiment of the present invention may include an image detection module 11 , an acquisition module 12 and an image output module 13 . in,

所述图像检测模块11,用于检测终端的采集图像中是否包括人脸图像。The image detection module 11 is configured to detect whether the captured image of the terminal includes a face image.

所述获取模块12,用于在所述图像检测模块11检测到所述采集图像中包括人脸图像时,按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差。The obtaining module 12 is configured to obtain the brightness difference between pixels in the human face image according to a preset pixel interval when the image detection module 11 detects that the captured image includes a human face image.

可选的,该像素间隔可根据不同的拍摄环境条件分别设置得到,或者根据用户需求自定义设置得到,等等,本发明实施例不做限定。Optionally, the pixel interval can be set separately according to different shooting environment conditions, or can be customized according to user requirements, etc., which are not limited in this embodiment of the present invention.

所述图像输出模块13,用于在所述获取模块12获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像。The image output module 13 is configured to output the captured image when the brightness difference between pixels in the face image captured by the acquiring module 12 satisfies a preset image output condition.

具体的,通过获取模块12获取的人脸图像中的像素之间的亮度差,图像输出模块13即可确定图像清晰度,从而图像输出模块13可在终端采集的多张图像中确定出该亮度差满足预设的图像输出条件的图像作为最清晰的图像进行输出,以提升输出图像清晰度。Specifically, the image output module 13 can determine the image clarity through the brightness difference between the pixels in the face image acquired by the acquisition module 12, so that the image output module 13 can determine the brightness in the multiple images collected by the terminal The images that do not meet the preset image output conditions are output as the clearest images to improve the output image clarity.

在本发明实施例中,可通过检测终端的采集图像中是否包括人脸图像,并检测到包括人脸图像时,按照预设的像素间隔获取该人脸图像中的像素之间的亮度差,从而可在获取的人脸图像中像素的亮度差满足预设的图像输出条件时,将该采集图像作为拍摄图像输出,由此提升了终端输出的拍摄图像的质量。In the embodiment of the present invention, by detecting whether the collected image of the terminal includes a human face image, and when it is detected that the human face image is included, the brightness difference between the pixels in the human face image is obtained according to a preset pixel interval, Therefore, when the brightness difference of pixels in the acquired face image satisfies the preset image output condition, the captured image can be output as a captured image, thereby improving the quality of the captured image output by the terminal.

进一步的,请参阅图5,图5是本发明实施例提供的另一种图像输出装置10的结构示意图。具体的,本发明实施例的所述装置10可包括上述图4对应本发明实施例中的图像输出装置的图像检测模块11、获取模块12以及图像输出模块13。进一步的,在本发明实施例中,所述图像输出模块13可具体包括:Further, please refer to FIG. 5 , which is a schematic structural diagram of another image output device 10 provided by an embodiment of the present invention. Specifically, the device 10 of the embodiment of the present invention may include the image detection module 11 , the acquisition module 12 and the image output module 13 of the image output device in the embodiment of the present invention corresponding to FIG. 4 . Further, in the embodiment of the present invention, the image output module 13 may specifically include:

筛选单元131,用于将所述亮度差与预设亮度阈值进行比较,并根据比较结果从所述终端获取的至少一张采集图像中筛选出清晰度最高的采集图像;A screening unit 131, configured to compare the brightness difference with a preset brightness threshold, and filter out the captured image with the highest definition from at least one captured image acquired by the terminal according to the comparison result;

输出单元132,用于将所述筛选单元131筛选出的所述采集图像作为拍摄图像,并输出所述拍摄图像。The output unit 132 is configured to use the captured image filtered out by the screening unit 131 as a captured image, and output the captured image.

可选的,在本发明实施例中,所述装置10还可包括:Optionally, in the embodiment of the present invention, the device 10 may further include:

采集模块14,用于采集用户人脸图像,并按照预设的像素间隔获取所述用户人脸图像中的像素之间的亮度差;The collection module 14 is used to collect the user's face image, and obtain the brightness difference between the pixels in the user's face image according to the preset pixel interval;

设置模块15,用于计算所述用户人脸图像中的像素的亮度差的平均值,并将所述平均值设置为所述预设亮度阈值。A setting module 15, configured to calculate an average value of brightness differences of pixels in the user's face image, and set the average value as the preset brightness threshold.

其中,该亮度阈值可预先设置得到。比如,该亮度阈值可以是通过采集模块14采集不同环境条件(如环境光强度不同)下的用户人脸图像,并通过调整预设的像素间隔后筛选出较佳清晰度的图像而确定出的,比如设置模块15可将将该较佳清晰度人脸图像的像素亮度差平均值作为该亮度阈值进行存储。其中,该亮度阈值可设置与该像素间隔相对应,即不同的像素间隔可对应不同的亮度阈值。或者,设置模块15还可根据用户对终端输出图像的清晰度需求自定义设置该亮度阈值。Wherein, the brightness threshold can be preset. For example, the brightness threshold can be determined by collecting user face images under different environmental conditions (such as different ambient light intensities) through the acquisition module 14, and by adjusting the preset pixel interval to filter out images with better clarity. For example, the setting module 15 may store the average value of pixel brightness differences of the face image with better definition as the brightness threshold. Wherein, the brightness threshold can be set corresponding to the pixel interval, that is, different pixel intervals can correspond to different brightness thresholds. Alternatively, the setting module 15 can also customize and set the brightness threshold according to the user's requirement for the clarity of the terminal output image.

作为一种可选的实施方式,所述筛选单元131可具体用于:As an optional implementation manner, the screening unit 131 may be specifically used for:

检测所述亮度差是否低于预设的第一亮度阈值;Detecting whether the brightness difference is lower than a preset first brightness threshold;

分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差低于所述第一亮度阈值的第二数目;Statistically counting the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the second number of brightness differences in face images included in the captured image that are lower than the first brightness threshold ;

计算所述第二数目与所述第一数目的第一比值;calculating a first ratio of the second number to the first number;

从获取的至少一张采集图像中筛选出所述第一比值最小的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。Selecting the acquired image with the smallest first ratio from the acquired at least one acquired image, and using the screened acquired image as the acquired image with the highest definition in the at least one acquired image.

其中,该第一亮度阈值可预先设置得到,其可与上述的亮度阈值相对应。比如,该第一亮度阈值可以是用于确定像素点模糊的亮度阈值,终端可预先设置有不同环境条件下的亮度阈值,且该第一亮度阈值可以是存储的与当前环境条件相匹配的亮度阈值。Wherein, the first brightness threshold may be preset, and may correspond to the aforementioned brightness threshold. For example, the first brightness threshold may be a brightness threshold used to determine blurred pixels, the terminal may be preset with brightness thresholds under different environmental conditions, and the first brightness threshold may be a stored brightness matching the current environmental conditions threshold.

作为一种可选的实施方式,所述筛选单元131可具体用于:As an optional implementation manner, the screening unit 131 may be specifically used for:

检测所述亮度差是否高于预设的第二亮度阈值;Detecting whether the brightness difference is higher than a preset second brightness threshold;

分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差高于所述第二亮度阈值的第三数目;respectively counting the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the third number of brightness differences higher than the second brightness threshold in the face images included in the captured image ;

计算所述第三数目与所述第一数目的第二比值;calculating a second ratio of the third number to the first number;

从获取的至少一张采集图像中筛选出所述第二比值最大的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。Selecting the acquired image with the largest second ratio from the acquired at least one acquired image, and using the screened acquired image as the acquired image with the highest definition in the at least one acquired image.

其中,该第二亮度阈值可预先设置得到,其也可与上述的亮度阈值相对应。比如,该第二亮度阈值可以是用于确定像素点清晰的亮度阈值,终端可预先设置有不同环境条件下的亮度阈值,且该第一亮度阈值可以是存储的与当前环境条件相匹配的亮度阈值。进一步可选的,该第二亮度阈值可设置为与上述的第一亮度阈值相同或不同,若不同,则设置模块15可预先根据不同的环境条件分别设置得到该第一亮度阈值和第二亮度阈值。Wherein, the second brightness threshold can be preset, and it can also correspond to the above brightness threshold. For example, the second brightness threshold may be a brightness threshold used to determine that pixels are clear, the terminal may be preset with brightness thresholds under different environmental conditions, and the first brightness threshold may be a stored brightness that matches the current environmental conditions threshold. Further optionally, the second brightness threshold can be set to be the same as or different from the above-mentioned first brightness threshold. If different, the setting module 15 can set the first brightness threshold and the second brightness respectively according to different environmental conditions in advance. threshold.

在本发明实施例中,可在终端的采集图像中包括人脸图像,如进行自拍时,按照预设的像素间隔获取该人脸图像中的像素之间的亮度差,并将获取的亮度差与预设的亮度阈值进行比较,从而根据比较结果从终端采集的多张图像中筛选出清晰度最高的图像作为拍摄图像并输出,由此提升了终端输出的拍摄图像的质量,提升了图像清晰度。In the embodiment of the present invention, the face image can be included in the collected image of the terminal. For example, when taking a selfie, the brightness difference between the pixels in the face image is obtained according to the preset pixel interval, and the obtained brightness difference Compared with the preset brightness threshold, according to the comparison result, the image with the highest clarity is selected from the multiple images collected by the terminal as the captured image and output, thereby improving the quality of the captured image output by the terminal and improving the clarity of the image Spend.

请参阅图6,图6是本发明实施例提供的一种终端1的结构示意图,用于执行上述的图像输出方法。具体的,如图6所示,本发明实施例的所述终端1可以包括:至少一个处理器100,至少一个输入装置200,至少一个输出装置300,存储器500等组件。其中,这些组件通过一条或多条总线400进行通信连接。本领域技术人员可以理解,图6中示出的终端1的结构并不构成对本发明实施例的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:Please refer to FIG. 6 . FIG. 6 is a schematic structural diagram of a terminal 1 provided by an embodiment of the present invention, which is used to execute the above-mentioned image output method. Specifically, as shown in FIG. 6 , the terminal 1 in this embodiment of the present invention may include: at least one processor 100 , at least one input device 200 , at least one output device 300 , a memory 500 and other components. Wherein, these components are communicatively connected through one or more buses 400 . Those skilled in the art can understand that the structure of the terminal 1 shown in FIG. 6 does not constitute a limitation to the embodiment of the present invention. It can be either a bus-shaped structure or a star-shaped structure, and it can also include more than shown in the figure. or fewer components, or combining certain components, or a different arrangement of components. in:

处理器100为终端1的控制中心,利用各种接口和线路连接整个终端1的各个部分,通过运行或执行存储在存储器500内的程序和/或模块,以及调用存储在存储器500内的数据,如上述的相位检测数据,以执行终端1的各种功能和处理数据。处理器100可以由集成电路(Integrated Circuit,简称IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器100可以仅包括中央处理器(Central Processing Unit,简称CPU),也可以是CPU、数字信号处理器(Digital SignalProcessor,简称DSP)、图形处理器(Graphic Processing Unit,简称GPU)及各种控制芯片的组合。在本发明实施方式中,CPU可以是单运算核心,也可以包括多运算核心。The processor 100 is the control center of the terminal 1, using various interfaces and lines to connect various parts of the entire terminal 1, by running or executing programs and/or modules stored in the memory 500, and calling data stored in the memory 500, Phase detection data as described above to perform various functions of the terminal 1 and process data. The processor 100 may be composed of an integrated circuit (Integrated Circuit, IC for short), for example, may be composed of a single packaged IC, or may be composed of multiple packaged ICs connected with the same function or different functions. For example, the processor 100 may only include a central processing unit (Central Processing Unit, referred to as CPU), and may also be a CPU, a digital signal processor (Digital Signal Processor, referred to as DSP), a graphics processing unit (Graphic Processing Unit, referred to as GPU) And a combination of various control chips. In the embodiments of the present invention, the CPU may be a single computing core, or may include multiple computing cores.

输入装置200可以包括标准的触摸屏、键盘、摄像头等,还可以包括有线接口、无线接口等。该摄像头可与对焦马达连接。The input device 200 may include a standard touch screen, a keyboard, a camera, etc., and may also include a wired interface, a wireless interface, and the like. The camera can be connected with a focus motor.

输出装置300可以包括显示屏、扬声器等,也可以包括有线接口、无线接口等。The output device 300 may include a display screen, a speaker, etc., and may also include a wired interface, a wireless interface, and the like.

存储器500可用于存储软件程序以及模块,处理器100、输入装置200以及输出装置300通过调用存储在存储器500中的软件程序以及模块,从而执行终端1的各项功能应用以及实现数据处理。存储器500主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序等;数据存储区可存储根据终端1的使用所创建的数据等。在本发明实施例中,操作系统可以是Android系统、iOS系统或Windows操作系统等等。The memory 500 can be used to store software programs and modules. The processor 100 , the input device 200 and the output device 300 execute various functional applications of the terminal 1 and realize data processing by calling the software programs and modules stored in the memory 500 . The memory 500 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application program required by at least one function, etc.; the data storage area can store data created according to the use of the terminal 1 . In the embodiment of the present invention, the operating system may be an Android system, an iOS system, or a Windows operating system and the like.

具体的,所述处理器100调用存储在所述存储器500中的应用程序,用于执行以下步骤:Specifically, the processor 100 invokes an application program stored in the memory 500 to perform the following steps:

检测终端的采集图像中是否包括人脸图像;Detect whether the captured image of the terminal includes a face image;

若包括人脸图像,则按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差;If a face image is included, the brightness difference between pixels in the face image is obtained according to a preset pixel interval;

当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,通过所述输出装置300输出所述采集图像。When the brightness difference between pixels in the acquired face image satisfies a preset image output condition, the acquired image is output through the output device 300 .

可选的,所述处理器100调用存储在所述存储器500中的应用程序执行所述当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像,具体执行以下步骤:Optionally, the processor 100 invokes an application program stored in the memory 500 to execute the step of outputting the obtained face image when the brightness difference between the pixels satisfies a preset image output condition. To collect images as described above, perform the following steps:

将所述亮度差与预设亮度阈值进行比较,并根据比较结果从所述终端获取的至少一张采集图像中筛选出清晰度最高的采集图像;Comparing the brightness difference with a preset brightness threshold, and selecting the highest-definition captured image from at least one captured image acquired by the terminal according to the comparison result;

将筛选出的所述采集图像作为拍摄图像,并通过所述输出装置300输出所述拍摄图像。The selected collected images are used as captured images, and the captured images are output through the output device 300 .

可选的,所述处理器100调用存储在所述存储器500中的应用程序,还用于执行以下步骤:Optionally, the processor 100 invokes an application program stored in the memory 500, and is further configured to perform the following steps:

通过所述输入装置200采集用户人脸图像,并按照预设的像素间隔获取所述用户人脸图像中的像素之间的亮度差;Collecting the user's face image through the input device 200, and acquiring the brightness difference between pixels in the user's face image according to a preset pixel interval;

计算所述用户人脸图像中的像素的亮度差的平均值,并将所述平均值设置为所述预设亮度阈值。calculating an average value of brightness differences of pixels in the user's face image, and setting the average value as the preset brightness threshold.

可选的,所述处理器100调用存储在所述存储器500中的应用程序执行所述将所述亮度差与预设亮度阈值进行比较,并根据比较结果从所述终端获取的至少一张采集图像中筛选出清晰度最高的采集图像,具体执行以下步骤:Optionally, the processor 100 invokes an application program stored in the memory 500 to perform the comparison of the brightness difference with a preset brightness threshold, and at least one captured image acquired from the terminal according to the comparison result. To filter out the captured image with the highest resolution from the images, perform the following steps:

检测所述亮度差是否低于预设的第一亮度阈值;Detecting whether the brightness difference is lower than a preset first brightness threshold;

分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差低于所述第一亮度阈值的第二数目;Statistically counting the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the second number of brightness differences in face images included in the captured image that are lower than the first brightness threshold ;

计算所述第二数目与所述第一数目的第一比值;calculating a first ratio of the second number to the first number;

从获取的至少一张采集图像中筛选出所述第一比值最小的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。Selecting the acquired image with the smallest first ratio from the acquired at least one acquired image, and using the screened acquired image as the acquired image with the highest definition in the at least one acquired image.

可选的,所述处理器100调用存储在所述存储器500中的应用程序执行所述将所述亮度差与预设亮度阈值进行比较,并根据比较结果从所述终端获取的至少一张采集图像中筛选出清晰度最高的采集图像,具体执行以下步骤:Optionally, the processor 100 invokes an application program stored in the memory 500 to perform the comparison of the brightness difference with a preset brightness threshold, and at least one captured image acquired from the terminal according to the comparison result. To filter out the captured image with the highest resolution from the images, perform the following steps:

检测所述亮度差是否高于预设的第二亮度阈值;Detecting whether the brightness difference is higher than a preset second brightness threshold;

分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差高于所述第二亮度阈值的第三数目;respectively counting the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the third number of brightness differences in the facial images included in the captured image that are higher than the second brightness threshold ;

计算所述第三数目与所述第一数目的第二比值;calculating a second ratio of the third number to the first number;

从获取的至少一张采集图像中筛选出所述第二比值最大的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。Selecting the acquired image with the largest second ratio from the acquired at least one acquired image, and using the screened acquired image as the acquired image with the highest definition in the at least one acquired image.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.

所述该作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or may also be distributed to multiple network modules . Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, or in the form of hardware plus software function modules.

上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated modules implemented in the form of software function modules can be stored in a computer-readable storage medium. The above-mentioned software function modules are stored in a storage medium, and include several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) or a processor (processor) execute the methods described in various embodiments of the present invention. partial steps. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .

本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, only the division of the above-mentioned functional modules is used as an example for illustration. The internal structure of the system is divided into different functional modules to complete all or part of the functions described above. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiments, and details are not repeated here.

最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.

Claims (11)

1.一种图像输出方法,其特征在于,包括:1. An image output method, characterized in that, comprising: 检测终端的采集图像中是否包括人脸图像;Detect whether the captured image of the terminal includes a face image; 若包括人脸图像,则按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差;If a face image is included, the brightness difference between pixels in the face image is obtained according to a preset pixel interval; 当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像。When the brightness difference between pixels in the acquired face image satisfies a preset image output condition, the acquired image is output. 2.根据权利要求1所述的方法,其特征在于,所述当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像,包括:2. The method according to claim 1, wherein, when the brightness difference between the pixels in the obtained face image satisfies a preset image output condition, outputting the captured image comprises: 将所述亮度差与预设亮度阈值进行比较,并根据比较结果从所述终端获取的至少一张采集图像中筛选出清晰度最高的采集图像;Comparing the brightness difference with a preset brightness threshold, and selecting the highest-definition captured image from at least one captured image acquired by the terminal according to the comparison result; 将筛选出的所述采集图像作为拍摄图像,并输出所述拍摄图像。and using the filtered captured image as a captured image, and outputting the captured image. 3.根据权利要求2所述的方法,其特征在于,所述方法还包括:3. The method according to claim 2, wherein the method further comprises: 采集用户人脸图像,并按照预设的像素间隔获取所述用户人脸图像中的像素之间的亮度差;Collecting the user's face image, and obtaining the brightness difference between pixels in the user's face image according to a preset pixel interval; 计算所述用户人脸图像中的像素的亮度差的平均值,并将所述平均值设置为所述预设亮度阈值。calculating an average value of brightness differences of pixels in the user's face image, and setting the average value as the preset brightness threshold. 4.根据权利要求2所述的方法,其特征在于,所述将所述亮度差与预设亮度阈值进行比较,并根据比较结果从所述终端获取的至少一张采集图像中筛选出清晰度最高的采集图像,包括:4. The method according to claim 2, characterized in that the brightness difference is compared with a preset brightness threshold, and the sharpness is filtered out from at least one captured image acquired by the terminal according to the comparison result. Highest acquisition images, including: 检测所述亮度差是否低于预设的第一亮度阈值;Detecting whether the brightness difference is lower than a preset first brightness threshold; 分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差低于所述第一亮度阈值的第二数目;Statistically counting the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the second number of brightness differences in face images included in the captured image that are lower than the first brightness threshold ; 计算所述第二数目与所述第一数目的第一比值;calculating a first ratio of the second number to the first number; 从获取的至少一张采集图像中筛选出所述第一比值最小的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。Selecting the acquired image with the smallest first ratio from the acquired at least one acquired image, and using the screened acquired image as the acquired image with the highest definition in the at least one acquired image. 5.根据权利要求2所述的方法,其特征在于,所述将所述亮度差与预设亮度阈值进行比较,并根据比较结果从所述终端获取的至少一张采集图像中筛选出清晰度最高的采集图像,包括:5. The method according to claim 2, characterized in that the brightness difference is compared with a preset brightness threshold, and the sharpness is filtered out from at least one captured image acquired by the terminal according to the comparison result. Highest acquisition images, including: 检测所述亮度差是否高于预设的第二亮度阈值;Detecting whether the brightness difference is higher than a preset second brightness threshold; 分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差高于所述第二亮度阈值的第三数目;respectively counting the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the third number of brightness differences higher than the second brightness threshold in the face images included in the captured image ; 计算所述第三数目与所述第一数目的第二比值;calculating a second ratio of the third number to the first number; 从获取的至少一张采集图像中筛选出所述第二比值最大的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。Selecting the acquired image with the largest second ratio from the acquired at least one acquired image, and using the screened acquired image as the acquired image with the highest definition among the at least one acquired image. 6.一种图像输出装置,其特征在于,包括:6. An image output device, characterized in that it comprises: 图像检测模块,用于检测终端的采集图像中是否包括人脸图像;An image detection module, configured to detect whether a face image is included in the captured image of the terminal; 获取模块,用于在所述图像检测模块检测到所述采集图像中包括人脸图像时,按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差;An acquisition module, configured to acquire the brightness difference between pixels in the face image according to a preset pixel interval when the image detection module detects that the captured image includes a face image; 图像输出模块,用于在所述获取模块获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,输出所述采集图像。An image output module, configured to output the captured image when the brightness difference between pixels in the face image acquired by the acquisition module satisfies a preset image output condition. 7.根据权利要求6所述的装置,其特征在于,所述图像输出模块包括:7. The device according to claim 6, wherein the image output module comprises: 筛选单元,用于将所述亮度差与预设亮度阈值进行比较,并根据比较结果从所述终端获取的至少一张采集图像中筛选出清晰度最高的采集图像;A screening unit, configured to compare the brightness difference with a preset brightness threshold, and filter out the captured image with the highest definition from at least one captured image acquired by the terminal according to the comparison result; 输出单元,用于将所述筛选单元筛选出的所述采集图像作为拍摄图像,并输出所述拍摄图像。an output unit, configured to use the captured image filtered by the screening unit as a captured image, and output the captured image. 8.根据权利要求7所述的装置,其特征在于,所述装置还包括:8. The device according to claim 7, further comprising: 采集模块,用于采集用户人脸图像,并按照预设的像素间隔获取所述用户人脸图像中的像素之间的亮度差;The collection module is used to collect the user's face image, and obtain the brightness difference between the pixels in the user's face image according to the preset pixel interval; 设置模块,用于计算所述用户人脸图像中的像素的亮度差的平均值,并将所述平均值设置为所述预设亮度阈值。A setting module, configured to calculate an average value of brightness differences of pixels in the user's face image, and set the average value as the preset brightness threshold. 9.根据权利要求7所述的装置,其特征在于,所述筛选单元具体用于:9. The device according to claim 7, wherein the screening unit is specifically used for: 检测所述亮度差是否低于预设的第一亮度阈值;Detecting whether the brightness difference is lower than a preset first brightness threshold; 分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差低于所述第一亮度阈值的第二数目;Statistically counting the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the second number of brightness differences in face images included in the captured image that are lower than the first brightness threshold ; 计算所述第二数目与所述第一数目的第一比值;calculating a first ratio of the second number to the first number; 从获取的至少一张采集图像中筛选出所述第一比值最小的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。Selecting the acquired image with the smallest first ratio from the acquired at least one acquired image, and using the screened acquired image as the acquired image with the highest definition among the at least one acquired image. 10.根据权利要求7所述的装置,其特征在于,所述筛选单元具体用于:10. The device according to claim 7, wherein the screening unit is specifically used for: 检测所述亮度差是否高于预设的第二亮度阈值;Detecting whether the brightness difference is higher than a preset second brightness threshold; 分别统计终端获取的至少一张采集图像中每一采集图像获取的所述亮度差的第一数目,以及该采集图像包括的人脸图像中亮度差高于所述第二亮度阈值的第三数目;respectively counting the first number of brightness differences acquired by each of the at least one captured image acquired by the terminal, and the third number of brightness differences in the facial images included in the captured image that are higher than the second brightness threshold ; 计算所述第三数目与所述第一数目的第二比值;calculating a second ratio of the third number to the first number; 从获取的至少一张采集图像中筛选出所述第二比值最大的采集图像,并将筛选出的所述采集图像作为所述至少一张采集图像中清晰度最高的采集图像。Selecting the acquired image with the largest second ratio from the acquired at least one acquired image, and using the screened acquired image as the acquired image with the highest definition in the at least one acquired image. 11.一种终端,其特征在于,包括:输出装置、存储器和处理器,所述处理器分别与所述输出装置及所述存储器连接;其中,11. A terminal, characterized in that it comprises: an output device, a memory, and a processor, and the processor is respectively connected to the output device and the memory; wherein, 所述存储器用于存储应用程序;The memory is used to store application programs; 所述处理器用于调用所述存储器中存储的应用程序执行:The processor is used to invoke the application program stored in the memory to execute: 检测终端的采集图像中是否包括人脸图像;Detect whether the captured image of the terminal includes a face image; 若包括人脸图像,则按照预设的像素间隔获取所述人脸图像中的像素之间的亮度差;If a face image is included, the brightness difference between pixels in the face image is obtained according to a preset pixel interval; 当获取的所述人脸图像中的像素之间的亮度差满足预设的图像输出条件时,通过所述输出装置输出所述采集图像。When the brightness difference between the pixels in the acquired face image satisfies a preset image output condition, the acquired image is output through the output device.
CN201610802926.1A 2016-09-05 2016-09-05 Image output method, device and terminal Active CN106357978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610802926.1A CN106357978B (en) 2016-09-05 2016-09-05 Image output method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610802926.1A CN106357978B (en) 2016-09-05 2016-09-05 Image output method, device and terminal

Publications (2)

Publication Number Publication Date
CN106357978A true CN106357978A (en) 2017-01-25
CN106357978B CN106357978B (en) 2019-05-03

Family

ID=57858914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610802926.1A Active CN106357978B (en) 2016-09-05 2016-09-05 Image output method, device and terminal

Country Status (1)

Country Link
CN (1) CN106357978B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107302663A (en) * 2017-07-31 2017-10-27 努比亚技术有限公司 A kind of brightness of image method of adjustment, terminal and computer-readable recording medium
CN108416988A (en) * 2017-04-19 2018-08-17 陈其高 A kind of sitting posture prompting method and device
CN108513056A (en) * 2017-02-23 2018-09-07 株式会社理光 Image processing method, device and electronic equipment
CN111766236A (en) * 2019-04-01 2020-10-13 深圳兆日科技股份有限公司 Paper texture acquisition method and device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1697478A (en) * 2004-05-13 2005-11-16 欧姆龙株式会社 image correction device
KR20060022935A (en) * 2004-09-08 2006-03-13 한민홍 Eye image based drowsiness detection method and device
CN101465964A (en) * 2007-12-17 2009-06-24 鸿富锦精密工业(深圳)有限公司 Photographic device and photographic method
CN104967786A (en) * 2015-07-10 2015-10-07 广州三星通信技术研究有限公司 Image selection method and device
CN104978710A (en) * 2015-07-02 2015-10-14 广东欧珀移动通信有限公司 Method and device for identifying and adjusting human face luminance based on photographing
CN105654043A (en) * 2015-12-24 2016-06-08 广东欧珀移动通信有限公司 Control method, control device and photographing system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1697478A (en) * 2004-05-13 2005-11-16 欧姆龙株式会社 image correction device
KR20060022935A (en) * 2004-09-08 2006-03-13 한민홍 Eye image based drowsiness detection method and device
CN101465964A (en) * 2007-12-17 2009-06-24 鸿富锦精密工业(深圳)有限公司 Photographic device and photographic method
CN104978710A (en) * 2015-07-02 2015-10-14 广东欧珀移动通信有限公司 Method and device for identifying and adjusting human face luminance based on photographing
CN104967786A (en) * 2015-07-10 2015-10-07 广州三星通信技术研究有限公司 Image selection method and device
CN105654043A (en) * 2015-12-24 2016-06-08 广东欧珀移动通信有限公司 Control method, control device and photographing system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108513056A (en) * 2017-02-23 2018-09-07 株式会社理光 Image processing method, device and electronic equipment
CN108416988A (en) * 2017-04-19 2018-08-17 陈其高 A kind of sitting posture prompting method and device
CN107302663A (en) * 2017-07-31 2017-10-27 努比亚技术有限公司 A kind of brightness of image method of adjustment, terminal and computer-readable recording medium
CN111766236A (en) * 2019-04-01 2020-10-13 深圳兆日科技股份有限公司 Paper texture acquisition method and device and storage medium
CN111766236B (en) * 2019-04-01 2023-05-26 深圳兆日科技股份有限公司 Method and device for collecting paper texture and storage medium

Also Published As

Publication number Publication date
CN106357978B (en) 2019-05-03

Similar Documents

Publication Publication Date Title
JP7266672B2 (en) Image processing method, image processing apparatus, and device
CN107172345B (en) Image processing method and terminal
CN107172296A (en) A kind of image capturing method and mobile terminal
US20150244916A1 (en) Electronic device and control method of the same
CN107909569B (en) Screen-patterned detection method, screen-patterned detection device and electronic equipment
CN106529339A (en) Picture display method, device and terminal
CN107704798B (en) Image blurring method, apparatus, computer-readable storage medium, and computer device
CN107423699A (en) Liveness detection method and related products
CN104902143B (en) A kind of image de-noising method and device based on resolution ratio
CN107679481A (en) Solve lock control method and Related product
CN111028276A (en) Image alignment method and device, storage medium and electronic equipment
CN106357978B (en) Image output method, device and terminal
CN106412422B (en) Focusing method, device and terminal
CN105227855B (en) Image processing method and terminal
CN109120862A (en) High dynamic range image acquisition method and device and mobile terminal
CN105430269B (en) A kind of photographic method and device applied to mobile terminal
CN105763813A (en) A photographing method, device and intelligent terminal
CN106303234A (en) photographing processing method and device
CN107180417B (en) Photo processing method and device, computer readable storage medium and electronic equipment
CN113744139A (en) Image processing method, image processing device, electronic equipment and storage medium
CN106303235A (en) Photographing processing method and device
WO2015196681A1 (en) Picture processing method and electronic device
CN106454100A (en) Focusing method and device and mobile terminal
CN105391940A (en) Image recommendation method and apparatus
CN109961403B (en) Photo adjusting method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 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

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant