Movatterモバイル変換


[0]ホーム

URL:


CN107580184B - A shooting method and mobile terminal - Google Patents

A shooting method and mobile terminal
Download PDF

Info

Publication number
CN107580184B
CN107580184BCN201711046335.7ACN201711046335ACN107580184BCN 107580184 BCN107580184 BCN 107580184BCN 201711046335 ACN201711046335 ACN 201711046335ACN 107580184 BCN107580184 BCN 107580184B
Authority
CN
China
Prior art keywords
value
brightness
exposure
ratio
scene information
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.)
Active
Application number
CN201711046335.7A
Other languages
Chinese (zh)
Other versions
CN107580184A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co LtdfiledCriticalVivo Mobile Communication Co Ltd
Priority to CN201711046335.7ApriorityCriticalpatent/CN107580184B/en
Publication of CN107580184ApublicationCriticalpatent/CN107580184A/en
Application grantedgrantedCritical
Publication of CN107580184BpublicationCriticalpatent/CN107580184B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Translated fromChinese

本发明提供一种拍摄方法及移动终端,该方法包括:检测拍摄预览界面输出的预览图像中是否存在人脸信息;若检测到所述预览图像中存在人脸信息,则获取当前场景信息;将所述当前场景信息与预先存储的场景信息进行比对;若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值;根据所述目标曝光调整值,调整曝光参数。这样,如果预览图像中存在人脸信息,且如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。并且根据目标曝光调整值,调整曝光参数。保证了所拍摄的图片的亮度的一致性。

The present invention provides a shooting method and a mobile terminal. The method includes: detecting whether there is human face information in the preview image output by the shooting preview interface; if it is detected that there is human face information in the preview image, obtaining current scene information; comparing the current scene information with pre-stored scene information; if there is no scene information matching the current scene information in the pre-stored scene information, determining a target exposure adjustment value; according to the target exposure adjustment value, Adjust exposure parameters. In this way, if there is face information in the preview image, and if there is no scene information matching the current scene information in the pre-stored scene information, the target exposure adjustment value can be determined. And adjust the exposure parameter according to the target exposure adjustment value. The brightness consistency of the captured pictures is guaranteed.

Description

Translated fromChinese
一种拍摄方法及移动终端A shooting method and mobile terminal

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种拍摄方法及移动终端。The invention relates to the field of communication technologies, in particular to a photographing method and a mobile terminal.

背景技术Background technique

在拍摄照片时,可以通过自动曝光(Automatic Exposure,AE)算法来控制感光芯片(SENSOR)的曝光,进而获得亮度符合条件的图片。现有技术中,不同的终端所具备的SENSOR的感光性存在差异。在同一场景下,如果使用相同的AE参数进行拍摄,则所获得的图片的亮度会不一致。且对于同一个终端的SENSOR,外界环境亮度的差异也会使通过AE算法所计算出的结果存在偏差,导致在不同场景下所拍摄出的图片的亮度不一致。因此,现有技术中,所拍摄的图片的亮度差异较大。When taking a photo, the exposure of the photosensitive chip (SENSOR) can be controlled by an automatic exposure (Automatic Exposure, AE) algorithm, and then a picture with a brightness that meets the conditions can be obtained. In the prior art, there are differences in the photosensitivity of the SENSORs possessed by different terminals. In the same scene, if the same AE parameters are used to shoot, the brightness of the obtained pictures will be inconsistent. Moreover, for the SENSOR of the same terminal, the difference in the brightness of the external environment will also cause deviations in the results calculated by the AE algorithm, resulting in inconsistencies in the brightness of the pictures taken in different scenes. Therefore, in the prior art, the brightness of the captured pictures varies greatly.

发明内容Contents of the invention

本发明实施例提供一种拍摄方法及移动终端,以解决现有技术中,所拍摄的图片的亮度差异较大的问题。Embodiments of the present invention provide a photographing method and a mobile terminal to solve the problem in the prior art that the brightness of photographed pictures varies greatly.

为了解决上述技术问题,本发明是这样实现的:一种拍摄方法,包括:In order to solve the above-mentioned technical problems, the present invention is achieved in this way: a shooting method, comprising:

检测拍摄预览界面输出的预览图像中是否存在人脸信息;Detect whether there is face information in the preview image output by the shooting preview interface;

若检测到所述预览图像中存在人脸信息,则获取当前场景信息;If it is detected that there is face information in the preview image, then obtain current scene information;

将所述当前场景信息与预先存储的场景信息进行比对;comparing the current scene information with pre-stored scene information;

若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值;If there is no scene information matching the current scene information in the pre-stored scene information, then determine a target exposure adjustment value;

根据所述目标曝光调整值,调整曝光参数。Adjusting exposure parameters according to the target exposure adjustment value.

第一方面,本发明实施例提供了一种拍摄方法,包括:In a first aspect, an embodiment of the present invention provides a shooting method, including:

检测拍摄预览界面输出的预览图像中是否存在人脸信息;Detect whether there is face information in the preview image output by the shooting preview interface;

若检测到所述预览图像中存在人脸信息,则获取当前场景信息;If it is detected that there is face information in the preview image, then obtain current scene information;

将所述当前场景信息与预先存储的场景信息进行比对;comparing the current scene information with pre-stored scene information;

若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值;If there is no scene information matching the current scene information in the pre-stored scene information, then determine a target exposure adjustment value;

根据所述目标曝光调整值,调整曝光参数。Adjusting exposure parameters according to the target exposure adjustment value.

第二方面,本发明实施例还提供一种移动终端,包括:In the second aspect, the embodiment of the present invention also provides a mobile terminal, including:

第一检测模块,用于检测拍摄预览界面输出的预览图像中是否存在人脸信息;The first detection module is used to detect whether there is human face information in the preview image output by the shooting preview interface;

第一获取模块,用于若检测到所述预览图像中存在人脸信息,则获取当前场景信息;The first acquisition module is used to acquire current scene information if it is detected that there is face information in the preview image;

比对模块,用于将所述当前场景信息与预先存储的场景信息进行比对;A comparison module, configured to compare the current scene information with pre-stored scene information;

第一确定模块,用于若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值;A first determination module, configured to determine a target exposure adjustment value if there is no scene information matching the current scene information in the pre-stored scene information;

调整模块,用于根据所述目标曝光调整值,调整曝光参数。An adjustment module, configured to adjust exposure parameters according to the target exposure adjustment value.

第三方面,本发明实施例还提供一种移动终端,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述拍摄方法的步骤。In the third aspect, the embodiment of the present invention also provides a mobile terminal, which is characterized in that it includes a processor, a memory, and a computer program stored in the memory and operable on the processor, and the computer program is executed by the The steps of realizing the above-mentioned photographing method when the above-mentioned processor is executed.

第四方面,本发明实施例还提供一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述拍摄方法的步骤。In a fourth aspect, an embodiment of the present invention also provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned photographing method is realized A step of.

在本发明实施例中,通过检测拍摄预览界面输出的预览图像中是否存在人脸信息;若检测到所述预览图像中存在人脸信息,则获取当前场景信息;将所述当前场景信息与预先存储的场景信息进行比对;若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值;根据所述目标曝光调整值,调整曝光参数。这样,如果预览图像中存在人脸信息,且如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。并且根据目标曝光调整值,调整曝光参数。保证了所拍摄的图片的亮度的一致性。In the embodiment of the present invention, by detecting whether there is human face information in the preview image output by the shooting preview interface; if it is detected that there is human face information in the preview image, the current scene information is obtained; comparing the stored scene information; if there is no scene information matching the current scene information in the pre-stored scene information, determining a target exposure adjustment value; and adjusting exposure parameters according to the target exposure adjustment value. In this way, if there is face information in the preview image, and if there is no scene information matching the current scene information in the pre-stored scene information, the target exposure adjustment value can be determined. And adjust the exposure parameter according to the target exposure adjustment value. The brightness consistency of the captured pictures is guaranteed.

附图说明Description of drawings

图1是本发明实施例提供的拍摄方法的流程图之一;Fig. 1 is one of the flowcharts of the photographing method provided by the embodiment of the present invention;

图2是本发明实施例提供的在移动终端的屏幕上显示至少一个操作区的示意图;FIG. 2 is a schematic diagram of displaying at least one operation area on a screen of a mobile terminal provided by an embodiment of the present invention;

图3是本发明实施例提供的拍摄方法的流程图之二;Fig. 3 is the second flowchart of the photographing method provided by the embodiment of the present invention;

图4是本发明实施例提供的拍摄方法的流程图之三;Fig. 4 is the third flowchart of the photographing method provided by the embodiment of the present invention;

图5是本发明实施例提供的移动终端的结构图之一;Fig. 5 is one of the structural diagrams of the mobile terminal provided by the embodiment of the present invention;

图6是本发明实施例提供的移动终端的结构图之二;FIG. 6 is the second structural diagram of the mobile terminal provided by the embodiment of the present invention;

图7是本发明实施例提供的移动终端的结构图之三;FIG. 7 is the third structural diagram of the mobile terminal provided by the embodiment of the present invention;

图8是本发明实施例提供的移动终端的结构图之四;FIG. 8 is a fourth structural diagram of a mobile terminal provided by an embodiment of the present invention;

图9是本发明实施例提供的移动终端的结构图之五;FIG. 9 is the fifth structural diagram of the mobile terminal provided by the embodiment of the present invention;

图10是本发明实施例提供的移动终端的结构图之六;FIG. 10 is the sixth structural diagram of the mobile terminal provided by the embodiment of the present invention;

图11是本发明实施例提供的移动终端的结构图之七;FIG. 11 is the seventh structural diagram of the mobile terminal provided by the embodiment of the present invention;

图12是本发明实施例提供的移动终端的结构图之八;FIG. 12 is the eighth structural diagram of the mobile terminal provided by the embodiment of the present invention;

图13是本发明实施例提供的移动终端的结构图之九;FIG. 13 is a ninth structural diagram of a mobile terminal provided by an embodiment of the present invention;

图14是本发明实施例提供的移动终端的结构图之十;FIG. 14 is the tenth structural diagram of the mobile terminal provided by the embodiment of the present invention;

图15是本发明实施例提供的移动终端的结构图之十一。FIG. 15 is the eleventh structural diagram of the mobile terminal provided by the embodiment of the present invention.

具体实施方式Detailed ways

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

参见图1,图1是本发明实施例提供的一种拍摄方法的流程图。如图1所示,包括以下步骤:Referring to FIG. 1 , FIG. 1 is a flowchart of a shooting method provided by an embodiment of the present invention. As shown in Figure 1, the following steps are included:

步骤101、检测拍摄预览界面输出的预览图像中是否存在人脸信息。Step 101, detecting whether there is human face information in the preview image output by the shooting preview interface.

在步骤101中,开启移动终端的相机功能之后,可以检测拍摄预览界面输出的预览图像中是否存在人脸信息。如果预览图像中不存在人脸信息,则可以通过AE算法计算出曝光参数值。接收到拍照指令时,就可以按照计算出的曝光参数值进行曝光,进而获得拍照图像。In step 101, after the camera function of the mobile terminal is turned on, it may be detected whether there is human face information in the preview image output by the shooting preview interface. If there is no face information in the preview image, the exposure parameter value can be calculated by the AE algorithm. When a photographing instruction is received, exposure can be performed according to the calculated exposure parameter value, and then a photographed image can be obtained.

