[go: up one dir, main page]

CN104038697B - A kind of mobile terminal realizes the method and mobile terminal that more people take pictures - Google Patents

A kind of mobile terminal realizes the method and mobile terminal that more people take pictures Download PDF

Info

Publication number
CN104038697B
CN104038697B CN201410258043.XA CN201410258043A CN104038697B CN 104038697 B CN104038697 B CN 104038697B CN 201410258043 A CN201410258043 A CN 201410258043A CN 104038697 B CN104038697 B CN 104038697B
Authority
CN
China
Prior art keywords
face
image
camera
preset range
initial pictures
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.)
Expired - Fee Related
Application number
CN201410258043.XA
Other languages
Chinese (zh)
Other versions
CN104038697A (en
Inventor
张弓
李小朋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201410258043.XA priority Critical patent/CN104038697B/en
Publication of CN104038697A publication Critical patent/CN104038697A/en
Application granted granted Critical
Publication of CN104038697B publication Critical patent/CN104038697B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)

Abstract

本发明适用于移动终端技术领域,提供了一种移动终端实现多人拍照的方法及移动终端,包括:在接收到拍照请求信息时,启动摄像头,通过所述摄像头获取初始图像;当所述初始图像中的人脸范围超出预设范围时,控制所述摄像头朝所述初始图像中的人脸范围超出所述预设范围的超出部分的方向旋转,并通过所述摄像头获取至少一组叠加图像;将所述初始图像和所述至少一组叠加图像拼接生成合成图像并保存。本发明通过控制摄像头朝初始图像中的人脸范围超出预设范围的超出部分的方向旋转,获取至少一组叠加图像,再将初始图像与至少一组叠加图像拼接生成合成图像,从而通过移动终端实现了多人拍照,且大大降低了移动终端实现多人拍照的操作难度。

The present invention is applicable to the technical field of mobile terminals, and provides a method for a mobile terminal to realize multi-person photography and the mobile terminal, including: when receiving a photographing request message, starting a camera, and obtaining an initial image through the camera; when the initial When the face range in the image exceeds the preset range, control the camera to rotate in the direction where the face range in the initial image exceeds the preset range, and obtain at least one set of superimposed images through the camera ; Stitching the initial image and the at least one set of superimposed images to generate a composite image and saving it. The present invention obtains at least one set of superimposed images by controlling the rotation of the camera toward the direction where the range of the face in the initial image exceeds the preset range, and then stitches the initial image and at least one set of superimposed images to generate a composite image, thereby through the mobile terminal It realizes taking pictures by multiple people, and greatly reduces the operational difficulty of taking pictures by multiple people on the mobile terminal.

Description

一种移动终端实现多人拍照的方法及移动终端Method and mobile terminal for realizing multi-person photographing by mobile terminal

技术领域technical field

本发明属于移动终端技术领域,尤其涉及一种移动终端实现多人拍照的方法及移动终端。The invention belongs to the technical field of mobile terminals, and in particular relates to a method for a mobile terminal to realize multiple people taking pictures and the mobile terminal.

背景技术Background technique

现有的移动终端在实现多人拍照时,很难将多人的人脸都拍入画面中。为了实现多人拍照,需要将移动终端放在较远的位置,操作难度大。When the existing mobile terminal realizes that multiple people take pictures, it is difficult to capture the faces of multiple people into the picture. In order to realize multiple people taking pictures, the mobile terminal needs to be placed at a relatively far position, which makes the operation difficult.

发明内容Contents of the invention

本发明实施例的目的在于提供一种移动终端实现多人拍照的方法,以降低移动终端实现多人拍照的操作难度。The purpose of the embodiments of the present invention is to provide a method for a mobile terminal to take pictures of multiple people, so as to reduce the operational difficulty of taking pictures of multiple people on the mobile terminal.

本发明实施例是这样实现的,一种移动终端实现多人拍照的方法,包括:The embodiment of the present invention is implemented in this way, a method for a mobile terminal to realize multiple people taking pictures, comprising:

在接收到拍照请求信息时,启动摄像头,通过所述摄像头获取初始图像;When receiving the photographing request information, start the camera, and obtain the initial image through the camera;

当所述初始图像中的人脸范围超出预设范围时,控制所述摄像头朝所述初始图像中的人脸范围超出所述预设范围的超出部分的方向旋转,并通过所述摄像头获取至少一组叠加图像;When the face range in the initial image exceeds the preset range, control the camera to rotate in the direction where the face range in the initial image exceeds the preset range, and acquire at least a set of superimposed images;

将所述初始图像和所述至少一组叠加图像拼接生成合成图像并保存。Stitching the initial image and the at least one set of superimposed images to generate a composite image and saving it.

本发明实施例的另一目的在于提供一种移动终端,包括:Another object of the embodiments of the present invention is to provide a mobile terminal, including:

初始图像获取模块,用于在接收到拍照请求信息时,启动摄像头,通过所述摄像头获取初始图像;The initial image acquisition module is used to start the camera and acquire the initial image through the camera when receiving the photographing request information;

叠加图像获取模块,用于当所述初始图像中的人脸范围超出预设范围时,控制所述摄像头朝所述初始图像中的人脸范围超出所述预设范围的超出部分的方向旋转,并通过所述摄像头获取至少一组叠加图像;A superimposed image acquisition module, configured to control the camera to rotate in a direction in which the range of the face in the initial image exceeds the preset range when the range of the face in the initial image exceeds the preset range, And acquire at least one set of superimposed images through the camera;

图像拼接模块,用于将所述初始图像和所述至少一组叠加图像拼接生成合成图像并保存。An image splicing module, configured to splice the initial image and the at least one set of superimposed images to generate a composite image and save it.

