技术领域technical field
本发明涉及移动终端应用领域,具体涉及一种移动终端拍照自动合成的方法、存储装置及移动终端。The invention relates to the application field of mobile terminals, in particular to a method for automatically synthesizing photographs taken by a mobile terminal, a storage device and a mobile terminal.
背景技术Background technique
目前,移动终端功能越来越丰富,成为了人们生活中不可或缺的工具,随着移动终端摄像头技术的提高和拍照应用的发展,移动终端的拍照功能已逐步替代了传统照相机。移动终端通常配置有前置摄像头和后置摄像头,但是现有技术中,前置摄像头和后置摄像头通常为独立工作,不能配合拍照,比如:在人们聚会时,需要进行合影留念,但是合影确不能将拍照人员拍入合影里面。At present, mobile terminals have more and more functions and have become an indispensable tool in people's life. With the improvement of mobile terminal camera technology and the development of camera applications, the camera function of mobile terminals has gradually replaced traditional cameras. Mobile terminals are usually equipped with a front camera and a rear camera, but in the prior art, the front camera and the rear camera usually work independently and cannot cooperate with each other to take pictures. Photographers cannot be included in group photos.
因此,现有技术还有待于改进和发展。Therefore, the prior art still needs to be improved and developed.
发明内容Contents of the invention
本发明要解决的技术问题在于,针对现有技术的上述缺陷,提供了一种移动终端拍照自动合成的方法、存储装置及移动终端,旨在解决在合影时,可将拍照人员同时纳入进合照当中。The technical problem to be solved by the present invention is that, aiming at the above-mentioned defects of the prior art, a method for automatically synthesizing photos taken by a mobile terminal, a storage device and a mobile terminal are provided, aiming at solving the problem of including the photographers into the group photo at the same time among.
本发明解决技术问题所采用的技术方案如下:The technical solution adopted by the present invention to solve technical problems is as follows:
一种移动终端拍照自动合成的方法,包括以下步骤:A method for automatically synthesizing photos taken by a mobile terminal, comprising the following steps:
A,获取后置摄像头的第一预览画面,识别所述第一预览画面中的合影人数;A. Obtain the first preview picture of the rear camera, and identify the number of people taking a group photo in the first preview picture;
B,将所述合影人数与预设阈值进行对比,当所述合影人数大于等于所述预设阈值时,自动切换至前置摄像头的第二预览画面;B. Comparing the number of people taking a group photo with a preset threshold, and automatically switching to the second preview screen of the front camera when the number of people taking a group photo is greater than or equal to the preset threshold;
C,根据用户的操作指令,获取前置摄像头拍摄的照片,并提取所述照片中的人物画面后,自动切换至后置摄像头的第一预览画面;C. According to the user's operation instruction, obtain the photo taken by the front camera, and after extracting the character picture in the photo, automatically switch to the first preview picture of the rear camera;
D,将所述人物画面移动至所述第一预览画面中的预合成区域,并完成后置摄像头的拍摄,得到第三预览画面;D, moving the character picture to the pre-synthesis area in the first preview picture, and completing the shooting of the rear camera to obtain the third preview picture;
E,将所述第三预览画面进行自动合成,得到目标照片。E, automatically synthesizing the third preview image to obtain a target photo.
所述步骤A具体包括:Described step A specifically comprises:
A1,移动终端根据用户的操作指令,开启后置摄像头,并获取后置摄像头的第一预览画面;A1, the mobile terminal turns on the rear camera according to the user's operation instruction, and obtains the first preview image of the rear camera;
A2,根据人脸识别技术,计算所述第一预览画面中的人脸识别框数量。A2. According to face recognition technology, calculate the number of face recognition frames in the first preview image.
所述步骤B之前还包括:Also include before the step B:
根据用户的操作指令,在所述第一预览画面中选择一预合成区域,其中,所述预合成区域以人脸识别框显示。According to the user's operation instruction, a pre-synthesis area is selected in the first preview screen, wherein the pre-synthesis area is displayed with a face recognition frame.
所述预设阈值为合影人数2人。The preset threshold is 2 people for the group photo.
所述步骤D具体包括:Described step D specifically comprises:
D1,通过人脸识别技术,获取所述人物画面的人脸识别框;D1, using face recognition technology to obtain the face recognition frame of the character picture;
D2,将获取到的人物画面的人脸识别框移动至所述预合成区域;D2, moving the face recognition frame of the acquired character picture to the pre-synthesis area;
D3,调整所述人物画面的比例大小,直至与所述第一预览画面的比例大小相同;D3, adjusting the scale of the character picture until it is the same as the scale of the first preview picture;
D4,控制后置摄像头完成拍摄,得到第三预览画面。D4, controlling the rear camera to complete shooting, and obtaining a third preview image.
所述步骤E具体包括:Described step E specifically comprises:
检测并调整所述第三预览画面的像素。Detecting and adjusting pixels of the third preview image.
所述步骤E具体包括:Described step E specifically comprises:
检测并调整所述第三预览画面的亮度。Detect and adjust the brightness of the third preview image.
一种存储装置,所述存储装置存储有多条指令,所述指令能够被执行以实现如以上所述的移动终端拍照自动合成的方法。A storage device, the storage device stores a plurality of instructions, and the instructions can be executed to realize the above-mentioned method for automatic synthesis of photographs taken by a mobile terminal.
一种移动终端,包括:处理器、与所述处理器通信连接的存储器,所述存储器存储有多条指令,所述指令被处理器执行时实现以上任一项所述的移动终端拍照自动合成的方法;A mobile terminal, comprising: a processor, a memory connected to the processor in communication, the memory stores a plurality of instructions, and when the instructions are executed by the processor, the automatic synthesis of photographs of the mobile terminal described in any one of the above is realized Methods;
所述处理器用于调用所述存储器中的指令,以执行上述任一项所述的移动终端拍照自动合成的方法。The processor is used for invoking instructions in the memory to execute the method for automatic composition of photographs by a mobile terminal described in any one of the above.
本发明的有益效果:本发明在合影时,通过将前置摄像头拍摄的人物照片进行提取,并合成至后置摄像头拍摄的照片当中,使人们在合影时能够将拍照人员纳入合照当中,为用户提供了方便,并且本发明可适配任意厂商的配置有前、后摄像头的移动终端,无需增减移动终端的硬件,普及性强,有较高的实用性。Beneficial effects of the present invention: when taking a group photo, the present invention extracts the photos of people taken by the front camera and synthesizes them into the photos taken by the rear camera, so that people can include the photographers in the group photo when they take a group photo. The invention provides convenience, and the invention can be adapted to mobile terminals equipped with front and rear cameras of any manufacturer without increasing or decreasing the hardware of the mobile terminal, and has strong universality and high practicability.
附图说明Description of drawings
图1是本发明一种移动终端拍照自动合成的方法较佳实施例的流程图。FIG. 1 is a flow chart of a preferred embodiment of a method for automatically synthesizing photos taken by a mobile terminal in the present invention.
图2是本发明一种移动终端拍照自动合成的方法的具体应用实施例的流程图。FIG. 2 is a flow chart of a specific application embodiment of a method for automatically synthesizing photos taken by a mobile terminal according to the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案及优点更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention more clear and definite, the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本发明实施例提供了一种移动终端拍照自动合成的方法,如图1所示,包括以下步骤:An embodiment of the present invention provides a method for automatically synthesizing photos taken by a mobile terminal, as shown in FIG. 1 , comprising the following steps:
S100,获取后置摄像头的第一预览画面,识别所述第一预览画面中的合影人数。S100. Acquire a first preview image of a rear camera, and identify the number of people taking a group photo in the first preview image.
本发明实施例中,需要所述移动终端配备有前置摄像头和后置摄像头,并且所述移动终端需要具备人脸识别技术。In the embodiment of the present invention, the mobile terminal needs to be equipped with a front camera and a rear camera, and the mobile terminal needs to have face recognition technology.
此外,本发明实施例中所述的用户、拍照人员为指同一人。In addition, the user and the photographer mentioned in the embodiment of the present invention refer to the same person.
所述步骤S100具体包括:The step S100 specifically includes:
S101,移动终端根据用户的操作指令,开启后置摄像头,并获取后置摄像头的第一预览画面;S101, the mobile terminal turns on the rear camera according to the user's operation instruction, and obtains the first preview image of the rear camera;
S102,根据人脸识别技术,计算所述第一预览画面中的人脸识别框数量。S102. Calculate the number of face recognition frames in the first preview image according to the face recognition technology.
本发明实施例中,当用户需要使用移动终端拍摄合影照片时,开启拍照功能,移动终端默认为优先开启后置摄像头(或调整至开启后置摄像头),后置摄像头取景到的预览画面显示在所述移动终端的显示屏上。In the embodiment of the present invention, when the user needs to use the mobile terminal to take a group photo, the camera function is turned on, and the mobile terminal defaults to turning on the rear camera first (or adjusting to turn on the rear camera), and the preview screen captured by the rear camera is displayed on on the display screen of the mobile terminal.
将后置摄像头对准合影对象进行取景,移动终端根据人脸识别技术,识别出第一预览画面(后置摄像头取景到的第一预览画面)中的人脸,并且每个人脸以一识别框显示在第一预览画面中相对应的位置,一个人脸识别框代表一个合影人数,以计算出第一预览画面中的合影人数。Point the rear camera at the subject of the group photo to take a view, and the mobile terminal recognizes the face in the first preview screen (the first preview screen captured by the rear camera) according to the face recognition technology, and each face is marked with a recognition frame Displayed at a corresponding position in the first preview image, a face recognition frame represents a number of people taking a group photo, so as to calculate the number of people taking a group photo in the first preview image.
S200,将所述合影人数与预设阈值进行对比,当所述合影人数大于等于所述预设阈值时,自动切换至前置摄像头的第二预览画面。S200. Comparing the number of people taking a group photo with a preset threshold, and automatically switching to a second preview image of the front camera when the number of people taking a group photo is greater than or equal to the preset threshold.
本发明实施例中,所述预设阈值为合影人数2人。获取步骤S100中计算出的合影人数,并将合影人数与预设阈值进行对比,当合影人数大于等于预设阈值时,则自动切换至前置摄像头的第二预览画面;若小于预设阈值,则结束本应用。In the embodiment of the present invention, the preset threshold is 2 people for the group photo. Obtain the number of people taking a group photo calculated in step S100, and compare the number of people taking a group photo with a preset threshold, and when the number of people taking a group photo is greater than or equal to the preset threshold, automatically switch to the second preview screen of the front camera; if it is less than the preset threshold, then end the application.
比如:如当前在第一预览画面中计算出的合影人数为3人,那么将合影人数3人与预设阈值2人做对比,显然,合影人数3人大于预设阈值2人,如此,则控制移动终端自动切换为前置摄像头取景,并将前置摄像头取景的第二预览画面显示在移动终端的显示在显示屏上;如果计算出当前第一预览画面中的合影人数为1人,同样也是将合影人数1人与预设阈值2人做对比,结果为合影人数1人小于预设阈值2人,则结束本应用。For example: if the current number of people in the group photo calculated on the first preview screen is 3, then compare the number of people in the group photo with the preset threshold of 2 people. Obviously, the number of people in the group photo is greater than the preset threshold of 2 people. If so, then Control the mobile terminal to automatically switch to the front camera for viewing, and display the second preview screen of the front camera on the display screen of the mobile terminal; It also compares the number of 1 person in the group photo with the preset threshold of 2, and if the result is that the number of 1 person in the group photo is less than the preset threshold of 2, the application ends.
进一步的,所述步骤S200之前还包括:Further, before the step S200, it also includes:
根据用户的操作指令,在所述第一预览画面中选择一预合成区域,其中,所述预合成区域以人脸识别框显示。According to the user's operation instruction, a pre-synthesis area is selected in the first preview screen, wherein the pre-synthesis area is displayed with a face recognition frame.
本发明实施例中,当合影人数大于预设阈值,并且要切换至前置摄像头之前,还需满足一预设条件,即:用户需要在第一预览画面中选择一预合成区域。In the embodiment of the present invention, when the number of people taking a group photo is greater than the preset threshold and before switching to the front camera, a preset condition needs to be met, that is, the user needs to select a pre-synthesis area in the first preview image.
具体的,用户需要在第一预览画面中选择一个区域作为预合成区域,为本应用后续步骤做准备,预合成区域以人脸识别框显示在第一预览画面中,需要用户移动至所需的区域。Specifically, the user needs to select an area in the first preview screen as the pre-synthesis area to prepare for the subsequent steps of this application. The pre-synthesis area is displayed in the first preview screen with a face recognition frame, and the user needs to move to the desired area. area.
比如,当后置摄像头取景到的第一预览画面中,合影人数为2人以上,此时,需要用户选择一个空闲区域作为预合成区域,因第一预览画面中的合影人是以人脸识别框识别并显示在相对应位置的,并且预合成区域也是以人脸识别框显示在第一预览画面中,因此,用户只需控制以人脸识别框显示的预合成区域在第一预览画面中移动,直至用户移动至用户满意的位置,并且下达确认指令。值得一提的是,预合成区域的选择不能与第一预览画面中的其他人脸识别框重叠,所以,用户如果想选择一个心仪的位置的话,可以安排其他合影人排整队列,给拍照人员空闲出一个心仪的位置。For example, when the number of people in the group photo is more than 2 in the first preview screen captured by the rear camera, the user needs to select a free area as the pre-synthesis area, because the group photo in the first preview screen is based on face recognition. The frame is recognized and displayed in the corresponding position, and the pre-synthesis area is also displayed in the first preview screen as a face recognition frame, so the user only needs to control the movement of the pre-synthesis area displayed in the face recognition frame in the first preview screen , until the user moves to a satisfactory location and issues a confirmation command. It is worth mentioning that the selection of the pre-synthesis area cannot overlap with other face recognition frames in the first preview screen. Therefore, if the user wants to choose a favorite location, he can arrange other photo shooters to line up for the photographer. Free up a favorite spot.
S300,根据用户的操作指令,获取前置摄像头拍摄的照片,并提取所述照片中的人物画面后,自动切换至后置摄像头的第一预览画面。S300. According to the user's operation instruction, obtain the photo taken by the front camera, and after extracting the image of the person in the photo, automatically switch to the first preview image of the rear camera.
本发明实施例中,当移动终端切换为前置摄像头后,移动终端显示屏上显示第二预览画面,此时,需要拍照人员使用前置摄像头进行自拍,自拍完成后,提取自拍照片中的人物画面,然后切换至后置摄像头,移动终端显示屏显示第一预览画面。In the embodiment of the present invention, when the mobile terminal is switched to the front camera, the second preview screen is displayed on the display screen of the mobile terminal. At this time, the photographer needs to use the front camera to take a selfie. After the selfie is completed, the person in the selfie photo is extracted. screen, and then switch to the rear camera, and the display screen of the mobile terminal displays the first preview screen.
S400,将所述人物画面移动至所述第一预览画面中的预合成区域,并完成后置摄像头的拍摄,得到第三预览画面。S400. Move the character picture to a pre-synthesis area in the first preview picture, and complete shooting with a rear camera to obtain a third preview picture.
所述步骤S400具体包括:The step S400 specifically includes:
S401,通过人脸识别技术,获取所述人物画面的人脸识别框。S401. Acquire a face recognition frame of the character picture through face recognition technology.
具体的,摄像头已切换为后置摄像头,移动终端显示屏显示第一预览画面,然后获取自拍照片中的人物画面,并且通过人脸识别技术,识别该人物画面中的人脸,以人脸识别框显示。Specifically, the camera has been switched to the rear camera, the display screen of the mobile terminal displays the first preview image, and then obtains the image of the person in the selfie photo, and recognizes the face in the image of the person through face recognition technology, and uses face recognition box is displayed.
S402,将获取到的人物画面的人脸识别框移动至所述预合成区域。S402. Move the acquired face recognition frame of the person picture to the pre-synthesis area.
具体的,控制所述人物画面的人脸识别框,移动至所述预合成区域。Specifically, the face recognition frame of the character picture is controlled to move to the pre-synthesis area.
S403,调整所述人物画面的比例大小,直至与所述第一预览画面的比例大小相同。S403. Adjust the scale of the character picture until it is the same as the scale of the first preview picture.
具体的,由于前置摄像头自拍的人物画面与第一预览画面中的人物比例大小不同,所以当所任人物画面移动至预合成区域后,需调整所述人物画面的大小,以配合第一预览画面的比例大小。当所述人物画面与第一预览画面的比例大小不同时,所述人物画面的人脸识别框与第一预览画面中的人脸识别框同样也不相同,并且成正比关系,通过调整所述人物画面的人脸识别框大小,至与所述第一预览画面中的人脸识别框同样大小。值得一提的是,调整所述人物画面的人脸识别框大小时,调整的是整个人物画面的比例,不止是人脸比例。Specifically, since the character picture taken by the front camera is different from the character in the first preview picture, when any character picture moves to the pre-synthesis area, the size of the character picture needs to be adjusted to match the first preview picture proportional size. When the proportions of the character picture and the first preview picture are different, the face recognition frame of the character picture is also different from the face recognition frame in the first preview picture, and they are in direct proportion. By adjusting the The size of the face recognition frame of the character picture should be the same size as the face recognition frame in the first preview picture. It is worth mentioning that when adjusting the size of the face recognition frame of the character picture, what is adjusted is the proportion of the entire character picture, not just the proportion of the face.
S404,控制后置摄像头完成拍摄,得到第三预览画面。S404. Control the rear camera to complete shooting, and obtain a third preview image.
具体的,当将所述人物画面移动至第一预览画面的预合成区域后,拍照人员控制后置摄像头完成拍摄,得到第三预览画面。所述第三预览画面包括:前置摄像头拍摄的人物画面、后置摄像头拍摄的合影画面。Specifically, after moving the character picture to the pre-synthesis area of the first preview picture, the photographer controls the rear camera to complete the shooting, and obtains the third preview picture. The third preview image includes: a character image captured by the front camera, and a group photo image captured by the rear camera.
S500,将所述第三预览画面进行自动合成,得到目标照片。S500. Automatically synthesize the third preview image to obtain a target photo.
本发明实施例中,将获得的第三预览画面进行合成,所述合成需调整所述第三预览画面的亮度,因为在第三预览画面中包含有前置摄像头拍摄的人物画面、后置摄像头拍摄的合影画面,需将前置摄像头拍摄的人物画面的亮度与后置摄像头拍摄的合影画面的亮度调整为一致,可有一定比例的亮度差值,如5%或10%。In the embodiment of the present invention, the obtained third preview picture is synthesized, and the brightness of the third preview picture needs to be adjusted in the synthesis, because the third preview picture includes a character picture captured by a front camera, a rear camera For the group photo taken, the brightness of the character picture taken by the front camera needs to be adjusted to be consistent with the brightness of the group photo taken by the rear camera, and there may be a certain percentage of brightness difference, such as 5% or 10%.
此外,还需调整第三预览画面的像素,因为在第三预览画面中包含有前置摄像头拍摄的人物画面、后置摄像头拍摄的合影画面,需将前置摄像头拍摄的人物画面的像素与后置摄像头拍摄的合影画面的像素调整为一致,可有一定比例的像素差值,如5%或10%。In addition, it is necessary to adjust the pixels of the third preview image, because the third preview image includes the character image captured by the front camera and the group photo image captured by the rear camera, and it is necessary to combine the pixels of the character image captured by the front camera The pixels of the group photo taken by the camera are adjusted to be consistent, and there may be a certain percentage of pixel difference, such as 5% or 10%.
以下通过具体的应用实施例对本发明一种移动终端拍照自动合成的方法做进一步详细描述,如图2所示,包括以下步骤:A method for automatically synthesizing photos taken by a mobile terminal of the present invention is described in further detail below through specific application examples, as shown in FIG. 2 , including the following steps:
1. 开启移动终端的拍照功能:用户输出操作指令,开始移动终端的拍照功能,默认开启后置摄像头(或调整至后置摄像头)。1. Enable the camera function of the mobile terminal: the user inputs an operation command to start the camera function of the mobile terminal, and the rear camera is enabled by default (or adjusted to the rear camera).
2. 识别并计算后置摄像头的第一预览画面中的合影人数:后置摄像头开启后,移动终端显示屏上实时显示出后置摄像头取景的第一预览画面,将后置摄像头对准所需拍摄的合影对象,通过人脸识别技术,以人脸识别框分别显示合影人,计算第一预览画面中的人脸识别框,即为合影人数。2. Identify and calculate the number of people in the group photo in the first preview screen of the rear camera: After the rear camera is turned on, the first preview screen of the rear camera will be displayed in real time on the display screen of the mobile terminal, and the rear camera should be aimed at the desired For the photographed subjects, the face recognition technology is used to display the people who take the photo in the face recognition frame, and the face recognition frame in the first preview screen is calculated, which is the number of people in the group photo.
3. 将合影人数与预设阈值进行对比:获取第一预览画面中的合影人数,将所述合影人数与预设阈值进行对比(较佳的,预设阈值为人数2人),当所述合影人数少于所述预设阈值时,结束本应用;当所述合影人数大于等于所述预设阈值时,则进行步骤4。3. Comparing the number of people taking photos with the preset threshold: obtain the number of people taking photos in the first preview screen, and compare the number of people taking photos with the preset threshold (preferably, the preset threshold is 2 people), when the When the number of people taking pictures together is less than the preset threshold, the application ends; when the number of people taking pictures together is greater than or equal to the preset threshold, go to step 4.
4. 在第一预览画面中选择一预合成区域:预合成区域以人脸识别框的形式显示,用户需在第一预览画面空闲出选择一区域作为预合成区域,并确认选择。所述预合成区域不可与第一预览画面中的合影人的人脸识别框相叠加。4. Select a pre-synthesis area in the first preview screen: the pre-synthesis area is displayed in the form of a face recognition frame, and the user needs to select an area as the pre-synthesis area in the first preview screen and confirm the selection. The pre-synthesis area cannot be superimposed on the face recognition frame of the person taking the photo in the first preview image.
5. 自动切换至前置摄像头:当所述第一预览画面中的合影人数大于等于预设阈值,并且选择并确认了预合成区域后,则自动将当前开启的后置摄像头切换为开启前置摄像头,并在移动终端显示屏上显示由前置摄像头取景的第二预览画面。5. Automatically switch to the front camera: When the number of people in the group photo in the first preview screen is greater than or equal to the preset threshold, and the pre-synthesis area is selected and confirmed, the currently opened rear camera will be automatically switched to open the front camera camera, and display a second preview image captured by the front camera on the display screen of the mobile terminal.
6. 用户使用前置摄像头拍摄照片完成:当切换为前置摄像头后,用户需使用前置摄像头完成自拍。6. The user takes a photo with the front camera: After switching to the front camera, the user needs to use the front camera to take a selfie.
7. 从前置摄像头拍摄的照片中提取人物画面:当前置摄像头拍摄完成后,获取前置摄像头拍摄的照片,从该照片中提取人物画面。7. Extract images of people from photos taken by the front-facing camera: After the photos taken by the front-facing camera are completed, obtain photos taken by the front-facing camera, and extract images of people from the photos.
8. 自动切换至后置摄像头的第一预览画面:当成功提取了前置摄像头拍摄照片中的人物画面后,自动将摄像头从前置摄像头切换成后置摄像头,并在移动终端显示屏上显示第一预览画面。8. Automatically switch to the first preview screen of the rear camera: After successfully extracting the picture of the person in the photo taken by the front camera, the camera will be automatically switched from the front camera to the rear camera, and displayed on the display screen of the mobile terminal The first preview screen.
9. 将提取的人物画面移动至预合成区域:所述人物画面为从前置摄像头拍摄的照片中提取出的人物画面;将所述人物画面提取后,显示在第一预览画面上,通过人脸识别技术,显示出所述人物画面的人脸识别框,控制所述人物画面的人脸识别框,移动至所述预合成区域,为后续步骤合成照片做准备。9. Move the extracted character picture to the pre-synthesis area: the character picture is the character picture extracted from the photos taken by the front camera; after the described character picture is extracted, it is displayed on the first preview screen, and the human The face recognition technology displays the face recognition frame of the character picture, controls the face recognition frame of the character picture, moves to the pre-synthesis area, and prepares for the subsequent step of synthesizing photos.
10. 调整人物画面的比例大小:因所述人物画面为前置摄像头拍摄的,而所述预合成区域为后置摄像头的第一预览画面的一部分,所以所述人物画面与所述第一预览画面比例大小不同,需调整所述人物画面的比例大小。通过调整所述人物画面的人脸识别框大小,进行所述人物画面整体的大小,直至与所述预合成区域大小相同(所述预合成区域以人脸识别框显示),进而与所述第一预览画面的比例大小相同。所述人物画面的人脸识别框的大小与所述人物画面大小成正比。10. Adjust the proportion of the character picture: because the character picture is taken by the front camera, and the pre-synthesis area is part of the first preview picture of the rear camera, the character picture and the first preview The scale of the picture is different, and the scale of the picture of the character needs to be adjusted. By adjusting the size of the face recognition frame of the character picture, the overall size of the character picture is adjusted until it is the same size as the pre-synthesis area (the pre-synthesis area is displayed in a face recognition frame), and then compared with the second The scale and size of the preview images are the same. The size of the face recognition frame of the character picture is proportional to the size of the character picture.
11. 获取第三预览画面:当使用后置摄像头对准所需拍摄的合影对象、并已将所述人物画面移至预合成区域且调整好比例大小后,使用后置摄像头进行拍摄,得到第三预览画面。11. Obtain the third preview image: when the rear camera is used to aim at the subject to be photographed, and the image of the person has been moved to the pre-synthesis area and the proportion is adjusted, use the rear camera to shoot and get the second preview image. Three preview screen.
12. 调整第三预览画面的亮度:因为在第三预览画面中包含有前置摄像头拍摄的人物画面、后置摄像头拍摄的合影画面,需将前置摄像头拍摄的人物画面的亮度与后置摄像头拍摄的合影画面的亮度调整为一致,可有一定比例的亮度差值,如5%或10%。12. Adjust the brightness of the third preview screen: Because the third preview screen includes the character screen captured by the front camera and the group photo screen captured by the rear camera, it is necessary to adjust the brightness of the character screen captured by the front camera to the brightness of the rear camera. The brightness of the group photo taken is adjusted to be consistent, and there may be a certain percentage of brightness difference, such as 5% or 10%.
13. 调整第三预览画面的像素:因为在第三预览画面中包含有前置摄像头拍摄的人物画面、后置摄像头拍摄的合影画面,需将前置摄像头拍摄的人物画面的像素与后置摄像头拍摄的合影画面的像素调整为一致,可有一定比例的像素差值,如5%或10%。13. Adjust the pixels of the third preview image: Because the third preview image contains the image of the person captured by the front camera and the group photo image captured by the rear camera, it is necessary to combine the pixels of the image of the person captured by the front camera with the image of the rear camera. The pixels of the group photo taken are adjusted to be consistent, and there may be a certain percentage of pixel difference, such as 5% or 10%.
14. 合成至目标照片:将所述第三预览画面调整好亮度和像素后,合成至目标照片。14. Composite to the target photo: After adjusting the brightness and pixels of the third preview screen, composite to the target photo.
由上可见,本发明在合影时,通过将前置摄像头拍摄的人物照片进行提取,并合成至后置摄像头拍摄的照片当中,使人们在合影时能够将拍照人员纳入合照当中,为用户提供了方便,并且本发明可适配任意厂商的配置有前、后摄像头的移动终端,无需增减移动终端的硬件,普及性强,有较高的实用性。It can be seen from the above that when taking a group photo, the present invention extracts the photos of people taken by the front camera and synthesizes them into the photos taken by the rear camera, so that people can include the photographers in the group photo when they take a group photo, providing users with It is convenient, and the present invention can be adapted to any manufacturer's mobile terminal equipped with front and rear cameras without increasing or decreasing the hardware of the mobile terminal, and has strong universality and high practicability.
基于以上所述的一种移动终端拍照自动合成的方法,本发明还公开了一种存储装置,所述存储装置存储有多条指令,所述指令能够被执行以实现上述任一项所述的移动终端拍照自动合成的方法。Based on the above-mentioned method for automatically synthesizing photos taken by a mobile terminal, the present invention also discloses a storage device, the storage device stores a plurality of instructions, and the instructions can be executed to achieve any of the above-mentioned A method for automatically synthesizing photos taken by a mobile terminal.
基于以上所述的一种移动终端拍照自动合成的方法,本发明还公开了一种移动终端,包括:处理器、与所述处理器通信连接的存储器,所述存储器存储有多条指令,所述指令被处理器执行时实现以上任一项所述的移动终端拍照自动合成的方法;Based on the above-mentioned method for automatically synthesizing photos of a mobile terminal, the present invention also discloses a mobile terminal, including: a processor, a memory connected to the processor in communication, the memory stores a plurality of instructions, the When the instructions are executed by the processor, the method for automatically synthesizing photos of the mobile terminal described in any one of the above is realized;
所述处理器用于调用所述存储器中的指令,以执行上述任一项所述的移动终端拍照自动合成的方法。The processor is used for invoking instructions in the memory to execute the method for automatic composition of photographs by a mobile terminal described in any one of the above.
综上所述,本发明公开了一种移动终端拍照自动合成的方法、存储装置及移动终端,包括:获取后置摄像头的第一预览画面,识别所述第一预览画面中的合影人数;将所述合影人数与预设阈值进行对比,当所述合影人数大于等于所述预设阈值时,自动切换至前置摄像头的第二预览画面;根据用户的操作指令,获取前置摄像头拍摄的照片,并提取所述照片中的人物画面后,自动切换至后置摄像头的第一预览画面;将所述人物画面移动至所述第一预览画面中的预合成区域,并完成后置摄像头的拍摄,得到第三预览画面;将所述第三预览画面进行自动合成,得到目标照片。本发明在合影时,通过将前置摄像头拍摄的人物照片进行提取,并合成至后置摄像头拍摄的照片当中,使人们在合影时能够将拍照人员纳入合照当中,为用户提供了方便,并且本发明可适配任意厂商的配置有前、后摄像头的移动终端,无需增减移动终端的硬件,普及性强,有较高的实用性。To sum up, the present invention discloses a method for automatically synthesizing photos taken by a mobile terminal, a storage device, and a mobile terminal, including: acquiring a first preview picture of a rear camera, identifying the number of people taking a group photo in the first preview picture; The number of people in the group photo is compared with the preset threshold, and when the number of people in the group photo is greater than or equal to the preset threshold, automatically switch to the second preview screen of the front camera; according to the user's operation instruction, obtain the photos taken by the front camera , and after extracting the character picture in the photo, automatically switch to the first preview picture of the rear camera; move the character picture to the pre-synthesis area in the first preview picture, and complete the shooting of the rear camera , to obtain a third preview image; automatically synthesizing the third preview image to obtain a target photo. When taking a group photo, the present invention extracts the photos of people taken by the front camera and synthesizes them into the photos taken by the rear camera, so that people can include the photographers into the group photo when they take a group photo, which provides convenience for users, and the present invention The invention can be adapted to any manufacturer's mobile terminal equipped with front and rear cameras, without increasing or decreasing the hardware of the mobile terminal, and has strong popularity and high practicability.
应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。It should be understood that the application of the present invention is not limited to the above examples, and those skilled in the art can make improvements or transformations according to the above descriptions, and all these improvements and transformations should belong to the protection scope of the appended claims of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710352749.6ACN107124551B (en) | 2017-05-18 | 2017-05-18 | A method, storage device and mobile terminal for automatic photo synthesis of mobile terminal |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710352749.6ACN107124551B (en) | 2017-05-18 | 2017-05-18 | A method, storage device and mobile terminal for automatic photo synthesis of mobile terminal |
| Publication Number | Publication Date |
|---|---|
| CN107124551Atrue CN107124551A (en) | 2017-09-01 |
| CN107124551B CN107124551B (en) | 2021-03-23 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710352749.6AActiveCN107124551B (en) | 2017-05-18 | 2017-05-18 | A method, storage device and mobile terminal for automatic photo synthesis of mobile terminal |
| Country | Link |
|---|---|
| CN (1) | CN107124551B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108200332A (en)* | 2017-12-27 | 2018-06-22 | 努比亚技术有限公司 | A kind of pattern splicing method, mobile terminal and computer readable storage medium |
| CN108600611A (en)* | 2018-03-28 | 2018-09-28 | 努比亚技术有限公司 | A kind of image pickup method, mobile terminal and computer readable storage medium |
| CN110475058A (en)* | 2018-05-10 | 2019-11-19 | 宏碁股份有限公司 | Image composition method and intelligent apparatus |
| EP3594869A1 (en)* | 2018-07-11 | 2020-01-15 | Aptiv Technologies Limited | Assigned seating system for an automated-taxi |
| CN111246078A (en)* | 2018-11-29 | 2020-06-05 | 北京小米移动软件有限公司 | Image processing method and device |
| CN111770279A (en)* | 2020-08-03 | 2020-10-13 | 维沃移动通信有限公司 | A shooting method and electronic device |
| CN112954221A (en)* | 2021-03-11 | 2021-06-11 | 深圳市几何数字技术服务有限公司 | Method for real-time photo shooting |
| CN113473011A (en)* | 2021-06-29 | 2021-10-01 | 广东湾区智能终端工业设计研究院有限公司 | Shooting method, system and storage medium |
| CN114727000A (en)* | 2021-01-05 | 2022-07-08 | 北京小米移动软件有限公司 | Group photo method, device, terminal equipment and storage medium |
| CN116471429A (en)* | 2023-06-20 | 2023-07-21 | 上海云梯信息科技有限公司 | Image information pushing method based on behavior feedback and real-time video transmission system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101651767A (en)* | 2008-08-14 | 2010-02-17 | 三星电子株式会社 | Device and method for synchronously synthesizing images |
| US20140240544A1 (en)* | 2013-02-22 | 2014-08-28 | Samsung Electronics Co., Ltd. | Apparatus and method for photographing an image in a device having a camera |
| CN105391949A (en)* | 2015-10-29 | 2016-03-09 | 深圳市金立通信设备有限公司 | Photographing method and terminal |
| CN105578028A (en)* | 2015-07-28 | 2016-05-11 | 宇龙计算机通信科技(深圳)有限公司 | A camera method and terminal |
| CN105979163A (en)* | 2015-11-06 | 2016-09-28 | 乐视移动智能信息技术(北京)有限公司 | Shooting method and device |
| CN106506924A (en)* | 2016-12-05 | 2017-03-15 | 深圳天珑无线科技有限公司 | The image pickup method and mobile terminal of mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101651767A (en)* | 2008-08-14 | 2010-02-17 | 三星电子株式会社 | Device and method for synchronously synthesizing images |
| US20140240544A1 (en)* | 2013-02-22 | 2014-08-28 | Samsung Electronics Co., Ltd. | Apparatus and method for photographing an image in a device having a camera |
| CN105578028A (en)* | 2015-07-28 | 2016-05-11 | 宇龙计算机通信科技(深圳)有限公司 | A camera method and terminal |
| CN105391949A (en)* | 2015-10-29 | 2016-03-09 | 深圳市金立通信设备有限公司 | Photographing method and terminal |
| CN105979163A (en)* | 2015-11-06 | 2016-09-28 | 乐视移动智能信息技术(北京)有限公司 | Shooting method and device |
| CN106506924A (en)* | 2016-12-05 | 2017-03-15 | 深圳天珑无线科技有限公司 | The image pickup method and mobile terminal of mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108200332A (en)* | 2017-12-27 | 2018-06-22 | 努比亚技术有限公司 | A kind of pattern splicing method, mobile terminal and computer readable storage medium |
| CN108600611A (en)* | 2018-03-28 | 2018-09-28 | 努比亚技术有限公司 | A kind of image pickup method, mobile terminal and computer readable storage medium |
| CN110475058A (en)* | 2018-05-10 | 2019-11-19 | 宏碁股份有限公司 | Image composition method and intelligent apparatus |
| US11625993B2 (en) | 2018-07-11 | 2023-04-11 | Motional Ad Llc | Assigned seating system for an automated taxi |
| EP3594869A1 (en)* | 2018-07-11 | 2020-01-15 | Aptiv Technologies Limited | Assigned seating system for an automated-taxi |
| US10643439B2 (en) | 2018-07-11 | 2020-05-05 | Aptiv Technologies Limited | Assigned seating system for an automated-taxi |
| US10991212B2 (en) | 2018-07-11 | 2021-04-27 | Motional Ad Llc | Assigned seating system for an automated taxi |
| CN111246078A (en)* | 2018-11-29 | 2020-06-05 | 北京小米移动软件有限公司 | Image processing method and device |
| CN111770279A (en)* | 2020-08-03 | 2020-10-13 | 维沃移动通信有限公司 | A shooting method and electronic device |
| CN111770279B (en)* | 2020-08-03 | 2022-04-08 | 维沃移动通信有限公司 | A shooting method and electronic device |
| CN114727000A (en)* | 2021-01-05 | 2022-07-08 | 北京小米移动软件有限公司 | Group photo method, device, terminal equipment and storage medium |
| CN112954221A (en)* | 2021-03-11 | 2021-06-11 | 深圳市几何数字技术服务有限公司 | Method for real-time photo shooting |
| CN113473011A (en)* | 2021-06-29 | 2021-10-01 | 广东湾区智能终端工业设计研究院有限公司 | Shooting method, system and storage medium |
| CN116471429A (en)* | 2023-06-20 | 2023-07-21 | 上海云梯信息科技有限公司 | Image information pushing method based on behavior feedback and real-time video transmission system |
| CN116471429B (en)* | 2023-06-20 | 2023-08-25 | 上海云梯信息科技有限公司 | Image information pushing method based on behavior feedback and real-time video transmission system |
| Publication number | Publication date |
|---|---|
| CN107124551B (en) | 2021-03-23 |
| Publication | Publication Date | Title |
|---|---|---|
| CN107124551A (en) | A kind of mobile terminal is taken pictures the method being automatically synthesized, storage device and mobile terminal | |
| CN107580178B (en) | Image processing method and device | |
| CN111050072B (en) | Method, equipment and storage medium for remote co-shooting | |
| US10009543B2 (en) | Method and apparatus for displaying self-taken images | |
| JP6231869B2 (en) | Imaging apparatus, communication device, control method thereof, and program | |
| CN109218606B (en) | Image pickup control apparatus, control method thereof, and computer readable medium | |
| CN110740260B (en) | Shooting method and device and computer readable storage medium | |
| TW201024908A (en) | Panoramic image auto photographing method of digital photography device | |
| WO2015161561A1 (en) | Method and device for terminal to achieve image synthesis based on multiple cameras | |
| CN108900764A (en) | Image pickup method and electronic device and filming control method and server | |
| CN105657239B (en) | A kind of image processing method and device | |
| JP2019067312A (en) | IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, CONTROL METHOD OF IMAGE PROCESSING APPARATUS, AND PROGRAM | |
| CN113329172B (en) | Shooting method and device and electronic equipment | |
| CN108810326B (en) | A photographing method, device and mobile terminal | |
| CN106791390B (en) | Wide-angle self-timer real-time preview method and user terminal | |
| CN106899768A (en) | Terminal photographing method and device | |
| US9177395B2 (en) | Display device and display method for providing image display in first color mode and second color mode | |
| CN108540711A (en) | Mobile terminal and its image pickup method | |
| JP6111528B2 (en) | Image processing apparatus, image processing method, and program | |
| CN105007415A (en) | Method and device for previewing image | |
| CN108683847A (en) | photographing method, device, terminal and storage medium | |
| CN105791671A (en) | A front camera shooting correction method, device and terminal | |
| CN112887624B (en) | Shooting method and device and electronic equipment | |
| JP6299908B2 (en) | Image processing apparatus, image processing method, and program | |
| WO2021026782A1 (en) | Control method and control apparatus for handheld cradle head, handheld cradle head and storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right | Effective date of registration:20240117 Address after:Room 501, 85 Xiaguang Dongli, Haicang District, Xiamen City, Fujian Province, 361000 Patentee after:Xiamen reliable intellectual property service Co.,Ltd. Address before:516006 Zhongkai hi tech Zone, Huizhou, Guangdong, 86 Chang seven Road West Patentee before:HUIZHOU TCL MOBILE COMMUNICATION Co.,Ltd. | |
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right | Effective date of registration:20241129 Address after:No. 2, 5th Floor, Unit 4, Building 7, Linfangju, Nanhu Central Garden, Wuchang District, Wuhan City, Hubei Province 430000* Patentee after:Wuhan Jintian Interactive Entertainment Network Technology Development Co.,Ltd. Country or region after:China Address before:Room 501, 85 Xiaguang Dongli, Haicang District, Xiamen City, Fujian Province, 361000 Patentee before:Xiamen reliable intellectual property service Co.,Ltd. Country or region before:China |