步骤102、若检测到所述预览图像中存在人脸信息,则获取当前场景信息。Step 102, if it is detected that there is human face information in the preview image, acquire current scene information.

在步骤102中,如果检测到预览图像中存在人脸信息,则可以获取当前场景信息。上述当前场景信息可以包括预览图像的当前亮度值、当前色温值、当前人脸位置以及人脸区域亮度与背景区域亮度之间的比值。In step 102, if it is detected that there is human face information in the preview image, current scene information may be acquired. The above current scene information may include a current brightness value, a current color temperature value, a current face position, and a ratio between the brightness of the face area and the brightness of the background area of the preview image.

需要说明的是,当预览图像中存在多个人脸区域时,上述比值可以为所有人脸区域的亮度总和与背景区域亮度之间的比值,即上述比值可以为所有人脸区域的亮度总和与预览图像中除人脸区域之外的其他区域的亮度的比值。且预览图像中当前人脸位置为所有人脸区域中,最左上角的人脸区域的位置坐标与最右下角的人脸区域的位置坐标所确定的矩形区域。It should be noted that when there are multiple face regions in the preview image, the above ratio can be the ratio between the sum of the brightness of all face regions and the brightness of the background region, that is, the above ratio can be the sum of the brightness of all face regions and the preview The ratio of the brightness of other areas in the image except the face area. In addition, the current face position in the preview image is a rectangular area determined by the position coordinates of the upper leftmost face area and the lower rightmost face area among all the face areas.

移动终端的数据库中存储有场景信息以及与存储的场景信息相对应的曝光参数值。其中,移动终端的数据库中存储的场景信息即为预先存储的场景信息。数据库中存储的场景信息的层次格式如下:色温值、图像的亮度值、人脸区域的亮度与背景区域亮度之间的比值,即人脸区域的亮度与预览图像中除人脸区域之外的其他区域的亮度的比值以及预览图像中人脸区域位置。The database of the mobile terminal stores scene information and exposure parameter values corresponding to the stored scene information. Wherein, the scene information stored in the database of the mobile terminal is pre-stored scene information. The hierarchical format of the scene information stored in the database is as follows: color temperature value, brightness value of the image, the ratio between the brightness of the face area and the brightness of the background area, that is, the brightness of the face area and the area other than the face area in the preview image The ratio of the brightness of other areas and the position of the face area in the preview image.

步骤103、将所述当前场景信息与预先存储的场景信息进行比对。Step 103, comparing the current scene information with pre-stored scene information.

在步骤103中,可以将当前场景信息与存储于数据库中的场景信息进行比对,即可以将当前场景信息与预先存储的场景信息进行比对。当前场景信息与预先存储的场景信息相匹配时,可以获取与预先存储的场景信息对应的曝光参数值。In step 103, the current scene information can be compared with the scene information stored in the database, that is, the current scene information can be compared with the pre-stored scene information. When the current scene information matches the pre-stored scene information, an exposure parameter value corresponding to the pre-stored scene information may be acquired.

将当前场景信息与预先存储的场景信息进行比对时,可以先从色温值开始比对。例如,假设当前场景的色温是4000k,则可以在数据库中使用查表的方法查找4000k±N的数据,其中,N表示查表的容差范围,可以根据不同的情况进行设置。例如,如果色温的变化以整数进行计量,则N可以根据需求设置为10、20或者100等等。接下来,可以依次将预览图像的当前亮度值与预先存储的亮度值进行比对;将当前人脸区域亮度与背景区域亮度之间的比值与预先存储的人脸区域亮度与背景区域亮度之间的比值进行比对,其中,亮度值比值为小数,可以将亮度值比值的查表的容差范围设置为0.01、0.05或者0.1等等;将当前人脸位置与预先存储的人脸位置进行比对。When comparing the current scene information with the pre-stored scene information, the comparison can start from the color temperature value. For example, assuming that the color temperature of the current scene is 4000k, you can use the table lookup method to find 4000k±N data in the database, where N represents the tolerance range of the table lookup, which can be set according to different situations. For example, if the change of the color temperature is measured as an integer, N can be set to 10, 20, or 100 according to requirements. Next, the current brightness value of the preview image can be compared with the pre-stored brightness value in turn; the ratio between the current face area brightness and the background area brightness and the pre-stored face area brightness The ratio of the brightness value is compared, wherein the ratio of the brightness value is a decimal, and the tolerance range of the look-up table of the brightness value ratio can be set to 0.01, 0.05 or 0.1, etc.; compare the current face position with the pre-stored face position right.

如果当前色温值与预先存储的色温值相匹配、预览图像的当前亮度值与预先存储的亮度值相匹配、当前人脸区域亮度与背景区域亮度之间的比值与预先存储的人脸区域亮度与背景区域亮度之间的比值相匹配且当前人脸位置与预先存储的人脸位置相匹配,则可以获取与预先存储的场景信息对应的曝光参数值,且可以将该曝光参数值传给AE算法。可以将该曝光参数值设置到SENSOR的驱动中,进而完成曝光,获得拍照图像。If the current color temperature value matches the pre-stored color temperature value, the current brightness value of the preview image matches the pre-stored brightness value, the ratio between the current face area brightness and the background area brightness and the pre-stored face area brightness and The ratio between the brightness of the background area matches and the current face position matches the pre-stored face position, then the exposure parameter value corresponding to the pre-stored scene information can be obtained, and the exposure parameter value can be passed to the AE algorithm . The exposure parameter value can be set to the driver of the SENSOR to complete the exposure and obtain a photographed image.

如果当前场景信息与预先存储的场景信息相匹配,可以直接获取与预先存储的场景信息对应的曝光参数值,进而完成曝光。不需要再调整曝光参数,方便快捷。If the current scene information matches the pre-stored scene information, the exposure parameter value corresponding to the pre-stored scene information can be directly obtained, and then the exposure is completed. There is no need to adjust the exposure parameters, which is convenient and quick.

步骤104、若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值。Step 104. If there is no scene information matching the current scene information in the pre-stored scene information, determine a target exposure adjustment value.

在步骤104中,如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。In step 104, if there is no scene information matching the current scene information in the pre-stored scene information, a target exposure adjustment value may be determined.

确定目标曝光调整值的方式可以有两种,这里先来解释第一种方式。可以先获取预览图像中人脸区域的第一亮度均值,并且获取预览图像中的背景区域的第二亮度均值。然后可以计算第一亮度均值和第二亮度均值之间的亮度比值Cur_Y。进而可以将计算得到的亮度比值与预设的目标比值进行比对,得到比对结果。接下来,可以根据比对结果,确定目标曝光调整值。目标曝光调整值可以包括曝光增益增大值以及曝光时间增大值;或者,目标曝光调整值可以包括曝光增益减小值以及曝光时间减小值。There are two ways to determine the target exposure adjustment value, and the first way will be explained here first. The first average brightness value of the face area in the preview image may be acquired first, and the second average brightness value of the background area in the preview image may be acquired. Then the luminance ratio Cur_Y between the first luminance mean and the second luminance mean can be calculated. Furthermore, the calculated brightness ratio can be compared with a preset target ratio to obtain a comparison result. Next, the target exposure adjustment value can be determined according to the comparison result. The target exposure adjustment value may include an exposure gain increase value and an exposure time increase value; or, the target exposure adjustment value may include an exposure gain decrease value and an exposure time decrease value.

需要说明的是,可以将预先存储的亮度比值确定为目标比值;也可以为用户提供选择接口,可以获取用户选择的参考图像,并将参考图像中的人脸区域的亮度均值与背景区域的亮度均值之间的比值确定为目标比值。It should be noted that the pre-stored brightness ratio can be determined as the target ratio; the user can also be provided with a selection interface, which can obtain the reference image selected by the user, and compare the average brightness of the face area in the reference image with the brightness of the background area The ratio between the means was determined as the target ratio.

如果比对结果指示计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y等于目标比值,或者,两者的偏差在±0.1的范围之内,则可以获取当前曝光参数。且可以将当前曝光参数、当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置进行关联存储。If the comparison result indicates that the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value is equal to the target ratio, or the deviation between the two is within a range of ±0.1, the current exposure parameter may be acquired. Furthermore, the current exposure parameter, the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current face position can be associated and stored.

如果比对结果指示计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y小于目标比值,则可以确定曝光增益增大值以及曝光时间增大值。增加曝光增益值以及曝光时间值之后,如果再次计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y仍然小于目标比值,则可以再次增加曝光增益值以及曝光时间值。如此循环下去,直到计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y与目标比值相匹配为止。可以将第一亮度均值和第二亮度均值之间的亮度比值Cur_Y与目标比值相匹配时的曝光参数作为最终的曝光参数。If the comparison result indicates that the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value is smaller than the target ratio, the exposure gain increase value and the exposure time increase value may be determined. After increasing the exposure gain value and the exposure time value, if the recalculated brightness ratio Cur_Y between the first average brightness value and the second brightness average value is still smaller than the target ratio, the exposure gain value and the exposure time value may be increased again. This loop continues until the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value matches the target ratio. The exposure parameter when the brightness ratio Cur_Y between the first average brightness value and the second average brightness value matches the target ratio may be used as the final exposure parameter.

如果比对结果指示计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y大于目标比值,则可以确定曝光增益减小值以及曝光时间减小值。If the comparison result indicates that the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value is greater than the target ratio, the exposure gain reduction value and the exposure time reduction value may be determined.

减小曝光增益值以及曝光时间值之后,如果再次计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y仍然大于目标比值,则可以再次减小曝光增益值以及曝光时间值。如此循环下去,直到计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y与目标比值相匹配为止。可以将第一亮度均值和第二亮度均值之间的亮度比值Cur_Y与目标比值相匹配时的曝光参数作为最终的曝光参数。After reducing the exposure gain value and the exposure time value, if the recalculated brightness ratio Cur_Y between the first average brightness value and the second brightness average value is still greater than the target ratio, the exposure gain value and the exposure time value may be reduced again. This loop continues until the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value matches the target ratio. The exposure parameter when the brightness ratio Cur_Y between the first average brightness value and the second average brightness value matches the target ratio may be used as the final exposure parameter.

