[go: up one dir, main page]

CN107995418B - Shooting method and device and mobile terminal - Google Patents

Shooting method and device and mobile terminal Download PDF

Info

Publication number
CN107995418B
CN107995418B CN201711165913.9A CN201711165913A CN107995418B CN 107995418 B CN107995418 B CN 107995418B CN 201711165913 A CN201711165913 A CN 201711165913A CN 107995418 B CN107995418 B CN 107995418B
Authority
CN
China
Prior art keywords
face
area
determining
image frame
dimming model
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
CN201711165913.9A
Other languages
Chinese (zh)
Other versions
CN107995418A (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 Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201711165913.9A priority Critical patent/CN107995418B/en
Publication of CN107995418A publication Critical patent/CN107995418A/en
Application granted granted Critical
Publication of CN107995418B publication Critical patent/CN107995418B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability

Landscapes

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

Abstract

The invention provides a shooting method, a shooting device and a mobile terminal, wherein the method comprises the following steps: when a shooting starting instruction is received, determining an optimal dimming model by analyzing a background area and a face area in an acquired real-time image frame; adjusting the brightness and the color temperature of a face region in the real-time image frame by adopting the optimal dimming model; and when a shooting ending instruction is received, saving the adjusted image set of the face area to obtain a shot image set. The problems of poor picture layering and poor shooting effect are solved, and the beneficial effects of enhancing the picture layering and the shooting effect are achieved.

Description

一种拍摄方法、装置及移动终端A shooting method, device and mobile terminal

技术领域technical field

本发明涉及移动终端技术领域,尤其涉及一种拍摄方法、装置及移动终端。The present invention relates to the technical field of mobile terminals, and in particular, to a photographing method, device and mobile terminal.

背景技术Background technique

随着移动终端的普及,用户不仅可以通过移动终端拍摄静态图片,还可以拍摄视频、制作动态图片等由多帧连续图片组成的图片集合。With the popularization of mobile terminals, users can not only shoot still pictures through the mobile terminals, but also can shoot videos, make dynamic pictures, and other picture collections composed of multiple frames of continuous pictures.

在实际应用中,使用移动终端进行拍摄多帧连续图片时,在接收到用户开始拍摄的指令时,直接通过摄像头采集图片,直至接收到用户对该拍摄发出结束指令,将得到的多帧图片作为拍摄结果。可以看出,拍摄的多帧连续图片画面没有通过任何打光处理,画面层次感较弱、拍摄效果较差,从而降低了用户的拍照体验。In practical applications, when using a mobile terminal to shoot multiple frames of continuous pictures, when receiving an instruction from the user to start shooting, the camera directly captures the picture until the user sends an instruction to end the shooting, and the obtained multi-frame pictures are used as Shooting results. It can be seen that the multi-frame continuous pictures taken have not undergone any lighting processing, the picture layering is weak, and the shooting effect is poor, thereby reducing the user's photographing experience.

发明内容SUMMARY OF THE INVENTION

本发明实施例提供的拍摄方法、装置及移动终端,可解决在先技术中拍摄视频画面层次感较弱、拍摄效果较差的问题。The shooting method, device and mobile terminal provided by the embodiments of the present invention can solve the problems of weak layering and poor shooting effect of shooting video images in the prior art.

一方面,本发明实施例公开了一种拍摄方法,应用于移动终端,包括:On the one hand, an embodiment of the present invention discloses a shooting method, which is applied to a mobile terminal, including:

当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;When a shooting start instruction is received, the optimal dimming model is determined by analyzing the background area and the face area in the acquired real-time image frame;

采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;Using the optimal dimming model to adjust the brightness and color temperature of the face region in the real-time image frame;

当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。When receiving the shooting end instruction, save the image set whose face area has been adjusted to obtain the shooting image set.

另一方面,本发明实施例还公开了一种拍摄装置,包括:On the other hand, an embodiment of the present invention also discloses a photographing device, comprising:

调光模型确定模块,用于当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;The dimming model determination module is used to determine the optimal dimming model by analyzing the background area and the face area in the acquired real-time image frame when the shooting start instruction is received;

亮度调整模块,用于采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;a brightness adjustment module, configured to use the optimal dimming model to adjust the brightness and color temperature of the face region in the real-time image frame;

拍摄图像保存模块,用于当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。The captured image saving module is used to save the image set whose face area has been adjusted to obtain the captured image set when the shooting end instruction is received.

再一方面,本发明实施例还公开了一种移动终端,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上任一项所述的拍摄方法的步骤。In another aspect, an embodiment of the present invention also discloses a mobile terminal, including a processor, a memory, and a computer program stored in the memory and running on the processor, the computer program being executed by the processor When executed, the steps of the photographing method described in any one of the above are realized.

最后一方面,本发明实施例还公开了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上任一项所述的拍摄方法的步骤。In a final aspect, an embodiment of the present invention further discloses a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the shooting described in any one of the preceding items is realized. steps of the method.

在本发明实施例中,当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。解决了画面层次感较弱、拍摄效果较差的问题,达到了增强画面层次感、以及拍摄效果的有益效果。In the embodiment of the present invention, when a shooting start instruction is received, the optimal dimming model is determined by analyzing the background area and the face area in the acquired real-time image frame; The brightness and color temperature of the face area in the real-time image frame are adjusted; when the shooting end instruction is received, the adjusted image set of the face area is saved to obtain a shot image set. The problem of weak image layering and poor shooting effect is solved, and the beneficial effects of enhancing image layering and shooting effect are achieved.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, in order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.

附图说明Description of drawings

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

图1示出了本发明实施例一中的一种拍摄方法的步骤流程图;FIG. 1 shows a flowchart of steps of a shooting method in Embodiment 1 of the present invention;

图1A示出了本发明实施例中的打光效果示意图;FIG. 1A shows a schematic diagram of a lighting effect in an embodiment of the present invention;

图1B示出了本发明实施例中的打光效果示意图;FIG. 1B shows a schematic diagram of a lighting effect in an embodiment of the present invention;

图1C示出了本发明实施例中的打光效果示意图;FIG. 1C shows a schematic diagram of a lighting effect in an embodiment of the present invention;

图1D示出了本发明实施例中的打光效果示意图;FIG. 1D shows a schematic diagram of a lighting effect in an embodiment of the present invention;

图2示出了本发明实施例二中的一种拍摄方法的步骤流程图;FIG. 2 shows a flowchart of steps of a shooting method in Embodiment 2 of the present invention;

图3示出了本发明实施例三中的一种拍摄装置的结构框图;3 shows a structural block diagram of a photographing apparatus in Embodiment 3 of the present invention;

图4示出了本发明实施例四中的一种拍摄装置的结构框图;4 shows a structural block diagram of a photographing apparatus in Embodiment 4 of the present invention;

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

具体实施方式Detailed ways

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

下面通过列举几个具体的实施例详细介绍本发明提供的一种拍摄方法、装置及移动终端。The following describes a shooting method, device and mobile terminal provided by the present invention in detail by listing several specific embodiments.

实施例一Example 1

参照图1,示出了本发明实施例一的一种拍摄方法的步骤流程图,具体可以包括如下步骤:Referring to FIG. 1 , a flowchart of steps of a photographing method according to Embodiment 1 of the present invention is shown, which may specifically include the following steps:

步骤101,当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型。Step 101 , when a shooting start instruction is received, an optimal dimming model is determined by analyzing the background area and the face area in the acquired real-time image frame.

本发明实施例适用于具有拍摄图片、视频、动态图片的移动终端。其中,移动终端包括但不限于手机、平板电脑。The embodiment of the present invention is applicable to a mobile terminal having captured pictures, videos, and dynamic pictures. The mobile terminals include but are not limited to mobile phones and tablet computers.

本发明实施例可以从实时抓取的各图像帧进行分析,并进行调光,从而保证每帧图像均达到最好的拍摄效果以及层次感。可以理解,本发明实施例同样适用于拍摄单张图像。In the embodiment of the present invention, each image frame captured in real time can be analyzed, and the light can be adjusted, so as to ensure that each frame of image achieves the best shooting effect and sense of hierarchy. It can be understood that the embodiment of the present invention is also applicable to shooting a single image.

具体地,对于一帧图像,首先,识别图像中的人脸区域和背景区域;然后,通过分别对背景区域和人脸区域的特点进行分析,从预设调光模型中,获取最优调光模型。Specifically, for a frame of image, first, identify the face area and background area in the image; then, by analyzing the characteristics of the background area and the face area respectively, obtain the optimal dimming from the preset dimming model Model.

其中,对人脸区域和背景区域的识别,可以通过人脸识别技术先识别出人脸区域,或通过拍摄用户选择人脸区域,从而其他区域作为背景区域。Among them, for the identification of the face area and the background area, the face area can be first identified through the face recognition technology, or the user can select the face area by photographing, so that other areas are used as the background area.

背景区域和人脸区域的特点包括但不限于:背景区域的色彩、人脸区域的皮肤状态、肤色、以及分析得到的年龄、性别等。本发明实施例可以通过不同的色彩、肤色以及年龄、性别获取到最优的调光模型。The characteristics of the background area and the face area include, but are not limited to: the color of the background area, the skin state, skin color, and age, gender, etc. of the face area. In the embodiment of the present invention, an optimal dimming model can be obtained through different colors, skin colors, age, and gender.

预设的调光模型包括但不限于:伦勃朗光模型、蝴蝶光模型、无影光模型、多光源模型、宽窄光模型、半面光模型、背光模型。如图1A所示为通过伦勃朗光从侧面打光的效果,如图1B所示为通过蝴蝶光进行打光的效果,图1C和1D均为通过打光之后的图像。从中可以看出,经过打光之后各拍摄的画面层次感更强、拍摄效果更好。The preset dimming models include but are not limited to: Rembrandt light model, butterfly light model, shadowless light model, multi-light source model, wide and narrow light model, half-surface light model, and backlight model. Figure 1A shows the effect of lighting from the side with Rembrandt light, Figure 1B shows the effect of lighting with butterfly light, and Figures 1C and 1D are images after lighting. It can be seen from this that after lighting, the pictures of each shot have a stronger sense of hierarchy and better shooting effects.

步骤102,采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整。Step 102, using the optimal dimming model to adjust the brightness and color temperature of the face region in the real-time image frame.

本发明实施例通过对人脸区域单独打光,从而增强人脸区域的层次感以及拍摄效果。The embodiment of the present invention enhances the sense of hierarchy and the shooting effect of the face region by separately lighting the face region.

具体地,将人脸区域各像素点的亮度和色温,按照指定模型进行调整。Specifically, the brightness and color temperature of each pixel in the face area are adjusted according to the specified model.

其中,各像素的亮度呈现出来图像的明亮程度,本发明实施例可以通过调节不同位置像素的亮度,使得图像呈现较好的视觉效果。例如,如图1A所示,从右侧打光,将左侧脸部的亮度调低,从而提高视觉效果。又例如,如图1B所示,将鼻子下方、眼睛周围的亮度、脖子的亮度调低,脸部正前方、额头以及下巴的亮度调高,从而提高视觉效果。The brightness of each pixel presents the brightness of the image, and the embodiment of the present invention can make the image present a better visual effect by adjusting the brightness of the pixels at different positions. For example, as shown in Figure 1A, lighting from the right side reduces the brightness of the face on the left side to improve the visual effect. For another example, as shown in FIG. 1B , the brightness under the nose, around the eyes, and the neck is reduced, and the brightness in front of the face, forehead, and chin is increased, thereby improving the visual effect.

色温为表示光线中包含颜色成分的一个计量单位。从理论上讲,色温是指绝对黑体从绝对零度(-273℃)开始加温后所呈现的颜色。黑体在受热后逐渐由黑变为红色,然后转为黄色,后为白色,最后变为蓝色。当加热到一定温度,黑体发出的光所含的光谱成分就称为这一温度下的色温,计量单位为“K”(开尔文)。如果某一光源发出的光,与某一温度下黑体发出的光所含的光谱成分相同,即称为某K色温,如100W灯泡发出光的颜色,与绝对黑体在2527K时的颜色相同,那么这只灯泡发出的光的色温为527K+273K=2800K。本发明实施例可以通过调节色温从而使得图像呈现较好的视觉效果。例如,在某些场景下使用暖光会使得图像呈现出一种温暖、舒适的效果,而在某些场景下使用冷光会渲染出一种凄凉、悲惨的效果。Color temperature is a unit of measurement that expresses the color components contained in light. Theoretically, color temperature refers to the color of an absolute black body when it is heated from absolute zero (-273°C). The black body gradually changes from black to red, then to yellow, then to white, and finally to blue after being heated. When heated to a certain temperature, the spectral composition of the light emitted by the black body is called the color temperature at this temperature, and the unit of measurement is "K" (Kelvin). If the light emitted by a light source has the same spectral components as the light emitted by a black body at a certain temperature, it is called a certain K color temperature. For example, the color of the light emitted by a 100W light bulb is the same as the color of an absolute black body at 2527K, then The color temperature of the light emitted by this bulb is 527K+273K=2800K. In the embodiment of the present invention, the color temperature can be adjusted so that the image presents a better visual effect. For example, using warm light in some scenes can give the image a warm, cozy effect, while using cool light in some scenes can render a bleak, tragic effect.

步骤103,当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。Step 103 , when receiving the shooting end instruction, save the image set whose face area has been adjusted to obtain the shooting image set.

在本发明实施例中,将经过人脸区域经过打光的图像集合作为拍摄图像集,从而拍摄的视频、动态图像等呈现出比较好的拍摄效果,提高了用户的拍摄积极性。In the embodiment of the present invention, the set of illuminated images passing through the face area is used as the set of captured images, so that the captured videos, dynamic images, etc. exhibit a better capturing effect, which improves the user's enthusiasm for capturing.

在本发明实施例中,当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。解决了画面层次感较弱、拍摄效果较差的问题,达到了增强画面层次感、以及拍摄效果的有益效果。In the embodiment of the present invention, when a shooting start instruction is received, the optimal dimming model is determined by analyzing the background area and the face area in the acquired real-time image frame; The brightness and color temperature of the face area in the real-time image frame are adjusted; when the shooting end instruction is received, the adjusted image set of the face area is saved to obtain a shot image set. The problem of weak image layering and poor shooting effect is solved, and the beneficial effects of enhancing image layering and shooting effect are achieved.

实施例二Embodiment 2

参照图2,示出了本发明实施例二的一种拍摄方法的步骤流程图,具体可以包括如下步骤:Referring to FIG. 2, a flowchart of steps of a shooting method according to Embodiment 2 of the present invention is shown, which may specifically include the following steps:

步骤201,实时获取图像帧,并确定所述图像帧中的人脸区域和背景区域。In step 201, an image frame is acquired in real time, and a face area and a background area in the image frame are determined.

本发明实施例可以对各图像帧采用不同的调光模型进行亮度处理。In the embodiment of the present invention, different dimming models can be used to perform brightness processing on each image frame.

具体地,首先,确定人脸区域;然后,将人脸区域以外的其他区域作为背景区域。其中,人脸区域可以通过人脸识别和/或用户指定得到。Specifically, first, the face region is determined; then, other regions than the face region are used as the background region. Wherein, the face area can be obtained through face recognition and/or user designation.

在实际拍摄过程中,用户可以通过点击或其他操作指定目标区域,从而移动终端可以根据用户指定的目标区域进行特殊处理。在本发明实施例中,移动终端可以根据用户指定的人脸区域进行打光处理。In the actual shooting process, the user can specify the target area by clicking or other operations, so that the mobile terminal can perform special processing according to the target area specified by the user. In this embodiment of the present invention, the mobile terminal may perform lighting processing according to the face area designated by the user.

可选地,在本发明的另一种实施例中,步骤201包括子步骤2011至2012:Optionally, in another embodiment of the present invention, step 201 includes sub-steps 2011 to 2012:

子步骤2011,对所述图像帧进行人脸识别,得到人脸区域。Sub-step 2011, performing face recognition on the image frame to obtain a face region.

在实际应用中,可以通过对人脸特征点进行检测,从而确定人脸区域。其中,人脸特征点包括但不限于五官以及脸部轮廓点。In practical applications, the facial region can be determined by detecting the facial feature points. The facial feature points include but are not limited to facial features and facial contour points.

子步骤2012,根据所述人脸区域,确定背景区域。Sub-step 2012, determining a background area according to the face area.

具体地,将人脸区域之外的区域作为背景区域。Specifically, the area outside the face area is taken as the background area.

可选地,在本发明的另一种实施例中,步骤201包括子步骤2013至2014:Optionally, in another embodiment of the present invention, step 201 includes sub-steps 2013 to 2014:

子步骤2013,接收用户在所述图像帧中的人脸区域确定操作,得到人脸区域。Sub-step 2013, receiving the user's operation of determining the face area in the image frame, and obtaining the face area.

在实际应用中,当用户在一帧图像中选择了一个点时,可以基于该点向周围区域扩散,从而确定人脸区域;当用户选择了一个区域时,可以将该区域直接作为人脸区域。In practical applications, when the user selects a point in a frame of image, it can spread to the surrounding area based on the point to determine the face area; when the user selects an area, the area can be directly used as the face area .

子步骤2014,根据所述人脸区域,确定背景区域。Sub-step 2014, determining a background area according to the face area.

该步骤可以参照子步骤2012的详细说明,在此不再赘述。For this step, reference may be made to the detailed description of sub-step 2012, which will not be repeated here.

步骤202,分别确定所述背景区域及人脸区域的目标属性。Step 202: Determine the target attributes of the background area and the face area, respectively.

其中,目标属性包括但不限于背景区域的色彩、光源方向、以及人脸朝向、人脸肤色等。从而可以根据这些目标属性确定最优打光模型。The target attributes include, but are not limited to, the color of the background area, the direction of the light source, the orientation of the face, the skin color of the face, and the like. Thus, the optimal lighting model can be determined according to these target properties.

步骤203,根据所述背景区域及人脸区域的目标属性,从保存的最优调光模型列表中确定最优调光模型。Step 203: Determine an optimal dimming model from the saved optimal dimming model list according to the target attributes of the background area and the face area.

具体地,可以通过实验预先确定各调光模型对应的目标属性,然后,根据当前拍摄场景的目标属性确定调光模型。Specifically, the target attribute corresponding to each dimming model can be pre-determined through experiments, and then the dimming model is determined according to the target attribute of the current shooting scene.

例如,对于蝴蝶光调光模型,对应的人脸的目标属性为正面朝向,从而在监测到人脸的朝向为正面时,可以选择蝴蝶光调光模型。For example, for the butterfly light dimming model, the target attribute of the corresponding face is the frontal orientation, so when the detected face orientation is frontal, the butterfly light dimming model can be selected.

步骤204,采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整。Step 204, using the optimal dimming model to adjust the brightness and color temperature of the face region in the real-time image frame.

该步骤可以参照步骤102的详细说明,在此不再赘述。For this step, reference may be made to the detailed description of step 102, which will not be repeated here.

步骤205,采用用户为实时图像帧选择的调光模型,对所述实时图像帧中的人脸区域的亮度和色温进行调整。Step 205, using the dimming model selected by the user for the real-time image frame, to adjust the brightness and color temperature of the face region in the real-time image frame.

本发明实施例提供用户根据喜好修改最优调光模型。具体地,在进行自动调光之后,在拍摄界面显示各调光模型,当用户点击其中一调光模型之后,采用该调光模型对人脸区域进行处理。The embodiment of the present invention provides that the user can modify the optimal dimming model according to their preferences. Specifically, after the automatic dimming is performed, each dimming model is displayed on the shooting interface, and after the user clicks one of the dimming models, the face region is processed by using the dimming model.

步骤206,确定所述实时图像帧中背景区域的目标属性,并将所述目标属性与所述调光模型对应保存至最优调光模型列表。Step 206: Determine the target attribute of the background area in the real-time image frame, and save the target attribute and the dimming model corresponding to the optimal dimming model list.

在本发明实施例中,可以通过记录用户为一拍摄场景选择的调光模型作为该拍摄场景的最优调光模型,从而在下次拍摄类似拍摄场景时,自动采用该最优调光模型对人脸区域进行处理。In the embodiment of the present invention, the dimming model selected by the user for a shooting scene can be recorded as the optimal dimming model of the shooting scene, so that the optimal dimming model is automatically used for the next shooting of a similar shooting scene. face area for processing.

步骤207,当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。Step 207 , when receiving the shooting end instruction, save the image set whose face area has been adjusted to obtain the shooting image set.

该步骤可以参照步骤103的详细说明,在此不再赘述。For this step, reference may be made to the detailed description of step 103, which is not repeated here.

在本发明实施例中,当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。解决了画面层次感较弱、拍摄效果较差的问题,达到了增强画面层次感、以及拍摄效果的有益效果。此外,还可以通过安全检查或将充电端口接地对充电端口进行安全保护。In the embodiment of the present invention, when a shooting start instruction is received, the optimal dimming model is determined by analyzing the background area and the face area in the acquired real-time image frame; The brightness and color temperature of the face area in the real-time image frame are adjusted; when the shooting end instruction is received, the adjusted image set of the face area is saved to obtain a shot image set. The problem of weak image layering and poor shooting effect is solved, and the beneficial effects of enhancing image layering and shooting effect are achieved. Additionally, the charging port can be secured with a safety check or grounding the charging port.

实施例三Embodiment 3

参照图3,示出了本发明实施例三的一种拍摄装置的结构框图。Referring to FIG. 3 , a structural block diagram of a photographing apparatus according to Embodiment 3 of the present invention is shown.

所述拍摄装置300包括:调光模型确定模块301、亮度调整模块302、拍摄图像保存模块303。The photographing device 300 includes: a dimming model determination module 301 , a brightness adjustment module 302 , and a captured image saving module 303 .

下面分别详细介绍各模块的功能以及各模块之间的交互关系。The functions of each module and the interaction between the modules are described in detail below.

调光模型确定模块301,用于当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;The dimming model determination module 301 is configured to determine the optimal dimming model by analyzing the background area and the face area in the acquired real-time image frame when receiving the shooting start instruction;

亮度调整模块302,用于采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;a brightness adjustment module 302, configured to adjust the brightness and color temperature of the face region in the real-time image frame by using the optimal dimming model;

拍摄图像保存模块303,用于当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。The captured image saving module 303 is configured to save a set of images whose face regions have been adjusted to obtain a set of captured images when a shooting end instruction is received.

在本发明实施例中,当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。解决了画面层次感较弱、拍摄效果较差的问题,达到了增强画面层次感、以及拍摄效果的有益效果。In the embodiment of the present invention, when a shooting start instruction is received, the optimal dimming model is determined by analyzing the background area and the face area in the acquired real-time image frame; The brightness and color temperature of the face area in the real-time image frame are adjusted; when the shooting end instruction is received, the adjusted image set of the face area is saved to obtain a shot image set. The problem of weak image layering and poor shooting effect is solved, and the beneficial effects of enhancing image layering and shooting effect are achieved.

实施例三是方法实施例一对应的装置实施例,详细说明可以参照实施例一,在此不再赘述。Embodiment 3 is an apparatus embodiment corresponding to method embodiment 1. For detailed description, reference may be made to embodiment 1, which will not be repeated here.

实施例四Embodiment 4

参照图4,示出了本发明实施例四的一种拍摄装置的结构框图。Referring to FIG. 4 , a structural block diagram of a photographing apparatus according to Embodiment 4 of the present invention is shown.

所述拍摄装置400包括:调光模型确定模块401、亮度调整模块402、用户调整模块403、用户模型保存模块404、拍摄图像保存模块405。The photographing device 400 includes: a dimming model determination module 401 , a brightness adjustment module 402 , a user adjustment module 403 , a user model storage module 404 , and a captured image storage module 405 .

下面分别详细介绍各模块的功能以及各模块之间的交互关系。The functions of each module and the interaction between the modules are described in detail below.

调光模型确定模块401,用于当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;可选地,在本发明实施例中,上述调光模型确定模块401,包括:The dimming model determination module 401 is used to determine the optimal dimming model by analyzing the background area and the face area in the acquired real-time image frame when receiving the shooting start instruction; optionally, in the implementation of the present invention In an example, the above-mentioned dimming model determination module 401 includes:

区域确定子模块4011,用于实时获取图像帧,并确定所述图像帧中的人脸区域和背景区域。The region determination sub-module 4011 is used to acquire an image frame in real time, and determine the face region and background region in the image frame.

目标属性确定子模块4012,用于分别确定所述背景区域及人脸区域的目标属性。The target attribute determination sub-module 4012 is used for respectively determining the target attributes of the background area and the face area.

调光模型确定子模块4013,用于根据所述背景区域及人脸区域的目标属性,确定最优调光模型。The dimming model determination sub-module 4013 is configured to determine the optimal dimming model according to the target attributes of the background area and the face area.

可选地,在本发明的另一种实施例中,上述区域确定子模块4011,包括:Optionally, in another embodiment of the present invention, the above-mentioned area determination submodule 4011 includes:

人脸区域确定单元,用于对所述图像帧进行人脸识别,得到人脸区域。The face area determination unit is used for performing face recognition on the image frame to obtain the face area.

背景区域确定单元,用于根据所述人脸区域,确定背景区域。The background area determination unit is configured to determine the background area according to the face area.

亮度调整模块402,用于采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整。The brightness adjustment module 402 is configured to use the optimal dimming model to adjust the brightness and color temperature of the face region in the real-time image frame.

用户调整模块403,用于采用用户为实时图像帧选择的调光模型,对所述实时图像帧中的人脸区域的亮度和色温进行调整。The user adjustment module 403 is configured to use the dimming model selected by the user for the real-time image frame to adjust the brightness and color temperature of the face region in the real-time image frame.

用户模型保存模块404,用于确定所述实时图像帧中背景区域的目标属性,并将所述目标属性与所述调光模型对应保存至最优调光模型列表。The user model saving module 404 is configured to determine the target attribute of the background area in the real-time image frame, and save the target attribute and the dimming model corresponding to the optimal dimming model list.

拍摄图像保存模块405,用于当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。The captured image saving module 405 is configured to save a set of images whose face area has been adjusted to obtain a set of captured images when receiving a shooting end instruction.

在本发明实施例中,当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。解决了画面层次感较弱、拍摄效果较差的问题,达到了增强画面层次感、以及拍摄效果的有益效果。此外,还可以通过安全检查或将充电端口接地对充电端口进行安全保护。In the embodiment of the present invention, when a shooting start instruction is received, the optimal dimming model is determined by analyzing the background area and the face area in the acquired real-time image frame; The brightness and color temperature of the face area in the real-time image frame are adjusted; when the shooting end instruction is received, the adjusted image set of the face area is saved to obtain a shot image set. The problem of weak image layering and poor shooting effect is solved, and the beneficial effects of enhancing image layering and shooting effect are achieved. Additionally, the charging port can be secured with a safety check or grounding the charging port.

实施例四是方法实施例二对应的装置实施例,详细说明可以参照实施例二,在此不再赘述。The fourth embodiment is an apparatus embodiment corresponding to the second method embodiment. For a detailed description, reference may be made to the second embodiment, which will not be repeated here.

实施例五Embodiment 5

图5为实现本发明各个实施例的一种移动终端的硬件结构示意图,该移动终端500包括但不限于:射频单元501、网络模块502、音频输出单元503、输入单元504、传感器505、显示单元506、用户输入单元507、接口单元508、存储器509、处理器510、以及电源511等部件。本领域技术人员可以理解,图5中示出的移动终端结构并不构成对移动终端的限定,移动终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,移动终端包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。5 is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention. The mobile terminal 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, and a display unit 506 , a user input unit 507 , an interface unit 508 , a memory 509 , a processor 510 , and a power supply 511 and other components. Those skilled in the art can understand that the structure of the mobile terminal shown in FIG. 5 does not constitute a limitation on the mobile terminal, and the mobile terminal may include more or less components than the one shown, or combine some components, or different components layout. In this 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, a pedometer, and the like.

处理器510,用于当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。The processor 510 is configured to determine an optimal dimming model by analyzing the background area and the face area in the acquired real-time image frame when receiving the shooting start instruction; using the optimal dimming model for the The brightness and color temperature of the face area in the real-time image frame are adjusted; when a shooting end instruction is received, the adjusted image set of the face area is saved to obtain a shot image set.

可见,在本发明实施例中,当接收到拍摄开始指令时,通过对获取的实时图像帧中的背景区域及人脸区域进行分析,确定最优调光模型;采用所述最优调光模型对所述实时图像帧中的人脸区域的亮度和色温进行调整;当接收到拍摄结束指令时,保存人脸区域经过调整的图像集合,得到拍摄图像集。解决了画面层次感较弱、拍摄效果较差的问题,达到了增强画面层次感、以及拍摄效果的有益效果。It can be seen that, in the embodiment of the present invention, when a shooting start instruction is received, the optimal dimming model is determined by analyzing the background area and the face area in the acquired real-time image frame; the optimal dimming model is adopted. Adjust the brightness and color temperature of the face area in the real-time image frame; when receiving the shooting end instruction, save the adjusted image set of the face area to obtain a shot image set. The problem of weak image layering and poor shooting effect is solved, and the beneficial effects of enhancing image layering and shooting effect are achieved.

应理解的是,本发明实施例中,射频单元501可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器510处理;另外,将上行的数据发送给基站。通常,射频单元501包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元501还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in this embodiment of the present invention, the radio frequency unit 501 can be used for receiving and sending signals during sending and receiving of information or during a call. Specifically, after receiving the downlink data from the base station, it is processed by the processor 510; The uplink data is sent to the base station. Generally, the radio frequency unit 501 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 501 can also communicate with the network and other devices through a wireless communication system.

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

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

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

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

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

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

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

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

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

处理器510是移动终端的控制中心,利用各种接口和线路连接整个移动终端的各个部分,通过运行或执行存储在存储器509内的软件程序和/或模块,以及调用存储在存储器509内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。处理器510可包括一个或多个处理单元;优选的,处理器510可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器510中。The processor 510 is the control center of the mobile terminal, uses various interfaces and lines to connect various parts of the entire mobile terminal, runs or executes the software programs and/or modules stored in the memory 509, and calls the data stored in the memory 509. , perform various functions of the mobile terminal and process data, so as to monitor the mobile terminal as a whole. The processor 510 may include one or more processing units; preferably, the processor 510 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 above-mentioned modulation and demodulation processor may not be integrated into the processor 510.

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

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

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

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。Embodiments of the present invention further provide a computer-readable storage medium, where 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 embodiments of the shooting method can be realized, and the same technical effect can be achieved. , in order to avoid repetition, it will not be repeated here. 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.

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

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

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The 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 embodiments, which are merely illustrative rather than restrictive. Under the inspiration of the present invention, without departing from the spirit of the present invention and the scope protected by the claims, many forms can be made, which all belong to the protection of the present invention.

Claims (9)

1. A shooting method is applied to a mobile terminal, and is characterized by comprising the following steps:
when a shooting starting instruction is received, determining an optimal dimming model by analyzing a background area and a face area in an acquired real-time image frame;
adjusting the brightness and the color temperature of a face region in the real-time image frame by adopting the optimal dimming model;
when a shooting ending instruction is received, saving the adjusted image set of the face area to obtain a shot image set; the step of determining the optimal dimming model by analyzing the background region and the face region in the acquired real-time image frame includes:
acquiring an image frame in real time, and determining a face area and a background area in the image frame;
respectively determining the target attributes of the background area and the face area;
determining an optimal dimming model according to the target attributes of the background area and the face area;
wherein the target attributes comprise the color of the background area, the light source direction, the face orientation and the face skin color;
wherein the adjusting the brightness of the face region in the real-time image frame by using the optimal dimming model comprises: adjusting pixels at different positions of the face area to different brightness according to the optimal dimming model;
wherein, the determining an optimal dimming model according to the target attributes of the background region and the face region includes: and selecting the optimal dimming model from preset dimming models according to the target attributes of the background area and the face area.
2. The method of claim 1, wherein the step of determining the face region and the background region in the image frame comprises:
carrying out face recognition on the image frame to obtain a face area;
and determining a background area according to the face area.
3. The method of claim 1, further comprising, after the step of adjusting the brightness and color temperature of the face region in the real-time image frame using the optimal dimming model:
adjusting the brightness and color temperature of a face region in the real-time image frame according to the dimming model selected by a user;
and determining a target attribute of a background area in the real-time image frame, and correspondingly storing the target attribute and the dimming model into an optimal dimming model list.
4. The method according to claim 3, wherein the step of determining an optimal dimming model according to the target attributes of the background region and the face region comprises:
and determining an optimal dimming model from a stored optimal dimming model list according to the target attributes of the background area and the face area.
5. A camera, comprising:
the dimming model determining module is used for determining an optimal dimming model by analyzing a background area and a face area in the acquired real-time image frame when a shooting starting instruction is received;
the brightness adjusting module is used for adjusting the brightness and the color temperature of the face area in the real-time image frame by adopting the optimal dimming model;
the shot image storage module is used for storing the adjusted image set of the face area when a shooting ending instruction is received to obtain a shot image set; wherein the dimming model determination module comprises:
the area determination submodule is used for acquiring an image frame in real time and determining a face area and a background area in the image frame;
the target attribute determining submodule is used for respectively determining the target attributes of the background area and the face area;
the dimming model determining submodule is used for determining an optimal dimming model according to the target attributes of the background area and the face area;
wherein the target attributes comprise the color of the background area, the light source direction, the face orientation and the face skin color;
the brightness adjusting module is specifically configured to: adjusting pixels at different positions of the face area to different brightness according to the optimal dimming model;
the dimming model determining submodule is specifically configured to select the optimal dimming model from preset dimming models according to the target attributes of the background region and the face region.
6. The apparatus of claim 5, wherein the region determination submodule comprises:
the face area determining unit is used for carrying out face recognition on the image frame to obtain a face area;
and the background area determining unit is used for determining a background area according to the face area.
7. The apparatus of claim 5, further comprising:
the user adjusting module is used for adjusting the brightness and the color temperature of the face area in the real-time image frame by adopting a dimming model selected by a user;
and the user model storage module is used for determining the target attribute of the background area in the real-time image frame and correspondingly storing the target attribute and the dimming model into an optimal dimming model list.
8. The apparatus of claim 7, wherein the dimming model determination submodule comprises:
and the dimming model determining unit is used for determining an optimal dimming model from the stored optimal dimming model list according to the target attributes of the background area and the face area.
9. A mobile terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the photographing method according to any of claims 1 to 4.
CN201711165913.9A 2017-11-21 2017-11-21 Shooting method and device and mobile terminal Active CN107995418B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711165913.9A CN107995418B (en) 2017-11-21 2017-11-21 Shooting method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711165913.9A CN107995418B (en) 2017-11-21 2017-11-21 Shooting method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN107995418A CN107995418A (en) 2018-05-04
CN107995418B true CN107995418B (en) 2020-07-21

Family

ID=62031915

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711165913.9A Active CN107995418B (en) 2017-11-21 2017-11-21 Shooting method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN107995418B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108810406B (en) * 2018-05-23 2021-03-02 Oppo广东移动通信有限公司 Portrait light effect processing method, device, terminal and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794385A (en) * 2010-03-23 2010-08-04 上海交通大学 Multi-angle multi-target fast human face tracking method used in video sequence
CN102013006A (en) * 2009-09-07 2011-04-13 泉州市铁通电子设备有限公司 Method for automatically detecting and identifying face on the basis of backlight environment
WO2013064891A1 (en) * 2011-11-01 2013-05-10 Canon Kabushiki Kaisha Method and system for luminance adjustment of images in an image sequence
CN103123725A (en) * 2011-11-18 2013-05-29 鸿富锦精密工业(深圳)有限公司 Image analyzing device and analyzing method

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101448085B (en) * 2008-12-26 2013-08-21 北京中星微电子有限公司 Videography processing method and system supporting face detection
JP6458333B2 (en) * 2015-01-21 2019-01-30 スタンレー電気株式会社 Vehicle lighting
CN105245786B (en) * 2015-09-09 2019-01-08 厦门美图之家科技有限公司 A kind of self-timer method based on intelligent testing light, self-heterodyne system and camera terminal
CN105516613A (en) * 2015-12-07 2016-04-20 凌云光技术集团有限责任公司 Intelligent exposure method and system based on face recognition
KR102153607B1 (en) * 2016-01-22 2020-09-08 삼성전자주식회사 Apparatus and method for detecting foreground in image
KR102636243B1 (en) * 2016-02-19 2024-02-14 삼성전자주식회사 Method for processing image and electronic device thereof
CN106331510B (en) * 2016-10-31 2019-10-15 维沃移动通信有限公司 A backlight photographing method and mobile terminal
CN106878695A (en) * 2017-02-13 2017-06-20 广东欧珀移动通信有限公司 White balance processing method, device and computer equipment
CN107277356B (en) * 2017-07-10 2020-02-14 Oppo广东移动通信有限公司 Method and device for processing human face area of backlight scene
CN107846554B (en) * 2017-10-31 2020-09-01 努比亚技术有限公司 Image processing method, terminal and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102013006A (en) * 2009-09-07 2011-04-13 泉州市铁通电子设备有限公司 Method for automatically detecting and identifying face on the basis of backlight environment
CN101794385A (en) * 2010-03-23 2010-08-04 上海交通大学 Multi-angle multi-target fast human face tracking method used in video sequence
WO2013064891A1 (en) * 2011-11-01 2013-05-10 Canon Kabushiki Kaisha Method and system for luminance adjustment of images in an image sequence
CN103123725A (en) * 2011-11-18 2013-05-29 鸿富锦精密工业(深圳)有限公司 Image analyzing device and analyzing method

Also Published As

Publication number Publication date
CN107995418A (en) 2018-05-04

Similar Documents

Publication Publication Date Title
CN107908383B (en) Screen color adjusting method and device and mobile terminal
CN107809599B (en) A kind of supplementary light method and device and mobile terminal
CN107977652B (en) Method for extracting screen display content and mobile terminal
CN108833753B (en) Image acquisition and application method, terminal and computer readable storage medium
CN110266930A (en) Lighting method for image shooting, mobile terminal and lighting adjustment method
CN107566730B (en) A panoramic image shooting method and mobile terminal
CN108234882B (en) Image blurring method and mobile terminal
CN108111754A (en) A kind of method and mobile terminal of definite image acquisition modality
CN107817939A (en) A kind of image processing method and mobile terminal
CN108040209B (en) Shooting method and mobile terminal
CN110807405A (en) A detection method and electronic device for a candid camera device
CN107644396B (en) Lip color adjusting method and device
CN107864336B (en) Image processing method and mobile terminal
JP7467667B2 (en) Detection result output method, electronic device and medium
CN108628515A (en) A kind of operating method and mobile terminal of multimedia content
CN107948516A (en) A kind of image processing method, device and mobile terminal
CN111752450A (en) Display method, device and electronic device
CN111510623A (en) Shooting method and electronic equipment
CN109448069B (en) A template generation method and mobile terminal
CN108718389B (en) Shooting mode selection method and mobile terminal
CN107807488B (en) Camera assembly, aperture adjusting method and mobile terminal
CN108038889A (en) The processing method and mobile terminal of a kind of image color cast
CN111246111A (en) Photographing method, electronic device, and medium
CN108932505B (en) Image processing method and electronic equipment
CN107729100A (en) A kind of interface display control method and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant