Nothing Special   »   [go: up one dir, main page]

CN108540718A - Shooting method and device, mobile terminal and storage medium - Google Patents

Shooting method and device, mobile terminal and storage medium Download PDF

Info

Publication number
CN108540718A
CN108540718A CN201810308154.5A CN201810308154A CN108540718A CN 108540718 A CN108540718 A CN 108540718A CN 201810308154 A CN201810308154 A CN 201810308154A CN 108540718 A CN108540718 A CN 108540718A
Authority
CN
China
Prior art keywords
mobile terminal
included angle
mode
determined
target object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810308154.5A
Other languages
Chinese (zh)
Inventor
白剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810308154.5A priority Critical patent/CN108540718A/en
Publication of CN108540718A publication Critical patent/CN108540718A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • 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/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes

Landscapes

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

Abstract

The embodiment of the application discloses a shooting method, a shooting device, a mobile terminal and a storage medium, and relates to the technical field of mobile terminals. Wherein, the method comprises the following steps: acquiring a target object image through the camera; determining whether the current shooting mode is a horizontal screen mode or a vertical screen mode according to the position relation between the target object in the target object image and the mobile terminal; and when a shooting instruction is received, shooting by adopting the determined current shooting mode. The scheme effectively deals with the situation that the mobile terminal cannot be determined to correspond to the horizontal screen state or the vertical screen state through the attitude sensor, and the photographing experience of a user is improved.

Description

拍摄方法、装置、移动终端及存储介质Shooting method, device, mobile terminal and storage medium

技术领域technical field

本申请涉及移动终端技术领域,更具体地,涉及一种拍摄方法、装置、移动终端及存储介质。The present application relates to the technical field of mobile terminals, and more specifically, to a photographing method, device, mobile terminal and storage medium.

背景技术Background technique

随着移动终端的不断发展,其功能越来越丰富,拍照即是其中的一种。在通过移动终端进行拍照时,通常需要根据移动终端内置陀螺仪或者加速度传感器确定移动终端所处的姿态,以确定以横屏模式拍摄还是竖屏模式拍摄。然而,陀螺仪或者加速度在某些情况下无法有效分辨移动终端姿态,因此,无法确定当前应以何种拍摄状态进行拍摄,影响用户的拍照体验。With the continuous development of mobile terminals, their functions are becoming more and more abundant, and taking pictures is one of them. When taking pictures through the mobile terminal, it is usually necessary to determine the posture of the mobile terminal according to the built-in gyroscope or acceleration sensor of the mobile terminal, so as to determine whether to shoot in landscape mode or portrait mode. However, the gyroscope or the acceleration cannot effectively distinguish the attitude of the mobile terminal in some cases, therefore, it is impossible to determine which shooting state should be used for shooting, which affects the user's shooting experience.

发明内容Contents of the invention

鉴于上述问题,本申请提出了一种拍摄方法、装置、移动终端及存储介质,通过目标物体图像中目标物体与移动终端的位置关系确定移动终端的拍摄模式,提高用户拍照体验。In view of the above problems, the present application proposes a shooting method, device, mobile terminal and storage medium, which determines the shooting mode of the mobile terminal through the positional relationship between the target object and the mobile terminal in the target object image, and improves the user's shooting experience.

第一方面,本申请实施例提供了一种拍摄方法,应用于移动终端,所述移动终端包括摄像头,所述方法包括:通过所述摄像头获取目标物体图像;根据所述目标物体图像中的目标物体与所述移动终端的位置关系,确定当前拍摄模式为横屏模式还是竖屏模式;当接收到拍摄指令时,采用确定后的当前拍摄模式进行拍摄。In the first aspect, the embodiment of the present application provides a shooting method, which is applied to a mobile terminal, and the mobile terminal includes a camera, and the method includes: acquiring an image of a target object through the camera; The positional relationship between the object and the mobile terminal determines whether the current shooting mode is landscape mode or portrait mode; when a shooting instruction is received, the determined current shooting mode is used for shooting.

第二方面,本申请实施例提供了一种拍摄装置,应用于移动终端,所述移动终端包括摄像头,所述装置包括:图像获取模块,用于通过所述摄像头获取目标物体图像;拍摄模式确定模块,用于根据所述目标物体图像中的目标物体与所述移动终端的位置关系,确定当前拍摄模式为横屏模式还是竖屏模式;拍摄模块,用于当接收到拍摄指令时,采用确定后的当前拍摄模式进行拍摄。In the second aspect, the embodiment of the present application provides a shooting device, which is applied to a mobile terminal, the mobile terminal includes a camera, and the device includes: an image acquisition module, configured to acquire an image of a target object through the camera; determining a shooting mode A module, configured to determine whether the current shooting mode is a landscape mode or a vertical screen mode according to the positional relationship between the target object in the target object image and the mobile terminal; After the current shooting mode to shoot.

第三方面,本申请实施例提供了一种移动终端,包括显示屏、存储器及处理器,所述显示屏及所述存储器耦接到所述处理器,所述显示屏用于显示图像,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行上述方法。In a third aspect, an embodiment of the present application provides a mobile terminal, including a display screen, a memory, and a processor, the display screen and the memory are coupled to the processor, the display screen is used to display images, and the The memory stores instructions, and when the instructions are executed by the processor, the processor performs the above method.

第四方面,本申请实施例提供了一种具有处理器可执行的程序代码的计算机可读存储介质,所述程序代码使所述处理器执行上述方法。In a fourth aspect, the embodiment of the present application provides a computer-readable storage medium having a program code executable by a processor, and the program code causes the processor to execute the above method.

本申请提供的拍摄方法、装置、移动终端及存储介质,通过确定目标物体与移动终端的位置关系确定移动终端的当前拍摄模式为横屏模式还是竖屏模式,以在接收到拍摄指令时,根据该当前拍摄模式进行拍摄,有效应对通过姿态传感器无法确定移动终端对应横屏状态还是竖屏状态的情况,提高用户拍照体验。The shooting method, device, mobile terminal, and storage medium provided by the present application determine whether the current shooting mode of the mobile terminal is a landscape mode or a vertical screen mode by determining the positional relationship between the target object and the mobile terminal, so that when a shooting instruction is received, according to Shooting in the current shooting mode can effectively deal with the situation that the mobile terminal cannot be determined to be in a horizontal or vertical screen state through the attitude sensor, and improve the user's photographing experience.

本申请的这些方面或其他方面在以下实施例的描述中会更加简明易懂。These or other aspects of the present application will be more concise and understandable in the description of the following embodiments.

附图说明Description of drawings

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

图1a以及图1b示出了本申请实施例中移动终端的俯仰姿态示意图;Figure 1a and Figure 1b show a schematic diagram of the pitching attitude of the mobile terminal in the embodiment of the present application;

图2a以及图2b示出了本申请实施例中移动终端的横滚姿态示意图;FIG. 2a and FIG. 2b show a schematic diagram of a rolling posture of a mobile terminal in an embodiment of the present application;

图3示出了本申请实施例中移动终端的偏航姿态示意图;FIG. 3 shows a schematic diagram of the yaw attitude of the mobile terminal in the embodiment of the present application;

图4示出了本申请实施例中移动终端的水平状态示意图;FIG. 4 shows a schematic diagram of a horizontal state of a mobile terminal in an embodiment of the present application;

图5示出了本申请第一实施例提出的拍摄方法的流程图;FIG. 5 shows a flow chart of the shooting method proposed in the first embodiment of the present application;

图6示出了本申请第二实施例提出的拍摄方法的流程图;FIG. 6 shows a flow chart of the shooting method proposed in the second embodiment of the present application;

图7示出了本申请实施例提出的一种竖屏方向示意图;Fig. 7 shows a schematic diagram of a vertical screen direction proposed by the embodiment of the present application;

图8示出了本申请实施例提出的一种横屏方向示意图;Fig. 8 shows a schematic diagram of a horizontal screen direction proposed by the embodiment of the present application;

图9示出了本申请实施例提出的一种人脸示意图;Fig. 9 shows a schematic diagram of a human face proposed by the embodiment of the present application;

图10示出了本申请实施例提出的人脸与移动终端显示屏幕之间的位置关系的一种示意图;FIG. 10 shows a schematic diagram of the positional relationship between the human face and the display screen of the mobile terminal proposed in the embodiment of the present application;

图11示出了本申请实施例提出的人脸与移动终端显示屏幕之间的位置关系的另一种示意图;FIG. 11 shows another schematic diagram of the positional relationship between the human face and the display screen of the mobile terminal proposed in the embodiment of the present application;

图12示出了本申请实施例提出的移动终端的一种姿态示意图;FIG. 12 shows a schematic diagram of a posture of a mobile terminal proposed by an embodiment of the present application;

图13示出了本申请实施例提出的拍摄装置的功能模块图;FIG. 13 shows a functional block diagram of the photographing device proposed in the embodiment of the present application;

图14示出了本申请实施例提出的移动终端的一种结构框图;FIG. 14 shows a structural block diagram of a mobile terminal proposed in an embodiment of the present application;

