WO2015074261A1 - Method for saving photographed image, and electronic device - Google Patents

Method for saving photographed image, and electronic device Download PDF

Info

Publication number
WO2015074261A1
WO2015074261A1 PCT/CN2013/087725 CN2013087725W WO2015074261A1 WO 2015074261 A1 WO2015074261 A1 WO 2015074261A1 CN 2013087725 W CN2013087725 W CN 2013087725W WO 2015074261 A1 WO2015074261 A1 WO 2015074261A1
Authority
WO
WIPO (PCT)
Prior art keywords
moment
subject
image obtained
image
portrait
Prior art date
Application number
PCT/CN2013/087725
Other languages
French (fr)
Chinese (zh)
Inventor
魏代玉
罗巍
邓斌
Original Assignee
华为终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为终端有限公司 filed Critical 华为终端有限公司
Priority to PCT/CN2013/087725 priority Critical patent/WO2015074261A1/en
Priority to CN201380078887.XA priority patent/CN105453533B/en
Priority to CN201910423560.0A priority patent/CN110121030B/en
Publication of WO2015074261A1 publication Critical patent/WO2015074261A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/765Interface circuits between an apparatus for recording and another apparatus
    • H04N5/77Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera
    • H04N5/772Interface circuits between an apparatus for recording and another apparatus between a recording apparatus and a television camera the recording apparatus and the television camera being placed in the same enclosure
    • 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/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image

Landscapes

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

Abstract

Disclosed are a method for saving a photographed image, and an electronic device. The method comprises: determining whether a portrait of a photographed person in an image obtained on a first time point meets a storage condition; and after the portrait of the photographed person in the image obtained on the first time point does not meet the storage condition, selecting at least one image meeting the storage condition in a set time range after the first time point and/or before the first time point, and storing the at least one image meeting the condition.

Description

一种保存拍摄图像的方法以及电子设备 技术领域  Method for saving captured image and electronic device
本发明涉及图像处理技术领域, 尤其涉及一种保存拍摄图像的方法以及 电子设备。 背景技术  The present invention relates to the field of image processing technologies, and in particular, to a method for saving a captured image and an electronic device. Background technique
随着科学技术的不断发展, 电子技术也得到了飞速的发展, 电子产品的 种类也越来越多, 人们也享受到了科技发展带来的各种便利。 现在人们可以 通过各种类型的电子设备, 享受随着科技发展带来的舒适生活。  With the continuous development of science and technology, electronic technology has also developed rapidly, and there are more and more types of electronic products. People also enjoy the convenience brought by the development of science and technology. Nowadays, people can enjoy the comfortable life brought by the development of science and technology through various types of electronic devices.
例如, 智能手机、 平板电脑或数码相机等电子设备上都具有图像釆集功 能, 用户可以使用这些电子设备随时随地拍摄图像, 从而留住生活中的美好 瞬间。 在用户使用这些电子设备拍照的过程中, 以拍摄一人像为例, 若所拍 摄的图像中出现被拍摄者的眼睛因为闪光灯或者眨眼而在拍照的瞬间闭合, 或者在拍照瞬间因电子设备抖动引起被拍摄者的人像模糊等不满足要求的情 况, 使得用户需要重新拍摄, 花费了更多的时间, 在一些特定的场合, 例如 对参加体育比赛的运动员进行拍摄时, 若拍摄所获得的图像不满足要求, 甚 至是无法重新进行拍摄的。  For example, electronic devices such as smartphones, tablets, or digital cameras have image collection capabilities that allow users to take images anytime, anywhere, and retain the moments of life. In the process of taking pictures by the user using these electronic devices, taking a portrait of a person as an example, if the eyes of the photographer appear in the captured image are closed at the moment of photographing due to flash or blinking, or due to shaking of the electronic device at the moment of photographing If the subject's portrait is blurred or not, the user needs to re-shoot and spend more time. In some specific situations, such as shooting athletes participating in sports, if the image obtained by the shooting is not Meet the requirements, even unable to re-shoot.
因此, 现有技术中智能手机、 平板电脑或数码相机等电子设备在拍摄图 像时, 存在因所拍摄到的图像不满足要求而使得用户需要花费时间重新进行 拍摄的技术问题。 发明内容  Therefore, in the prior art, when an electronic device such as a smartphone, a tablet computer, or a digital camera captures an image, there is a technical problem that the user needs to take time to retake the image because the captured image does not satisfy the requirement. Summary of the invention
本发明实施例提供一种保存拍摄图像的方法以及电子设备, 用以解决现 有技术中智能手机、 平板电脑或数码相机等电子设备在拍摄图像时, 存在的 因所拍摄到的图像不满足要求而使得用户需要花费时间重新进行拍摄的技术 问题。 本发明的第一方面, 提供了一种保存拍摄图像的方法, 包括: 判断第一 时刻获得的图像中被拍摄者的人像是否满足保存条件; 在所述第一时刻获得 的图像中所述被拍摄者的人像不满足所述保存条件后, 从所述第一时刻之后 和 /或所述第一时刻之前的一设定时间段内选取满足所述保存条件的至少一张 图像, 并保存满足保存条件的至少一张图像。 The embodiment of the invention provides a method for saving a captured image and an electronic device for solving the problem that the captured image does not meet the requirements when the electronic device such as a smart phone, a tablet computer or a digital camera in the prior art captures an image. The technical problem that makes it take time for the user to take time to shoot again. A first aspect of the present invention provides a method of saving a captured image, comprising: determining whether a portrait of a subject in an image obtained at a first time satisfies a saving condition; and wherein the image is obtained in the image obtained at the first time After the portrait of the photographer does not satisfy the saving condition, at least one image that satisfies the saving condition is selected from the first time period and/or a set time period before the first time, and is saved and satisfied. Save at least one image of the condition.
结合第一方面, 在第一种可能的实现方式中, 所述判断第一时刻获得的 图像中被拍摄者的人像是否满足保存条件, 具体为: 判断所述第一时刻获得 的图像中被拍摄者的眼睛是否睁开, 其中, 在所述被拍摄者的眼睛闭合时, 确定所述第一时刻获得的图像中被拍摄者的人像不满足所述保存条件; 和 /或 判断所述第一时刻获得的图像中所述被拍摄者的人像是否模糊, 其中, 在所 述第一时刻获得的图像中所述被拍摄者的人像模糊时, 确定所述第一时刻获 得的图像中被拍摄者的人像不满足所述保存条件。  With reference to the first aspect, in a first possible implementation, the determining whether the portrait of the photographer in the image obtained at the first time meets the saving condition is specifically: determining that the image obtained at the first moment is photographed Whether the eyes of the person are open, wherein, when the subject's eyes are closed, determining that the portrait of the subject in the image obtained at the first moment does not satisfy the saving condition; and/or determining the first Whether the portrait of the subject is blurred in the image obtained at the time, wherein when the portrait of the subject is blurred in the image obtained at the first time, the subject in the image obtained at the first moment is determined The portrait does not satisfy the preservation condition.
结合第一种可能的实现方式, 在第二种可能的实现方式中, 在所述判断 所述第一时刻获得的图像中被拍摄者的眼睛是否睁开之前, 所述方法还包括: 基于在所述第一时刻之前获得的至少一张图像, 确定所述被拍摄者的眼睛处 于睁眼状态或闭眼状态, 其中, 在所述被拍摄者的眼睛处于所述睁眼状态时, 执行步骤: 判断所述第一时刻获得的图像中被拍摄者的眼睛是否睁开。  With reference to the first possible implementation manner, in a second possible implementation manner, before the determining whether the eye of the photographer is opened in the image obtained at the first moment, the method further includes: Determining, at least one image obtained before the first time, that the subject's eyes are in a blinking state or a closed eye state, wherein when the subject's eyes are in the blinking state, performing steps : Judging whether the subject's eyes in the image obtained at the first moment are split.
结合第一种可能实现的方式, 在第三种可能实现的方式中, 所述判断所 述第一时刻获得的图像中被拍摄者的眼睛是否睁开, 具体包括: 对所述第一 时刻获得的图像中所述被拍摄者的人脸区域进行预处理; 定位所述人脸区域 的至少两个特征点, 并获得从所述至少两个特征点所在区域提取出的至少两 个特征所组成的特征向量, 所述至少两个特征点至少包括眼睛特征点与眼角 特征点; 基于所述特征向量, 判断所述第一时刻获得的图像中所述被拍摄者 的眼睛是否睁开。  In the third possible implementation manner, in the third possible implementation manner, determining whether the eye of the captured person in the image obtained by the first moment is split includes: acquiring the first moment Performing pre-processing on the face region of the subject in the image; locating at least two feature points of the face region, and obtaining at least two features extracted from the region where the at least two feature points are located a feature vector, the at least two feature points including at least an eye feature point and an eye corner feature point; determining, based on the feature vector, whether the subject's eyes in the image obtained at the first time are split.
结合第一种可能实现的方式, 在第四种可能实现的方式中, 所述判断所 述第一时刻获得的图像中所述被拍摄者的人像是否模糊, 具体包括: 对所述 第一时刻获得的图像中所述被拍摄者的人像进行边缘检测, 获得局部极大值 的多个边缘点对应的多个第一强度值; 按预设比例缩小所述第一时刻获得的 图像, 并对缩小后的图像中所述被拍摄者的人像进行边缘检测, 获得局部极 大值的所述多个边缘点对应的多个第二强度值; 判断所述多个边缘点中每一 个边缘点对应的的所述第二强度值与所述第一强度值之差是否大于一门限 值, 其中, 在所述第二强度值与所述第一强度值之差大于所述门限值时, 确 定所述每一个边缘点为模糊; 判断所述多个边缘点中模糊的边缘点的数量是 否大于一预设值, 其中, 在所述模糊的边缘点的数量大于所述预设值时, 确 定所述第一时刻获得的图像中所述被拍摄者的人像模糊。 With reference to the first possible implementation manner, in a fourth possible implementation manner, the determining whether the portrait of the subject in the image obtained by the first moment is blurred, specifically includes: The image of the subject in the obtained image is edge-detected to obtain a local maximum a plurality of first intensity values corresponding to the plurality of edge points; reducing the image obtained at the first time by a preset ratio, and performing edge detection on the portrait of the subject in the reduced image to obtain a local maximum a plurality of second intensity values corresponding to the plurality of edge points of the value; determining whether a difference between the second intensity value corresponding to each of the plurality of edge points and the first intensity value is greater than one a threshold value, wherein, when a difference between the second intensity value and the first intensity value is greater than the threshold value, determining that each edge point is blurred; determining that the plurality of edge points are blurred Whether the number of edge points is greater than a preset value, wherein when the number of the blurred edge points is greater than the preset value, determining that the portrait of the subject in the image obtained at the first moment is blurred.
本发明的第二方面, 还提供一种电子设备, 包括: 图像釆集单元, 设置 于所述机壳上; 处理单元, 与所述图像釆集单元相连, 用于判断所述图像釆 集单元在第一时刻获得的图像中被拍摄者的人像是否满足保存条件, 并在所 述第一时刻获得的图像中所述被拍摄者的人像不满足所述保存条件后, 从所 述第一时刻之后和 /或所述第一时刻之前的一设定时间段内选取满足所述保存 条件的至少一张图像, 并保存满足保存条件的至少一张图像。  A second aspect of the present invention provides an electronic device, including: an image collection unit disposed on the casing; and a processing unit connected to the image collection unit for determining the image collection unit Whether the portrait of the subject in the image obtained at the first time satisfies the saving condition, and after the portrait of the subject does not satisfy the saving condition in the image obtained at the first time, from the first moment At least one image that satisfies the saving condition is selected after a set time period before the first time and/or the first time, and at least one image satisfying the saving condition is saved.
结合第二方面, 在第一种可能的实施方式中, 所述处理单元具体用于判 断所述第一时刻获得的图像中被拍摄者的眼睛是否睁开, 其中, 在所述被拍 摄者的眼睛闭合时, 确定所述第一时刻获得的图像中被拍摄者的人像不满足 所述保存条件, 和 /或判断所述第一时刻获得的图像中所述被拍摄者的人像是 否模糊, 其中, 在所述第一时刻获得的图像中所述被拍摄者的人像模糊时, 确定所述第一时刻获得的图像中被拍摄者的人像不满足所述保存条件。  With reference to the second aspect, in a first possible implementation, the processing unit is specifically configured to determine whether an eye of the photographer in the image obtained at the first moment is split, wherein, in the image of the photographer When the eye is closed, determining that the portrait of the subject in the image obtained at the first moment does not satisfy the saving condition, and/or determining whether the portrait of the subject in the image obtained at the first moment is blurred, wherein When the portrait of the subject is blurred in the image obtained at the first time, it is determined that the portrait of the subject in the image obtained at the first time does not satisfy the saving condition.
结合第一种可能的实施方式, 在第二种可能的实施方式中, 所述处理单 元还用于在所述判断所述第一时刻获得的图像中被拍摄者的眼睛是否睁开之 前, 基于在所述第一时刻之前获得的至少一张图像, 确定所述被拍摄者的眼 睛处于睁眼状态或闭眼状态。  With reference to the first possible implementation manner, in a second possible implementation manner, the processing unit is further configured to: before the eye of the photographer is opened in the image obtained by determining the first moment, based on At least one image obtained before the first moment determines that the subject's eyes are in a blinking state or a closed eye state.
结合第一种可能的实施方式, 在第三种可能的实施方式中, 所述处理单 元具体用于对所述第一时刻获得的图像中所述被拍摄者的人脸区域进行预处 理, 并定位所述人脸区域的至少两个特征点, 并获得从所述至少两个特征点 所在区域提取出的至少两个特征所组成的特征向量, 所述至少两个特征点至 少包括眼睛特征点与眼角特征点, 并基于所述特征向量, 判断所述第一时刻 获得的图像中所述被拍摄者的眼睛是否睁开。 With reference to the first possible implementation manner, in a third possible implementation, the processing unit is specifically configured to perform pre-processing on a face area of the subject in an image obtained at the first moment, and Locating at least two feature points of the face region and obtaining from the at least two feature points a feature vector composed of at least two features extracted by the region, the at least two feature points including at least an eye feature point and an eye feature point, and determining, according to the feature vector, the image obtained at the first moment Whether the eyes of the photographer are open.
结合第一种可能的实施方式, 在第四种可能的实施方式中, 所述处理单 元具体用于对所述第一时刻获得的图像中所述被拍摄者的人像进行边缘检 测, 获得局部极大值的多个边缘点对应的多个第一强度值, 并按预设比例缩 小所述第一时刻获得的图像, 并对缩小后的图像中所述被拍摄者的人像进行 边缘检测, 获得局部极大值的所述多个边缘点对应的多个第二强度值, 并判 断所述多个边缘点中每一个边缘点对应的的所述第二强度值与所述第一强度 值之差是否大于一门限值, 其中, 在所述第二强度值与所述第一强度值之差 大于所述门限值时, 确定所述每一个边缘点为模糊, 并判断所述多个边缘点 中模糊的边缘点的数量是否大于一预设值, 其中, 在所述模糊的边缘点的数 量大于所述预设值时, 确定所述第一时刻获得的图像中所述被拍摄者的人像 模糊。  With reference to the first possible implementation manner, in a fourth possible implementation, the processing unit is specifically configured to perform edge detection on the portrait of the subject in the image obtained at the first moment to obtain a local pole a plurality of first intensity values corresponding to the plurality of edge points of the large value, and reducing the image obtained at the first time by a preset ratio, and performing edge detection on the portrait of the subject in the reduced image, a plurality of second intensity values corresponding to the plurality of edge points of the local maximum value, and determining the second intensity value corresponding to each of the plurality of edge points and the first intensity value Whether the difference is greater than a threshold value, wherein, when the difference between the second intensity value and the first intensity value is greater than the threshold value, determining that each edge point is blurred, and determining the plurality of Whether the number of blurred edge points in the edge point is greater than a preset value, wherein, when the number of the edge points of the blur is greater than the preset value, determining the subject in the image obtained at the first moment of Like a blur.
本发明实施例中提供的一个或多个技术方案, 至少具有如下技术效果或 优点:  One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
由于判断第一时刻获得的图像中被拍摄者的人像是否满足保存条件, 并 在第一时刻获得的图像中被拍摄者的人像不满足保存条件后, 从第一时刻之 后和 /或第一时刻之前的一设定时间段内选取满足保存条件的至少一张图像, 并保存满足保存条件的至少一张图像的技术方案, 避免了第一时刻获得的图 像出现被拍摄者的眼睛在拍照的瞬间闭合或者图像模糊等不满足要求的情 况, 所以解决了现有技术中智能手机、 平板电脑或数码相机等电子设备在拍 摄图像时 , 存在的因所拍摄到的图像不满足要求而使得用户需要花费时间重 新进行拍摄的技术问题, 实现了节省用户重新拍摄图像时所花费的时间的技 术效果。 附图说明 Since it is determined whether the portrait of the subject in the image obtained at the first time satisfies the saving condition, and the portrait of the subject in the image obtained at the first time does not satisfy the saving condition, after the first time and/or the first time In the previous set time period, at least one image satisfying the saving condition is selected, and a technical solution of at least one image satisfying the saving condition is saved, thereby avoiding the image obtained at the first moment appearing at the moment of being photographed by the photographer's eyes. The situation that the closed image or the image blur is not satisfactory, so that the electronic device such as a smart phone, a tablet computer or a digital camera in the prior art has an image that is not satisfied by the captured image, so that the user needs to spend the image. The technical problem of time to retake the shooting achieves the technical effect of saving the time taken by the user to retake the image. DRAWINGS
图 1为本发明实施例提供的保存拍摄图像的方法流程图;  1 is a flowchart of a method for saving a captured image according to an embodiment of the present invention;
图 2为本发明实施例提供的应用保存拍摄图像的方法的电子设备的工作 流程图;  2 is a flowchart of an operation of an electronic device for applying a method for saving a captured image according to an embodiment of the present invention;
图 3为本发明实施例提供的电子设备的功能模块图。 具体实施方式  FIG. 3 is a functional block diagram of an electronic device according to an embodiment of the present invention. detailed description
本发明实施例通过提供一种保存拍摄图像的方法以及电子设备, 解决了 现有技术中智能手机、 平板电脑或数码相机等电子设备在拍摄图像时, 存在 的因所拍摄到的图像不满足要求而使得用户需要花费时间重新进行拍摄的技 术问题。  The embodiment of the present invention solves the problem that the electronic device such as a smart phone, a tablet computer or a digital camera in the prior art has an image that does not meet the requirements when the image is captured by providing a method for saving a captured image and an electronic device. The technical problem that makes it take time for the user to take time to shoot again.
本发明实施例中的技术方案为解决上述技术问题, 总体思路如下: 首先 , 判断第一时刻获得的图像中被拍摄者的人像是否满足保存条件; 然后, 在第一时刻获得的图像中被拍摄者的人像不满足保存条件后, 从 第一时刻之后和 /或第一时刻之前的一设定时间段内例如 2秒或者 3秒内等等, 选取满足保存条件的至少一张图像, 并保存满足保存条件的至少一张图像。  The technical solution in the embodiment of the present invention is to solve the above technical problem. The general idea is as follows: First, it is determined whether the portrait of the photographer in the image obtained at the first moment satisfies the saving condition; and then, the image obtained at the first moment is photographed. After the portrait of the person does not satisfy the saving condition, at least one image that satisfies the saving condition is selected and saved from a set time period after the first time and/or within a set time period before the first time, for example, 2 seconds or 3 seconds, and the like. At least one image that satisfies the save condition.
通过上述部分可以看出, 由于判断第一时刻获得的图像中被拍摄者的人 像是否满足保存条件, 并在第一时刻获得的图像中被拍摄者的人像不满足保 存条件后, 从第一时刻之后和 /或第一时刻之前的一设定时间段内选取满足保 存条件的至少一张图像, 并保存满足保存条件的至少一张图像的技术方案, 避免了第一时刻获得的图像出现被拍摄者的眼睛在拍照的瞬间闭合或者图像 模糊等不满足要求的情况, 所以解决了现有技术中智能手机、 平板电脑或数 码相机等电子设备在拍摄图像时, 存在的因所拍摄到的图像不满足要求而使 得用户需要花费时间重新进行拍摄的技术问题, 从而能够节省用户重新拍摄 图像时所花费的时间。  It can be seen from the above that, since it is determined whether the portrait of the subject in the image obtained at the first time satisfies the saving condition, and the portrait of the subject in the image obtained at the first time does not satisfy the saving condition, the first moment And then selecting at least one image that satisfies the saving condition and storing a technical solution that satisfies at least one image of the saving condition in a set period of time before the first time, and avoiding that the image obtained at the first moment is taken. When the eyes of the person are closed at the moment of photographing or the image is blurred, the image is not satisfied, so that the electronic device such as a smart phone, a tablet computer or a digital camera in the prior art has an image that is not captured due to the captured image. A technical problem that satisfies the requirements and requires the user to spend time re-shooting, thereby saving the time taken by the user to retake the image.
为了更好的理解上述技术方案, 下面将结合说明书附图以及具体的实施 方式对上述技术方案进行详细的说明。 In order to better understand the above technical solutions, the following description will be combined with the drawings and specific implementations. The above technical solution will be described in detail.
本发明实施例提供一种保存拍摄图像的方法,请参考图 1 , 图 1是本发明 实施例提供的保存拍摄图像的方法流程图, 如图 1所示, 该方法包括:  An embodiment of the present invention provides a method for saving a captured image. Referring to FIG. 1 , FIG. 1 is a flowchart of a method for saving a captured image according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:
S 1: 判断第一时刻获得的图像中被拍摄者的人像是否满足保存条件; S 1: determining whether the portrait of the subject in the image obtained at the first moment satisfies the storage condition;
S2: 在第一时刻获得的图像中被拍摄者的人像不满足保存条件后, 从第 一时刻之后和 /或第一时刻之前的一设定时间段内选取满足保存条件的至少一 张图像, 并保存满足保存条件的至少一张图像。 S2: after the portrait of the photographer in the image obtained at the first moment does not satisfy the saving condition, select at least one image that satisfies the saving condition from a set time period after the first time and/or before the first time, And save at least one image that satisfies the save condition.
请继续参考图 2,图 2是本发明实施例提供的应用保存拍摄图像的方法的 电子设备的工作流程图, 在接下来的部分中, 将结合图 1与图 2来详细地介 绍本发明实施例提供的保存拍摄图像的方法以及电子设备。  Please refer to FIG. 2 . FIG. 2 is a flowchart showing the operation of the electronic device according to the method for saving a captured image according to an embodiment of the present invention. In the following part, the implementation of the present invention will be described in detail with reference to FIG. 1 and FIG. 2 . The method of saving a captured image and an electronic device provided by the example.
如图 2所示, 应用本发明实施例提供的保存拍摄图像的方法的智能手机、 平板电脑或数码相机等电子设备在拍摄图像的时候, 会先调用电子设备的图 像釆集单元如摄像头, 然后将图像釆集单元所釆集到的图像显示在电子设备 的预览屏幕上, 当然, 此时需要保存设定时间段内的多张预览图像, 设定时 间段例如可以是 2秒, 3秒等等,所保存的多张预览图像可以为全尺寸( fullsize ) 图像, 本领域所属的技术人员能够根据实际情况设置设定时间段的具体值, 在此不做限制。  As shown in FIG. 2, an electronic device such as a smart phone, a tablet computer, or a digital camera that saves a method for capturing an image according to an embodiment of the present invention first calls an image collection unit such as a camera of an electronic device when capturing an image, and then Displaying the image collected by the image collection unit on the preview screen of the electronic device. Of course, it is necessary to save a plurality of preview images in the set time period, and the set time period may be, for example, 2 seconds, 3 seconds, etc. For example, the saved multiple preview images may be a full size image, and a person skilled in the art can set a specific value of the set time period according to actual conditions, which is not limited herein.
根据设定时间段内所保存的多张预览图像, 智能手机、 平板电脑或数码 相机等电子设备可以判断所拍摄的图像中是否有人脸, 具体可以是先离线训 练一个分类器, 这个分类器的意义是可以计算图像子窗口的特征值, 当子窗 口中的特征值满足阔值条件时, 此子窗口则可被电子设备判断为包括人脸, 否则为不包括人脸。  According to the multiple preview images saved in the set time period, an electronic device such as a smart phone, a tablet computer or a digital camera can determine whether there is a face in the captured image, specifically, it is possible to train a classifier offline, the classifier The meaning is that the feature value of the image sub-window can be calculated. When the feature value in the sub-window satisfies the threshold condition, the sub-window can be judged to include the human face by the electronic device, otherwise the face is not included.
在分类器检测图像的过程中时, 将图像数据, 按照一定比例连续缩小, 得到不同尺度的缩放图像, 然后在每个尺度的图像上, 穷举所有位置的子窗 口, 这个子窗口的大小根据分类器的特征来确定, 一般是 20*20 (单位可以是 像素), 对于每个子窗口来说, 使用分类器来计算这个子窗口的特征值, 当特 征值满足阔值条件时, 此窗口可被电子设备判断为包括人脸, 否则为不包括 人脸, 最后搜索所有尺度图像的所有子窗口, 并合并全图的所有子窗口的人 脸结果, 从而确定所拍摄的图像中是否包括人脸。 When the classifier detects the image, the image data is continuously reduced according to a certain ratio to obtain a scaled image of different scales, and then on each scale image, the sub-window of all positions is exhausted, and the size of the sub-window is determined according to The characteristics of the classifier are determined, generally 20*20 (the unit can be a pixel). For each sub-window, the classifier is used to calculate the feature value of the sub-window. When the feature value satisfies the threshold condition, the window can be It is judged by the electronic device to include a human face, otherwise it is not included The face, finally searches all the child windows of all scale images, and merges the face results of all the child windows of the full image to determine whether the face is included in the captured image.
当然, 在实际应用中, 电子设备可以是在所保存的多张预览图像中每一 张图像都包括人脸的情况下确定出所拍摄的图像中有人脸, 也可以是在包括 人脸的预览图像超过一定数量的情况下确定出所拍摄的图像中有人脸, 在此 不做限制。  Of course, in an actual application, the electronic device may determine a human face in the captured image in the case that each of the saved multiple preview images includes a human face, or may be a preview image including a human face. If there is more than a certain number of cases, the face of the captured image is determined, and no limitation is imposed here.
如图 2所示, 在确定所拍摄的图像中有人脸之后, 智能手机、 平板电脑 或数码相机等电子设备即可以进入人脸模式。 当然, 除了由智能手机、 平板 电脑或数码相机等电子设备根据对所保存的多张预览图像的判断结果自动进 入人脸模式之外, 还可以由用户通过按压一操作按键触发电子设备进入人脸 模式, 或者通过用户触摸电子设备的触控屏上的一个触控按键来触发电子设 备进入人脸模式, 在此不做限制。  As shown in Fig. 2, after determining the face of the captured image, the electronic device such as a smartphone, tablet or digital camera can enter the face mode. Of course, in addition to automatically entering the face mode by the electronic device such as a smart phone, a tablet computer, or a digital camera according to the judgment result of the saved multiple preview images, the user may trigger the electronic device to enter the face by pressing an operation button. The mode, or the user touches a touch button on the touch screen of the electronic device to trigger the electronic device to enter the face mode, and no limitation is imposed herein.
当然, 若所拍摄的图像中没有人脸, 或用户也没有控制电子设备进入人 脸模式, 则电子设备按照正常模式进行拍照保存, 在此就不再赘述了。  Of course, if there is no face in the captured image, or the user does not control the electronic device to enter the face mode, the electronic device saves the photo according to the normal mode, and will not be described here.
在根据设定时间段内所保存的多张预览图像, 确定出所拍摄的图像中包 括人脸图像后, 进一步地, 本发明实施例提供的保存拍摄图像的方法还包括: 基于在第一时刻之前获得的至少一张图像, 确定被拍摄者的眼睛处于睁眼状 态或闭眼状态。  The method for saving the captured image provided by the embodiment of the present invention further includes: before the first moment, the method for saving the captured image provided by the embodiment of the present invention, after determining that the captured image includes the face image, according to the plurality of preview images saved in the set time period. Obtain at least one image to determine that the subject's eyes are in a blinking state or a closed eye state.
具体来讲, 在所保存的多张预览图像中, 若被拍摄者闭眼的预览图像的 数量超过一定比例, 如超过 80%等等, 则表明被拍摄者的眼睛处于闭眼状态; 若被拍摄者睁眼的预览图像的数量超过一定比例, 如超过 60%等等, 则表明 被拍摄者的眼睛处于睁眼状态。  Specifically, in the saved plurality of preview images, if the number of preview images closed by the photographer exceeds a certain ratio, such as more than 80%, etc., it indicates that the subject's eyes are in a closed-eye state; The number of preview images of the photographer blinking exceeds a certain percentage, such as more than 60%, etc., indicating that the subject's eyes are in a blinking state.
在具体实施过程中, 判断第一时刻获得的图像中被拍摄者的眼睛为睁眼 或闭眼, 具体可以是:  In the specific implementation process, it is determined that the subject's eyes in the image obtained at the first moment are blinking or closing the eyes, and specifically:
首先对第一时刻获得的图像中被拍摄者的人脸区域进行预处理, 例如光 照矫正, 缩放到一定比例等等, 接着定位人脸区域的至少两个特征点, 并获 得从至少两个特征点所在区域提取出的至少两个特征所组成的特征向量, 至 少两个特征点至少包括眼睛特征点与眼角特征点, 当然, 还可以包括眉毛、 脸部肌肉等等, 最后对特征向量进行分类和回归处理, 并计算出眨眼的程度 数值, 从而能够确定出该预览图像中被拍摄者的眼睛为睁眼或闭眼, 例如眼 睛的上目艮皮与下目艮皮的闭合程度(即眨眼的数值)超过 60%, 即可以确定出 该预览图像中被拍摄者的眼睛为闭眼, 当然, 通过本实施例的介绍, 本领域 所属的技术人员能够根据实际情况, 将眨眼数值设为合适的数值范围, 以满 足实际情况的需要, 在此就不再赘述了。 First, pre-processing the face region of the subject in the image obtained at the first moment, such as illumination correction, scaling to a certain ratio, etc., and then locating at least two feature points of the face region, and obtaining at least two features a feature vector composed of at least two features extracted from the region where the point is located, to The two feature points include at least the eye feature point and the eye feature point. Of course, the eyebrows, the face muscles, and the like may be included. Finally, the feature vector is classified and subjected to regression processing, and the degree of the degree of the blink is calculated, thereby being able to determine In the preview image, the subject's eyes are blinked or closed, for example, the degree of closure of the upper and lower eyelids of the eye (ie, the value of the blink) exceeds 60%, thereby determining that the preview image is The photographer's eyes are closed eyes. Of course, by the introduction of the embodiment, those skilled in the art can set the blink value to a suitable numerical range according to the actual situation, so as to meet the actual situation, no longer I will go into details.
当然, 本实施例中所介绍的判断该预览图像中被拍摄者的眼睛为睁眼或 闭眼的方法只是一个举例, 通过本实施例的介绍, 本领域所属的技术人员能 够根据实际情况, 选择其他合适的方式来判断该预览图像中被拍摄者的眼睛 为睁眼或闭眼, 在此就不再赘述了。  Of course, the method for determining that the subject's eyes in the preview image is blinking or closing the eyes is only an example. Through the introduction of the embodiment, those skilled in the art can select according to the actual situation. Other suitable methods for judging the subject's eyes in the preview image are blinking or closing the eyes, and will not be described again here.
请同时参考图 1与图 2,在确定第一时刻所拍摄到的图像中被拍摄者的眼 睛为睁眼后, 本发明实施例提供的保存拍摄图像的方法进入步骤 S1 , 即: 判 断第一时刻获得的图像中被拍摄者的人像是否满足保存条件。  Referring to FIG. 1 and FIG. 2 simultaneously, after determining that the subject's eyes are blinked in the image captured at the first moment, the method for saving the captured image provided by the embodiment of the present invention proceeds to step S1, that is, determining the first Whether the portrait of the subject in the image obtained at the time satisfies the storage condition.
在实际应用中, 第一时刻可以是接收到保存指令的时刻, 如可以是用户 通过手指按压电子设备的快门按键, 或者点击、 触控电子设备的拍照按键的 时刻, 也可以是用户设定的自动拍照的时刻, 在此不做限制; 保存条件可以 是 "第一时刻获得的图像中被拍摄者的眼睛为睁开", 也可以是 "第一时刻获 得的图像中被拍摄者的人像清晰", 当然, 保存条件也可以是由用户根据实际 情况进行设定, 以满足用户在不同的使用场景下的使用需求, 如被拍摄者希 望所获得的图像为闭眼图像, 用户可以设定保存条件为 "第一时刻获得的图 像中被拍摄者的眼睛为闭合" 即可, 在此不做限制。  In the actual application, the first moment may be the moment when the save command is received, such as the moment when the user presses the shutter button of the electronic device by the finger, or clicks or touches the camera button of the electronic device, or may be set by the user. The moment of automatic photographing is not limited here; the saving condition may be "the image of the photographer is opened in the image obtained at the first moment", or "the portrait of the photographer in the image obtained at the first moment is clear." "Of course, the saving condition can also be set by the user according to the actual situation to meet the user's use requirements in different usage scenarios. For example, the image that the photographer desires to obtain is a closed-eye image, and the user can save the setting. The condition is "the eyes of the subject in the image obtained at the first moment are closed", and no limitation is imposed here.
在具体实施过程中, 判断第一时刻获得的图像中被拍摄者的人像是否满 足保存条件, 具体来讲, 可以为: 判断第一时刻获得的图像中被拍摄者的眼 睛是否睁开, 其中, 在被拍摄者的眼睛闭合时, 确定第一时刻获得的图像不 满足保存条件 , 和 /或判断第一时刻获得的图像中被拍摄者的人像是否模糊 , 其中, 在第一时刻获得的图像中被拍摄者的人像模糊时, 确定第一时刻获得 的图像不满足保存条件。 In the specific implementation process, it is determined whether the portrait of the captured person in the image obtained at the first moment satisfies the saving condition. Specifically, it may be: determining whether the eye of the captured person in the image obtained at the first moment is opened, wherein When the subject's eyes are closed, it is determined whether the image obtained at the first moment does not satisfy the saving condition, and/or whether the portrait of the subject in the image obtained at the first moment is blurred, wherein, in the image obtained at the first moment, When the portrait of the photographer is blurred, determine the first moment to get The image does not satisfy the save condition.
判断第一时刻获得的图像中被拍摄者的眼睛是否睁开, 可以根据前述部 分中介绍的判断预览图像中被拍摄者的眼睛是否睁开类似的方式进行判断, 在此就不再赘述了。  It is judged whether or not the subject's eyes are opened in the image obtained at the first time, and it can be judged based on whether or not the subject's eyes in the preview image are opened in a similar manner as described in the foregoing section, and will not be described again.
判断第一时刻获得的图像中被拍摄者的人像是否模糊, 可以是对第一时 刻获得的图像中被拍摄者的人像进行边缘检测, 获得局部极大值的多个边缘 点对应的多个第一强度值, 并按预设比例缩小第一时刻获得的图像, 并对缩 小后的图像中被拍摄者的人像进行边缘检测, 获得局部极大值的多个边缘点 对应的多个第二强度值, 然后判断多个边缘点中每一个边缘点对应的的第二 强度值与第一强度值之差是否大于一门限值, 其中, 在第二强度值与第一强 度值之差大于门限值时, 确定每一个边缘点为模糊, 最后判断多个边缘点中 模糊的边缘点的数量是否大于一预设值, 其中, 在模糊的边缘点的数量大于 预设值时, 确定第一时刻获得的图像中被拍摄者的人像模糊。  Determining whether the portrait of the subject in the image obtained at the first time is blurred may be performing edge detection on the portrait of the subject in the image obtained at the first time, and obtaining a plurality of plurality of edge points corresponding to the local maximum An intensity value, and reducing the image obtained at the first moment by a preset ratio, and performing edge detection on the image of the captured person in the reduced image to obtain a plurality of second intensities corresponding to the plurality of edge points of the local maximum value a value, and then determining whether a difference between the second intensity value corresponding to each edge point of the plurality of edge points and the first intensity value is greater than a threshold value, wherein a difference between the second intensity value and the first intensity value is greater than a threshold When the limit value is determined, it is determined that each edge point is blurred, and finally determining whether the number of blurred edge points in the plurality of edge points is greater than a preset value, wherein when the number of blurred edge points is greater than a preset value, determining the first The portrait of the subject in the image obtained at any time is blurred.
通过本实施例的介绍, 本领域所属的技术人员能够根据实际情况, 设置 门限值为合适的数值, 以满足实际情况的需要, 在此就不再赘述了。  Through the introduction of this embodiment, the person skilled in the art can set the threshold value to a suitable value according to the actual situation, to meet the needs of the actual situation, and will not be described herein.
当然, 本实施例中所介绍的判断第一时刻获得的图像中被拍摄者的人像 是否模糊的方法只是一个举例, 通过本实施例的介绍, 本领域所属的技术人 员能够根据实际情况, 选择其他合适的方式来判断第一时刻获得的图像中被 拍摄者的人像是否模糊, 在此就不再赘述了。  Of course, the method for determining whether the portrait of the subject in the image obtained at the first time is blurred is only an example. Through the introduction of the embodiment, those skilled in the art can select other according to the actual situation. A suitable way to judge whether the portrait of the subject in the image obtained at the first moment is blurred is not described herein.
上述部分介绍了判断第一时刻获得的图像中被拍摄者的人像是否满足保 存条件的两种形式, 通过本实施例的介绍, 本领域所属的技术人员能够推导 出判断第一时刻获得的图像中被拍摄者的人像是否满足保存条件的其他形 式, 在此就不再赘述了。  The above section describes two forms for judging whether or not the portrait of the subject in the image obtained at the first time satisfies the saving condition. With the introduction of the embodiment, those skilled in the art can deduce the image obtained at the first moment. Whether the portrait of the subject satisfies other forms of preservation conditions will not be described here.
请继续参考图 1与图 2 , 在步骤 S1之后, 确定出第一时刻获得的图像中 被拍摄者的人像不满足保存条件后, 本发明实施例提供的保存拍摄图像的方 法进入步骤 S2, 即: 从第一时刻之后和 /或第一时刻之前的一设定时间段内选 取满足保存条件的至少一张图像, 并保存满足保存条件的至少一张图像。 具体来讲, 由于第一时刻为接收到保存指令的时刻, 例如可以是用户按 下快门的时刻, 或者是设定的自动拍照的时刻, 所以在第一时刻之后和 /或第 一时刻之前的设定时间段内, 也即在第一时刻附近的其他时刻选取满足保存 条件的至少一张图像, 本领域所属的技术人员能够根据实际情况, 设置设定 时间段的具体数值, 例如 2秒或 3秒等等, 并保存选取出的满足保存条件的 至少一张图像, 如可以将其保存在电子设备的存储卡中。 Continuing to refer to FIG. 1 and FIG. 2, after the step S1, after determining that the portrait of the subject in the image obtained at the first time does not satisfy the saving condition, the method for saving the captured image provided by the embodiment of the present invention proceeds to step S2, that is, : selecting at least one image that satisfies the saving condition from a set time period after the first time and/or before the first time, and saving at least one image that satisfies the saving condition. Specifically, since the first time is the time when the save command is received, for example, the time when the user presses the shutter, or the time of the set automatic photographing, after the first time and/or before the first time During the set time period, that is, at least another image that meets the storage condition is selected at other times near the first time, a person skilled in the art can set a specific value of the set time period, for example, 2 seconds or according to actual conditions. 3 seconds, etc., and save the selected at least one image that satisfies the saving condition, for example, it can be saved in the memory card of the electronic device.
判断第一时刻之后和 /或第一时刻之前的设定时间段内的图像是否满足保 存条件与前述部分中介绍的方法原理类似, 为了说明书的简洁, 在此就不再 赘述了。  Judging whether the image in the set time period after the first time and/or before the first time satisfies the preservation condition is similar to the method principle described in the foregoing section, and for the sake of brevity of the description, it will not be described again here.
通过上述部分可以看出, 由于判断第一时刻获得的图像中被拍摄者的人 像是否满足保存条件, 并在第一时刻获得的图像中被拍摄者的人像不满足保 存条件后, 从第一时刻之后和 /或第一时刻之前的一设定时间段内选取满足保 存条件的至少一张图像, 并保存满足保存条件的至少一张图像的技术方案, 避免了第一时刻获得的图像出现被拍摄者的眼睛在拍照的瞬间闭合或者图像 模糊等不满足要求的情况, 所以解决了现有技术中智能手机、 平板电脑或数 码相机等电子设备在拍摄图像时, 存在的因所拍摄到的图像不满足要求而使 得用户需要花费时间重新进行拍摄的技术问题, 实现了节省用户重新拍摄图 像时所花费的时间的技术效果。  It can be seen from the above that, since it is determined whether the portrait of the subject in the image obtained at the first time satisfies the saving condition, and the portrait of the subject in the image obtained at the first time does not satisfy the saving condition, the first moment And then selecting at least one image that satisfies the saving condition and storing a technical solution that satisfies at least one image of the saving condition in a set period of time before the first time, and avoiding that the image obtained at the first moment is taken. When the eyes of the person are closed at the moment of photographing or the image is blurred, the image is not satisfied, so that the electronic device such as a smart phone, a tablet computer or a digital camera in the prior art has an image that is not captured due to the captured image. The technical problem that the user needs to spend time re-shooting is satisfied, and the technical effect of saving the time taken by the user to retake the image is realized.
基于同一发明构思, 本发明实施例还提供一种电子设备, 在实际应用中, 该电子设备可以是智能手机、 平板电脑或数码相机, 在此不做限制。  Based on the same inventive concept, an embodiment of the present invention further provides an electronic device. In an actual application, the electronic device may be a smart phone, a tablet computer, or a digital camera, which is not limited herein.
请参考图 3 , 图 3是本发明实施例提供的电子设备的功能模块图, 如图 3 所示, 该电子设备包括: 图像釆集单元 301 , ; 处理单元 302 , 与图像釆集单 元 301相连, 用于判断图像釆集单元 301在第一时刻获得的图像中被拍摄者 的人像是否满足保存条件, 其中第一时刻为接收到保存指令的时刻, 并在第 一时刻获得的图像中被拍摄者的人像不满足保存条件后, 从第一时刻之后和 / 或第一时刻之前的一设定时间段内选取满足保存条件的至少一张图像, 并保 存满足保存条件的至少一张图像。 其中, 图像釆集单元 301可以是摄像头, 如可以包括镜头、 CCD传感器 或 CMOS传感器、 ISP ( Image Signal Processing, 图像信号处理器)等元件; 处理单元 302可以是 CPU ( Central Processing Unit, 中央处理器), 可以是集 成了 ISP 的 ARM架构的处理器或 X86架构的处理器等, 在此不做限制。 Please refer to FIG. 3. FIG. 3 is a functional block diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 3, the electronic device includes: an image collection unit 301, and a processing unit 302 connected to the image collection unit 301. And determining whether the portrait of the photographer in the image obtained by the image collection unit 301 at the first time satisfies a saving condition, wherein the first time is a time when the save instruction is received, and is captured in the image obtained at the first time After the portrait of the person does not satisfy the saving condition, at least one image satisfying the saving condition is selected from a set time period after the first time and/or before the first time, and at least one image satisfying the saving condition is saved. The image collection unit 301 can be a camera, such as a lens, a CCD sensor or a CMOS sensor, an ISP (Image Signal Processing), and the like. The processing unit 302 can be a CPU (Central Processing Unit). It can be an ARM-integrated processor integrated with ISP or an X86-based processor, etc., and is not limited here.
在本发明实施例中, 处理单元 302具体用于判断第一时刻获得的图像中 被拍摄者的眼睛是否睁开, 其中, 在被拍摄者的眼睛闭合时, 确定第一时刻 获得的图像中被拍摄者的人像不满足保存条件 , 和 /或判断第一时刻获得的图 像中被拍摄者的人像是否模糊, 其中, 在第一时刻获得的图像中被拍摄者的 人像模糊时, 确定第一时刻获得的图像中被拍摄者的人像不满足保存条件。  In the embodiment of the present invention, the processing unit 302 is specifically configured to determine whether the eyes of the photographer in the image obtained at the first moment are opened, wherein when the eyes of the photographer are closed, it is determined that the image obtained at the first moment is The portrait of the photographer does not satisfy the saving condition, and/or determines whether the portrait of the subject in the image obtained at the first moment is blurred, wherein the first moment is determined when the portrait of the photographer is blurred in the image obtained at the first moment The portrait of the subject in the obtained image does not satisfy the saving condition.
在本发明实施例中, 处理单元 302还用于在判断第一时刻获得的图像中 被拍摄者的眼睛是否睁开之前, 基于在第一时刻之前获得的至少一张图像, 确定被拍摄者的眼睛处于睁眼状态或闭眼状态。  In the embodiment of the present invention, the processing unit 302 is further configured to determine, according to the at least one image obtained before the first moment, before the eye of the photographer is split in the image obtained at the first moment, determining the subject's The eyes are in a blinking state or in a closed eye state.
在本发明实施例中, 处理单元 302具体用于对第一时刻获得的图像中被 拍摄者的人脸区域进行预处理, 并定位人脸区域的至少两个特征点, 并获得 从至少两个特征点所在区域提取出的至少两个特征所组成的特征向量, 至少 两个特征点至少包括眼睛特征点与眼角特征点, 并基于特征向量, 判断第一 时刻获得的图像中被拍摄者的眼睛是否睁开。  In the embodiment of the present invention, the processing unit 302 is specifically configured to preprocess the face region of the captured image in the image obtained at the first time, and locate at least two feature points of the face region, and obtain at least two a feature vector composed of at least two features extracted from a region where the feature point is located, at least two feature points including at least an eye feature point and an eye feature point, and based on the feature vector, determining an eye of the captured person in the image obtained at the first moment Whether to open it.
在本发明实施例中, 处理单元 302具体用于对第一时刻获得的图像中被 拍摄者的人像进行边缘检测, 获得局部极大值的多个边缘点对应的多个第一 强度值, 并按预设比例缩小第一时刻获得的图像, 并对缩小后的图像中被拍 摄者的人像进行边缘检测, 获得局部极大值的多个边缘点对应的多个第二强 度值, 并判断多个边缘点中每一个边缘点对应的的第二强度值与第一强度值 之差是否大于一门限值, 其中, 在第二强度值与第一强度值之差大于门限值 时, 确定每一个边缘点为模糊, 并判断多个边缘点中模糊的边缘点的数量是 否大于一预设值, 其中, 在模糊的边缘点的数量大于预设值时, 确定第一时 刻获得的图像中被拍摄者的人像模糊。  In the embodiment of the present invention, the processing unit 302 is specifically configured to perform edge detection on the portrait of the captured person in the image obtained at the first moment, and obtain a plurality of first intensity values corresponding to the plurality of edge points of the local maximum value, and The image obtained at the first moment is reduced according to a preset ratio, and the image of the captured person in the reduced image is edge-detected, and a plurality of second intensity values corresponding to the plurality of edge points of the local maximum value are obtained, and the plurality of judgments are determined. Whether the difference between the second intensity value corresponding to each edge point and the first intensity value is greater than a threshold value, wherein when the difference between the second intensity value and the first intensity value is greater than a threshold value, determining Each edge point is blurred, and it is determined whether the number of blurred edge points in the plurality of edge points is greater than a preset value, wherein when the number of blurred edge points is greater than a preset value, determining an image obtained at the first moment The portrait of the photographer is blurred.
本实施例中的电子设备与前述实施例中的保存拍摄图像的方法是基于同 一发明构思下的两个方面, 在前面已经对方法的实施过程作了详细的描述, 所以本领域技术人员可根据前述描述清楚的了解本实施例中的电子设备的结 构及实施过程, 为了说明书的简洁, 在此就不再赘述了。 The method of saving the captured image in the electronic device in this embodiment and the foregoing embodiment is based on the same In the two aspects of the inventive concept, the implementation process of the method has been described in detail above, so that those skilled in the art can clearly understand the structure and implementation process of the electronic device in this embodiment according to the foregoing description, for the specification. The simplicity is not repeated here.
上述本发明实施例中的技术方案, 至少具有如下的技术效果或优点: 由于判断第一时刻获得的图像中被拍摄者的人像是否满足保存条件, 并 在第一时刻获得的图像中被拍摄者的人像不满足保存条件后, 从第一时刻之 后和 /或第一时刻之前的一设定时间段内选取满足保存条件的至少一张图像, 并保存满足保存条件的至少一张图像的技术方案, 避免了第一时刻获得的图 像出现被拍摄者的眼睛在拍照的瞬间闭合或者图像模糊等不满足要求的情 况, 所以解决了现有技术中智能手机、 平板电脑或数码相机等电子设备在拍 摄图像时 , 存在的因所拍摄到的图像不满足要求而使得用户需要花费时间重 新进行拍摄的技术问题, 实现了节省用户重新拍摄图像时所花费的时间的技 术效果。  The technical solution in the above embodiment of the present invention has at least the following technical effects or advantages: since it is determined whether the portrait of the subject in the image obtained at the first moment satisfies the saving condition, and the photographer is photographed in the image obtained at the first moment. After the portrait is not satisfied with the saving condition, at least one image satisfying the saving condition is selected from a set time period after the first time and/or before the first time, and a technical solution of saving at least one image satisfying the saving condition is saved. The image obtained at the first moment is prevented from being closed by the photographer's eyes at the moment of photographing or the image is blurred, so that the electronic device such as a smart phone, a tablet computer or a digital camera is photographed in the prior art. In the case of an image, there is a technical problem that the user needs to take time to retake the image because the captured image does not satisfy the requirement, and the technical effect of saving the time taken by the user to retake the image is realized.
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或 计算机程序产品。 因此, 本发明可釆用完全硬件实施例、 完全软件实施例、 或结合软件和硬件方面的实施例的形式。 而且, 本发明可釆用在一个或多个 其中包含有计算机可用程序代码的计算机可用存储介质 (包括但不限于磁盘 存储器、 CD-ROM、 光学存储器等)上实施的计算机程序产品的形式。  Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can be embodied in the form of one or more computer program products embodied on a computer-usable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.) in which computer usable program code is embodied.
本发明是参照根据本发明实施例的方法、 设备(系统)、 和计算机程序产 品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图 和 /或方框图中的每一流程和 /或方框、 以及流程图和 /或方框图中的流程 和 /或方框的结合。 可提供这些计算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器, 使得通 过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流 程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的 装置。  The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowcharts and/or block diagrams, and combinations of flow and/or blocks in the flowcharts and/or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设 备以特定方式工作的计算机可读存储器中, 使得存储在该计算机可读存储器 中的指令产生包括指令装置的制造品, 该指令装置实现在流程图一个流程或 多个流程和 /或方框图一个方框或多个方框中指定的功能。 These computer program instructions can also be stored in a bootable computer or other programmable data processing device. In a computer readable memory that operates in a particular manner, causing instructions stored in the computer readable memory to produce an article of manufacture comprising instruction means implemented in one or more flows and/or block diagrams of the flowchart The function specified in the box or in multiple boxes.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的 处理, 从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图 一个流程或多个流程和 /或方框图一个方框或多个方框中指定的功能的步 骤。 发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权利要 求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在内。  These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram. The spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and variations of the inventions