本发明实施例与现有技术相比存在的有益效果是:本发明实施例通过在接收到拍照请求时,获取初始图像,当初始图像中的人脸范围超出预设范围时,控制摄像头朝初始图像中的人脸范围超出预设范围的超出部分的方向旋转,获取至少一组叠加图像,再将初始图像与至少一组叠加图像拼接生成合成图像,从而通过移动终端实现了多人拍照,且大大降低了移动终端实现多人拍照的操作难度。Compared with the prior art, the embodiment of the present invention has the following beneficial effects: the embodiment of the present invention obtains the initial image when receiving a photographing request, and controls the camera to move toward the initial image when the face range in the initial image exceeds the preset range. The face range in the image is rotated in the direction of the excess part beyond the preset range, at least one set of superimposed images is acquired, and then the initial image is stitched with at least one set of superimposed images to generate a composite image, thereby realizing multiple people to take pictures through the mobile terminal, and It greatly reduces the operation difficulty of the mobile terminal to realize multiple people taking pictures.

附图说明Description of drawings

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

图1是本发明实施例提供的移动终端实现多人拍照的方法的实现流程图;FIG. 1 is an implementation flowchart of a method for a mobile terminal to realize multi-person photography provided by an embodiment of the present invention;

图2是移动终端实现多人拍照的方法中初始图像中的人脸范围超出预设范围的示意图;Fig. 2 is a schematic diagram of the range of faces in the initial image exceeding the preset range in the method for the mobile terminal to realize multi-person photography;

图3是本发明实施例提供的移动终端实现多人拍照的方法步骤S101的具体实现流程图;FIG. 3 is a specific implementation flow chart of step S101 of a method for realizing multi-person photography by a mobile terminal provided by an embodiment of the present invention;

图4是本发明实施例提供的移动终端实现多人拍照的方法步骤S303的示意图;FIG. 4 is a schematic diagram of step S303 of a method for realizing multi-person photographing by a mobile terminal according to an embodiment of the present invention;

图5示出了本发明实施例提供的移动终端实现多人拍照的方法步骤S102的具体实现流程图;FIG. 5 shows a specific implementation flow chart of step S102 of a method for taking pictures by a mobile terminal provided by an embodiment of the present invention;

图6示出了本发明实施例提供的移动终端实现多人拍照的方法步骤S502中获取至少一组叠加图像的示意图;FIG. 6 shows a schematic diagram of acquiring at least one group of superimposed images in step S502 of a method for taking pictures by a mobile terminal provided by an embodiment of the present invention;

图7示出了本发明实施例提供的移动终端的结构框图。Fig. 7 shows a structural block diagram of a mobile terminal provided by an embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

本发明实施例通过在接收到拍照请求时,获取初始图像,当初始图像中的人脸范围超出预设范围时,控制摄像头朝初始图像中的人脸范围超出预设范围的超出部分的方向旋转,获取至少一组叠加图像,再将初始图像与至少一组叠加图像拼接生成合成图像,从而通过移动终端实现了多人拍照,且大大降低了移动终端实现多人拍照的操作难度。In the embodiment of the present invention, the initial image is obtained when a photographing request is received, and when the range of the face in the initial image exceeds the preset range, the camera is controlled to rotate in a direction in which the range of the face in the initial image exceeds the preset range , acquiring at least one set of superimposed images, and then splicing the initial image and at least one set of superimposed images to generate a composite image, thereby realizing multi-person photographing through the mobile terminal, and greatly reducing the operation difficulty of multi-person photographing by the mobile terminal.

本发明实施例中的移动终端可以包括移动电话(或称为“蜂窝”电话)和具有移动终端的计算机,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(Personal CommunicationService,PCS)电话、无绳电话、会话发起协议(Session Initiation Protocol,SIP)话机、无线本地环路(Wireless Local Loop,WLL)站、个人数字助理(Personal DigitalAssistant,PDA)等设备,在此不作限定。The mobile terminal in the embodiment of the present invention can comprise mobile phone (or be referred to as " cellular " phone) and the computer that has mobile terminal, for example, can be portable, pocket type, hand-held, computer built-in or vehicle-mounted mobile device, they Exchanging language and/or data with the radio access network. For example, Personal Communication Service (PCS) phone, cordless phone, Session Initiation Protocol (SIP) phone, Wireless Local Loop (WLL) station, Personal Digital Assistant (PDA) and other equipment are not limited here.

图1示出了本发明实施例提供的移动终端实现多人拍照的方法的实现流程图,详述如下:Fig. 1 shows the flow chart of the implementation of the method for the mobile terminal to realize multi-person photography provided by the embodiment of the present invention, which is described in detail as follows:

在步骤S101中,在接收到拍照请求信息时,启动摄像头,通过所述摄像头获取初始图像。In step S101, when receiving the photographing request information, start the camera, and acquire an initial image through the camera.

在本发明实施例中,移动终端接收到用户输入的拍照请求信息后,启动摄像头。移动终端接收用户输入的拍照请求信息,可以为接收用户通过移动终端上预设按钮或已有的按钮中一个按钮或者多个按钮的组合发出的拍照请求信息;或者,接收用户通过移动终端触摸屏发出的拍照请求信息(例如逆时针滑动两圈)。移动终端接收到用户输入的拍照请求信息后,通过摄像头获取初始图像,并将初始图像保存,为后续的图像拼接做准备。In the embodiment of the present invention, after receiving the photographing request information input by the user, the mobile terminal starts the camera. The mobile terminal receives the photographing request information input by the user, which can be the photographing request information sent by the user through a preset button or a combination of buttons or a combination of buttons in the existing buttons on the mobile terminal; or, receiving the photographing request information sent by the user through the touch screen of the mobile terminal photo request information (for example, slide counterclockwise twice). After receiving the photographing request information input by the user, the mobile terminal acquires an initial image through the camera, and saves the initial image to prepare for subsequent image splicing.