图15示出了本申请实施例提出的移动终端的一种结构图;FIG. 15 shows a structural diagram of a mobile terminal proposed in an embodiment of the present application;

图16示出了本申请实施例的用于执行根据本申请实施例的拍摄方法的移动终端的框图。Fig. 16 shows a block diagram of a mobile terminal for executing the photographing method according to the embodiment of the present application according to the embodiment of the present application.

具体实施方式Detailed ways

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

日常使用手机等移动终端拍摄照片时,往往通过内置的姿态传感器,如陀螺仪和/或加速度传感器来检测手机为横屏还是竖屏,从而确定拍照模式为横屏模式还是竖屏模式,以确定生成照片的方向。When using a mobile terminal such as a mobile phone to take photos on a daily basis, the built-in attitude sensor, such as a gyroscope and/or an acceleration sensor, is often used to detect whether the mobile phone is in landscape or portrait mode, so as to determine whether the photographing mode is landscape mode or portrait mode. The orientation in which to generate the photo.

发明人发现,由于移动终端500姿态传感器只能检测重力方向的夹角,不能有效检测水平方向的夹角,也就是说,只能检测如图1a及图1b所示的移动终端的俯仰角A变化以及如图2a及图2b所示的横滚角B变化,而无法检测如图3所示的移动终端的偏航角C变化,如只能检测移动终端的一端高于另一端,而不能检测移动终端处于水平状态时的角度变化。因此,当用户使用移动终端水平向下拍摄照片时,无法确定移动终端应该为横屏还是竖屏,容易导致拍摄的照片方向错误,影响用户体验。如,用户在如图4中所示的手机水平状态下拍摄物体,用户想要横屏拍摄该物体,但是由于在水平状态下无法确定横屏拍摄还是竖屏拍摄,移动终端可能将拍摄模式处理为竖屏拍摄模式,获得的拍摄照片可能处理为竖屏拍摄的照片。The inventors found that since the attitude sensor 500 of the mobile terminal can only detect the included angle in the direction of gravity, it cannot effectively detect the included angle in the horizontal direction, that is to say, it can only detect the pitch angle A of the mobile terminal as shown in Figure 1a and Figure 1b change and the change of roll angle B shown in Figure 2a and Figure 2b, but it is impossible to detect the change of yaw angle C of the mobile terminal as shown in Figure 3, such as only detecting that one end of the mobile terminal is higher than the other end, but not Detect angle changes when the mobile terminal is in a horizontal state. Therefore, when the user uses the mobile terminal to take photos horizontally, it is impossible to determine whether the mobile terminal should be in landscape or portrait orientation, which will easily lead to wrong orientation of the photos taken and affect user experience. For example, the user shoots an object in the horizontal state of the mobile phone as shown in Figure 4, and the user wants to shoot the object in a horizontal screen, but since it is impossible to determine whether to shoot in a horizontal screen or a vertical screen in a horizontal state, the mobile terminal may process the shooting mode It is a vertical screen shooting mode, and the obtained photos may be processed as photos taken in a vertical screen.

发明人经过研究发现,用户在使用移动终端的后置摄像头拍照时,通常是人脸对着显示屏,观察屏幕中的图片预览,然后调整取景然后点击拍照按钮进行拍照。因此,本申请实施例提供了一种拍摄方法、装置、移动终端及存储介质,可以根据用户对移动终端的使用习惯,确定人脸等目标物体与移动终端之间的位置关系,来确定用户想要横屏拍摄还是竖屏拍摄,准确确定拍摄模式,使生成的照片的方向与移动终端查看方向一致。即横屏查看或者竖屏查看时,拍摄照片方向与手机预览方向一致,例如,用户在横屏模式下拍摄的照片,在竖屏查看时,可以将图片旋转90度后呈现给用户,使照片中目标物体的呈现给用户的方向与拍摄时用户取景的方向一致。The inventor found through research that when a user takes a photo with the rear camera of a mobile terminal, the user usually faces the display screen, observes the picture preview on the screen, then adjusts the viewfinder and then clicks the camera button to take a photo. Therefore, the embodiments of the present application provide a shooting method, device, mobile terminal, and storage medium, which can determine the positional relationship between target objects such as faces and the mobile terminal according to the user's usage habits of the mobile terminal, and determine the user's desired location. Whether to shoot in landscape or portrait mode, accurately determine the shooting mode so that the direction of the generated photo is consistent with the viewing direction of the mobile terminal. That is, when viewing in landscape or portrait mode, the direction of the photo taken is consistent with the preview direction of the mobile phone. For example, the photo taken by the user in landscape mode can be displayed to the user after being rotated 90 degrees when viewing in portrait mode, so that the photo The direction in which the target object is presented to the user is consistent with the direction in which the user frames the view when shooting.

在移动终端中可运行客户端。例如,在本申请中,移动终端中运行的客户端可以是相机。下面将主要从移动终端的客户端,结合附图并通过具体的实施例对本申请实施例提供的拍摄方法及装置进行说明。该移动终端可以是手机、平板电脑或者其他智能设备,本申请主要以手机为例进行说明。The client can be run on the mobile terminal. For example, in this application, the client running on the mobile terminal may be a camera. The photographing method and device provided in the embodiments of the present application will be described below mainly from the client side of the mobile terminal, in conjunction with the accompanying drawings and through specific embodiments. The mobile terminal may be a mobile phone, a tablet computer or other smart devices, and this application mainly uses a mobile phone as an example for illustration.

第一实施例first embodiment

请参阅图5,本申请第一实施例提供了一种拍摄方法。所述拍摄方法用于在根据目标物体移动终端的当前拍摄模式后,在拍摄时以该当前拍摄模式进行拍照。具体的实施例中,所述拍摄方法应用于如图13所示的拍摄装置以及对应有拍摄装置400的移动终端500(图14、图15、图16),该移动终端设置有摄像头510。上述的拍摄方法具体可以包括以下步骤:Referring to FIG. 5 , the first embodiment of the present application provides a shooting method. The shooting method is used to take pictures in the current shooting mode when shooting after moving the terminal according to the current shooting mode of the target object. In a specific embodiment, the shooting method is applied to the shooting device shown in FIG. 13 and the mobile terminal 500 corresponding to the shooting device 400 ( FIG. 14 , FIG. 15 , and FIG. 16 ), and the mobile terminal is provided with a camera 510 . The above-mentioned photographing method may specifically include the following steps:

步骤S110:通过所述摄像头获取目标物体图像。Step S110: Obtain an image of the target object through the camera.

移动终端在摄像头打开,进行拍照或摄像的拍摄模式下,为确定移动终端当前应该为横屏拍摄模式还是竖屏拍摄模式,可以根据摄像头可获取的目标物体的图像判断移动终端当前相对于目标物体的姿态,从而确定拍摄模式。When the mobile terminal is in the shooting mode of taking pictures or videos with the camera turned on, in order to determine whether the mobile terminal should be in the landscape shooting mode or the portrait shooting mode, it can be judged according to the image of the target object that the camera can obtain. attitude to determine the shooting mode.

具体的,可以通过摄像头获取目标物体的图像,作为目标物体图像。该目标物体具体为何种物体并不限定,可以是摄像头可获取的任何图像,或者是摄像头可获取的具有对称性的图像。Specifically, an image of the target object may be acquired through a camera as the image of the target object. What kind of object the target object is specifically is not limited, and may be any image that can be acquired by the camera, or a symmetrical image that can be acquired by the camera.

步骤S120:根据所述目标物体图像中的目标物体与所述移动终端的位置关系,确定当前拍摄模式为横屏模式还是竖屏模式。Step S120: According to the positional relationship between the target object in the target object image and the mobile terminal, determine whether the current shooting mode is a landscape mode or a portrait mode.

目标物体图像中目标物体与移动终端之间的位置关系,可以反映该目标物体本身与移动终端之间的关系,从而反映了当前移动终端进行拍摄的姿态,因此,可以根据目标物体图像中目标物体与移动终端的位置关系,确定移动终端的当前拍摄模式。确定的当前拍摄模式可能是横屏模式或者竖屏模式。The positional relationship between the target object and the mobile terminal in the target object image can reflect the relationship between the target object itself and the mobile terminal, thereby reflecting the current shooting posture of the mobile terminal. Therefore, the target object in the target object image can be The positional relationship with the mobile terminal determines the current shooting mode of the mobile terminal. The determined current shooting mode may be a landscape mode or a portrait mode.

步骤S130:若当接收到拍摄指令时,采用确定后的当前拍摄模式进行拍摄。Step S130: If a shooting instruction is received, use the determined current shooting mode to shoot.

若确定当前拍摄模式为横屏模式,则在接收到拍摄指令后,以横屏拍摄模式进行拍摄;若确定当前拍摄模式为竖屏拍摄模式,则在接收到拍摄指令后,以竖屏拍摄模式进行拍摄。If it is determined that the current shooting mode is landscape mode, after receiving the shooting instruction, shoot in landscape shooting mode; if it is determined that the current shooting mode is portrait shooting mode, then shoot in vertical screen mode after receiving the shooting command to shoot.

可以理解的,在确定当前拍摄模式后,若一直未接收到拍摄指令,在手机姿态改变时,若重新确定的当前拍摄模式不同,则在接收到拍摄指令时,以最新确定的拍摄模式进行拍摄。It can be understood that after the current shooting mode is determined, if no shooting instruction has been received, when the posture of the mobile phone changes, if the re-determined current shooting mode is different, when the shooting instruction is received, the shooting will be performed in the latest determined shooting mode .

本申请实施例中,可以根据目标物体图像中目标物体与移动终端之间的位置关系确定当前拍摄模式,以在接收到拍摄指令时,根据该当前拍摄模式进行拍摄,有效应对通过姿态传感器无法确定移动终端对应横屏状态还是竖屏状态的情况,提高用户拍照体验。In the embodiment of the present application, the current shooting mode can be determined according to the positional relationship between the target object and the mobile terminal in the target object image, so that when a shooting instruction is received, shooting is carried out according to the current shooting mode, effectively dealing with situations that cannot be determined by the attitude sensor. The mobile terminal corresponds to the horizontal screen state or the vertical screen state, so as to improve the user's photo taking experience.

第二实施例second embodiment

本申请实施例提供了一种拍摄方法,主要以人脸作为目标物体确定当前拍摄模式。由于移动终端在非水平状态下时,可以借助姿态传感器确定横屏还是竖屏,因此,在本申请实施例可以主要用于确定水平状态下移动终端的当前拍摄模式。具体的,请参见图6,该方法包括:An embodiment of the present application provides a shooting method, which mainly uses a human face as a target object to determine a current shooting mode. Since when the mobile terminal is in a non-horizontal state, the posture sensor can be used to determine whether the screen is in landscape or portrait mode. Therefore, this embodiment of the present application can be mainly used to determine the current shooting mode of the mobile terminal in the horizontal state. Specifically, please refer to Figure 6, the method includes:

步骤S210:根据移动终端的姿态判断所述移动终端当前是水平状态还是竖直状态。若是水平状态,执行步骤S220;若是竖直状态,执行步骤S250。Step S210: judging whether the mobile terminal is currently in a horizontal state or a vertical state according to the posture of the mobile terminal. If it is in the horizontal state, execute step S220; if it is in the vertical state, execute step S250.

在摄像机打开的情况下,可以判定移动终端的姿态,具体可以通过移动终端的姿态传感器进行判断,姿态传感器具体为哪些在本申请实施例中并不限定,如可以是加速度计和/或陀螺仪等。When the camera is turned on, the attitude of the mobile terminal can be determined. Specifically, the attitude sensor of the mobile terminal can be used for determination. The specific attitude sensors are not limited in this embodiment of the application, such as accelerometers and/or gyroscopes Wait.

可以理解的,移动终端处于水平状态并不一定限定为严格的水平状态,而是可以与水平面具有一定夹角的状态均可以定义为水平状态。该移动终端与水平面之间夹角可以是如图1所示的俯仰角,或者如图2所示的横滚角。It can be understood that the horizontal state of the mobile terminal is not necessarily limited to the strictly horizontal state, but any state that has a certain angle with the horizontal plane can be defined as the horizontal state. The angle between the mobile terminal and the horizontal plane may be a pitch angle as shown in FIG. 1 , or a roll angle as shown in FIG. 2 .

具体的,确定移动终端是处于水平状态还是竖直状态可以是,判断移动终端的显示屏幕与竖直方向的夹角是否在预设角度范围内;若是,则判定移动终端的姿态为水平状态,若否,则判定移动终端的姿态为竖直状态。或者说,判断显示屏幕与水平面之间的夹角大小,根据该夹角大小确定移动终端是否处于水平状态,如图1中角A的值在预设范围内时,判断移动终端为水平状态。其中,显示屏幕与竖直方向的夹角可以是如图1所示的角D,该预设角度范围在本申请实施例中并不限定,可以根据实际情况设定,例如,该预设角度范围可以是60度到120度之间。Specifically, determining whether the mobile terminal is in a horizontal state or a vertical state may be to determine whether the angle between the display screen of the mobile terminal and the vertical direction is within a preset angle range; if so, then determine that the posture of the mobile terminal is in a horizontal state, If not, it is determined that the posture of the mobile terminal is in a vertical state. In other words, determine the angle between the display screen and the horizontal plane, and determine whether the mobile terminal is in a horizontal state according to the angle. For example, when the value of angle A in Figure 1 is within a preset range, it is determined that the mobile terminal is in a horizontal state. Wherein, the included angle between the display screen and the vertical direction may be an angle D as shown in FIG. The range can be between 60 degrees and 120 degrees.

步骤S220:通过所述摄像头获取目标物体图像。Step S220: Obtain an image of the target object through the camera.

由于用户在使用手机摄像头拍照时,为了查看拍摄效果,通常是用户的人脸对着显示屏,观察屏幕中的图片预览,然后调整取景,取景确定点击拍照按钮进行拍照。在拍摄时,用户的人脸与移动终端之间具有位置关系,因此,可以以用户的人脸作为目标物体,通过移动终端的前置摄像头获取拍摄用户的人脸图像作为目标物体图像,根据目标物体图像中的人脸确定当前拍摄模式。Because when the user uses the mobile phone camera to take pictures, in order to check the shooting effect, the user usually faces the display screen, observes the picture preview on the screen, and then adjusts the viewfinder. After the viewfinder is determined, click the camera button to take a photo. When shooting, there is a positional relationship between the user's face and the mobile terminal. Therefore, the user's face can be used as the target object, and the user's face image can be captured through the front camera of the mobile terminal as the target object image. The faces in the subject image determine the current capture mode.

步骤S230:根据所述目标物体图像中的目标物体与所述移动终端的位置关系,确定当前拍摄模式为横屏模式还是竖屏模式。Step S230: According to the positional relationship between the target object in the target object image and the mobile terminal, determine whether the current shooting mode is a landscape mode or a portrait mode.

在用户通过移动终端进行拍摄时,若其面部更偏向横屏方向,则用户在进行横屏拍摄的可能性更高,若其面部偏向竖屏方向,则用户在进行竖屏拍摄的可能性更高,因此,可以根据目标物体图像中人脸偏向确定拍摄模式为横屏模式还是竖屏模式。其中,通常的,竖屏方向定义为如图7所示的移动终端的顶端a与低端a’之间的连接线aa’所在方向,即顶端a到低端a’所在方向或者低端a’到顶端a所在方向;横屏方向定义为连接顶端到低端的两个侧端的连接线 bb’所在方向,如图8所示。当然,横屏方向以及竖屏方向并不限定,以移动终端中横屏拍摄以及竖屏拍摄时分别对应的方向为准。When a user takes a picture through a mobile terminal, if the user's face is more inclined towards the landscape orientation, the user is more likely to be shooting in the landscape orientation; High, therefore, it can be determined whether the shooting mode is landscape mode or portrait mode according to the bias of the face in the image of the target object. Wherein, generally, the vertical screen direction is defined as the direction of the connection line aa' between the top a and the bottom a' of the mobile terminal as shown in Figure 7, that is, the direction from the top a to the bottom a' or the direction of the bottom a ' to the direction of the top a; the horizontal screen direction is defined as the direction of the connecting line bb' connecting the two side ends from the top to the bottom, as shown in FIG. 8 . Certainly, the horizontal screen direction and the vertical screen direction are not limited, and the directions corresponding to the horizontal screen shooting and the vertical screen shooting in the mobile terminal shall prevail.

在根据人脸确定拍摄模式时,可以判断所述人脸偏向横屏方向还是竖屏方向;若偏向横屏方向,确定当前拍摄模式为横屏模式,若偏向竖屏方向,确定当前拍摄模式为竖屏模式。When determining the shooting mode according to the face, it can be judged whether the face is in the landscape orientation or in the portrait orientation; if it is in the landscape direction, determine that the current shooting mode is landscape mode; if it is in the portrait orientation, determine that the current shooting mode is Portrait mode.

其中,判断人脸更偏向横屏方向还是竖屏方向时,可以根据人脸的五官特征进行判定。例如,根据人脸五官特征获取所述人脸中的特征线;根据特征线与移动终端之间的关系,确定人脸偏向横屏方向还是竖屏方向。如根据特征线与横屏方向或者竖屏方向之间的夹角确定人脸偏向。Among them, when judging whether the face is more inclined to the landscape orientation or the portrait orientation, the judgment can be made according to the facial features of the face. For example, the feature lines in the face are acquired according to the five sense features of the face; according to the relationship between the feature lines and the mobile terminal, it is determined whether the face is in a landscape orientation or a portrait orientation. For example, the face orientation is determined according to the angle between the feature line and the horizontal or vertical screen direction.

作为一种具体的实施方式,确定的特征线可以是人脸的中心轴线,即人脸的左脸与右脸的分割线,如图9中人脸的中心轴线T所示。其中,中心轴线的确定方式在本申请实施例中并不限定,如可以根据采集到的人脸图像中的发际线、眉心、鼻翼下缘或下巴尖等人脸特征判断出人脸的中心轴线。As a specific implementation manner, the determined feature line may be the central axis of the human face, that is, the dividing line between the left face and the right face of the human face, as shown in the central axis T of the human face in FIG. 9 . The method of determining the central axis is not limited in the embodiment of the present application. For example, the center of a human face can be determined according to facial features such as the hairline, eyebrow center, lower edge of the nose alar or chin tip in the collected facial images. axis.

再根据中心轴线与移动终端之间的位置关系确定人脸偏向。例如,可以计算所述中心轴线与横屏方向的夹角为第一夹角E,计算所述中心轴线与竖屏方向的夹角为第二夹角E’,如图10所示。若所述第一夹角大于所述第二夹角,判定所述人脸偏向竖屏方向;若所述第二夹角大于所述第二夹角,判定所述人脸偏向横屏方向。若第一夹角等于第二夹角,可以判定偏向横屏方向,也可以判定偏向竖屏方向,或者是,判定为在第一夹角等于第二夹角之前所确定的偏向,在本申请实施例中并不限定,可以根据需要设置。当然,在根据中心轴线判断人脸偏向时,若第一夹角大于45度,可以判定人脸偏向竖屏方向,若小于45度,可以判定人脸偏向横屏方向。Then, the face orientation is determined according to the positional relationship between the central axis and the mobile terminal. For example, the included angle between the central axis and the horizontal screen direction can be calculated as the first included angle E, and the included angle between the central axis and the vertical screen direction can be calculated as the second included angle E', as shown in FIG. 10 . If the first included angle is greater than the second included angle, it is determined that the human face is in a portrait orientation; if the second included angle is greater than the second included angle, it is determined that the human face is in a landscape orientation. If the first included angle is equal to the second included angle, it can be judged to be biased towards the horizontal screen direction, or it can be judged to be biased toward the vertical screen direction, or it can be judged to be the deflection determined before the first included angle is equal to the second included angle. In this application It is not limited in the embodiment, and can be set as required. Of course, when judging the orientation of the face according to the central axis, if the first included angle is greater than 45 degrees, it can be determined that the face is biased toward the portrait orientation, and if it is less than 45 degrees, it can be determined that the face is deflected to the landscape orientation.

当然,确定的特征线也可以是其他,如可以是与中心轴线垂直的线等。作为另一种具体的实施方式,确定的特征线可以是人脸图像的两眼之间的连线,如图11中连线T’。其中,获取所述人脸的两眼之间的连线可以是,首先获取人脸图像中两眼所在位置,再根据人眼特征,确定两眼之间的连续。根据两眼之间连线确定人脸偏向时,可以计算所述两眼之间的连线与横屏方向的夹角为第三夹角F,计算所述两眼之间的连线与竖屏方向的夹角为第四夹角F’,如图 11所示。若所述第三夹角大于所述第四夹角,判定所述人脸偏向横屏方向;若所述第四夹角大于所述第三夹角,判定所述人脸偏向竖屏方向。另外,若第三夹角等于第四夹角,可以判定偏向横屏方向,也可以判定偏向竖屏方向,或者是,判定为在第三夹角等于第四夹角之前所确定的偏向。Certainly, the determined feature line may also be other, for example, it may be a line perpendicular to the central axis. As another specific implementation manner, the determined feature line may be a connection line between two eyes of a face image, such as connection T' in FIG. 11 . Wherein, obtaining the connection line between the two eyes of the human face may be, first obtaining the positions of the two eyes in the human face image, and then determining the continuity between the two eyes according to the characteristics of the human eyes. When determining the face orientation according to the connection line between the two eyes, the angle between the connection line between the two eyes and the horizontal screen direction can be calculated as the third angle F, and the connection line between the two eyes and the vertical direction can be calculated as the third angle F. The included angle in the screen direction is the fourth included angle F', as shown in FIG. 11 . If the third included angle is greater than the fourth included angle, it is determined that the human face is biased in a landscape direction; if the fourth included angle is greater than the third included angle, it is determined that the human face is biased in a vertical screen direction. In addition, if the third included angle is equal to the fourth included angle, it may be determined that the orientation is in the landscape orientation, or it may be determined that the orientation is in the portrait orientation, or it may be determined as the orientation determined before the third included angle is equal to the fourth included angle.

可选的,在本申请实施例中,人脸识别部分也可以包括3D结构光人脸识别,采用3D结构光也可以准确识别人脸的轴线方向。Optionally, in this embodiment of the present application, the face recognition part may also include 3D structured light face recognition, and the axis direction of the face can also be accurately recognized by using 3D structured light.

步骤S240:当接收到拍摄指令时,采用确定后的当前拍摄模式进行拍摄。Step S240: When a shooting instruction is received, use the determined current shooting mode to shoot.

在接收到拍摄指令时,若当前拍摄模式为横屏模式,则拍摄横屏照片,移动终端为横屏预览,此时拍摄的照片方向与横屏预览相同;若当前拍摄模式为竖屏模式,则拍摄竖屏照片,移动终端为竖屏预览,此时拍摄的照片方向与竖屏预览相同。When receiving a shooting instruction, if the current shooting mode is landscape mode, take a landscape photo, and the mobile terminal is a landscape preview, and the direction of the photo taken at this time is the same as that of the landscape preview; if the current shooting mode is portrait mode, Then take a vertical screen photo, and the mobile terminal is a vertical screen preview, and the direction of the photo taken at this time is the same as that of the vertical screen preview.

步骤S250:根据移动终端的姿态确定当前拍摄模式。Step S250: Determine the current shooting mode according to the posture of the mobile terminal.

若移动终端处于竖直状态,可以通过姿态传感器确定的移动终端姿态确定拍摄模式。例如,当顶端或低端高于其他端时,确定为竖屏拍摄模式;当一个侧端高于其他端时,确定为横屏拍摄模式。If the mobile terminal is in a vertical state, the shooting mode can be determined according to the posture of the mobile terminal determined by the posture sensor. For example, when the top or bottom end is higher than the other ends, it is determined to be a portrait shooting mode; when one side end is higher than the other ends, it is determined to be a landscape shooting mode.

综上所述,本申请实施例中,可以根据移动终端的姿态确定移动终端是处于水平状态还是竖直状态,若在水平状态,则可以根据拍摄者的人脸与移动终端之间的位置关系确定当前拍摄模式为横屏模式还是竖屏模式。从而可以使得在水平拍摄时能够根据用户实际的预览方向来设置拍摄照片的方向,不会出现用户拍摄得到的照片方向与用户期望的照片方向旋转90°的问题。不会对用户使用照片带来不必要的麻烦,方便用户使用。To sum up, in the embodiment of this application, it can be determined according to the posture of the mobile terminal whether the mobile terminal is in a horizontal state or a vertical state. If it is in a horizontal state, it can be determined according to the positional relationship between the photographer's face and the mobile terminal. Determine whether the current shooting mode is landscape mode or portrait mode. Therefore, when shooting horizontally, the direction of taking photos can be set according to the user's actual preview direction, and there will be no problem that the direction of the photo taken by the user is rotated by 90° from the direction of the user's desired photo. It will not bring unnecessary trouble to the user to use the photos, and it is convenient for the user to use.

第三实施例third embodiment

本申请实施例提供了通过前述拍摄方法拍摄时的一种具体实施过程。在本申请实施例中,确定手机坐标系,假设手机放在其默认的方向上为图 7所示,手机坐标系的X轴是水平指向右的,Y轴是垂直向上的,Z轴是指向屏幕正面之外的,即屏幕背面是Z的负值。The embodiment of the present application provides a specific implementation process when shooting by the aforementioned shooting method. In the embodiment of this application, determine the coordinate system of the mobile phone, assuming that the mobile phone is placed in its default direction as shown in Figure 7, the X axis of the mobile phone coordinate system is horizontally pointing to the right, the Y axis is vertically upward, and the Z axis is pointing Outside the front of the screen, that is, the back of the screen is a negative value of Z.

当用户使用手机,手机发生运动或者旋转的时候,手机坐标系中坐标轴是不会改变的,即它们是跟随手机的。在手机发送运动或旋转后,可以确定其手机坐标系相对默认方向时,各坐标轴的变化角度,图12为使用手机内置陀螺仪检测到的手机重心与预定的X,Y,Z轴的夹角示意图,定义 X,Y及Z轴对应夹角分别为Rx,Ry,Rz。在用户打开后置相机预览时,通过手机内置的姿态传感器检测重心偏离默认方向的Z轴、靠近X轴和Y轴的角度Rx,Ry,Rz。设定A为角度余量,A的大小并不限定,可以根据实际调试效果来进行调整。例如,A的取值可以在0°-30°之间。当检测到|Rz-90°|>90°-A时,判定手机处于竖直状态,如果|Ry-90°|> |Rx-90°|,则判断手机为竖屏放置,拍照产生的照片方向与竖屏预览相同;如果|Ry-90°|<=|Rx-90°|,则判断手机为横屏放置,拍照产生的照片方向与横屏预览相同。当检测到|Rz-90°|<=90°-A时,判定手机为水平放置,此时,手机打开前置摄像头进行人脸识别图像采集。When the user uses the mobile phone and the mobile phone moves or rotates, the coordinate axes in the mobile phone coordinate system will not change, that is, they follow the mobile phone. After the mobile phone sends motion or rotation, the change angle of each coordinate axis can be determined when the mobile phone coordinate system is relative to the default direction. Figure 12 shows the center of gravity of the mobile phone detected by the built-in gyroscope of the mobile phone and the predetermined X, Y, Z axes. Angle schematic diagram, define the corresponding angles of X, Y and Z axes as Rx, Ry, Rz respectively. When the user opens the rear camera preview, the built-in attitude sensor of the mobile phone detects the angles Rx, Ry, and Rz of the Z axis where the center of gravity deviates from the default direction, and the angles Rx, Ry, and Rz that are close to the X axis and the Y axis. Set A as the angle margin. The size of A is not limited and can be adjusted according to the actual debugging effect. For example, the value of A may be between 0°-30°. When |Rz-90°|>90°-A is detected, it is determined that the mobile phone is in a vertical state, and if |Ry-90°|> |Rx-90°|, it is determined that the mobile phone is placed vertically, and the photo generated by taking pictures The orientation is the same as that of the portrait preview; if |Ry-90°|<=|Rx-90°|, it is judged that the mobile phone is placed in landscape orientation, and the direction of the photo generated by taking a photo is the same as that of the landscape preview. When |Rz-90°|<=90°-A is detected, it is determined that the mobile phone is placed horizontally. At this time, the mobile phone turns on the front camera to collect face recognition images.

人脸识别可以主要根据采集到的人脸图像中的发际线、眉心、鼻翼下缘、下巴尖等人脸特征判断出人脸的中心轴线。然后再比较人脸中心轴线与手机的X和Y轴线的夹角。当判断中心轴线与X轴的夹角大于中心轴线与Y轴的夹角时,判断手机为水平位置竖屏预览,此时拍摄的照片方向与竖屏预览相同。反之,当判断中心轴线与Y轴的夹角不小于中心轴线与X 轴的夹角时,判断手机为水平横屏预览,此时拍摄的照片方向与横屏预览相同。Face recognition can determine the central axis of the face mainly based on facial features such as the hairline, brow center, lower edge of the nose, and tip of the chin in the collected face images. Then compare the angle between the central axis of the face and the X and Y axes of the mobile phone. When it is determined that the angle between the central axis and the X axis is greater than the angle between the central axis and the Y axis, it is determined that the mobile phone is in a horizontal position and a vertical screen preview, and the direction of the photo taken at this time is the same as that of the vertical screen preview. Conversely, when it is determined that the angle between the central axis and the Y axis is not smaller than the angle between the central axis and the X axis, it is determined that the mobile phone is a horizontal landscape preview, and the direction of the photo taken at this time is the same as that of the landscape preview.

本申请实施例中,在内置加速度/陀螺仪传感器等姿态传感器下检测到手机拍摄位置为水平向下拍摄时,可以通过前置摄像头采集人脸图像,判断人脸与手机屏幕纵向轴线的角度,进而调整手机拍摄照片的方向,使得手机拍摄照片方向与手机预览方向一致。In the embodiment of the present application, when the attitude sensor such as the built-in acceleration/gyroscope sensor detects that the shooting position of the mobile phone is horizontally downward shooting, the face image can be collected through the front camera, and the angle between the face and the longitudinal axis of the mobile phone screen can be judged. Then adjust the direction of the mobile phone to take the photo, so that the direction of the mobile phone to take the photo is consistent with the direction of the preview of the mobile phone.

第四实施例Fourth embodiment

本申请实施例提供了一种拍摄装置400,如图13所示,该装置包括图像获取模块410,用于通过所述摄像头获取目标物体图像;拍摄模式确定模块 420,用于根据所述目标物体图像中的目标物体与所述移动终端的位置关系,确定当前拍摄模式为横屏模式还是竖屏模式;拍摄模块430,用于当接收到拍摄指令时,采用确定后的当前拍摄模式进行拍摄。The embodiment of the present application provides a shooting device 400. As shown in FIG. 13, the device includes an image acquisition module 410 for acquiring an image of a target object through the camera; a shooting mode determination module 420 for The positional relationship between the target object in the image and the mobile terminal determines whether the current shooting mode is landscape mode or portrait mode; the shooting module 430 is configured to use the determined current shooting mode to shoot when receiving a shooting instruction.

可选的,如图13所示,所示装置400还包括姿态判断模块440,用于根据移动终端的姿态判断所述移动终端当前是水平状态还是竖直状态;若是水平状态,图像获取模块410,用于通过所述摄像头获取目标物体图像。Optionally, as shown in FIG. 13 , the shown device 400 also includes a posture judging module 440, which is used to judge whether the mobile terminal is currently in a horizontal state or a vertical state according to the posture of the mobile terminal; if it is in a horizontal state, the image acquisition module 410 , used to acquire the image of the target object through the camera.

可选的,姿态判断模块440可以判断移动终端的显示屏幕与竖直方向的夹角是否在预设角度范围内;若是,则判定移动终端的姿态为水平状态,若否,则判定移动终端的姿态为竖直状态。Optionally, the posture judging module 440 can judge whether the included angle between the display screen of the mobile terminal and the vertical direction is within a preset angle range; if so, then judge that the posture of the mobile terminal is in a horizontal state; The posture is vertical.

可选的,所述目标物体可以为人脸,拍摄模式确定模块420可以判断所述人脸偏向横屏方向还是竖屏方向;若偏向横屏方向,确定当前拍摄模式为横屏模式,若偏向竖屏方向,确定当前拍摄模式为竖屏模式。Optionally, the target object can be a human face, and the shooting mode determination module 420 can determine whether the human face is in a landscape orientation or a portrait orientation; if it is in a landscape orientation, determine that the current shooting mode is a landscape mode; Screen orientation, confirm that the current shooting mode is portrait mode.

具体的,拍摄模式确定模块420可以根据人脸五官特征获取所述人脸中的特征线;根据所述特征线与所述移动终端横屏方向或者竖屏方向之间的夹角,确定所述人脸偏向横屏方向还是竖屏方向。Specifically, the shooting mode determination module 420 can obtain the feature line in the face according to the facial features; according to the angle between the feature line and the horizontal or vertical screen direction of the mobile terminal, determine the Whether the face is in landscape orientation or portrait orientation.

其中,所述特征线可以为中心轴线,拍摄模式确定模块420可以计算所述中心轴线与横屏方向的夹角为第一夹角,计算所述中心轴线与竖屏方向的夹角为第二夹角;若所述第一夹角大于所述第二夹角,判定所述人脸偏向竖屏方向,若所述第二夹角大于所述第二夹角,判定所述人脸偏向横屏方向。Wherein, the feature line may be a central axis, and the shooting mode determination module 420 may calculate the included angle between the central axis and the horizontal screen direction as the first included angle, and calculate the included angle between the central axis and the vertical screen direction as the second included angle. included angle; if the first included angle is greater than the second included angle, it is determined that the face is biased toward the vertical orientation; screen orientation.

或者,拍摄模式确定模块420可以用于获取所述人脸的两眼之间的连线;计算所述两眼之间的连线与横屏方向的夹角为第三夹角,计算所述两眼之间的连线与竖屏方向的夹角为第四夹角;若所述第三夹角大于所述第四夹角,判定所述人脸偏向横屏方向,若所述第四夹角大于所述第三夹角,判定所述人脸偏向竖屏方向。Alternatively, the shooting mode determination module 420 may be used to obtain the line between the two eyes of the human face; calculate the angle between the line between the two eyes and the horizontal screen direction as the third angle, and calculate the The angle between the line connecting the two eyes and the vertical screen direction is the fourth included angle; if the third included angle is greater than the fourth included angle, it is determined that the face is biased toward the horizontal screen direction; if the fourth included angle If the included angle is greater than the third included angle, it is determined that the human face is in a vertical orientation.

第五实施例fifth embodiment

请再次参阅图14,基于上述的拍摄方法及装置,本申请实施例还提供一种移动终端500。如图14所示,该移动终端500包括显示屏120、存储器 104及处理器102,所述显示屏120及所述存储器104耦接到所述处理器102,所述显示屏120用于显示图像,所述存储器104存储指令,当所述指令由所述处理器102执行时所述处理器102执行上述第一实施例以及第二实施例所述的方法。Please refer to FIG. 14 again. Based on the above-mentioned photographing method and device, the embodiment of the present application further provides a mobile terminal 500 . As shown in Figure 14, this mobile terminal 500 comprises display screen 120, memory 104 and processor 102, and described display screen 120 and described memory 104 are coupled to described processor 102, and described display screen 120 is used for displaying image , the memory 104 stores instructions, and when the instructions are executed by the processor 102, the processor 102 executes the methods described in the first embodiment and the second embodiment above.

具体的,如图15所示,该移动终端500可以包括电子本体部10,所述电子本体部10包括壳体12及设置在所述壳体12上的显示屏120。所述壳体12可采用金属、如钢材、铝合金制成。本实施例中,所述显示屏120 通常包括显示面板111,也可包括用于响应对所述显示面板111进行触控操作的电路等。所述显示面板111可以为一个液晶显示面板(LiquidCrystal Display,LCD),在一些实施例中,所述显示面板111同时为一个触摸屏109。本实施例中图像可以是在该显示屏120显示。Specifically, as shown in FIG. 15 , the mobile terminal 500 may include an electronic body part 10 , and the electronic body part 10 includes a housing 12 and a display screen 120 disposed on the housing 12 . The housing 12 can be made of metal, such as steel or aluminum alloy. In this embodiment, the display screen 120 generally includes a display panel 111 , and may also include a circuit for responding to a touch operation on the display panel 111 . The display panel 111 may be a liquid crystal display panel (Liquid Crystal Display, LCD), and in some embodiments, the display panel 111 is also a touch screen 109 . In this embodiment, images may be displayed on the display screen 120 .

请同时参阅图16,在实际的应用场景中,所述移动终端500可作为智能手机终端进行使用,在这种情况下所述电子本体部10通常还包括一个或多个(图中仅示出一个)处理器102、存储器104、RF(Radio Frequency,射频)模块106、音频电路110、传感器114、输入模块118、电源模块122。本领域普通技术人员可以理解,图16所示的结构仅为示意,其并不对所述电子本体部10的结构造成限定。例如,所述电子本体部10还可包括比图 16中所示更多或者更少的组件,或者具有与图16所示不同的对应。Please also refer to FIG. 16. In an actual application scenario, the mobile terminal 500 can be used as a smart phone terminal. In this case, the electronic main body 10 usually includes one or more (only shown in the figure a) A processor 102 , a memory 104 , an RF (Radio Frequency, radio frequency) module 106 , an audio circuit 110 , a sensor 114 , an input module 118 , and a power module 122 . Those skilled in the art can understand that the structure shown in FIG. 16 is only a schematic diagram, which does not limit the structure of the electronic body part 10 . For example, the electronic body part 10 may also include more or fewer components than those shown in FIG. 16 , or have a different correspondence from that shown in FIG. 16 .

本领域普通技术人员可以理解,相对于所述处理器102来说,所有其他的组件均属于外设,所述处理器102与这些外设之间通过多个外设接口 124相耦合。所述外设接口124可基于以下标准实现:通用异步接收/发送装置(Universal Asynchronous Receiver/Transmitter,UART)、通用输入/ 输出(General Purpose Input Output,GPIO)、串行外设接口(Serial Peripheral Interface,SPI)、内部集成电路(Inter-Integrated Circuit,I2C),但不并限于上述标准。在一些实例中,所述外设接口124可仅包括总线;在另一些实例中,所述外设接口124还可包括其他元件,如一个或者多个控制器,例如用于连接所述显示面板111的显示控制器或者用于连接存储器的存储控制器。此外,这些控制器还可以从所述外设接口124中脱离出来,而集成于所述处理器102内或者相应的外设内。Those skilled in the art can understand that, relative to the processor 102, all other components belong to peripherals, and the processor 102 is coupled to these peripherals through a plurality of peripheral interfaces 124. The peripheral interface 124 can be implemented based on the following standards: Universal Asynchronous Receiver/Transmitter (UART), General Purpose Input Output (GPIO), Serial Peripheral Interface (Serial Peripheral Interface) , SPI), inter-integrated circuit (Inter-Integrated Circuit, I2C), but not limited to the above standards. In some examples, the peripheral interface 124 may only include a bus; in other examples, the peripheral interface 124 may also include other components, such as one or more controllers, for example for connecting the display panel 111 display controller or memory controller for connecting memory. In addition, these controllers can also be separated from the peripheral interface 124 and integrated in the processor 102 or corresponding peripherals.

所述存储器104可用于存储软件程序以及模块,所述处理器102通过运行存储在所述存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理。所述存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,所述存储器104可进一步包括相对于所述处理器102远程设置的存储器,这些远程存储器可以通过网络连接至所述电子本体部10或所述显示屏120。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104 . The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory that is remotely located relative to the processor 102 , and these remote memories may be connected to the electronic main body 10 or the display screen 120 through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

所述RF模块106用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯。所述RF模块106可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。所述RF模块106可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。上述的无线网络可以使用各种通信标准、协议及技术,包括但并不限于全球移动通信系统(Global System for Mobile Communication,GSM)、增强型移动通信技术(Enhanced Data GSM Environment,EDGE),宽带码分多址技术(wideband codedivision multiple access,W-CDMA),码分多址技术(Code division access,CDMA)、时分多址技术(time division multiple access,TDMA),无线保真技术 (Wireless,Fidelity,WiFi)(如美国电气和电子工程师协会标准IEEE 802.10A,IEEE 802.11b,IEEE802.11g和/或IEEE 802.11n)、网络电话 (Voice over internet protocal,VoIP)、全球微波互联接入(Worldwide Interoperability for Microwave Access,Wi-Max)、其他用于邮件、即时通讯及短消息的协议,以及任何其他合适的通讯协议,甚至可包括那些当前仍未被开发出来的协议。The RF module 106 is used to receive and send electromagnetic waves, realize mutual conversion between electromagnetic waves and electrical signals, and communicate with communication networks or other devices. The RF module 106 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption/decryption chips, Subscriber Identity Module (SIM) cards, memory, etc. . The RF module 106 can communicate with various networks such as the Internet, intranet, wireless network or communicate with other devices through the wireless network. The wireless network mentioned above may include a cellular telephone network, a wireless local area network or a metropolitan area network. The above-mentioned wireless network can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), wideband code Division multiple access technology (wideband code division multiple access, W-CDMA), code division multiple access technology (Code division access, CDMA), time division multiple access technology (time division multiple access, TDMA), wireless fidelity technology (Wireless, Fidelity, WiFi) (such as IEEE 802.10A, IEEE 802.11b, IEEE802.11g and/or IEEE 802.11n), VoIP (Voice over internet protocal, VoIP), Worldwide Interoperability for Microwave Access, Wi-Max), other protocols for mail, instant messaging, and short messages, and any other suitable communication protocols, even those that have not yet been developed.

音频电路110、扬声器101、传声器103、麦克风105共同提供用户与所述电子本体部10或所述显示屏120之间的音频接口。The audio circuit 110 , the speaker 101 , the microphone 103 , and the microphone 105 jointly provide an audio interface between the user and the electronic main body 10 or the display screen 120 .

所述传感器114设置在所述电子本体部10内或所述显示屏120内,所述传感器114的实例包括但并不限于:加速度传感器114F、陀螺仪114G、磁力计114H以及其他传感器。The sensor 114 is disposed in the electronic main body 10 or the display screen 120 , examples of the sensor 114 include but not limited to: an acceleration sensor 114F, a gyroscope 114G, a magnetometer 114H and other sensors.

本实施例中,所述输入模块118可包括设置在所述显示屏120上的所述触摸屏109,所述触摸屏109可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在所述触摸屏109上或在所述触摸屏109附近的操作),从而可以获得用户的触摸手势,并根据预先设定的程序驱动相应的连接装置,因此,用户可以通过在显示屏的触控操作选定目标区域。可选的,所述触摸屏109可包括触摸检测装置和触摸控制器。其中,所述触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给所述触摸控制器;所述触摸控制器从所述触摸检测装置上接收触摸信息,并将该触摸信息转换成触点坐标,再送给所述处理器102,并能接收所述处理器102发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现所述触摸屏 109的触摸检测功能。除了所述触摸屏109,在其它变更实施方式中,所述输入模块118还可以包括其他输入设备,如按键107。所述按键107例如可包括用于输入字符的字符按键,以及用于触发控制功能的控制按键。所述控制按键的实例包括“返回主屏”按键、开机/关机按键等等。In this embodiment, the input module 118 may include the touch screen 109 arranged on the display screen 120, and the touch screen 109 may collect touch operations of the user on or near it (for example, the user uses a finger, a stylus, etc. Any suitable object or accessory on the touch screen 109 or near the touch screen 109), so that the user's touch gesture can be obtained, and the corresponding connection device can be driven according to the preset program. Therefore, the user can The touch operation of the display screen selects the target area. Optionally, the touch screen 109 may include a touch detection device and a touch controller. Wherein, 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, and The touch information is converted into touch point coordinates, and then sent to the processor 102, and can receive and execute commands sent by the processor 102. In addition, the touch detection function of the touch screen 109 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch screen 109 , in other modified implementation manners, the input module 118 may also include other input devices, such as keys 107 . The keys 107 may include, for example, character keys for inputting characters, and control keys for triggering control functions. Examples of the control buttons include a "return to main screen" button, a power on/off button, and the like.

所述显示屏120用于显示由用户输入的信息、提供给用户的信息以及所述电子本体部10的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、数字、视频和其任意组合来构成。在一个实例中,所述触摸屏109可设置于所述显示面板111上从而与所述显示面板111构成一个整体。The display screen 120 is used to display information input by the user, information provided to the user, and various graphical user interfaces of the electronic main body 10. These graphical user interfaces can be composed of graphics, text, icons, numbers, videos and other any combination to form. In one example, the touch screen 109 can be disposed on the display panel 111 so as to form an integral body with the display panel 111 .

所述电源模块122用于向所述处理器102以及其他各组件提供电力供应。具体地,所述电源模块122可包括电源管理系统、一个或多个电源(如电池或者交流电)、充电电路、电源失效检测电路、逆变器、电源状态指示灯以及其他任意与所述电子本体部10或所述显示屏120内电力的生成、管理及分布相关的组件。The power module 122 is used to provide power supply to the processor 102 and other components. Specifically, the power module 122 may include a power management system, one or more power sources (such as batteries or alternating current), a charging circuit, a power failure detection circuit, an inverter, a power status indicator light, and any other components related to the electronic body. Components related to the generation, management and distribution of power in the unit 10 or the display screen 120 .

所述移动终端500还包括定位器119,所述定位器119用于确定所述移动终端500所处的实际位置。本实施例中,所述定位器119采用定位服务来实现所述移动终端500的定位,所述定位服务,应当理解为通过特定的定位技术来获取所述移动终端500的位置信息(如经纬度坐标),在电子地图上标出被定位对象的位置的技术或服务。The mobile terminal 500 further includes a locator 119, and the locator 119 is used to determine the actual location of the mobile terminal 500. In this embodiment, the locator 119 uses a positioning service to realize the positioning of the mobile terminal 500. The positioning service should be understood as obtaining the position information (such as longitude and latitude coordinates) of the mobile terminal 500 through a specific positioning technology. ), a technology or service that marks the position of a positioned object on an electronic map.

应当理解的是,上述的移动终端500并不局限于智能手机终端,其应当指可以在移动中使用的计算机设备。具体而言,移动终端500,是指搭载了智能操作系统的移动计算机设备,移动终端500包括但不限于智能手机、智能手表、平板电脑,等等。It should be understood that the above-mentioned mobile terminal 500 is not limited to a smart phone terminal, but refers to a computer device that can be used on the move. Specifically, the mobile terminal 500 refers to a mobile computer device equipped with an intelligent operating system, and the mobile terminal 500 includes but is not limited to a smart phone, a smart watch, a tablet computer, and the like.

需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。对于方法实施例中的所描述的任意的处理方式,在装置实施例中均可以通过相应的处理模块实现,装置实施例中不再一一赘述。It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts in each embodiment, refer to each other, that is, Can. As for the device-type embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for related parts, please refer to part of the description of the method embodiments. Any of the processing methods described in the method embodiments can be implemented by corresponding processing modules in the device embodiments, and details will not be repeated in the device embodiments.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present application, "plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments or portions of code comprising one or more executable instructions for implementing specific logical functions or steps of the process , and the scope of preferred embodiments of the present application includes additional implementations in which functions may be performed out of the order shown or discussed, including in substantially simultaneous fashion or in reverse order depending on the functions involved, which shall It should be understood by those skilled in the art to which the embodiments of the present application belong.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言," 计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(移动终端),便携式计算机盘盒(磁装置),随机存取存储器 (RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium, For use with instruction execution systems, devices, or devices (such as computer-based systems, systems including processors, or other systems that can fetch instructions from instruction execution systems, devices, or devices and execute instructions), or in conjunction with these instruction execution systems, devices or equipment for use. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connection with one or more wires (mobile terminal), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, since the program can be read, for example, by optically scanning the paper or other medium, followed by editing, interpretation or other suitable processing if necessary. The program is processed electronically and stored in computer memory.

应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA) 等。It should be understood that each part of the present application may be realized by hardware, software, firmware or a combination thereof. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques known in the art: Discrete logic circuits, ASICs with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.

本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。Those of ordinary skill in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. During execution, one or a combination of the steps of the method embodiments is included. In addition, each functional unit in each embodiment of the present application may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.

上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limitations on the present application, and those skilled in the art can make the above-mentioned The embodiments are subject to changes, modifications, substitutions and variations.

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

Claims (10)

1.一种拍摄方法,其特征在于,应用于移动终端,所述移动终端包括摄像头,所述方法包括:1. A shooting method, characterized in that it is applied to a mobile terminal, the mobile terminal includes a camera, and the method comprises: 通过所述摄像头获取目标物体图像;Obtain an image of the target object through the camera; 根据所述目标物体图像中的目标物体与所述移动终端的位置关系,确定当前拍摄模式为横屏模式还是竖屏模式;According to the positional relationship between the target object in the target object image and the mobile terminal, determine whether the current shooting mode is a landscape mode or a portrait mode; 当接收到拍摄指令时,采用确定后的当前拍摄模式进行拍摄。When the shooting instruction is received, the determined current shooting mode is used for shooting. 2.根据权利要求1所述的方法,其特征在于,所述通过所述摄像头获取目标物体图像之前,还包括:2. The method according to claim 1, wherein, before acquiring the image of the target object through the camera, further comprising: 根据移动终端的姿态判断所述移动终端当前是水平状态还是竖直状态;judging whether the mobile terminal is currently in a horizontal state or a vertical state according to the posture of the mobile terminal; 若是水平状态,执行所述通过摄像头获取人脸图像的步骤。If it is in a horizontal state, perform the step of acquiring a face image through a camera. 3.根据权利要求2所述的方法,其特征在于,所述根据移动终端的姿态判断所述移动终端当前是水平状态还是竖直状态,包括:3. The method according to claim 2, wherein the judging whether the mobile terminal is currently in a horizontal state or a vertical state according to the posture of the mobile terminal comprises: 判断移动终端的显示屏幕与竖直方向的夹角是否在预设角度范围内;Judging whether the included angle between the display screen of the mobile terminal and the vertical direction is within a preset angle range; 若是,则判定移动终端的姿态为水平状态,If so, it is determined that the posture of the mobile terminal is a horizontal state, 若否,则判定移动终端的姿态为竖直状态。If not, it is determined that the posture of the mobile terminal is in a vertical state. 4.根据权利要求1所述的方法,其特征在于,所述目标物体为人脸,所述根据所述目标物体图像中的目标物体与所述移动终端的位置关系,确定当前拍摄模式为横屏模式还是竖屏模式,包括:4. The method according to claim 1, wherein the target object is a human face, and according to the positional relationship between the target object in the target object image and the mobile terminal, it is determined that the current shooting mode is horizontal screen The mode is still the portrait mode, including: 判断所述人脸偏向横屏方向还是竖屏方向;judging whether the human face is in a horizontal screen direction or a vertical screen direction; 若偏向横屏方向,确定当前拍摄模式为横屏模式,If it is inclined to the landscape direction, make sure the current shooting mode is landscape mode, 若偏向竖屏方向,确定当前拍摄模式为竖屏模式。If it is in the portrait direction, make sure the current shooting mode is portrait mode. 5.根据权利要求4所述的方法,其特征在于,所述判断所述人脸偏向横屏方向还是竖屏方向,包括:5. The method according to claim 4, wherein the judging whether the human face is in a landscape orientation or a portrait orientation comprises: 根据人脸五官特征获取所述人脸中的特征线;Acquiring feature lines in the human face according to facial facial features; 根据所述特征线与所述移动终端横屏方向或者竖屏方向之间的夹角,确定所述人脸偏向横屏方向还是竖屏方向。According to the included angle between the characteristic line and the horizontal screen direction or the vertical screen direction of the mobile terminal, it is determined whether the human face is biased toward the horizontal screen direction or the vertical screen direction. 6.根据权利要求5所述的方法,其特征在于,所述特征线为中心轴线,所述根据所述特征线与所述移动终端横屏方向或者竖屏方向之间的夹角,确定所述人脸偏向横屏方向还是竖屏方向,包括:6. The method according to claim 5, wherein the feature line is a central axis, and the said feature line is determined according to the angle between the feature line and the horizontal screen direction or the vertical screen direction of the mobile terminal. Whether the face is in the landscape or portrait orientation, including: 计算所述中心轴线与横屏方向的夹角为第一夹角,计算所述中心轴线与竖屏方向的夹角为第二夹角;calculating the included angle between the central axis and the horizontal screen direction as a first included angle, and calculating the included angle between the central axis and the vertical screen direction as a second included angle; 若所述第一夹角大于所述第二夹角,判定所述人脸偏向竖屏方向,If the first included angle is greater than the second included angle, it is determined that the face is biased towards the vertical screen direction, 若所述第二夹角大于所述第二夹角,判定所述人脸偏向横屏方向。If the second included angle is greater than the second included angle, it is determined that the human face is in a landscape direction. 7.根据权利要求5所述的方法,其特征在于,所述根据人脸五官特征获取所述人脸中的特征线,包括:7. The method according to claim 5, wherein said obtaining the feature line in the human face according to the facial features of the human face comprises: 获取所述人脸的两眼之间的连线;Obtain the connection line between the two eyes of the human face; 所述根据所述特征线与所述移动终端横屏方向或者竖屏方向之间的夹角,确定所述人脸偏向横屏方向还是竖屏方向,包括:According to the angle between the feature line and the horizontal screen direction or the vertical screen direction of the mobile terminal, determining whether the face is biased towards the horizontal screen direction or the vertical screen direction includes: 计算所述两眼之间的连线与横屏方向的夹角为第三夹角,计算所述两眼之间的连线与竖屏方向的夹角为第四夹角;Calculate the angle between the line between the two eyes and the horizontal screen direction as the third angle, and calculate the angle between the line between the two eyes and the vertical screen direction as the fourth angle; 若所述第三夹角大于所述第四夹角,判定所述人脸偏向横屏方向,If the third included angle is greater than the fourth included angle, it is determined that the human face is biased towards the horizontal screen direction, 若所述第四夹角大于所述第三夹角,判定所述人脸偏向竖屏方向。If the fourth included angle is greater than the third included angle, it is determined that the human face is in a vertical orientation. 8.一种拍摄装置,其特征在于,应用于移动终端,所述移动终端包括摄像头,所述装置包括:8. A shooting device, characterized in that it is applied to a mobile terminal, the mobile terminal includes a camera, and the device includes: 图像获取模块,用于通过所述摄像头获取目标物体图像;An image acquisition module, configured to acquire an image of a target object through the camera; 拍摄模式确定模块,用于根据所述目标物体图像中的目标物体与所述移动终端的位置关系,确定当前拍摄模式为横屏模式还是竖屏模式;A shooting mode determination module, configured to determine whether the current shooting mode is a landscape mode or a portrait mode according to the positional relationship between the target object in the target object image and the mobile terminal; 拍摄模块,用于当接收到拍摄指令时,采用确定后的当前拍摄模式进行拍摄。The shooting module is configured to use the determined current shooting mode to shoot when a shooting instruction is received. 9.一种移动终端,其特征在于,包括显示屏、存储器及处理器,所述显示屏及所述存储器耦接到所述处理器,所述显示屏用于显示图像,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行权利要求1至7任一项所述的方法。9. A mobile terminal, characterized in that it includes a display screen, a memory and a processor, the display screen and the memory are coupled to the processor, the display screen is used to display images, and the memory stores instructions , when the instruction is executed by the processor, the processor executes the method according to any one of claims 1 to 7. 10.一种具有处理器可执行的程序代码的计算机可读存储介质,其特征在于,所述程序代码使所述处理器执行权利要求1至7任一项所述的方法。10. A computer-readable storage medium having a program code executable by a processor, wherein the program code causes the processor to execute the method according to any one of claims 1 to 7.
CN201810308154.5A 2018-04-08 2018-04-08 Shooting method and device, mobile terminal and storage medium Pending CN108540718A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810308154.5A CN108540718A (en) 2018-04-08 2018-04-08 Shooting method and device, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810308154.5A CN108540718A (en) 2018-04-08 2018-04-08 Shooting method and device, mobile terminal and storage medium

Publications (1)

Publication Number Publication Date
CN108540718A true CN108540718A (en) 2018-09-14

Family

ID=63481838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810308154.5A Pending CN108540718A (en) 2018-04-08 2018-04-08 Shooting method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN108540718A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110913161A (en) * 2018-09-17 2020-03-24 成都鼎桥通信技术有限公司 Method and device for recording banner video through vertical screen
CN111050071A (en) * 2019-12-23 2020-04-21 维沃移动通信有限公司 Photographing method and electronic equipment
CN111464740A (en) * 2020-04-07 2020-07-28 Oppo广东移动通信有限公司 Image capturing method, device, storage medium and electronic device
CN111669462A (en) * 2020-05-30 2020-09-15 华为技术有限公司 Method and related device for displaying image
CN112584045A (en) * 2020-12-07 2021-03-30 Oppo广东移动通信有限公司 Positioning display method, terminal and computer readable storage medium
CN112702527A (en) * 2020-12-28 2021-04-23 维沃移动通信(杭州)有限公司 Image shooting method and device and electronic equipment
CN117111873A (en) * 2023-10-23 2023-11-24 南昌市一境信息技术有限公司 Immersion interaction system based on cave environment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050104848A1 (en) * 2003-09-25 2005-05-19 Kabushiki Kaisha Toshiba Image processing device and method
CN104820555A (en) * 2015-05-06 2015-08-05 努比亚技术有限公司 Transverse and vertical screen modes switching method and device, and terminal
CN104991723A (en) * 2015-07-08 2015-10-21 上海斐讯数据通信技术有限公司 Transverse and vertical screen switching system and method
CN106713757A (en) * 2016-12-30 2017-05-24 努比亚技术有限公司 Shooting control method and mobile terminal
CN107102801A (en) * 2017-03-28 2017-08-29 北京小米移动软件有限公司 Terminal screen spinning solution and device
CN107483709A (en) * 2016-09-29 2017-12-15 维沃移动通信有限公司 A kind of horizontal/vertical screen switching method and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050104848A1 (en) * 2003-09-25 2005-05-19 Kabushiki Kaisha Toshiba Image processing device and method
CN104820555A (en) * 2015-05-06 2015-08-05 努比亚技术有限公司 Transverse and vertical screen modes switching method and device, and terminal
CN104991723A (en) * 2015-07-08 2015-10-21 上海斐讯数据通信技术有限公司 Transverse and vertical screen switching system and method
CN107483709A (en) * 2016-09-29 2017-12-15 维沃移动通信有限公司 A kind of horizontal/vertical screen switching method and mobile terminal
CN106713757A (en) * 2016-12-30 2017-05-24 努比亚技术有限公司 Shooting control method and mobile terminal
CN107102801A (en) * 2017-03-28 2017-08-29 北京小米移动软件有限公司 Terminal screen spinning solution and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110913161A (en) * 2018-09-17 2020-03-24 成都鼎桥通信技术有限公司 Method and device for recording banner video through vertical screen
CN111050071A (en) * 2019-12-23 2020-04-21 维沃移动通信有限公司 Photographing method and electronic equipment
CN111464740A (en) * 2020-04-07 2020-07-28 Oppo广东移动通信有限公司 Image capturing method, device, storage medium and electronic device
CN111669462A (en) * 2020-05-30 2020-09-15 华为技术有限公司 Method and related device for displaying image
CN111669462B (en) * 2020-05-30 2022-09-02 华为技术有限公司 Method and related device for displaying image
CN112584045A (en) * 2020-12-07 2021-03-30 Oppo广东移动通信有限公司 Positioning display method, terminal and computer readable storage medium
CN112702527A (en) * 2020-12-28 2021-04-23 维沃移动通信(杭州)有限公司 Image shooting method and device and electronic equipment
CN117111873A (en) * 2023-10-23 2023-11-24 南昌市一境信息技术有限公司 Immersion interaction system based on cave environment
CN117111873B (en) * 2023-10-23 2024-01-09 南昌市一境信息技术有限公司 Immersion interaction system based on cave environment

Similar Documents

Publication Publication Date Title
US11108953B2 (en) Panoramic photo shooting method and apparatus
US11846877B2 (en) Method and terminal for acquiring panoramic image
CN108234875B (en) Shooting display method and device, mobile terminal and storage medium
US10574895B2 (en) Image capturing method and camera equipped electronic device
CN109167894B (en) Camera control method, device, mobile terminal and storage medium
CN108540718A (en) Shooting method and device, mobile terminal and storage medium
US11588972B2 (en) Shooting control method and terminal
CN108495045B (en) Image capturing method, image capturing apparatus, electronic apparatus, and storage medium
CN108762859B (en) Wallpaper display method and device, mobile terminal and storage medium
CN108769506B (en) Image acquisition method, device, mobile terminal and computer readable medium
WO2019165938A1 (en) Image collection method and apparatus, mobile terminal and storage medium
CN108391058B (en) Image capturing method, device, electronic device and storage medium
US20140038560A1 (en) System for and method of transmitting communication information
CN108737635A (en) message display method, device, mobile terminal and storage medium
CN108965691A (en) Camera control method and device, mobile terminal and storage medium
WO2018184260A1 (en) Correcting method and device for document image
CN108366163B (en) Control method and device for camera application, mobile terminal and computer readable medium
CN108390992A (en) Message display method and device, mobile terminal and storage medium
CN111385525B (en) Video monitoring method, device, terminal and system
US20140009385A1 (en) Method and system for rotating display image
EP4040332A1 (en) Method and apparatus for upgrading an intelligent model and non-transitory computer readable storage medium
CN111586279B (en) Method, device and equipment for determining shooting state and storage medium
WO2021218926A1 (en) Image display method and apparatus, and computer device
CN107682633B (en) Image processing method and device and mobile terminal
CN108696634A (en) Camera control method, device 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180914