Claims

权 利 要 求 Rights request
1、 一种保存拍摄图像的方法, 其特征在于, 包括: 1. A method of saving captured images, characterized by including:
判断第一时刻获得的图像中被拍摄者的人像是否满足保存条件; 在所述第一时刻获得的图像中所述被拍摄者的人像不满足所述保存条件 后, 从所述第一时刻之后和 /或所述第一时刻之前的一设定时间段内选取满足 所述保存条件的至少一张图像, 并保存满足所述保存条件的至少一张图像。 Determine whether the portrait of the subject in the image obtained at the first moment satisfies the preservation condition; after the portrait of the subject in the image obtained at the first moment does not meet the preservation condition, from the first moment onwards And/or select at least one image that satisfies the saving condition within a set time period before the first moment, and save at least one image that satisfies the saving condition.
2、 如权利要求 1所述的方法, 其特征在于, 所述判断第一时刻获得的图 像中被拍摄者的人像是否满足保存条件, 具体为: 2. The method of claim 1, wherein the step of determining whether the portrait of the subject in the image obtained at the first moment satisfies the preservation conditions is as follows:
判断所述第一时刻获得的图像中被拍摄者的眼睛是否睁开, 其中, 在所 述被拍摄者的眼睛闭合时, 确定所述第一时刻获得的图像中被拍摄者的人像 不满足所述保存条件; 和 /或 Determine whether the subject's eyes in the image obtained at the first moment are open, wherein, when the subject's eyes are closed, it is determined that the portrait of the subject in the image obtained at the first moment does not meet the requirements. the storage conditions described above; and/or
判断所述第一时刻获得的图像中所述被拍摄者的人像是否模糊, 其中, 在所述第一时刻获得的图像中所述被拍摄者的人像模糊时, 确定所述第一时 刻获得的图像中被拍摄者的人像不满足所述保存条件。 Determine whether the portrait of the subject in the image obtained at the first time is blurred, wherein, when the portrait of the subject in the image obtained at the first time is blurred, determine whether the portrait obtained at the first time is blurred. The portrait of the subject in the image does not meet the storage conditions.
3、 如权利要求 2所述的方法, 其特征在于, 在所述判断所述第一时刻获 得的图像中被拍摄者的眼睛是否睁开之前, 所述方法还包括: 3. The method of claim 2, wherein before determining whether the subject's eyes are open in the image obtained at the first moment, the method further includes:
基于在所述第一时刻之前获得的至少一张图像, 确定所述被拍摄者的眼 睛处于睁眼状态或闭眼状态, 其中, 在所述被拍摄者的眼睛处于所述睁眼状 态时, 执行步骤: 判断所述第一时刻获得的图像中被拍摄者的眼睛是否睁开。 Based on at least one image obtained before the first moment, it is determined that the subject's eyes are in an eye-open state or a closed-eye state, wherein, when the subject's eyes are in the eye-open state, Execution steps: Determine whether the subject's eyes are open in the image obtained at the first moment.
4、 如权利要求 2所述的方法, 其特征在于, 所述判断所述第一时刻获得 的图像中被拍摄者的眼睛是否睁开, 具体包括: 4. The method of claim 2, wherein determining whether the subject's eyes are open in the image obtained at the first moment specifically includes:
对所述第一时刻获得的图像中所述被拍摄者的人脸区域进行预处理; 定位所述人脸区域的至少两个特征点, 并获得从所述至少两个特征点所 在区域提取出的至少两个特征所组成的特征向量, 所述至少两个特征点至少 包括眼睛特征点与眼角特征点; Preprocess the face area of the photographed person in the image obtained at the first moment; locate at least two feature points of the face area, and obtain the region where the at least two feature points are located. A feature vector composed of at least two features, the at least two feature points at least include eye feature points and eye corner feature points;
基于所述特征向量, 判断所述第一时刻获得的图像中所述被拍摄者的眼 睛是否睁开。 Based on the feature vector, determine whether the subject's eyes in the image obtained at the first moment are Are your eyes open?
5、 如权利要求 2所述的方法, 其特征在于, 所述判断所述第一时刻获得 的图像中所述被拍摄者的人像是否模糊, 具体包括: 5. The method of claim 2, wherein the determining whether the portrait of the subject in the image obtained at the first moment is blurred specifically includes:
对所述第一时刻获得的图像中所述被拍摄者的人像进行边缘检测, 获得 局部极大值的多个边缘点对应的多个第一强度值; Perform edge detection on the portrait of the subject in the image obtained at the first moment, and obtain multiple first intensity values corresponding to multiple edge points of local maximum values;
按预设比例缩小所述第一时刻获得的图像, 并对缩小后的图像中所述被 拍摄者的人像进行边缘检测, 获得局部极大值的所述多个边缘点对应的多个 第二强度值; Reduce the image obtained at the first moment according to a preset ratio, perform edge detection on the portrait of the subject in the reduced image, and obtain a plurality of second values corresponding to the plurality of edge points with local maximum values. intensity value;
判断所述多个边缘点中每一个边缘点对应的的所述第二强度值与所述第 一强度值之差是否大于一门限值, 其中, 在所述第二强度值与所述第一强度 值之差大于所述门限值时 , 确定所述每一个边缘点为模糊; Determine whether the difference between the second intensity value corresponding to each edge point in the plurality of edge points and the first intensity value is greater than a threshold value, wherein, between the second intensity value and the first intensity value, When the difference between intensity values is greater than the threshold value, each edge point is determined to be blurred;
判断所述多个边缘点中模糊的边缘点的数量是否大于一预设值, 其中, 在所述模糊的边缘点的数量大于所述预设值时, 确定所述第一时刻获得的图 像中所述被拍摄者的人像模糊。 Determine whether the number of blurred edge points among the plurality of edge points is greater than a preset value, wherein, when the number of blurred edge points is greater than the preset value, determine whether the number of blurred edge points in the image obtained at the first moment is The subject's portrait is blurry.
6、 一种电子设备, 其特征在于, 包括: 6. An electronic device, characterized by including:
图像釆集单元; Image collection unit;
处理单元, 与所述图像釆集单元相连, 用于判断所述图像釆集单元在第 一时刻获得的图像中被拍摄者的人像是否满足保存条件, 并在所述第一时刻 获得的图像中所述被拍摄者的人像不满足所述保存条件后, 从所述第一时刻 之后和 /或所述第一时刻之前的一设定时间段内选取满足所述保存条件的至少 一张图像, 并保存满足所述保存条件的至少一张图像。 A processing unit, connected to the image collection unit, used to determine whether the portrait of the subject in the image obtained by the image collection unit at the first moment meets the storage conditions, and in the image obtained at the first moment After the portrait of the photographed person does not meet the storage condition, select at least one image that satisfies the storage condition from a set time period after the first moment and/or before the first moment, and save at least one image that meets the saving conditions.
7、 如权利要求 6所述的电子设备, 其特征在于, 所述处理单元具体用于 判断所述第一时刻获得的图像中被拍摄者的眼睛是否睁开, 其中, 在所述被 拍摄者的眼睛闭合时, 确定所述第一时刻获得的图像中被拍摄者的人像不满 足所述保存条件, 和 /或判断所述第一时刻获得的图像中所述被拍摄者的人像 是否模糊, 其中, 在所述第一时刻获得的图像中所述被拍摄者的人像模糊时, 确定所述第一时刻获得的图像中被拍摄者的人像不满足所述保存条件。 7. The electronic device according to claim 6, wherein the processing unit is specifically configured to determine whether the subject's eyes are open in the image obtained at the first moment, wherein, when the subject is photographed, When the eyes are closed, it is determined that the portrait of the subject in the image obtained at the first moment does not meet the storage condition, and/or it is determined whether the portrait of the subject in the image obtained at the first moment is blurred, Wherein, when the portrait of the subject in the image obtained at the first moment is blurred, it is determined that the portrait of the subject in the image obtained at the first moment does not satisfy the storage condition.
8、 如权利要求 7所述的电子设备, 其特征在于, 所述处理单元还用于在 所述判断所述第一时刻获得的图像中被拍摄者的眼睛是否睁开之前, 基于在 所述第一时刻之前获得的至少一张图像, 确定所述被拍摄者的眼睛处于睁眼 状态或闭眼状态。 8. The electronic device of claim 7, wherein the processing unit is further configured to, before determining whether the subject's eyes are open in the image obtained at the first moment, based on the At least one image obtained before the first moment determines whether the subject's eyes are open or closed.
9、 如权利要求 7所述的电子设备, 其特征在于, 所述处理单元具体用于 对所述第一时刻获得的图像中所述被拍摄者的人脸区域进行预处理, 并定位 所述人脸区域的至少两个特征点, 并获得从所述至少两个特征点所在区域提 取出的至少两个特征所组成的特征向量, 所述至少两个特征点至少包括眼睛 特征点与眼角特征点, 并基于所述特征向量, 判断所述第一时刻获得的图像 中所述被拍摄者的眼睛是否睁开。 9. The electronic device according to claim 7, wherein the processing unit is specifically configured to preprocess the face area of the photographed person in the image obtained at the first moment, and locate the face area of the photographed person. At least two feature points of the human face area, and obtain a feature vector composed of at least two features extracted from the area where the at least two feature points are located, the at least two feature points at least include eye feature points and eye corner features point, and based on the feature vector, determine whether the eyes of the subject in the image obtained at the first moment are open.
10、 如权利要求 7 所述的电子设备, 其特征在于, 所述处理单元具体用 于对所述第一时刻获得的图像中所述被拍摄者的人像进行边缘检测, 获得局 部极大值的多个边缘点对应的多个第一强度值, 并按预设比例缩小所述第一 时刻获得的图像, 并对缩小后的图像中所述被拍摄者的人像进行边缘检测, 获得局部极大值的所述多个边缘点对应的多个第二强度值, 并判断所述多个 边缘点中每一个边缘点对应的的所述第二强度值与所述第一强度值之差是否 大于一门限值, 其中, 在所述第二强度值与所述第一强度值之差大于所述门 限值时, 确定所述每一个边缘点为模糊, 并判断所述多个边缘点中模糊的边 缘点的数量是否大于一预设值, 其中, 在所述模糊的边缘点的数量大于所述 预设值时, 确定所述第一时刻获得的图像中所述被拍摄者的人像模糊。 10. The electronic device according to claim 7, wherein the processing unit is specifically configured to perform edge detection on the portrait of the subject in the image obtained at the first moment, and obtain a local maximum value. Multiple first intensity values corresponding to multiple edge points, and reduce the image obtained at the first moment according to a preset ratio, and perform edge detection on the portrait of the subject in the reduced image to obtain a local maximum a plurality of second intensity values corresponding to the plurality of edge points, and determine whether the difference between the second intensity value corresponding to each edge point in the plurality of edge points and the first intensity value is greater than A threshold value, wherein when the difference between the second intensity value and the first intensity value is greater than the threshold value, it is determined that each edge point is blurred, and it is determined that among the plurality of edge points Whether the number of blurred edge points is greater than a preset value, wherein, when the number of blurred edge points is greater than the preset value, it is determined that the portrait of the subject in the image obtained at the first moment is blurred .
PCT/CN2013/087725 2013-11-22 2013-11-22 Method for saving photographed image, and electronic device WO2015074261A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2013/087725 WO2015074261A1 (en) 2013-11-22 2013-11-22 Method for saving photographed image, and electronic device
CN201380078887.XA CN105453533B (en) 2013-11-22 2013-11-22 A kind of method and electronic equipment saving shooting image
CN201910423560.0A CN110121030B (en) 2013-11-22 2013-11-22 Method for storing shot image and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/087725 WO2015074261A1 (en) 2013-11-22 2013-11-22 Method for saving photographed image, and electronic device

Publications (1)

Publication Number Publication Date
WO2015074261A1 true WO2015074261A1 (en) 2015-05-28

Family

ID=53178830

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/087725 WO2015074261A1 (en) 2013-11-22 2013-11-22 Method for saving photographed image, and electronic device

Country Status (2)

Country Link
CN (2) CN110121030B (en)
WO (1) WO2015074261A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592263A (en) * 2015-12-17 2016-05-18 小米科技有限责任公司 Image capturing method, device and terminal

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112843678B (en) * 2020-12-31 2023-05-23 上海米哈游天命科技有限公司 Method and device for shooting image, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420527A (en) * 2007-10-25 2009-04-29 株式会社尼康 Camera and image recording method
CN101520842A (en) * 2008-02-29 2009-09-02 佳能株式会社 Information processing apparatus, eye open/closed degree determination method and image sensing apparatus
CN101584205A (en) * 2007-01-15 2009-11-18 松下电器产业株式会社 Imaging device
CN103096124A (en) * 2013-02-20 2013-05-08 浙江宇视科技有限公司 Auxiliary focusing method and auxiliary focusing device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622740B (en) * 2011-01-28 2016-07-20 鸿富锦精密工业(深圳)有限公司 Anti-eye closing portrait system and method
CN103369214A (en) * 2012-03-30 2013-10-23 华晶科技股份有限公司 An image acquiring method and an image acquiring apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101584205A (en) * 2007-01-15 2009-11-18 松下电器产业株式会社 Imaging device
CN101420527A (en) * 2007-10-25 2009-04-29 株式会社尼康 Camera and image recording method
CN101520842A (en) * 2008-02-29 2009-09-02 佳能株式会社 Information processing apparatus, eye open/closed degree determination method and image sensing apparatus
CN103096124A (en) * 2013-02-20 2013-05-08 浙江宇视科技有限公司 Auxiliary focusing method and auxiliary focusing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105592263A (en) * 2015-12-17 2016-05-18 小米科技有限责任公司 Image capturing method, device and terminal