需要说明的是,一张照片的亮度值主要取决于SENSOR的曝光时间(也称快门时间)和对应的曝光增益值。增大曝光时间或者曝光增益值均能够增加照片的亮度值,反之则会减小照片的亮度值。每一个SENSOR在调试效果过程中会建立一张曝光参数表,该曝光参数表从暗到亮记录了该SENSOR对应的曝光时间和曝光增益值。一对曝光时间和曝光增益值即是一组曝光参数值,也对应了一个亮度值,并且对应一个曝光参数的索引值。确定了需要达到的亮度值之后,可以在预先存储的曝光参数表中查找与需要达到的亮度值相差最小的亮度值,并且确定与需要达到的亮度值相差最小的亮度值对应的曝光参数的索引值。最后,可以将与确定的曝光参数的索引值对应的曝光参数值作为最终的曝光参数值。It should be noted that the brightness value of a photo mainly depends on the exposure time (also called shutter time) of the SENSOR and the corresponding exposure gain value. Increasing the exposure time or exposure gain value can increase the brightness value of the photo, otherwise it will decrease the brightness value of the photo. Each SENSOR will establish an exposure parameter table during the debugging effect process, and the exposure parameter table records the corresponding exposure time and exposure gain value of the SENSOR from dark to bright. A pair of exposure time and exposure gain values is not only a set of exposure parameter values, but also corresponds to a brightness value, and corresponds to an index value of an exposure parameter. After the brightness value to be achieved is determined, the brightness value with the minimum difference from the brightness value to be achieved can be searched in the pre-stored exposure parameter table, and the index of the exposure parameter corresponding to the brightness value with the minimum difference from the brightness value to be achieved can be determined value. Finally, the exposure parameter value corresponding to the determined index value of the exposure parameter may be used as the final exposure parameter value.

这里再解释确定目标曝光调整值的第二种方式。可以设置至少一个操作区,即可以在拍摄预览界面上,显示至少一个操作区。如图2所示,为在移动终端的屏幕上显示至少一个操作区的示意图。Here again, the second way of determining the target exposure adjustment value is explained. At least one operation area can be set, that is, at least one operation area can be displayed on the shooting preview interface. As shown in FIG. 2 , it is a schematic diagram of displaying at least one operation area on the screen of the mobile terminal.

在图2中,每个操作区响应的内容一致,用户可以根据自己的习惯选择使用哪一个操作区。例如,如果用户习惯于点击屏幕中部,则单手拍照时,用户的手指可以点击处于屏幕中间位置的操作区。In Figure 2, each operation area responds to the same content, and users can choose which operation area to use according to their own habits. For example, if the user is used to clicking the middle of the screen, when taking a picture with one hand, the user's finger can click the operation area in the middle of the screen.

移动终端可以检测用户在至少一个操作区中的任一个操作区的按压操作。如果检测到按压操作,则可以获取上述按压操作的压力等级和按压时长。接下来,可以根据压力等级和按压时长,确定目标曝光调整值。The mobile terminal may detect a user's pressing operation on any one of the at least one operation area. If a pressing operation is detected, the pressure level and pressing duration of the pressing operation may be acquired. Next, the target exposure adjustment value can be determined according to the pressure level and pressing time.

进一步的,可以根据压力等级,确定曝光参数的调整方向;可以根据按压时长,确定曝光参数的调整幅度。最终,可以根据调整方向和调整幅度,确定目标曝光调整值。其中,曝光参数包括曝光增益和曝光时间。Further, the adjustment direction of the exposure parameters can be determined according to the pressure level; the adjustment range of the exposure parameters can be determined according to the pressing time. Finally, the target exposure adjustment value can be determined according to the adjustment direction and adjustment range. Wherein, the exposure parameters include exposure gain and exposure time.

例如,上述按压操作的压力等级超过预设阈值时,可以确定曝光参数的调整方向为增大的方向;上述按压操作的压力等级小于预设阈值时,可以确定曝光参数的调整方向为减小的方向。For example, when the pressure level of the pressing operation exceeds a preset threshold, it can be determined that the adjustment direction of the exposure parameters is an increasing direction; when the pressure level of the pressing operation is less than a preset threshold, it can be determined that the adjustment direction of the exposure parameters is a decreasing direction direction.

可以根据获取到的按压时长、预先存储的参考时长以及预先存储的参考时长对应的基准曝光参数调整幅度,计算获取到的按压时长对应的曝光参数的调整幅度。例如,如果预先存储的参考时长为t1,且预先存储的参考时长t1对应的基准曝光参数调整幅度为1,则按压时长持续到t2时的曝光参数调整幅度为t2/t1。接下来,可以根据当前曝光参数值以及按压时长对应的曝光参数调整幅度,计算最终的曝光参数值。The adjustment range of the exposure parameter corresponding to the obtained pressing duration may be calculated according to the obtained pressing duration, the pre-stored reference duration, and the reference exposure parameter adjustment range corresponding to the pre-stored reference duration. For example, if the pre-stored reference duration is t1, and the reference exposure parameter adjustment range corresponding to the pre-stored reference duration t1 is 1, then the exposure parameter adjustment range when the pressing duration lasts to t2 is t2/t1. Next, the final exposure parameter value can be calculated according to the current exposure parameter value and the exposure parameter adjustment range corresponding to the pressing duration.

用户可以根据自身需要灵活调整图像亮度,增强了交互性。且通过显示于屏幕上的操作区来控制图像亮度的变化,方便快捷。Users can flexibly adjust the image brightness according to their own needs, which enhances interactivity. And it is convenient and fast to control the change of image brightness through the operation area displayed on the screen.

步骤105、根据所述目标曝光调整值,调整曝光参数。Step 105. Adjust exposure parameters according to the target exposure adjustment value.

在步骤105中,确定了目标曝光调整值之后,就可以根据目标曝光调整值来调整曝光参数了。In step 105, after the target exposure adjustment value is determined, the exposure parameters can be adjusted according to the target exposure adjustment value.

本发明实施例中,上述移动终端可以是手机、平板电脑(Tablet PersonalComputer)、膝上型电脑(Laptop Computer)、个人数字助理(personal digitalassistant,简称PDA)、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等。In the embodiment of the present invention, the above-mentioned mobile terminal may be a mobile phone, a tablet computer (Tablet PersonalComputer), a laptop computer (Laptop Computer), a personal digital assistant (personal digital assistant, PDA for short), a mobile Internet device (Mobile Internet Device, MID) Or wearable device (Wearable Device), etc.

本发明实施例的拍摄方法。检测拍摄预览界面输出的预览图像中是否存在人脸信息;若检测到所述预览图像中存在人脸信息,则获取当前场景信息;将所述当前场景信息与预先存储的场景信息进行比对;若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值;根据所述目标曝光调整值,调整曝光参数。这样,如果预览图像中存在人脸信息,且如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。并且根据目标曝光调整值,调整曝光参数。保证了所拍摄的图片的亮度的一致性。The photographing method of the embodiment of the present invention. Detect whether there is human face information in the preview image output by the shooting preview interface; if it is detected that there is human face information in the preview image, then obtain current scene information; compare the current scene information with the pre-stored scene information; If there is no scene information matching the current scene information in the pre-stored scene information, a target exposure adjustment value is determined; and an exposure parameter is adjusted according to the target exposure adjustment value. In this way, if there is face information in the preview image, and if there is no scene information matching the current scene information in the pre-stored scene information, the target exposure adjustment value can be determined. And adjust the exposure parameter according to the target exposure adjustment value. The brightness consistency of the captured pictures is guaranteed.

参见图3,图3是本发明实施例提供的另一种拍摄方法的流程图。本实施例与前一个实施例的区别在于详细阐述了通过将人脸区域的第一亮度均值与背景区域的第二亮度均值之间的亮度比值与预设的目标比值进行比对,得到比对结果。进而根据比对结果,确定目标曝光调整值的过程。如图3所示,包括以下步骤:Referring to FIG. 3 , FIG. 3 is a flow chart of another shooting method provided by an embodiment of the present invention. The difference between this embodiment and the previous embodiment is that it is elaborated that by comparing the brightness ratio between the first average brightness value of the face area and the second average brightness value of the background area with the preset target ratio, the comparison is obtained. result. Then, according to the comparison result, the process of determining the target exposure adjustment value. As shown in Figure 3, the following steps are included:

步骤301、检测拍摄预览界面输出的预览图像中是否存在人脸信息。Step 301, detecting whether there is human face information in the preview image output by the shooting preview interface.

在步骤301中,开启移动终端的相机功能之后,可以检测拍摄预览界面输出的预览图像中是否存在人脸信息。如果预览图像中不存在人脸信息,则可以通过AE算法计算出曝光参数值。接收到拍照指令时,就可以按照计算出的曝光参数值进行曝光,进而获得拍照图像。In step 301, after the camera function of the mobile terminal is turned on, it may be detected whether there is human face information in the preview image output by the shooting preview interface. If there is no face information in the preview image, the exposure parameter value can be calculated by the AE algorithm. When a photographing instruction is received, exposure can be performed according to the calculated exposure parameter value, and then a photographed image can be obtained.

步骤302、若检测到所述预览图像中存在人脸信息,则获取当前场景信息。Step 302, if it is detected that there is human face information in the preview image, acquire current scene information.

在步骤302中,如果检测到预览图像中存在人脸信息,则可以获取当前场景信息。上述当前场景信息可以包括预览图像的当前亮度值、当前色温值、当前人脸位置以及人脸区域亮度与背景区域亮度之间的比值。In step 302, if it is detected that there is human face information in the preview image, current scene information may be acquired. The above current scene information may include a current brightness value, a current color temperature value, a current face position, and a ratio between the brightness of the face area and the brightness of the background area of the preview image.

移动终端的数据库中存储有场景信息以及与存储的场景信息相对应的曝光参数值。其中,移动终端的数据库中存储的场景信息即为预先存储的场景信息。数据库中存储的场景信息的层次格式如下:色温值、图像的亮度值、人脸区域的亮度与背景区域亮度之间的比值,即人脸区域的亮度与预览图像中除人脸区域之外的其他区域的亮度的比值以及预览图像中人脸区域位置。The database of the mobile terminal stores scene information and exposure parameter values corresponding to the stored scene information. Wherein, the scene information stored in the database of the mobile terminal is pre-stored scene information. The hierarchical format of the scene information stored in the database is as follows: color temperature value, brightness value of the image, the ratio between the brightness of the face area and the brightness of the background area, that is, the brightness of the face area and the area other than the face area in the preview image The ratio of the brightness of other areas and the position of the face area in the preview image.

可选的,所述当前场景信息包括以下至少一项:所述预览图像的当前亮度值、当前色温值、当前人脸位置、人脸区域亮度与背景区域亮度之间的比值。Optionally, the current scene information includes at least one of the following: a current brightness value, a current color temperature value, a current face position of the preview image, and a ratio between the brightness of the face area and the brightness of the background area.

如前所述,当前场景信息可以包括以下至少一项:预览图像的当前亮度值、当前色温值、当前人脸位置、人脸区域亮度与背景区域亮度之间的比值。As mentioned above, the current scene information may include at least one of the following: the current brightness value of the preview image, the current color temperature value, the current face position, and the ratio between the brightness of the face area and the brightness of the background area.

步骤303、将所述当前场景信息与预先存储的场景信息进行比对。Step 303, comparing the current scene information with pre-stored scene information.

在步骤303中,可以将当前场景信息与存储于数据库中的场景信息进行比对,即可以将当前场景信息与预先存储的场景信息进行比对。In step 303, the current scene information can be compared with the scene information stored in the database, that is, the current scene information can be compared with the pre-stored scene information.