进一步地,在步骤S101所述在接收到拍照请求信息时,启动摄像头,通过所述摄像头获取初始图像之后,还包括:Further, when the photographing request information is received in step S101, the camera is started, and after the initial image is acquired by the camera, the method further includes:

提取所述初始图像中的人脸信息,根据所述人脸信息分析所述初始图像中的人脸范围。Extracting the face information in the initial image, and analyzing the face range in the initial image according to the face information.

其中,人脸信息包括但不限于人脸轮廓、眼睛、鼻子、嘴巴、耳朵或者肤色信息。根据上述信息,可分析出初始图像中的人脸范围。可选地,当移动终端识别到人脸时,进行对焦。Wherein, the face information includes but not limited to face outline, eyes, nose, mouth, ears or skin color information. According to the above information, the face range in the initial image can be analyzed. Optionally, when the mobile terminal recognizes a human face, focus is performed.

在步骤S102中,当所述初始图像中的人脸范围超出预设范围时,控制所述摄像头朝所述初始图像中的人脸范围超出所述预设范围的超出部分的方向旋转,并通过所述摄像头获取至少一组叠加图像。In step S102, when the face range in the initial image exceeds the preset range, control the camera to rotate in the direction where the face range in the initial image exceeds the preset range, and pass The camera captures at least one set of superimposed images.

图2示出了移动终端实现多人拍照的方法中初始图像中的人脸范围超出预设范围的示意图。参照图2,黑色粗实线方框为移动终端屏幕,表示摄像头所能拍摄的范围;虚线表示预设范围。当初始图像中的人脸范围超出预设范围时,控制摄像头朝初始图像中的人脸范围超出预设范围的超出部分的方向旋转。例如,在图2中,初始图像中的人脸范围的左上方、下方和右上方超出预设范围,则控制摄像头朝左上方、下方和右上方旋转并获取三组叠加图像,并保存叠加图像,为后续的图像拼接做准备。以摄像头朝左上方旋转获取第一组叠加图像为例进行说明:摄像头在朝左上方旋转的过程中,获取N张叠加图像,以保证初始图像与叠加图像之间平滑过渡。其中,N为正整数。这N张叠加图像组成第一组叠加图像,且这N张叠加图像包含初始图像中的人脸范围超出预设范围的超出部分。当获取第一组叠加图像时,若当前获取的叠加图像的预设范围内包含了超出部分的最左上方的画面,则判定当前获取的叠加图像为第一组叠加图像的最后一张叠加图像,即第一组叠加图像获取完成,并使摄像头回到初始位置。Fig. 2 shows a schematic diagram of a method in which a mobile terminal realizes taking photos of multiple people, and the range of human faces in an initial image exceeds a preset range. Referring to FIG. 2 , the black thick solid line box is the screen of the mobile terminal, which indicates the range that the camera can shoot; the dotted line indicates the preset range. When the face range in the initial image exceeds the preset range, the camera is controlled to rotate in a direction where the face range in the initial image exceeds the preset range. For example, in Figure 2, the upper left, lower, and upper right of the face range in the initial image exceed the preset range, then control the camera to rotate toward the upper left, lower, and upper right to obtain three sets of superimposed images, and save the superimposed images , to prepare for the subsequent image stitching. Take the camera rotates to the upper left to obtain the first set of superimposed images as an example: when the camera rotates to the upper left, N superimposed images are obtained to ensure a smooth transition between the initial image and the superimposed image. Wherein, N is a positive integer. The N superimposed images form the first group of superimposed images, and the N superimposed images include the excess portion of the face in the initial image beyond the preset range. When acquiring the first set of superimposed images, if the preset range of the currently acquired superimposed images includes the upper leftmost picture of the excess part, it is determined that the currently acquired superimposed images are the last superimposed images of the first group of superimposed images , that is, the acquisition of the first group of superimposed images is completed, and the camera returns to the initial position.

需要说明的是,也可以将移动终端屏幕的范围作为预设范围,当初始图像中的人脸范围超出移动终端屏幕的范围时,控制摄像头朝初始图像中的人脸范围超出移动终端屏幕的范围的超出部分的方向旋转。It should be noted that the range of the screen of the mobile terminal can also be used as the preset range. When the range of the face in the initial image exceeds the range of the screen of the mobile terminal, the camera is controlled to move toward the range of the face in the initial image beyond the range of the screen of the mobile terminal. Rotate in the direction of the excess portion.

在步骤S103中,将所述初始图像和所述至少一组叠加图像拼接生成合成图像并保存。In step S103, the initial image and the at least one set of superimposed images are spliced to generate a composite image and saved.

在这里,将初始图像与至少一组叠加图像拼接包括,将叠加图像与初始图像重复的部分重叠,将叠加图像包含而初始图像不包含的超出部分与初始图像拼接。Here, stitching the initial image with at least one set of superimposed images includes overlapping the overlapping portion of the superimposed image with the original image, and stitching the excess portion included in the superimposed image but not included in the original image with the initial image.