Also Published As

Publication number Publication date
CN105453533B (en) 2019-05-28
CN105453533A (en) 2016-03-30
CN110121030A (en) 2019-08-13
CN110121030B (en) 2020-11-24

Similar Documents

Publication Publication Date Title
CN104767933B (en) A method of having the portable digital equipment and screening photo of camera function
WO2022028184A1 (en) Photography control method and apparatus, electronic device, and storage medium
WO2017096866A1 (en) Method and apparatus for generating high dynamic range image
US9838616B2 (en) Image processing method and electronic apparatus
US10467498B2 (en) Method and device for capturing images using image templates
WO2014086241A1 (en) Method and device for automatically setting photographing mode
TWI653581B (en) Image tracking system and image tracking method
WO2019214574A1 (en) Image capturing method and apparatus, and electronic terminal
US9591210B2 (en) Image processing face detection apparatus, method for controlling the same, and program
US9888176B2 (en) Video apparatus and photography method thereof
WO2017166636A1 (en) Intelligent photographing method and device, mobile apparatus, and non-volatile computer storage medium
WO2017096861A1 (en) Method and device for taking photographs
WO2016197657A1 (en) Photographing processing method and apparatus
WO2015101123A1 (en) Method and apparatus for processing video photographing
JP2008219449A (en) Imaging device and control method thereof
WO2019213818A1 (en) Photographing control method, and electronic device
WO2022042670A1 (en) Eye state detection-based image processing method and apparatus, and storage medium
JP5880135B2 (en) Detection apparatus, detection method, and program
WO2019084756A1 (en) Image processing method and device, and aerial vehicle
JP2012527139A (en) Camera device having image processing function
WO2017143778A1 (en) Automatic picture acquisition method and apparatus, and electronic device
JP2019186791A (en) Imaging apparatus, control method of the imaging apparatus, and control program
WO2015074261A1 (en) Method for saving photographed image, and electronic device
CN107734250A (en) A kind of photographic method based on dynamic environment, mobile terminal and storage medium
JP2008219450A (en) Imaging device and control method thereof

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201380078887.X

Country of ref document: CN

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

Ref document number: 13897744

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13897744

Country of ref document: EP

Kind code of ref document: A1