可选的,所述当前场景信息包括:所述预览图像的当前亮度值、当前色温值、当前人脸位置和人脸区域亮度与背景区域亮度之间的比值;Optionally, the current scene information includes: the current brightness value of the preview image, the current color temperature value, the current face position, and the ratio between the brightness of the face area and the brightness of the background area;

所述获取当前场景信息的步骤,包括:The step of obtaining current scene information includes:

获取所述预览图像的当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置;Obtain the current brightness value, current color temperature value, ratio between the brightness of the face area and the brightness of the background area and the current position of the face of the preview image;

所述将所述当前场景信息与预先存储的场景信息进行比对的步骤,包括:The step of comparing the current scene information with pre-stored scene information includes:

将所述当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置依次与预先存储的场景信息进行比对;comparing the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current position of the face with pre-stored scene information in sequence;

所述若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值的步骤,包括:If there is no scene information matching the current scene information in the pre-stored scene information, the step of determining the target exposure adjustment value includes:

若所述当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置中存在至少一项与预先存储的场景信息不匹配,则确定目标曝光调整值;If at least one of the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current face position does not match the pre-stored scene information, determine the target exposure adjustment value;

其中,所述预先存储的场景信息包括预先存储的亮度值、预先存储的色温值、预先存储的人脸位置和预先存储的人脸区域亮度与背景区域亮度之间的比值。Wherein, the pre-stored scene information includes a pre-stored brightness value, a pre-stored color temperature value, a pre-stored face position, and a pre-stored ratio between the brightness of the face area and the brightness of the background area.

将当前场景信息与预先存储的场景信息进行比对时,可以先从色温值开始比对。例如,假设当前场景的色温是4000k,则可以在数据库中使用查表的方法查找4000k±N的数据,其中,N表示查表的容差范围,可以根据不同的情况进行设置。例如,如果色温的变化以整数进行计量,则N可以根据需求设置为10、20或者100等等。接下来,可以依次将预览图像的当前亮度值与预先存储的亮度值进行比对;将当前人脸区域亮度与背景区域亮度之间的比值与预先存储的人脸区域亮度与背景区域亮度之间的比值进行比对,其中,亮度值比值为小数,可以将亮度值比值的查表的容差范围设置为0.01、0.05或者0.1等等;将当前人脸位置与预先存储的人脸位置进行比对。When comparing the current scene information with the pre-stored scene information, the comparison can start from the color temperature value. For example, assuming that the color temperature of the current scene is 4000k, you can use the table lookup method to find 4000k±N data in the database, where N represents the tolerance range of the table lookup, which can be set according to different situations. For example, if the change of the color temperature is measured as an integer, N can be set to 10, 20, or 100 according to requirements. Next, the current brightness value of the preview image can be compared with the pre-stored brightness value in turn; the ratio between the current face area brightness and the background area brightness and the pre-stored face area brightness The ratio of the brightness value is compared, wherein the ratio of the brightness value is a decimal, and the tolerance range of the look-up table of the ratio of the brightness value can be set to 0.01, 0.05 or 0.1, etc.; compare the current face position with the pre-stored face position right.

如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。If there is no scene information matching the current scene information in the pre-stored scene information, a target exposure adjustment value may be determined.

步骤304、若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则获取所述预览图像中人脸区域的第一亮度均值。Step 304. If there is no scene information matching the current scene information in the pre-stored scene information, acquire a first average brightness value of the face area in the preview image.

在步骤304中,如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以先获取预览图像中人脸区域的第一亮度均值。In step 304, if there is no scene information matching the current scene information in the pre-stored scene information, the first average brightness value of the face area in the preview image may be obtained first.

步骤305、获取所述预览图像中的背景区域的第二亮度均值,其中,所述背景区域为所述预览图像中除所述人脸区域之外的所有图像区域。Step 305. Obtain a second average brightness value of a background area in the preview image, where the background area is all image areas in the preview image except the face area.

在步骤305中,还可以获取预览图像中的背景区域的第二亮度均值。其中,背景区域为预览图像中除人脸区域之外的所有图像区域。In step 305, a second average brightness value of the background area in the preview image may also be acquired. Wherein, the background area is all image areas in the preview image except the face area.

步骤306、计算所述第一亮度均值和所述第二亮度均值之间的亮度比值。Step 306. Calculate a brightness ratio between the first average brightness value and the second average brightness value.

在步骤306中,可以计算第一亮度均值和第二亮度均值之间的亮度比值Cur_Y。In step 306, a brightness ratio Cur_Y between the first average brightness value and the second average brightness value may be calculated.

可选的,在所述将所述亮度比值与预设的目标比值进行比对,得到比对结果的步骤之前,所述方法还包括:Optionally, before the step of comparing the brightness ratio with a preset target ratio to obtain a comparison result, the method further includes:

将预先存储的亮度比值确定为目标比值;determining the pre-stored brightness ratio as the target ratio;

或者,获取用户选择的参考图像,并将所述参考图像中的人脸区域的亮度均值与背景区域的亮度均值之间的比值确定为目标比值。Alternatively, a reference image selected by the user is obtained, and the ratio between the average brightness value of the face area in the reference image and the average brightness value of the background area is determined as the target ratio.

需要说明的是,可以将预先存储的亮度比值确定为目标比值;也可以为用户提供选择接口,可以获取用户选择的参考图像,并将参考图像中的人脸区域的亮度均值与背景区域的亮度均值之间的比值确定为目标比值。It should be noted that the pre-stored brightness ratio can be determined as the target ratio; the user can also be provided with a selection interface, which can obtain the reference image selected by the user, and compare the average brightness of the face area in the reference image with the brightness of the background area The ratio between the means was determined as the target ratio.

步骤307、将所述亮度比值与预设的目标比值进行比对,得到比对结果。Step 307 , comparing the brightness ratio with a preset target ratio to obtain a comparison result.

在步骤307中,可以将计算得到的亮度比值与预设的目标比值进行比对,得到比对结果。In step 307, the calculated brightness ratio may be compared with a preset target ratio to obtain a comparison result.

步骤308、根据所述比对结果,确定目标曝光调整值。Step 308: Determine a target exposure adjustment value according to the comparison result.

在步骤308中,可以根据比对结果,确定目标曝光调整值。In step 308, a target exposure adjustment value may be determined according to the comparison result.

可选的,所述根据所述比对结果,确定目标曝光调整值的步骤,包括:Optionally, the step of determining the target exposure adjustment value according to the comparison result includes:

若所述比对结果指示所述亮度比值小于所述目标比值,则确定曝光增益增大值和/或曝光时间增大值;If the comparison result indicates that the brightness ratio is smaller than the target ratio, determining an exposure gain increase value and/or an exposure time increase value;

若所述比对结果指示所述亮度比值大于所述目标比值,则确定曝光增益减小值和/或曝光时间减小值;If the comparison result indicates that the brightness ratio is greater than the target ratio, determining an exposure gain reduction value and/or an exposure time reduction value;

其中,所述目标曝光调整值包括所述曝光增益增大值和/或曝光时间增大值;或者,所述目标曝光调整值包括所述曝光增益减小值和/或曝光时间减小值。Wherein, the target exposure adjustment value includes the exposure gain increase value and/or exposure time increase value; or, the target exposure adjustment value includes the exposure gain decrease value and/or exposure time decrease value.

目标曝光调整值可以包括曝光增益增大值以及曝光时间增大值;或者,目标曝光调整值可以包括曝光增益减小值以及曝光时间减小值。The target exposure adjustment value may include an exposure gain increase value and an exposure time increase value; or, the target exposure adjustment value may include an exposure gain decrease value and an exposure time decrease value.

如果比对结果指示计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y小于目标比值,则可以确定曝光增益增大值以及曝光时间增大值。If the comparison result indicates that the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value is smaller than the target ratio, the exposure gain increase value and the exposure time increase value may be determined.

增加曝光增益值以及曝光时间值之后,如果再次计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y仍然小于目标比值,则可以再次增加曝光增益值以及曝光时间值。如此循环下去,直到计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y与目标比值相匹配为止。可以将第一亮度均值和第二亮度均值之间的亮度比值Cur_Y与目标比值相匹配时的曝光参数作为最终的曝光参数。After increasing the exposure gain value and the exposure time value, if the recalculated brightness ratio Cur_Y between the first average brightness value and the second brightness average value is still smaller than the target ratio, the exposure gain value and the exposure time value may be increased again. This loop continues until the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value matches the target ratio. The exposure parameter when the brightness ratio Cur_Y between the first average brightness value and the second average brightness value matches the target ratio may be used as the final exposure parameter.

如果比对结果指示计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y大于目标比值,则可以确定曝光增益减小值以及曝光时间减小值。If the comparison result indicates that the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value is greater than the target ratio, the exposure gain reduction value and the exposure time reduction value may be determined.

减小曝光增益值以及曝光时间值之后,如果再次计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y仍然大于目标比值,则可以再次减小曝光增益值以及曝光时间值。如此循环下去,直到计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y与目标比值相匹配为止。可以将第一亮度均值和第二亮度均值之间的亮度比值Cur_Y与目标比值相匹配时的曝光参数作为最终的曝光参数。After reducing the exposure gain value and the exposure time value, if the recalculated brightness ratio Cur_Y between the first average brightness value and the second brightness average value is still greater than the target ratio, the exposure gain value and the exposure time value may be reduced again. This loop continues until the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value matches the target ratio. The exposure parameter when the brightness ratio Cur_Y between the first average brightness value and the second average brightness value matches the target ratio may be used as the final exposure parameter.

需要说明的是,一张照片的亮度值主要取决于SENSOR的曝光时间(也称快门时间)和对应的曝光增益值。增大曝光时间或者曝光增益值均能够增加照片的亮度值,反之则会减小照片的亮度值。每一个SENSOR在调试效果过程中会建立一张曝光参数表,该曝光参数表从暗到亮记录了该SENSOR对应的曝光时间和曝光增益值。一对曝光时间和曝光增益值即是一组曝光参数值,也对应了一个亮度值,并且对应一个曝光参数的索引值。确定了需要达到的亮度值之后,可以在预先存储的曝光参数表中查找与需要达到的亮度值相差最小的亮度值,并且确定与需要达到的亮度值相差最小的亮度值对应的曝光参数的索引值。最后,可以将与确定的曝光参数的索引值对应的曝光参数值作为最终的曝光参数值。It should be noted that the brightness value of a photo mainly depends on the exposure time (also called shutter time) of the SENSOR and the corresponding exposure gain value. Increasing the exposure time or exposure gain value can increase the brightness value of the photo, otherwise it will decrease the brightness value of the photo. Each SENSOR will establish an exposure parameter table during the debugging effect process, and the exposure parameter table records the corresponding exposure time and exposure gain value of the SENSOR from dark to bright. A pair of exposure time and exposure gain values is not only a set of exposure parameter values, but also corresponds to a brightness value, and corresponds to an index value of an exposure parameter. After the brightness value to be achieved is determined, the brightness value with the minimum difference from the brightness value to be achieved can be searched in the pre-stored exposure parameter table, and the index of the exposure parameter corresponding to the brightness value with the minimum difference from the brightness value to be achieved can be determined value. Finally, the exposure parameter value corresponding to the determined index value of the exposure parameter may be used as the final exposure parameter value.