图3示出了本发明实施例提供的移动终端实现多人拍照的方法步骤S101的具体实现流程图。参照图3,步骤S101所述在接收到拍照请求信息时,启动摄像头,通过所述摄像头获取初始图像包括:FIG. 3 shows a specific implementation flow chart of step S101 of the method for realizing multi-person photographing by a mobile terminal provided by an embodiment of the present invention. With reference to Fig. 3, described in step S101 when receiving photographing request information, start camera, obtain initial image by described camera and include:

在步骤S301中,在接收到拍照请求信息时,启动摄像头,通过所述摄像头获取包含人脸的图像。In step S301, when receiving the photographing request information, the camera is started, and an image including a human face is acquired through the camera.

作为本发明的一个实施例,当移动终端接收到用户输入的拍照请求信息时,移动终端启动摄像头,并判断摄像头当前拍摄的画面是否包含人脸,若摄像头当前拍摄的画面包含人脸,则通过摄像头采集包含人脸的图像。As an embodiment of the present invention, when the mobile terminal receives the photographing request information input by the user, the mobile terminal starts the camera, and judges whether the picture currently taken by the camera contains a human face, and if the picture currently taken by the camera contains a human face, then pass The camera captures an image containing a human face.

优选地,所述方法还包括:Preferably, the method also includes:

通过所述移动终端的屏幕实时展示所述包含人脸的图像。The image containing the human face is displayed in real time through the screen of the mobile terminal.

作为本发明的一个实施例,移动终端启动摄像功能后,可通过移动终端的屏幕实时展示摄像头拍摄的画面,以使用户在摄像头拍摄的画面适当时发出拍照请求信息,从而获得较高画质的包含人脸的图像。这里的画质包括两方面的含义,一是摄像头拍摄的画面包括用户想要拍摄的主要画面,二是画面清晰。As an embodiment of the present invention, after the mobile terminal activates the camera function, the screen of the mobile terminal can display the pictures taken by the camera in real time, so that the user can send a photo request message when the picture taken by the camera is appropriate, so as to obtain a picture with higher quality. An image containing a human face. The picture quality here includes two meanings. One is that the picture captured by the camera includes the main picture that the user wants to shoot, and the other is that the picture is clear.

在步骤S302中,判断所述包含人脸的图像中指定位置的人脸范围是否超出所述预设范围。In step S302, it is judged whether the face range of the specified position in the image containing the face exceeds the preset range.

在这里,包含人脸的图像中的预设范围与初始图像中的预设范围一致。Here, the preset range in the image containing the human face is consistent with the preset range in the initial image.

可选地,指定位置为包含人脸的图像的左上角、右上角、左下角或者右下角,在此不作限定。在本发明实施例中以指定位置为包含人脸的图像的左上角为例来进行说明。Optionally, the specified position is the upper left corner, upper right corner, lower left corner or lower right corner of the image containing the human face, which is not limited herein. In the embodiment of the present invention, the specified position is the upper left corner of the image containing the human face as an example for illustration.

图4示出了本发明实施例提供的移动终端实现多人拍照的方法步骤S303的示意图,参照图4:FIG. 4 shows a schematic diagram of step S303 of a method for taking pictures by a mobile terminal provided by an embodiment of the present invention. Referring to FIG. 4:

在步骤S303中,若所述包含人脸的图像中指定位置的人脸范围超出所述预设范围,则控制所述摄像头旋转,直到所述包含人脸的图像中指定位置的人脸范围不超出所述预设范围时,再通过所述摄像头获取所述初始图像。In step S303, if the range of the human face at the specified position in the image containing the human face exceeds the preset range, control the rotation of the camera until the range of the human face at the specified position in the image containing the human face exceeds the preset range. When the preset range is exceeded, the initial image is acquired through the camera.

在本发明实施例中,指定位置为包含人脸的图像的左上角。图4中的上图为包含人脸的图像,由图4中的上图可知,该包含人脸的图像中左上角的人脸范围超出预设范围,则控制摄像头朝左上方旋转,直到包含人脸的图像中左上角的人脸范围不超出预设范围,如图4中的下图所示。当包含人脸的图像中左上角的人脸范围不超出预设范围时,通过摄像头获取初始图像,即图4中的下图可作为初始图像。In the embodiment of the present invention, the designated position is the upper left corner of the image containing the human face. The upper picture in Figure 4 is an image containing a human face. From the upper picture in Figure 4, it can be seen that the range of the face in the upper left corner of the image containing a human face exceeds the preset range, so the camera is controlled to rotate to the upper left until it contains The range of the face in the upper left corner of the face image does not exceed the preset range, as shown in the lower figure in FIG. 4 . When the range of the face in the upper left corner of the image containing the face does not exceed the preset range, the initial image is obtained through the camera, that is, the lower image in Figure 4 can be used as the initial image.

在步骤S304中,若所述包含人脸的图像中指定位置的人脸范围不超出所述预设范围,则将所述包含人脸的图像作为所述初始图像。In step S304, if the face range of the specified position in the image containing a human face does not exceed the preset range, the image containing a human face is used as the initial image.

在本实施例中,当包含人脸的图像中左上角的人脸范围不超出预设范围时,将包含人脸的图像作为初始图像。In this embodiment, when the range of the human face in the upper left corner of the image containing the human face does not exceed the preset range, the image containing the human face is used as the initial image.

通过本实施例,可减少后续旋转摄像头获取叠加图像的次数,减少数据处理量。参照图4,若将图4中的上图作为初始图像,则后续需要控制摄像头分别向左上方、下方和右上方三个方向旋转,以获取三个方向对应的三组叠加图像;而将图4中的下图作为初始图像,则后续只需要控制摄像头向右方和右下方两个方向旋转,以获得两个方向对应的两组叠加图像。Through this embodiment, the number of times the subsequent rotating camera acquires superimposed images can be reduced, and the amount of data processing can be reduced. Referring to Figure 4, if the upper image in Figure 4 is used as the initial image, then the camera needs to be controlled to rotate in three directions: upper left, lower, and upper right to obtain three groups of superimposed images corresponding to the three directions; The following image in 4 is used as the initial image, then you only need to control the camera to rotate to the right and the bottom right to obtain two sets of superimposed images corresponding to the two directions.

图5示出了本发明实施例提供的移动终端实现多人拍照的方法步骤S102的具体实现流程图,参照图5:FIG. 5 shows a specific implementation flow chart of step S102 of the method for realizing multi-person photography by a mobile terminal provided by an embodiment of the present invention. Referring to FIG. 5:

进一步地,步骤S102所述当所述初始图像中的人脸范围超出预设范围时,控制所述摄像头朝所述初始图像中的人脸范围超出所述预设范围的超出部分的方向旋转,并通过所述摄像头获取至少一组叠加图像具体为:Further, in step S102, when the face range in the initial image exceeds the preset range, the camera is controlled to rotate in a direction in which the face range in the initial image exceeds the preset range, And obtain at least one set of superimposed images through the camera, specifically:

在步骤S501中,当所述初始图像中的人脸范围超出预设范围时,分析所述初始图像中的人脸范围超出所述预设范围的超出部分的位置;In step S501, when the range of the human face in the initial image exceeds the preset range, analyze the position of the excess part of the range of the human face in the initial image beyond the preset range;

在步骤S502中,根据所述超出部分的位置,控制所述摄像头朝所述超出部分的方向旋转,并在所述摄像头旋转的过程中,以预设频率获取至少一组叠加图像,直到所述超出部分包含在所述叠加图像的预设范围内后,再停止旋转所述摄像头。In step S502, according to the position of the excess part, the camera is controlled to rotate toward the direction of the excess part, and during the rotation of the camera, at least one group of superimposed images is acquired at a preset frequency until the After the exceeding part is included in the preset range of the superimposed image, the rotation of the camera is stopped.

在本实施例中,假设初始图像如图2所示,则初始图像中人脸范围超出预设范围,分析初始图像中的人脸范围超出预设范围的超出部分的位置,可知超出部分的位置包括左上方、下方和右上方。假设摄像头获取初始图像时,其所处的位置为初始位置。In this embodiment, assuming that the initial image is as shown in Figure 2, the face range in the initial image exceeds the preset range, and the position of the excess part of the face range in the initial image beyond the preset range is analyzed, and the position of the excess part can be known Includes top left, bottom, and top right. Assume that when the camera acquires the initial image, its position is the initial position.

第一步,控制摄像头由初始位置朝左上方旋转,以预设频率获取第一组叠加图像,若当前获取的叠加图像的预设范围内包含了超出部分的最左上方的画面,则判定当前获取的叠加图像为第一组叠加图像的最后一张叠加图像,即第一组叠加图像获取完成,左上方的超出部分已全部包含在第一组叠加图像的预设范围内。图6中的上图示出了第一组叠加图像的最后一张叠加图像的示意图。第一组叠加图像获取完成后,使摄像头回到初始位置。The first step is to control the camera to rotate from the initial position to the upper left, and acquire the first set of superimposed images at a preset frequency. If the preset range of the currently acquired superimposed images includes the upper leftmost picture beyond the part, it is determined that the current The acquired superimposed image is the last superimposed image of the first group of superimposed images, that is, the acquisition of the first group of superimposed images is completed, and the excess part on the upper left is completely included in the preset range of the first group of superimposed images. The upper figure in FIG. 6 shows a schematic diagram of the last superimposed image of the first group of superimposed images. After the acquisition of the first group of superimposed images is completed, the camera is returned to the initial position.

第二步,控制摄像头由初始位置朝下方旋转,以预设频率获取第二组叠加图像,若当前获取的叠加图像的预设范围内包含了超出部分的最下方的画面,则判定当前获取的叠加图像为第二组叠加图像的最后一张叠加图像,即第二组叠加图像获取完成,下方的超出部分已全部包含在第二组叠加图像的预设范围内。图6中的中图示出了第二组叠加图像的最后一张叠加图像的示意图。第二组叠加图像获取完成后,使摄像头回到初始位置。The second step is to control the camera to rotate downward from the initial position, and acquire the second set of superimposed images at a preset frequency. The superimposed image is the last superimposed image of the second group of superimposed images, that is, the acquisition of the second group of superimposed images is completed, and the excess part below is all included in the preset range of the second group of superimposed images. The middle figure in FIG. 6 shows a schematic diagram of the last superimposed image of the second group of superimposed images. After the acquisition of the second group of superimposed images is completed, the camera is returned to the initial position.

第三步,控制摄像头由初始位置朝右上方旋转,以预设频率获取第三组叠加图像,若当前获取的叠加图像的预设范围内包含了超出部分的最右上方的画面,则判定当前获取的叠加图像为第三组叠加图像的最后一张叠加图像,即第三组叠加图像获取完成,右上方的超出部分已全部包含在第三组叠加图像的预设范围内。图6中的下图示出了第三组叠加图像的最后一张叠加图像的示意图。第三组叠加图像获取完成后,可以使摄像头回到初始位置。The third step is to control the camera to rotate from the initial position to the upper right, and acquire the third group of superimposed images at the preset frequency. The acquired superimposed image is the last superimposed image of the third group of superimposed images, that is, the acquisition of the third group of superimposed images is completed, and the excess part on the upper right is completely included in the preset range of the third group of superimposed images. The lower figure in FIG. 6 shows a schematic diagram of the last superimposed image of the third group of superimposed images. After the acquisition of the third group of superimposed images is completed, the camera can be returned to the initial position.

经过上述三步后,所有超出部分都包含在叠加图像中,则停止旋转摄像头,叠加图像取像完毕。After the above three steps, all excess parts are included in the superimposed image, then stop rotating the camera, and the superimposed image acquisition is completed.

本发明实施例通过在接收到拍照请求时,获取初始图像,当初始图像中的人脸范围超出预设范围时,控制摄像头朝初始图像中的人脸范围超出预设范围的超出部分的方向旋转,获取至少一组叠加图像,再将初始图像与至少一组叠加图像拼接生成合成图像,从而通过移动终端实现了多人拍照,且大大降低了移动终端实现多人拍照的操作难度。In the embodiment of the present invention, the initial image is obtained when a photographing request is received, and when the range of the face in the initial image exceeds the preset range, the camera is controlled to rotate in a direction in which the range of the face in the initial image exceeds the preset range , acquiring at least one set of superimposed images, and then splicing the initial image and at least one set of superimposed images to generate a composite image, thereby realizing multi-person photographing through the mobile terminal, and greatly reducing the operation difficulty of multi-person photographing by the mobile terminal.

图7示出了本发明实施例提供的移动终端的结构框图,该移动终端可以用于运行图1至图6所述的移动终端实现多人拍照的方法。为了便于说明,仅示出了与本实施例相关的部分。FIG. 7 shows a structural block diagram of a mobile terminal provided by an embodiment of the present invention, and the mobile terminal can be used to run the method described in FIGS. 1 to 6 on the mobile terminal to realize multi-person photography. For ease of description, only the parts related to this embodiment are shown.

参照图7,该移动终端包括:Referring to Figure 7, the mobile terminal includes:

初始图像获取模块71,在接收到拍照请求信息时,启动摄像头,通过所述摄像头获取初始图像。The initial image acquisition module 71, when receiving the photographing request information, activates the camera, and acquires the initial image through the camera.

叠加图像获取模块72,当所述初始图像中的人脸范围超出预设范围时,控制所述摄像头朝所述初始图像中的人脸范围超出所述预设范围的超出部分的方向旋转,并通过所述摄像头获取至少一组叠加图像。The superimposed image acquisition module 72, when the range of the face in the initial image exceeds the preset range, controls the camera to rotate in the direction in which the range of the face in the initial image exceeds the preset range, and At least one set of superimposed images is acquired through the camera.

图像拼接模块73,将所述初始图像和所述至少一组叠加图像拼接生成合成图像并保存。The image splicing module 73 splices the initial image and the at least one set of superimposed images to generate a composite image and saves it.

进一步地,所述移动终端还1包括:Further, the mobile terminal further includes:

人脸范围分析模块,提取所述初始图像中的人脸信息,根据所述人脸信息分析所述初始图像中的人脸范围。The human face range analysis module extracts the human face information in the initial image, and analyzes the human face range in the initial image according to the human face information.

优选地,所述初始图像获取模块71包括:Preferably, the initial image acquisition module 71 includes:

包含人脸的图像采集子模块,在接收到拍照请求信息时,启动摄像头,通过所述摄像头采集包含人脸的图像;The image acquisition sub-module comprising a human face, when receiving the photographing request information, starts the camera, and collects an image comprising a human face through the camera;

指定位置人脸范围判断子模块,判断所述包含人脸的图像中指定位置的人脸范围是否超出所述预设范围;The submodule for judging the face range at the specified position determines whether the face range at the specified position in the image containing the face exceeds the preset range;

第一初始图像获取子模块,若所述包含人脸的图像中指定位置的人脸范围超出所述预设范围,则控制所述摄像头旋转,直到所述包含人脸的图像中指定位置的人脸范围不超出所述预设范围时,再通过所述摄像头获取所述初始图像;The first initial image acquisition submodule, if the range of the face at the specified position in the image containing the human face exceeds the preset range, then control the rotation of the camera until the person at the specified position in the image containing the human face When the face range does not exceed the preset range, then obtain the initial image through the camera;

第二初始图像获取子模块,若所述包含人脸的图像中指定位置的人脸范围不超出所述预设范围,则将所述包含人脸的图像作为所述初始图像。The second initial image acquisition sub-module is to use the image containing a human face as the initial image if the range of the human face at a specified position in the image containing a human face does not exceed the preset range.

优选地,所述移动终端还包括:Preferably, the mobile terminal further includes:

包含人脸的图像展示模块,用于通过所述移动终端的屏幕实时展示所述包含人脸的图像。The image display module containing human face is used to display the image containing human face in real time through the screen of the mobile terminal.

进一步地,所述叠加图像获取模块具体用于:Further, the superimposed image acquisition module is specifically used for:

当所述初始图像中的人脸范围超出预设范围时,分析所述初始图像中的人脸范围超出所述预设范围的超出部分的位置;When the range of the human face in the initial image exceeds the preset range, analyze the position of the excess part of the range of the human face in the initial image beyond the preset range;

根据所述超出部分的位置,控制所述摄像头朝所述超出部分的方向旋转,并在所述摄像头旋转的过程中,以预设频率获取至少一组叠加图像,直到所述超出部分包含在所述叠加图像的预设范围内后,再停止旋转所述摄像头。According to the position of the excess part, control the camera to rotate towards the direction of the excess part, and during the rotation of the camera, acquire at least one set of superimposed images at a preset frequency until the excess part is included in the After being within the preset range of the superimposed image, stop rotating the camera.

本发明实施例通过在接收到拍照请求时,获取初始图像,当初始图像中的人脸范围超出预设范围时,控制摄像头朝初始图像中的人脸范围超出预设范围的超出部分的方向旋转,获取至少一组叠加图像,再将初始图像与至少一组叠加图像拼接生成合成图像,从而通过移动终端实现了多人拍照,且大大降低了移动终端实现多人拍照的操作难度。In the embodiment of the present invention, the initial image is obtained when a photographing request is received, and when the range of the face in the initial image exceeds the preset range, the camera is controlled to rotate in a direction in which the range of the face in the initial image exceeds the preset range , acquiring at least one set of superimposed images, and then splicing the initial image and at least one set of superimposed images to generate a composite image, thereby realizing multi-person photographing through the mobile terminal, and greatly reducing the operation difficulty of multi-person photographing by the mobile terminal.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.

Claims (8)

1. a kind of mobile terminal realizes the method that more people take pictures, it is characterised in that including:
Receive it is input by user take pictures solicited message when, start camera, pass through the camera obtain initial pictures;
When the face scope in the initial pictures exceeds preset range, the camera is controlled towards in the initial pictures Face scope is rotated beyond the preset range beyond the direction of part, and obtains at least one set of superposition by the camera Image;
By the initial pictures and at least one set of superimposed image splicing generation composograph and preserve;It is described will be described initial Image and at least one set of superimposed image splicing include, the part weight that the superimposed image and the initial pictures are repeated It is folded, by the superimposed image includes and what the initial pictures did not included splice beyond part and the initial pictures;
It is described receive it is input by user take pictures solicited message when, start camera, pass through the camera obtain initial graph As including:
Receive it is input by user take pictures solicited message when, start camera, judge the picture of the camera current shooting Whether face is included, if the picture of the camera current shooting includes face, face is included by camera collection Image;
Judge whether the face scope of designated position in the image comprising face exceeds the preset range, wherein, it is described The upper left corner, the upper right corner, the lower left corner or the lower right corner of designated position image comprising face for described in;
If the face scope of designated position exceeds the preset range in the image comprising face, the camera is controlled Rotation, until it is described comprising the image of face in designated position face scope without departing from the preset range when, then pass through institute State camera and obtain the initial pictures;
If the face scope of designated position includes people without departing from the preset range by described in the image comprising face The image of face is as the initial pictures.
2. the method as described in claim 1, it is characterised in that receiving solicited message input by user of taking pictures described When, start camera, after obtaining initial pictures by the camera, further include:
The face information in the initial pictures is extracted, the face model in the initial pictures is analyzed according to the face information Enclose.
3. the method as described in claim 1, it is characterised in that the method further includes:
By the image that face is included described in the screen real-time exhibition of the mobile terminal.
4. such as claims 1 to 3 any one of them method, it is characterised in that the face model worked as in the initial pictures Enclose when exceeding preset range, control the camera towards the face scope in the initial pictures beyond the super of the preset range The direction for going out part rotates, and obtains at least one set of superimposed image by the camera and be specially:
When the face scope in the initial pictures exceeds preset range, the face scope analyzed in the initial pictures exceeds The preset range beyond the position of part;
According to described beyond the position of part, the camera is controlled to be rotated towards the direction beyond part, and taken the photograph described During picture is rotating, at least one set of superimposed image is obtained with predeterminated frequency, until described described folded beyond being partially contained in After adding in the preset range of image, then the camera that stops rotating.
A kind of 5. mobile terminal, it is characterised in that including:
Initial pictures acquisition module, for receive it is input by user take pictures solicited message when, start camera, by described Camera obtains initial pictures;
Superimposed image acquisition module, for when the face scope in the initial pictures exceeds preset range, being taken the photograph described in control As head being rotated beyond the direction of part towards the face scope in the initial pictures beyond the preset range, and by described Camera obtains at least one set of superimposed image;
Image mosaic module, for the initial pictures and at least one set of superimposed image splicing to be generated composograph and are protected Deposit;It is described to include the initial pictures with least one set of superimposed image splicing, by the superimposed image with it is described initial What image repeated partly overlaps, by the superimposed image includes and the initial pictures do not include beyond part with it is described initial Image mosaic;
The initial pictures acquisition module includes:
Image Acquisition submodule comprising face, for receive it is input by user take pictures solicited message when, start camera, Judge whether the picture of the camera current shooting includes face, if the picture of the camera current shooting includes face, The image of face is then included by camera collection;
Designated position face scope judging submodule, for judging the face scope of designated position in the image comprising face Whether the preset range is exceeded, wherein, the upper left corner, the upper right corner, the left side of designated position image comprising face for described in Inferior horn or the lower right corner;
First initial pictures acquisition submodule, if the face scope for designated position in the image comprising face exceeds institute State preset range, then control the camera to rotate, until it is described comprising the image of face in designated position face scope not During beyond the preset range, then pass through the camera acquisition initial pictures;
Second initial pictures acquisition submodule, if for designated position in the image comprising face face scope without departing from The preset range, then using the image comprising face as the initial pictures.
6. mobile terminal as claimed in claim 5, it is characterised in that the mobile terminal further includes:
Face surface analysis module, for extracting the face information in the initial pictures, institute is analyzed according to the face information State the face scope in initial pictures.
7. mobile terminal as claimed in claim 5, it is characterised in that the mobile terminal further includes:
Image shows module comprising face, for including the figure of face described in the screen real-time exhibition by the mobile terminal Picture.
8. such as claim 5 to 7 any one of them mobile terminal, it is characterised in that the superimposed image acquisition module is specific For:
When the face scope in the initial pictures exceeds preset range, the face scope analyzed in the initial pictures exceeds The preset range beyond the position of part;
According to described beyond the position of part, the camera is controlled to be rotated towards the direction beyond part, and taken the photograph described During picture is rotating, at least one set of superimposed image is obtained with predeterminated frequency, until described described folded beyond being partially contained in After adding in the preset range of image, then the camera that stops rotating.
CN201410258043.XA 2014-06-11 2014-06-11 A kind of mobile terminal realizes the method and mobile terminal that more people take pictures Expired - Fee Related CN104038697B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410258043.XA CN104038697B (en) 2014-06-11 2014-06-11 A kind of mobile terminal realizes the method and mobile terminal that more people take pictures

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410258043.XA CN104038697B (en) 2014-06-11 2014-06-11 A kind of mobile terminal realizes the method and mobile terminal that more people take pictures

Publications (2)

Publication Number Publication Date
CN104038697A CN104038697A (en) 2014-09-10
CN104038697B true CN104038697B (en) 2018-05-04

Family

ID=51469271

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410258043.XA Expired - Fee Related CN104038697B (en) 2014-06-11 2014-06-11 A kind of mobile terminal realizes the method and mobile terminal that more people take pictures

Country Status (1)

Country Link
CN (1) CN104038697B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104469157B (en) * 2014-12-08 2017-11-07 广东欧珀移动通信有限公司 The method and apparatus that a kind of many people of camera shoot
CN104754231B (en) * 2015-03-31 2019-02-19 Oppo广东移动通信有限公司 Method and device for shooting person video
CN104883498B (en) * 2015-04-30 2018-01-23 广东欧珀移动通信有限公司 A kind of image pickup method and terminal based on rotating camera
CN104883495B (en) * 2015-04-30 2018-05-29 广东欧珀移动通信有限公司 A kind of photographic method and device
CN104883497A (en) * 2015-04-30 2015-09-02 广东欧珀移动通信有限公司 Positioning shooting method and mobile terminal
CN108712602A (en) * 2018-04-24 2018-10-26 Oppo广东移动通信有限公司 Camera control method and device, mobile terminal and storage medium
CN108495045B (en) * 2018-05-17 2020-11-27 Oppo广东移动通信有限公司 Image capturing method, device, electronic device, and storage medium
CN110266937A (en) * 2019-05-14 2019-09-20 深圳三诺信息科技有限公司 Terminal device and camera control method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216883A (en) * 2007-12-29 2008-07-09 北京中星微电子有限公司 A photography method and device
CN102279515A (en) * 2010-06-09 2011-12-14 鸿富锦精密工业(深圳)有限公司 Panoramic shooting apparatus and method thereof
CN103475849A (en) * 2013-09-22 2013-12-25 广东欧珀移动通信有限公司 Method and device for adjusting shooting angle of camera during video call
CN103533222A (en) * 2013-10-18 2014-01-22 路宽 Full-automatic telescopic rotatable camera

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216883A (en) * 2007-12-29 2008-07-09 北京中星微电子有限公司 A photography method and device
CN102279515A (en) * 2010-06-09 2011-12-14 鸿富锦精密工业(深圳)有限公司 Panoramic shooting apparatus and method thereof
CN103475849A (en) * 2013-09-22 2013-12-25 广东欧珀移动通信有限公司 Method and device for adjusting shooting angle of camera during video call
CN103533222A (en) * 2013-10-18 2014-01-22 路宽 Full-automatic telescopic rotatable camera

Also Published As

Publication number Publication date
CN104038697A (en) 2014-09-10

Similar Documents

Publication Publication Date Title
CN104038697B (en) A kind of mobile terminal realizes the method and mobile terminal that more people take pictures
US11218649B2 (en) Photographing method, apparatus, and device
JP5719967B2 (en) Imaging device with projector and control method thereof
WO2022001806A1 (en) Image transformation method and apparatus
CN103945105B (en) The method and apparatus that a kind of intelligence is taken pictures with share photos
CN105657257B (en) Image pickup method, device, system, mobile terminal and the self-shooting bar of distant view photograph
CN104320586A (en) Photographing method, system and terminal
WO2015078336A1 (en) Method and terminal for shooting media
US12154251B2 (en) Image processing method and related apparatus
CN103945045A (en) Method and device for data processing
WO2012151889A1 (en) Mobile phone
CN104574397A (en) Image processing method and mobile terminal
CN105049695A (en) Video recording method and device
CN103167146A (en) System and method for achieving data transmission and matching based on face recognition technology
US20150244756A1 (en) Method, Apparatus and System for Determining Terminal That is to Share Real-Time Video
CN102932596A (en) Photographing method and device and mobile terminal
CN107395957A (en) Photographic method, device, storage medium and electronic equipment
US10291835B2 (en) Information processing apparatus, imaging apparatus, information processing method, and imaging system
US9052866B2 (en) Method, apparatus and computer-readable medium for image registration and display
CN112085647A (en) Face correction method and electronic equipment
CN113850709A (en) Image transformation method and device
CN105139340A (en) Method and device for splicing panoramic photos
CN106791787A (en) A kind of terminal device with shoot function
CN105516609A (en) Method and device for taking pictures
CN109698908A (en) Intelligence calls method, terminal and the storage medium of front camera and rear camera imaging

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20170401

Address after: Changan town in Guangdong province Dongguan 523841 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: 518000 Guangdong city of Shenzhen province Nanshan District Gao Xin Road No. 013 Fu technology building B block 6 Building

Applicant before: SHENZHEN OPPO COMMUNICATION SOFTWARE Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523841 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180504