可选的,在所述将所述亮度比值与预设的目标比值进行比对,得到比对结果的步骤之后,所述方法还包括:Optionally, after the step of comparing the brightness ratio with a preset target ratio to obtain a comparison result, the method further includes:

若所述比对结果指示所述亮度比值等于所述目标比值,则获取当前曝光参数;If the comparison result indicates that the luminance ratio is equal to the target ratio, obtaining a current exposure parameter;

将所述当前曝光参数、所述当前亮度值、所述当前色温值、所述人脸区域亮度与背景区域亮度之间的比值和所述当前人脸位置进行关联存储。The current exposure parameter, the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current position of the face are stored in association.

如果比对结果指示计算出的第一亮度均值和第二亮度均值之间的亮度比值Cur_Y等于目标比值,或者,两者的偏差在±0.1的范围之内,则可以获取当前曝光参数。且可以将当前曝光参数、当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置进行关联存储。If the comparison result indicates that the calculated brightness ratio Cur_Y between the first average brightness value and the second average brightness value is equal to the target ratio, or the deviation between the two is within a range of ±0.1, the current exposure parameter may be acquired. Furthermore, the current exposure parameter, the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current face position can be associated and stored.

将当前曝光参数、当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置进行关联并存储下来,当用户再次使用相机进行拍照时,上述数据可以用于判断是否已有适合当前场景的曝光参数。如果判断出存在适合当前场景的曝光参数,可以直接调用,方便快捷。The current exposure parameter, current brightness value, current color temperature value, the ratio between the brightness of the face area and the brightness of the background area are associated and stored with the current face position. When the user uses the camera to take pictures again, the above data can be used for Determine whether there are exposure parameters suitable for the current scene. If it is determined that there is an exposure parameter suitable for the current scene, it can be called directly, which is convenient and quick.

步骤309、根据所述目标曝光调整值,调整曝光参数。Step 309. Adjust exposure parameters according to the target exposure adjustment value.

在步骤309中,确定了目标曝光调整值之后,就可以根据目标曝光调整值来调整曝光参数了。In step 309, after the target exposure adjustment value is determined, the exposure parameters can be adjusted according to the target exposure adjustment value.

步骤3010、锁定当前曝光参数。Step 3010, lock the current exposure parameters.

在步骤3010中,移动终端可以锁定当前曝光参数。In step 3010, the mobile terminal can lock the current exposure parameters.

步骤3011、根据所述当前曝光参数,进行拍照,生成照片。Step 3011, take a photo according to the current exposure parameters, and generate a photo.

在步骤3011中,移动终端可以根据当前曝光参数,进行拍照,进而生成照片。即移动终端可以将当前曝光参数设置到SENSOR的驱动中,完成曝光,最终获得照片。In step 3011, the mobile terminal may take a photo according to the current exposure parameters, and then generate a photo. That is to say, the mobile terminal can set the current exposure parameters into the driver of the SENSOR, complete the exposure, and finally obtain the photo.

本发明实施例的拍摄方法。检测拍摄预览界面输出的预览图像中是否存在人脸信息;若检测到所述预览图像中存在人脸信息,则获取当前场景信息;将所述当前场景信息与预先存储的场景信息进行比对;若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则获取所述预览图像中人脸区域的第一亮度均值;获取所述预览图像中的背景区域的第二亮度均值,其中,所述背景区域为所述预览图像中除所述人脸区域之外的所有图像区域;计算所述第一亮度均值和所述第二亮度均值之间的亮度比值;将所述亮度比值与预设的目标比值进行比对,得到比对结果;根据所述比对结果,确定目标曝光调整值;根据所述目标曝光调整值,调整曝光参数;锁定当前曝光参数;根据所述当前曝光参数,进行拍照,生成照片。这样,如果预览图像中存在人脸信息,且如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。并且根据目标曝光调整值,调整曝光参数。保证了所拍摄的图片的亮度的一致性。The photographing method of the embodiment of the present invention. Detect whether there is human face information in the preview image output by the shooting preview interface; if it is detected that there is human face information in the preview image, then obtain current scene information; compare the current scene information with the pre-stored scene information; If there is no scene information matching the current scene information in the pre-stored scene information, then obtain the first average brightness value of the human face area in the preview image; obtain the second average brightness value of the background area in the preview image , wherein, the background area is all image areas in the preview image except the face area; calculate the brightness ratio between the first average brightness value and the second average brightness value; Comparing the ratio with a preset target ratio to obtain a comparison result; determining a target exposure adjustment value according to the comparison result; adjusting an exposure parameter according to the target exposure adjustment value; locking the current exposure parameter; Exposure parameters, take pictures, and generate photos. In this way, if there is face information in the preview image, and if there is no scene information matching the current scene information in the pre-stored scene information, the target exposure adjustment value can be determined. And adjust the exposure parameter according to the target exposure adjustment value. The brightness consistency of the captured pictures is guaranteed.

参见图4,图4是本发明实施例提供的另一种拍摄方法的流程图。本实施例与前一个实施例的区别在于详细阐述了基于检测到的按压操作确定目标曝光调整值的过程。如图4所示,包括以下步骤:Referring to FIG. 4 , FIG. 4 is a flowchart of another shooting method provided by an embodiment of the present invention. The difference between this embodiment and the previous embodiment is that the process of determining the target exposure adjustment value based on the detected pressing operation is described in detail. As shown in Figure 4, the following steps are included:

步骤401、检测拍摄预览界面输出的预览图像中是否存在人脸信息。Step 401, detecting whether there is human face information in the preview image output by the shooting preview interface.

在步骤401中,开启移动终端的相机功能之后,可以检测拍摄预览界面输出的预览图像中是否存在人脸信息。如果预览图像中不存在人脸信息,则可以通过AE算法计算出曝光参数值。接收到拍照指令时,就可以按照计算出的曝光参数值进行曝光,进而获得拍照图像。In step 401, after the camera function of the mobile terminal is turned on, it may be detected whether there is human face information in the preview image output by the shooting preview interface. If there is no face information in the preview image, the exposure parameter value can be calculated by the AE algorithm. When a photographing instruction is received, exposure can be performed according to the calculated exposure parameter value, and then a photographed image can be obtained.

步骤402、若检测到所述预览图像中存在人脸信息,检测所述预览图像中是否存在有效人脸。Step 402, if it is detected that there is human face information in the preview image, detect whether there is a valid human face in the preview image.

在步骤402中,如果检测到预览图像中存在人脸信息,则可以检测预览图像中是否存在有效人脸。In step 402, if it is detected that there is human face information in the preview image, it may be detected whether there is a valid human face in the preview image.

可选的,所述检测所述预览图像中是否存在有效人脸的步骤,包括:Optionally, the step of detecting whether there is a valid human face in the preview image includes:

检测所述预览图像中的人脸的位置;detecting the position of the human face in the preview image;

若检测到所述人脸的位置在预设时间段内的位置偏移在预设范围内,则获取所述人脸的面积;If it is detected that the position of the human face is shifted within a preset time period within a preset range, then acquire the area of the human face;

若所述人脸的面积大于预设阈值,则确定所述预览图像中存在有效人脸。If the area of the human face is larger than the preset threshold, it is determined that there is a valid human face in the preview image.

可以检测预览图像中的人脸的位置。如果检测到人脸的位置在预设时间段内的位置偏移在预设范围内,则可以获取人脸的面积。如果人脸的面积大于预设阈值,则可以确定预览图像中存在有效人脸。The position of the face in the preview image can be detected. If the detected position of the human face is shifted within a preset range within a preset time period, the area of the human face may be acquired. If the area of the human face is greater than the preset threshold, it can be determined that there is a valid human face in the preview image.

只有当人脸的位置在预设时间段内的位置偏移在预设范围内,且人脸的面积大于预设阈值,才会确定预览图像中存在有效人脸。限定的条件比较严格,降低了误判的风险。Only when the position deviation of the face within the preset time period is within a preset range and the area of the face is greater than a preset threshold, it is determined that there is a valid face in the preview image. The limited conditions are relatively strict, which reduces the risk of misjudgment.

步骤403、若检测到所述预览图像中存在有效人脸,则获取当前场景信息。Step 403, if it is detected that there is a valid human face in the preview image, obtain current scene information.

在步骤403中,如果检测到预览图像中存在有效人脸,则可以获取当前场景信息。上述当前场景信息可以包括预览图像的当前亮度值、当前色温值、当前人脸位置以及人脸区域亮度与背景区域亮度之间的比值。In step 403, if it is detected that there is a valid human face in the preview image, current scene information may be acquired. The above current scene information may include a current brightness value, a current color temperature value, a current face position, and a ratio between the brightness of the face area and the brightness of the background area of the preview image.

移动终端的数据库中存储有场景信息以及与存储的场景信息相对应的曝光参数值。其中,移动终端的数据库中存储的场景信息即为预先存储的场景信息。数据库中存储的场景信息的层次格式如下:色温值、图像的亮度值、人脸区域的亮度与背景区域亮度之间的比值,即人脸区域的亮度与预览图像中除人脸区域之外的其他区域的亮度的比值以及预览图像中人脸区域位置。The database of the mobile terminal stores scene information and exposure parameter values corresponding to the stored scene information. Wherein, the scene information stored in the database of the mobile terminal is pre-stored scene information. The hierarchical format of the scene information stored in the database is as follows: color temperature value, brightness value of the image, the ratio between the brightness of the face area and the brightness of the background area, that is, the brightness of the face area and the area other than the face area in the preview image The ratio of the brightness of other areas and the position of the face area in the preview image.

步骤404、将所述当前场景信息与预先存储的场景信息进行比对。Step 404, comparing the current scene information with pre-stored scene information.

在步骤404中,可以将当前场景信息与存储于数据库中的场景信息进行比对,即可以将当前场景信息与预先存储的场景信息进行比对。具体的比对过程已经在前两个实施例中进行了详细的阐述,这里不再赘述。In step 404, the current scene information can be compared with the scene information stored in the database, that is, the current scene information can be compared with the pre-stored scene information. The specific comparison process has been described in detail in the previous two embodiments, and will not be repeated here.

步骤405、若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,在所述拍摄预览界面上,显示至少一个操作区。Step 405: If there is no scene information matching the current scene information in the pre-stored scene information, display at least one operation area on the shooting preview interface.

在步骤405中,如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以设置至少一个操作区,即可以在拍摄预览界面上,显示至少一个操作区。In step 405, if there is no scene information matching the current scene information in the pre-stored scene information, at least one operation area may be set, that is, at least one operation area may be displayed on the shooting preview interface.

步骤406、检测用户在所述至少一个操作区中的任一个操作区的按压操作。Step 406 , detecting a user's pressing operation on any one of the at least one operation area.

在步骤406中,移动终端可以检测用户在至少一个操作区中的任一个操作区的按压操作。In step 406, the mobile terminal may detect a user's pressing operation on any one of the at least one operation area.

步骤407、若检测到按压操作,则获取所述按压操作的压力等级和按压时长。Step 407, if a pressing operation is detected, acquire the pressure level and pressing duration of the pressing operation.

在步骤407中,如果检测到按压操作,则可以获取上述按压操作的压力等级和按压时长。In step 407, if a pressing operation is detected, the pressure level and pressing duration of the pressing operation may be acquired.

步骤408、根据所述压力等级和按压时长,确定目标曝光调整值。Step 408: Determine a target exposure adjustment value according to the pressure level and pressing time.

在步骤408中,可以根据压力等级和按压时长,确定目标曝光调整值。In step 408, a target exposure adjustment value may be determined according to the pressure level and the pressing duration.

可选的,所述根据所述压力等级和按压时长,确定目标曝光调整值的步骤,包括:Optionally, the step of determining the target exposure adjustment value according to the pressure level and pressing duration includes:

根据所述压力等级,确定曝光参数的调整方向;Determine the adjustment direction of the exposure parameters according to the pressure level;

根据所述按压时长,确定曝光参数的调整幅度;Determine the adjustment range of the exposure parameter according to the pressing duration;

根据所述调整方向和所述调整幅度,确定目标曝光调整值;determining a target exposure adjustment value according to the adjustment direction and the adjustment range;

其中,所述曝光参数包括曝光增益和曝光时间。Wherein, the exposure parameters include exposure gain and exposure time.

可以根据压力等级,确定曝光参数的调整方向;可以根据按压时长,确定曝光参数的调整幅度。最终,可以根据调整方向和调整幅度,确定目标曝光调整值。其中,曝光参数包括曝光增益和曝光时间。The adjustment direction of the exposure parameters can be determined according to the pressure level; the adjustment range of the exposure parameters can be determined according to the pressing time. Finally, the target exposure adjustment value can be determined according to the adjustment direction and adjustment range. Wherein, the exposure parameters include exposure gain and exposure time.

例如,上述按压操作的压力等级超过预设阈值时,可以确定曝光参数的调整方向为增大的方向;上述按压操作的压力等级小于预设阈值时,可以确定曝光参数的调整方向为减小的方向。For example, when the pressure level of the pressing operation exceeds a preset threshold, it can be determined that the adjustment direction of the exposure parameters is an increasing direction; when the pressure level of the pressing operation is less than a preset threshold, it can be determined that the adjustment direction of the exposure parameters is a decreasing direction direction.

可以根据获取到的按压时长、预先存储的参考时长以及预先存储的参考时长对应的基准曝光参数调整幅度,计算获取到的按压时长对应的曝光参数的调整幅度。例如,如果预先存储的参考时长为t1,且预先存储的参考时长t1对应的基准曝光参数调整幅度为1,则按压时长持续到t2时的曝光参数调整幅度为t2/t1。接下来,可以根据当前曝光参数值以及按压时长对应的曝光参数调整幅度,计算最终的曝光参数值。The adjustment range of the exposure parameter corresponding to the obtained pressing duration may be calculated according to the obtained pressing duration, the pre-stored reference duration, and the reference exposure parameter adjustment range corresponding to the pre-stored reference duration. For example, if the pre-stored reference duration is t1, and the reference exposure parameter adjustment range corresponding to the pre-stored reference duration t1 is 1, then the exposure parameter adjustment range when the pressing duration lasts to t2 is t2/t1. Next, the final exposure parameter value can be calculated according to the current exposure parameter value and the exposure parameter adjustment range corresponding to the pressing duration.

用户可以根据自身需要灵活调整图像亮度,增强了交互性。且通过显示于屏幕上的操作区来控制图像亮度的变化,方便快捷。Users can flexibly adjust the image brightness according to their own needs, which enhances interactivity. And it is convenient and fast to control the change of image brightness through the operation area displayed on the screen.

步骤409、根据所述目标曝光调整值,调整曝光参数。Step 409. Adjust exposure parameters according to the target exposure adjustment value.

在步骤409中,确定了目标曝光调整值之后,就可以根据目标曝光调整值来调整曝光参数了。In step 409, after the target exposure adjustment value is determined, the exposure parameters can be adjusted according to the target exposure adjustment value.

步骤4010、锁定当前曝光参数。Step 4010, lock the current exposure parameters.

在步骤4010中,移动终端可以锁定当前曝光参数。In step 4010, the mobile terminal may lock the current exposure parameters.

步骤4011、根据所述当前曝光参数,进行拍照,生成照片。Step 4011, take a photo according to the current exposure parameters, and generate a photo.

在步骤4011中,移动终端可以根据当前曝光参数,进行拍照,进而生成照片。即移动终端可以将当前曝光参数设置到SENSOR的驱动中,完成曝光,最终获得照片。In step 4011, the mobile terminal may take a photo according to the current exposure parameters, and then generate a photo. That is to say, the mobile terminal can set the current exposure parameters into the driver of the SENSOR, complete the exposure, and finally obtain the photo.

本发明实施例的拍摄方法。检测拍摄预览界面输出的预览图像中是否存在人脸信息;若检测到所述预览图像中存在人脸信息,检测所述预览图像中是否存在有效人脸;若检测到所述预览图像中存在有效人脸,则获取当前场景信息;将所述当前场景信息与预先存储的场景信息进行比对;若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,在所述拍摄预览界面上,显示至少一个操作区;检测用户在所述至少一个操作区中的任一个操作区的按压操作;若检测到按压操作,则获取所述按压操作的压力等级和按压时长;根据所述压力等级和按压时长,确定目标曝光调整值;根据所述目标曝光调整值,调整曝光参数;锁定当前曝光参数;根据所述当前曝光参数,进行拍照,生成照片。这样,如果预览图像中存在人脸信息,且如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。并且根据目标曝光调整值,调整曝光参数。保证了所拍摄的图片的亮度的一致性。The photographing method of the embodiment of the present invention. Detect whether there is human face information in the preview image output by the shooting preview interface; if it is detected that there is human face information in the preview image, detect whether there is a valid human face in the preview image; if it is detected that there is a valid human face in the preview image face, then obtain the current scene information; compare the current scene information with the pre-stored scene information; if there is no scene information matching the current scene information in the pre-stored scene information, in the shooting preview On the interface, display at least one operation area; detect the pressing operation of the user on any one of the at least one operation area; if the pressing operation is detected, obtain the pressure level and pressing duration of the pressing operation; according to the Determine the target exposure adjustment value based on the pressure level and pressing time; adjust the exposure parameters according to the target exposure adjustment value; lock the current exposure parameters; take pictures according to the current exposure parameters to generate photos. In this way, if there is face information in the preview image, and if there is no scene information matching the current scene information in the pre-stored scene information, the target exposure adjustment value can be determined. And adjust the exposure parameter according to the target exposure adjustment value. The brightness consistency of the captured pictures is guaranteed.

参见图5,图5是本发明实施提供的移动终端的结构图,如图5所示,移动终端500包括第一检测模块501、第一获取模块502、比对模块503、第一确定模块504和调整模块505,其中:Referring to FIG. 5, FIG. 5 is a structural diagram of a mobile terminal provided by the implementation of the present invention. As shown in FIG. 5, a mobile terminal 500 includes a first detection module 501, a first acquisition module 502, a comparison module 503, and a first determination module 504 and adjustment module 505, wherein:

第一检测模块501,用于检测拍摄预览界面输出的预览图像中是否存在人脸信息;The first detection module 501 is used to detect whether there is human face information in the preview image output by the shooting preview interface;

第一获取模块502,用于若检测到所述预览图像中存在人脸信息,则获取当前场景信息;The first acquisition module 502 is configured to acquire current scene information if it is detected that there is human face information in the preview image;

比对模块503,用于将所述当前场景信息与预先存储的场景信息进行比对;A comparison module 503, configured to compare the current scene information with pre-stored scene information;

第一确定模块504,用于若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值;The first determining module 504 is configured to determine a target exposure adjustment value if there is no scene information matching the current scene information in the pre-stored scene information;

调整模块505,用于根据所述目标曝光调整值,调整曝光参数。An adjustment module 505, configured to adjust exposure parameters according to the target exposure adjustment value.

可选的,所述当前场景信息包括以下至少一项:所述预览图像的当前亮度值、当前色温值、当前人脸位置、人脸区域亮度与背景区域亮度之间的比值。Optionally, the current scene information includes at least one of the following: a current brightness value, a current color temperature value, a current face position of the preview image, and a ratio between the brightness of the face area and the brightness of the background area.

可选的,所述当前场景信息包括:所述预览图像的当前亮度值、当前色温值、当前人脸位置和人脸区域亮度与背景区域亮度之间的比值;Optionally, the current scene information includes: the current brightness value of the preview image, the current color temperature value, the current face position, and the ratio between the brightness of the face area and the brightness of the background area;

所述第一获取模块502具体用于:The first obtaining module 502 is specifically used for:

获取所述预览图像的当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置;Obtain the current brightness value, current color temperature value, ratio between the brightness of the face area and the brightness of the background area and the current position of the face of the preview image;

所述比对模块503具体用于:The comparison module 503 is specifically used for:

将所述当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置依次与预先存储的场景信息进行比对;comparing the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current position of the face with pre-stored scene information in sequence;

所述第一确定模块504具体用于:The first determining module 504 is specifically configured to:

若所述当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置中存在至少一项与预先存储的场景信息不匹配,则确定目标曝光调整值;If at least one of the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current face position does not match the pre-stored scene information, determine the target exposure adjustment value;

其中,所述预先存储的场景信息包括预先存储的亮度值、预先存储的色温值、预先存储的人脸位置和预先存储的人脸区域亮度与背景区域亮度之间的比值。Wherein, the pre-stored scene information includes a pre-stored brightness value, a pre-stored color temperature value, a pre-stored face position, and a pre-stored ratio between the brightness of the face area and the brightness of the background area.

可选的,如图6所示,所述第一确定模块504包括:Optionally, as shown in FIG. 6, the first determining module 504 includes:

第一获取子模块5041,用于获取所述预览图像中人脸区域的第一亮度均值;The first obtaining sub-module 5041 is used to obtain the first average brightness value of the human face area in the preview image;

第二获取子模块5042,用于获取所述预览图像中的背景区域的第二亮度均值;The second obtaining sub-module 5042 is used to obtain the second average brightness value of the background area in the preview image;

计算子模块5043,用于计算所述第一亮度均值和所述第二亮度均值之间的亮度比值;Calculation sub-module 5043, configured to calculate the brightness ratio between the first average brightness value and the second average brightness value;

比对子模块5044,用于将所述亮度比值与预设的目标比值进行比对,得到比对结果;A comparison sub-module 5044, configured to compare the brightness ratio with a preset target ratio to obtain a comparison result;

第一确定子模块5045,用于根据所述比对结果,确定目标曝光调整值;The first determination sub-module 5045 is configured to determine a target exposure adjustment value according to the comparison result;

其中,所述背景区域为所述预览图像中除所述人脸区域之外的所有图像区域。Wherein, the background area is all image areas in the preview image except the face area.

可选的,如图7所示,所述第一确定子模块5045包括:Optionally, as shown in FIG. 7, the first determining submodule 5045 includes:

第一确定单元50451,用于若所述比对结果指示所述亮度比值小于所述目标比值,则确定曝光增益增大值和/或曝光时间增大值;The first determining unit 50451 is configured to determine an exposure gain increase value and/or an exposure time increase value if the comparison result indicates that the brightness ratio is smaller than the target ratio;

第二确定单元50452,用于若所述比对结果指示所述亮度比值大于所述目标比值,则确定曝光增益减小值和/或曝光时间减小值;The second determining unit 50452 is configured to determine an exposure gain reduction value and/or an exposure time reduction value if the comparison result indicates that the brightness ratio is greater than the target ratio;

其中,所述目标曝光调整值包括所述曝光增益增大值和/或曝光时间增大值;或者,所述目标曝光调整值包括所述曝光增益减小值和/或曝光时间减小值。Wherein, the target exposure adjustment value includes the exposure gain increase value and/or exposure time increase value; or, the target exposure adjustment value includes the exposure gain decrease value and/or exposure time decrease value.

可选的,如图8所示,所述移动终端还包括:Optionally, as shown in Figure 8, the mobile terminal further includes:

第二获取模块506,用于若所述比对结果指示所述亮度比值等于所述目标比值,则获取当前曝光参数;The second acquiring module 506 is configured to acquire the current exposure parameter if the comparison result indicates that the brightness ratio is equal to the target ratio;

关联模块507,用于将所述当前曝光参数、所述当前亮度值、所述当前色温值、所述人脸区域亮度与背景区域亮度之间的比值和所述当前人脸位置进行关联存储。An associating module 507, configured to associate and store the current exposure parameter, the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current face position.

可选的,如图9所示,所述移动终端还包括:Optionally, as shown in Figure 9, the mobile terminal further includes:

锁定模块508,用于锁定当前曝光参数;A locking module 508, configured to lock the current exposure parameters;

生成模块509,用于根据所述当前曝光参数,进行拍照,生成照片。The generating module 509 is configured to take a picture according to the current exposure parameters and generate a picture.

可选的,如图10所示,所述移动终端还包括:Optionally, as shown in Figure 10, the mobile terminal further includes:

第二确定模块5010,用于将预先存储的亮度比值确定为目标比值;The second determination module 5010 is used to determine the pre-stored brightness ratio as the target ratio;

或者,第三确定模块5011,用于获取用户选择的参考图像,并将所述参考图像中的人脸区域的亮度均值与背景区域的亮度均值之间的比值确定为目标比值。Alternatively, the third determination module 5011 is configured to obtain a reference image selected by the user, and determine the ratio between the average brightness value of the face area and the average brightness value of the background area in the reference image as the target ratio.

可选的,如图11所示,所述第一确定模块504还包括:Optionally, as shown in FIG. 11, the first determination module 504 further includes:

显示子模块5046,用于在所述拍摄预览界面上,显示至少一个操作区;A display submodule 5046, configured to display at least one operation area on the shooting preview interface;

第一检测子模块5047,用于检测用户在所述至少一个操作区中的任一个操作区的按压操作;The first detection submodule 5047 is configured to detect a user's pressing operation on any one of the at least one operation area;

第三获取子模块5048,用于若检测到按压操作,则获取所述按压操作的压力等级和按压时长;The third acquiring submodule 5048 is configured to acquire the pressure level and pressing duration of the pressing operation if the pressing operation is detected;

第二确定子模块5049,用于根据所述压力等级和按压时长,确定目标曝光调整值。The second determination sub-module 5049 is configured to determine the target exposure adjustment value according to the pressure level and the pressing duration.

可选的,如图12所示,所述第二确定子模块5049包括:Optionally, as shown in Figure 12, the second determining submodule 5049 includes:

第三确定单元50491,用于根据所述压力等级,确定曝光参数的调整方向;The third determination unit 50491 is configured to determine the adjustment direction of the exposure parameters according to the pressure level;

第四确定单元50492,用于根据所述按压时长,确定曝光参数的调整幅度;The fourth determination unit 50492 is configured to determine the adjustment range of the exposure parameter according to the pressing duration;

第五确定单元50493,用于根据所述调整方向和所述调整幅度,确定目标曝光调整值;A fifth determining unit 50493, configured to determine a target exposure adjustment value according to the adjustment direction and the adjustment range;

其中,所述曝光参数包括曝光增益和曝光时间。Wherein, the exposure parameters include exposure gain and exposure time.

可选的,如图13所示,所述移动终端还包括:Optionally, as shown in Figure 13, the mobile terminal further includes:

第二检测模块5012,用于检测所述预览图像中是否存在有效人脸;The second detection module 5012 is used to detect whether there is a valid human face in the preview image;

执行模块5013,用于若检测到所述预览图像中存在有效人脸,则执行所述获取当前场景信息的步骤。The execution module 5013 is configured to execute the step of acquiring current scene information if it is detected that there is a valid human face in the preview image.

可选的,如图14所示,所述第二检测模块5012包括:Optionally, as shown in Figure 14, the second detection module 5012 includes:

第二检测子模块50121,用于检测所述预览图像中的人脸的位置;The second detection sub-module 50121 is used to detect the position of the human face in the preview image;

第四获取子模块50122,用于若检测到所述人脸的位置在预设时间段内的位置偏移在预设范围内,则获取所述人脸的面积;The fourth acquisition sub-module 50122 is used to acquire the area of the human face if it is detected that the position of the human face is offset within a preset range within a preset time period;

第三确定子模块50123,用于若所述人脸的面积大于预设阈值,则确定所述预览图像中存在有效人脸。The third determination sub-module 50123 is configured to determine that there is a valid human face in the preview image if the area of the human face is greater than a preset threshold.

移动终端500能够实现图1、图3和图4的方法实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。且移动终端500可以实现如果预览图像中存在人脸信息,且如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。并且根据目标曝光调整值,调整曝光参数。保证了所拍摄的图片的亮度的一致性。The mobile terminal 500 can implement various processes implemented by the mobile terminal in the method embodiments in FIG. 1 , FIG. 3 , and FIG. 4 , and details are not repeated here to avoid repetition. And the mobile terminal 500 can determine the target exposure adjustment value if there is face information in the preview image and if there is no scene information matching the current scene information in the pre-stored scene information. And adjust the exposure parameter according to the target exposure adjustment value. The brightness consistency of the captured pictures is guaranteed.

图15为实现本发明各个实施例的一种移动终端的硬件结构示意图。FIG. 15 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.

该移动终端1500包括但不限于:射频单元1501、网络模块1502、音频输出单元1503、输入单元1504、传感器1505、显示单元1506、用户输入单元1507、接口单元1508、存储器1509、处理器1510、以及电源1511等部件。本领域技术人员可以理解,图15中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,移动终端包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。The mobile terminal 1500 includes but not limited to: a radio frequency unit 1501, a network module 1502, an audio output unit 1503, an input unit 1504, a sensor 1505, a display unit 1506, a user input unit 1507, an interface unit 1508, a memory 1509, a processor 1510, and Power supply 1511 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in Figure 15 does not constitute a limitation on the mobile terminal, and the mobile terminal may include more or less components than shown in the figure, or combine some components, or different components layout. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle-mounted terminal, a wearable device, and a pedometer.

处理器1510,用于检测拍摄预览界面输出的预览图像中是否存在人脸信息;若检测到所述预览图像中存在人脸信息,则获取当前场景信息;将所述当前场景信息与预先存储的场景信息进行比对;若预先存储的场景信息中不存在与所述当前场景信息匹配的场景信息,则确定目标曝光调整值;根据所述目标曝光调整值,调整曝光参数。The processor 1510 is configured to detect whether there is human face information in the preview image output by the shooting preview interface; if it is detected that there is human face information in the preview image, then obtain current scene information; compare the current scene information with the pre-stored Comparing the scene information; if there is no scene information matching the current scene information in the pre-stored scene information, determining the target exposure adjustment value; adjusting the exposure parameter according to the target exposure adjustment value.

如果预览图像中存在人脸信息,且如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。并且根据目标曝光调整值,调整曝光参数。保证了所拍摄的图片的亮度的一致性。If there is face information in the preview image, and if there is no scene information matching the current scene information in the pre-stored scene information, a target exposure adjustment value may be determined. And adjust the exposure parameter according to the target exposure adjustment value. The brightness consistency of the captured pictures is guaranteed.

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

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

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

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

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

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

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

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

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

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

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

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

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

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

所述当前场景信息包括以下至少一项:所述预览图像的当前亮度值、当前色温值、当前人脸位置、人脸区域亮度与背景区域亮度之间的比值。The current scene information includes at least one of the following: the current brightness value, the current color temperature value, the current face position, and the ratio between the brightness of the face area and the brightness of the background area of the preview image.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

所述当前场景信息包括:所述预览图像的当前亮度值、当前色温值、当前人脸位置和人脸区域亮度与背景区域亮度之间的比值;The current scene information includes: the current brightness value of the preview image, the current color temperature value, the current face position and the ratio between the brightness of the face area and the brightness of the background area;

获取所述预览图像的当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置;Obtain the current brightness value, current color temperature value, ratio between the brightness of the face area and the brightness of the background area and the current position of the face of the preview image;

将所述当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置依次与预先存储的场景信息进行比对;comparing the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current position of the face with pre-stored scene information in sequence;

若所述当前亮度值、当前色温值、人脸区域亮度与背景区域亮度之间的比值和当前人脸位置中存在至少一项与预先存储的场景信息不匹配,则确定目标曝光调整值;If at least one of the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current face position does not match the pre-stored scene information, determine the target exposure adjustment value;

其中,所述预先存储的场景信息包括预先存储的亮度值、预先存储的色温值、预先存储的人脸位置和预先存储的人脸区域亮度与背景区域亮度之间的比值。Wherein, the pre-stored scene information includes a pre-stored brightness value, a pre-stored color temperature value, a pre-stored face position, and a pre-stored ratio between the brightness of the face area and the brightness of the background area.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

获取所述预览图像中人脸区域的第一亮度均值;Acquiring the first average brightness value of the face area in the preview image;

获取所述预览图像中的背景区域的第二亮度均值;Acquiring a second average brightness value of the background area in the preview image;

计算所述第一亮度均值和所述第二亮度均值之间的亮度比值;calculating a brightness ratio between the first average brightness value and the second average brightness value;

将所述亮度比值与预设的目标比值进行比对,得到比对结果;Comparing the brightness ratio with a preset target ratio to obtain a comparison result;

根据所述比对结果,确定目标曝光调整值;determining a target exposure adjustment value according to the comparison result;

其中,所述背景区域为所述预览图像中除所述人脸区域之外的所有图像区域。Wherein, the background area is all image areas in the preview image except the face area.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

若所述比对结果指示所述亮度比值小于所述目标比值,则确定曝光增益增大值和/或曝光时间增大值;If the comparison result indicates that the brightness ratio is smaller than the target ratio, determining an exposure gain increase value and/or an exposure time increase value;

若所述比对结果指示所述亮度比值大于所述目标比值,则确定曝光增益减小值和/或曝光时间减小值;If the comparison result indicates that the brightness ratio is greater than the target ratio, determining an exposure gain reduction value and/or an exposure time reduction value;

其中,所述目标曝光调整值包括所述曝光增益增大值和/或曝光时间增大值;或者,所述目标曝光调整值包括所述曝光增益减小值和/或曝光时间减小值。Wherein, the target exposure adjustment value includes the exposure gain increase value and/or exposure time increase value; or, the target exposure adjustment value includes the exposure gain decrease value and/or exposure time decrease value.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

若所述比对结果指示所述亮度比值等于所述目标比值,则获取当前曝光参数;If the comparison result indicates that the luminance ratio is equal to the target ratio, obtaining a current exposure parameter;

将所述当前曝光参数、所述当前亮度值、所述当前色温值、所述人脸区域亮度与背景区域亮度之间的比值和所述当前人脸位置进行关联存储。The current exposure parameter, the current brightness value, the current color temperature value, the ratio between the brightness of the face area and the brightness of the background area, and the current position of the face are stored in association.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

锁定当前曝光参数;Lock the current exposure parameters;

根据所述当前曝光参数,进行拍照,生成照片。Taking photos according to the current exposure parameters to generate photos.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

将预先存储的亮度比值确定为目标比值;determining the pre-stored brightness ratio as the target ratio;

或者,获取用户选择的参考图像,并将所述参考图像中的人脸区域的亮度均值与背景区域的亮度均值之间的比值确定为目标比值。Alternatively, a reference image selected by the user is obtained, and the ratio between the average brightness value of the face area in the reference image and the average brightness value of the background area is determined as the target ratio.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

在所述拍摄预览界面上,显示至少一个操作区;On the shooting preview interface, at least one operation area is displayed;

检测用户在所述至少一个操作区中的任一个操作区的按压操作;detecting a user's pressing operation on any one of the at least one operation area;

若检测到按压操作,则获取所述按压操作的压力等级和按压时长;If a pressing operation is detected, obtain the pressure level and pressing duration of the pressing operation;

根据所述压力等级和按压时长,确定目标曝光调整值。A target exposure adjustment value is determined according to the pressure level and the pressing duration.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

根据所述压力等级,确定曝光参数的调整方向;Determine the adjustment direction of the exposure parameters according to the pressure level;

根据所述按压时长,确定曝光参数的调整幅度;Determine the adjustment range of the exposure parameter according to the pressing duration;

根据所述调整方向和所述调整幅度,确定目标曝光调整值;determining a target exposure adjustment value according to the adjustment direction and the adjustment range;

其中,所述曝光参数包括曝光增益和曝光时间。Wherein, the exposure parameters include exposure gain and exposure time.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

检测所述预览图像中是否存在有效人脸;Detecting whether there is a valid human face in the preview image;

若检测到所述预览图像中存在有效人脸,则执行所述获取当前场景信息的步骤。If it is detected that there is a valid human face in the preview image, the step of acquiring current scene information is executed.

可选的,处理器1510还用于:Optionally, the processor 1510 is also used for:

检测所述预览图像中的人脸的位置;detecting the position of the human face in the preview image;

若检测到所述人脸的位置在预设时间段内的位置偏移在预设范围内,则获取所述人脸的面积;If it is detected that the position of the human face is shifted within a preset time period within a preset range, then acquire the area of the human face;

若所述人脸的面积大于预设阈值,则确定所述预览图像中存在有效人脸。If the area of the human face is larger than the preset threshold, it is determined that there is a valid human face in the preview image.

移动终端1500能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。且移动终端1500可以实现如果预览图像中存在人脸信息,且如果预先存储的场景信息中不存在与当前场景信息匹配的场景信息,则可以确定目标曝光调整值。并且根据目标曝光调整值,调整曝光参数。保证了所拍摄的图片的亮度的一致性。The mobile terminal 1500 can implement various processes implemented by the mobile terminal in the foregoing embodiments, and to avoid repetition, details are not repeated here. And the mobile terminal 1500 can determine the target exposure adjustment value if there is face information in the preview image and if there is no scene information matching the current scene information in the pre-stored scene information. And adjust the exposure parameter according to the target exposure adjustment value. The brightness consistency of the captured pictures is guaranteed.

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

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

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

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

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

Claims (22)

CN201711046335.7A2017-10-312017-10-31 A shooting method and mobile terminalActiveCN107580184B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201711046335.7ACN107580184B (en)2017-10-312017-10-31 A shooting method and mobile terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201711046335.7ACN107580184B (en)2017-10-312017-10-31 A shooting method and mobile terminal

Publications (2)

Publication NumberPublication Date
CN107580184A CN107580184A (en)2018-01-12
CN107580184Btrue CN107580184B (en)2019-11-19

Family

ID=61040743

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201711046335.7AActiveCN107580184B (en)2017-10-312017-10-31 A shooting method and mobile terminal

Country Status (1)

CountryLink
CN (1)CN107580184B (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108848308B (en)*2018-06-272019-12-31维沃移动通信有限公司 A shooting method and mobile terminal
CN109743506A (en)*2018-12-142019-05-10维沃移动通信有限公司 An image capturing method and terminal device
CN109495689B (en)*2018-12-292021-04-13北京旷视科技有限公司Shooting method and device, electronic equipment and storage medium
CN109547701B (en)*2019-01-042021-07-09Oppo广东移动通信有限公司 Image capturing method, device, storage medium and electronic device
CN109801320B (en)*2019-01-262020-12-01武汉嫦娥医学抗衰机器人股份有限公司Intelligent skin dryness state identification method and system based on facial partition
CN109862282B (en)*2019-02-182021-04-30Oppo广东移动通信有限公司Method and device for processing person image
CN109846463A (en)*2019-03-042019-06-07武汉迅检科技有限公司Infrared face temp measuring method, system, equipment and storage medium
CN109981990B (en)*2019-04-102023-07-28深圳传音通讯有限公司Image processing method, device and terminal
CN110288679A (en)*2019-06-302019-09-27于峰The processing method of image, apparatus and system
CN110516555A (en)*2019-07-312019-11-29苏州浪潮智能科技有限公司 A face recognition method, device, equipment and readable storage medium
CN111461103B (en)*2020-05-142023-05-16广东小天才科技有限公司Method and device for eliminating interference of click-to-read scene, electronic equipment and storage medium
CN112672060B (en)*2020-12-292022-09-02维沃移动通信有限公司Shooting method and device and electronic equipment
CN112843731B (en)*2020-12-312023-05-12上海米哈游天命科技有限公司Shooting method, shooting device, shooting equipment and storage medium
CN112843709B (en)*2020-12-312023-05-26上海米哈游天命科技有限公司Shooting method, shooting device, shooting equipment and storage medium
CN112819722B (en)*2021-02-032024-09-20东莞埃科思科技有限公司Method, device, equipment and storage medium for exposing infrared image face
CN112966562A (en)*2021-02-042021-06-15深圳市街角电子商务有限公司Face living body detection method, system and storage medium
CN113986175A (en)*2021-10-292022-01-28北京光启元数字科技有限公司Color selection method and device, electronic equipment and readable medium
CN114222072B (en)*2021-12-162023-10-27影石创新科技股份有限公司Image processing method, device, electronic equipment and storage medium
CN114885096B (en)*2022-03-292024-03-15北京旷视科技有限公司Shooting mode switching method, electronic equipment and storage medium
CN117115408A (en)*2022-05-172023-11-24北京智行者科技股份有限公司 A visual coding detection method, system and mobile tool
CN116095513B (en)*2022-08-052024-03-26荣耀终端有限公司 Photography methods and related devices
CN115633258A (en)*2022-09-272023-01-20北京极感科技有限公司 Brightness adjustment method, device, storage medium and product

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104994306A (en)*2015-06-292015-10-21厦门美图之家科技有限公司Photographic method and photographic device capable of automatically adjusting exposure based on face brightness
CN105516613A (en)*2015-12-072016-04-20凌云光技术集团有限责任公司Intelligent exposure method and system based on face recognition
CN105847704A (en)*2016-04-012016-08-10广东欧珀移动通信有限公司Control method, control device and electronic device
CN106454104A (en)*2016-10-282017-02-22维沃移动通信有限公司Photographing method and mobile terminal
CN106657994A (en)*2017-03-032017-05-10深圳市金立通信设备有限公司Exposure testing method, control terminal, terminal to be tested, and exposure testing system
CN106713778A (en)*2016-12-282017-05-24上海兴芯微电子科技有限公司Exposure control method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104994306A (en)*2015-06-292015-10-21厦门美图之家科技有限公司Photographic method and photographic device capable of automatically adjusting exposure based on face brightness
CN105516613A (en)*2015-12-072016-04-20凌云光技术集团有限责任公司Intelligent exposure method and system based on face recognition
CN105847704A (en)*2016-04-012016-08-10广东欧珀移动通信有限公司Control method, control device and electronic device
CN106454104A (en)*2016-10-282017-02-22维沃移动通信有限公司Photographing method and mobile terminal
CN106713778A (en)*2016-12-282017-05-24上海兴芯微电子科技有限公司Exposure control method and device
CN106657994A (en)*2017-03-032017-05-10深圳市金立通信设备有限公司Exposure testing method, control terminal, terminal to be tested, and exposure testing system

Also Published As

Publication numberPublication date
CN107580184A (en)2018-01-12

Similar Documents

PublicationPublication DateTitle
CN107580184B (en) A shooting method and mobile terminal
CN109361865B (en)Shooting method and terminal
CN109688322B (en)Method and device for generating high dynamic range image and mobile terminal
CN107566730B (en) A panoramic image shooting method and mobile terminal
CN109361867B (en)Filter processing method and mobile terminal
CN108492246B (en)Image processing method and device and mobile terminal
CN107846583B (en) A kind of image shadow compensation method and mobile terminal
CN108924414B (en) A shooting method and terminal equipment
CN107820011A (en)Photographic method and camera arrangement
WO2019174628A1 (en)Photographing method and mobile terminal
CN107809598B (en)A kind of image pickup method, mobile terminal and server
CN107734251A (en)A kind of photographic method and mobile terminal
CN108040209B (en)Shooting method and mobile terminal
CN108040240B (en) Method, device and mobile terminal for white balance adjustment
CN108111754A (en)A kind of method and mobile terminal of definite image acquisition modality
JP7467667B2 (en) Detection result output method, electronic device and medium
CN109104578B (en) An image processing method and mobile terminal
CN108513067A (en)A kind of filming control method and mobile terminal
CN107888833A (en)A kind of image capturing method and mobile terminal
CN109727212B (en) An image processing method and mobile terminal
CN110955793A (en)Display control method and electronic equipment
CN108174110B (en) A kind of photographing method and flexible screen terminal
CN109462727B (en)Filter adjusting method and mobile terminal
CN110636225A (en) Photographing method and electronic equipment
CN110363729A (en) An image processing method, terminal equipment, and computer-readable storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp