Movatterモバイル変換


[0]ホーム

URL:


CN106454086A - Image processing method and mobile terminal - Google Patents

Image processing method and mobile terminal
Download PDF

Info

Publication number
CN106454086A
CN106454086ACN201610879637.1ACN201610879637ACN106454086ACN 106454086 ACN106454086 ACN 106454086ACN 201610879637 ACN201610879637 ACN 201610879637ACN 106454086 ACN106454086 ACN 106454086A
Authority
CN
China
Prior art keywords
pictures
subject
picture
background
cameras
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.)
Granted
Application number
CN201610879637.1A
Other languages
Chinese (zh)
Other versions
CN106454086B (en
Inventor
金鑫
王兆丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co LtdfiledCriticalVivo Mobile Communication Co Ltd
Priority to CN201610879637.1ApriorityCriticalpatent/CN106454086B/en
Publication of CN106454086ApublicationCriticalpatent/CN106454086A/en
Application grantedgrantedCritical
Publication of CN106454086BpublicationCriticalpatent/CN106454086B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例提供了一种图像处理方法和移动终端,应用于移动终端,所述移动终端包括多个摄像头,其特征在于,所述方法包括:接收用户的拍照请求;针对所述拍照请求采用多个摄像头拍摄多张图片;其中,所述多张图片为所述多个摄像头通过不同的焦平面拍摄得到;分别提取所述多张图片中的拍摄主体和背景层;将所述多张图片的背景层合成为背景图片;将所述拍摄主体合成至背景图片,获得目标图片。可以获得不同的清晰的拍摄主体,将拍摄主体的特征像素点添加到背景图片中,可以为用户在一张图片提供多个清晰的拍摄主体,极大地提高用户的拍照体验,为用户提供高质量、高清晰度的图片。

An embodiment of the present invention provides an image processing method and a mobile terminal, which are applied to a mobile terminal, and the mobile terminal includes a plurality of cameras, wherein the method includes: receiving a photo-taking request from a user; A plurality of cameras take a plurality of pictures; wherein, the plurality of pictures are taken by the plurality of cameras through different focal planes; the subject and the background layer in the plurality of pictures are respectively extracted; the plurality of pictures are The background layer is synthesized into a background image; the subject is synthesized into the background image to obtain a target image. Different clear subjects can be obtained, and the feature pixels of the subject can be added to the background picture, which can provide users with multiple clear subjects in one picture, greatly improve the user's photo experience, and provide users with high-quality , high-resolution pictures.

Description

Translated fromChinese
一种图像处理方法和移动终端Image processing method and mobile terminal

技术领域technical field

本发明涉及移动终端的技术领域,特别是涉及一种基于移动终端的图像处理方法和一种基于移动终端的图像处理装置。The present invention relates to the technical field of mobile terminals, in particular to an image processing method based on a mobile terminal and an image processing device based on a mobile terminal.

背景技术Background technique

随着电子产品的不断发展,具有拍照功能的移动终端越来越普及,用户可以随时随地用它来进行拍照,所得的图像以多媒体的短信等形式发送给亲朋好友,即拍即发,方便快捷。With the continuous development of electronic products, mobile terminals with camera functions are becoming more and more popular. Users can use them to take pictures anytime and anywhere, and the resulting images are sent to relatives and friends in the form of multimedia text messages, which is convenient and fast. .

智能手机等移动终端已经不再是简单的通信工具,而是集休闲、娱乐和通信等功能的工艺品。与此同时,用户对拍照效果的要求也越来越高。现有技术中,人们采用移动终端进行拍照,通常只能选取一个焦点,拍照得到一张在焦点区域内较为清楚的照片,这也是人们拍照过程中经常会遭遇的景深大小的问题。例如,在这样一个场景下拍照:一个人,一丛花,人与花在移动终端的前后相隔一定的距离;如果人距离移动终端较前而花距离移动终端较远,这时,如果选择人为焦点区域,则花在呈现在照片上是模糊,而如果选择花的所在区域为焦点区域,则人在呈现在照片上是模糊。Mobile terminals such as smart phones are no longer simple communication tools, but handicrafts that integrate leisure, entertainment and communication functions. At the same time, users have higher and higher requirements for camera effects. In the prior art, people use mobile terminals to take pictures, usually only one focal point can be selected, and a photo that is relatively clear in the focal area can be obtained by taking pictures, which is also the problem of depth of field that people often encounter in the process of taking pictures. For example, take a picture in such a scene: a person, a bunch of flowers, the person and the flower are separated by a certain distance in front of the mobile terminal; if the person is farther away from the mobile terminal and the flower is farther away from the mobile terminal, If the focus area is selected, the flowers will appear blurred in the photo, and if the area where the flower is located is selected as the focus area, the person will appear blurred in the photo.

发明内容Contents of the invention

鉴于上述问题,本发明实施例提供一种图像处理方法和移动终端,以解决现有技术中多个拍摄主体不能同时清晰地显示在同一张图片的上述问题In view of the above problems, an embodiment of the present invention provides an image processing method and a mobile terminal to solve the above problems in the prior art that multiple subjects cannot be clearly displayed in the same picture at the same time

为了解决上述问题,本发明实施例公开了一种图像处理方法,应用于移动终端,所述移动终端包括多个摄像头,其特征在于,所述方法包括:In order to solve the above problems, an embodiment of the present invention discloses an image processing method, which is applied to a mobile terminal, and the mobile terminal includes multiple cameras, wherein the method includes:

接收用户的拍照请求;Receive the user's photo request;

针对所述拍照请求采用多个摄像头拍摄多张图片;其中,所述多张图片为所述多个摄像头通过不同的焦平面拍摄得到;Multiple cameras are used to take multiple pictures for the photographing request; wherein, the multiple pictures are obtained by the multiple cameras through different focal planes;

分别提取所述多张图片中的拍摄主体和背景层;extracting the subject and the background layer in the plurality of pictures respectively;

将所述多张图片的背景层合成为背景图片;Synthesizing the background layers of the plurality of pictures into a background picture;

将所述拍摄主体合成至背景图片,获得目标图片。The subject is synthesized into a background picture to obtain a target picture.

本发明实施例还公开一种移动终端,所述移动终端包括多个摄像头,其特征在于,所述终端包括:The embodiment of the present invention also discloses a mobile terminal, which includes multiple cameras, and is characterized in that the terminal includes:

拍照请求接收模块,用于接收用户的拍照请求;A photographing request receiving module, configured to receive a photographing request from a user;

图片拍摄模块,用于针对所述拍照请求采用多个摄像头拍摄多张图片;其中,所述多张图片为所述多个摄像头通过不同的焦平面拍摄得到;The picture shooting module is used to take a plurality of pictures with multiple cameras according to the photo taking request; wherein, the multiple pictures are obtained by taking pictures of the multiple cameras through different focal planes;

拍摄主体和背景层提取模块,用于分别提取所述多张图片中的拍摄主体和背景层;The subject and background layer extraction module is used to extract the subject and background layers in the multiple pictures respectively;

背景图片合成模块,用于将所述多张图片的背景层合成为背景图片;A background picture synthesis module, used to synthesize the background layers of the multiple pictures into a background picture;

目标图片获得模块,用于将所述拍摄主体合成至背景图片,获得目标图片。A target picture obtaining module, configured to synthesize the subject into a background picture to obtain a target picture.

本发明实施例包括以下优点:Embodiments of the present invention include the following advantages:

本发明实施例中,接收用户的拍照请求,针对所述拍照请求,采用多个摄像头获取不同焦平面的多张图片,确定图片中的拍摄主体,从多张图片中提取出背景层,将背景层合成为背景图片,将所述拍摄主体合成至背景图片,获得目标图片。采用多个摄像头获取不同焦平面的图片,使移动终端拍摄的每一个拍摄主体可以清晰地呈现在目标图片上,利用多摄像头的特性,提高了移动终端拍摄的目标图片的清晰度,使目标图片的细节都清晰的呈现用户面前,大大增强用户的体验,提升了用户的拍照体验。In the embodiment of the present invention, a photographing request from a user is received, and for the photographing request, multiple cameras are used to obtain multiple pictures of different focal planes, the subject in the picture is determined, the background layer is extracted from the multiple pictures, and the background The layers are synthesized into a background image, and the subject is synthesized into the background image to obtain a target image. Multiple cameras are used to obtain pictures of different focal planes, so that each subject captured by the mobile terminal can be clearly presented on the target picture, and the characteristics of multiple cameras are used to improve the clarity of the target picture taken by the mobile terminal, so that the target picture The details are clearly presented in front of the user, which greatly enhances the user experience and improves the user's photo experience.

进一步地,可以获得不同的清晰的拍摄主体,将拍摄主体的特征像素点添加到背景图片中,可以为用户在一张图片提供多个清晰的拍摄主体,极大地提高用户的拍照体验,为用户提供高质量、高清晰度的图片。Furthermore, different clear subjects can be obtained, and the feature pixels of the subject can be added to the background picture, which can provide users with multiple clear subjects in one picture, greatly improving the user's photographing experience and providing users with Provide high-quality, high-definition pictures.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图In order to more clearly illustrate the technical solutions in the embodiments of the present invention, 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 invention. For those of ordinary skill in the art, on the premise of not paying creative work, other drawings can also be obtained based on these drawings

图1是本发明实施例的一种图像处理方法实施例一的步骤流程图;FIG. 1 is a flow chart of the steps of Embodiment 1 of an image processing method according to an embodiment of the present invention;

图2是本发明实施例的一种焦平面的图片;Fig. 2 is a picture of a focal plane of an embodiment of the present invention;

图3是本发明实施例的一种图像处理方法实施例二的步骤流程图;FIG. 3 is a flow chart of steps in Embodiment 2 of an image processing method according to an embodiment of the present invention;

图4是本发明实施例三的一种移动终端的结构框图;FIG. 4 is a structural block diagram of a mobile terminal according to Embodiment 3 of the present invention;

图5是本发明实施例四的一种移动终端的结构框图;FIG. 5 is a structural block diagram of a mobile terminal according to Embodiment 4 of the present invention;

图6是本发明实施例五的一种移动终端的结构示意图。FIG. 6 is a schematic structural diagram of a mobile terminal according to Embodiment 5 of the present invention.

具体实施方式detailed description

为了使本发明实施例所解决的技术问题、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本发明实施例进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the technical problems, technical solutions and beneficial effects solved by the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings and the 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.

实施例一Embodiment one

参照图1,示出了本发明实施例的一种图像处理方法实施例的步骤流程图,所述移动终端包括多个摄像头;具体可以包括如下步骤:Referring to FIG. 1 , it shows a flow chart of the steps of an embodiment of an image processing method according to an embodiment of the present invention. The mobile terminal includes multiple cameras; specifically, the following steps may be included:

步骤101,接收用户的拍照请求;Step 101, receiving a photo taking request from a user;

本发明实施例中,移动终端可以包括多个摄像头的智能设备,采用所述移动终端进行拍照,首先接收用户触发的拍照请求,其中,用户触发拍照请求的方式可以通过接触屏幕的点击事件,也可以是通过按压实体按键的按压事件,本发明实施例对此不作任何的限制。In the embodiment of the present invention, the mobile terminal may include a smart device with multiple cameras, and the mobile terminal is used to take pictures. First, it receives a photo request triggered by the user. It may be a pressing event of pressing a physical key, which is not limited in this embodiment of the present invention.

步骤102,针对所述拍照请求采用多个摄像头拍摄多张图片;其中,所述多张图片为所述多个摄像头通过不同的焦平面拍摄得到;Step 102, using a plurality of cameras to take a plurality of pictures in response to the photographing request; wherein, the plurality of pictures are obtained by the plurality of cameras through different focal planes;

具体而言,针对所述拍照请求,移动终端采用预先设置的焦距参数调节多个摄像头,获取不同焦平面的多张图片,例如,取焦距参数的范围为10mm-35mm将焦距参数平均分成多份,得到多个不同的焦距参数,采用上述不同焦距参数的设置多个摄像头,同时采用取景框(移动终端的屏幕)上随机不同的点作为焦点信息,采用所述焦点信息进一步设置多个摄像头,而移动终端的摄像头的快门时间、光圈大小、增益等可以取固定值,比如,取快门时间为1/30s,光圈大小F2.8,增益为400,当然,上述的参数设置方式只是本发明实施例的枚举,还可以是其它的参数设置方式,例如,焦距参数的范围以等差数列的方式划分为N个不同的焦距参数,按照取景框的对角线上的点作为焦点,本发明实施例对此不作限制。Specifically, for the photographing request, the mobile terminal uses preset focal length parameters to adjust multiple cameras to obtain multiple pictures of different focal planes. , to obtain a plurality of different focal length parameters, adopt the above-mentioned different focal length parameters to set multiple cameras, and use random different points on the viewfinder frame (screen of the mobile terminal) as focus information, and further set multiple cameras by using the focus information, The shutter time, aperture size, gain, etc. of the camera of the mobile terminal can take fixed values. For example, the shutter time is 1/30s, the aperture size is F2.8, and the gain is 400. Of course, the above-mentioned parameter setting method is only the implementation of the present invention. The enumeration of example can also be other parameter setting methods, for example, the scope of the focal length parameter is divided into N different focal length parameters in the mode of arithmetic sequence, according to the point on the diagonal line of the viewfinder frame as the focus, the present invention The embodiment does not limit this.

经过上述的焦距参数、焦点信息设置及快门时间、光圈大小、增益的设置,移动终端采用设置了不同参数的N个摄像头拍照后,获得不同焦平面的N张图片,需要说明的是,焦平面指的是与成像系统的光轴垂直且包含成像系统焦点的平面,参照图2,示出本发明实施例的一种焦平面的图片,与焦点同一平面上且与移动终端的摄像头的感光器件(CCD,Charge-coupled Device)平行的为同一焦平面,即拍照时在同一焦平面的物象应该都是清晰的,如图2中的物象“蝴蝶”因为都在同一焦平面上,获得的图片中“蝴蝶”都是清晰的,而不在焦平面内的背景与前景都是模糊的(虚化的)。获得不同焦平面的多张图片,即获得多张有不同的清晰的物象的图片,需要说明的是,本发明实施例中,焦距参数大小的设置方式,可以将焦距参数限制在一个较小的范围内,例如取焦距参数范围为18mm-22mm,将上述的焦距范围平均分为N份,采用取景框上不同的随机点为焦点信息,这样,可以得到多张焦平面较近的图片。After the above-mentioned focal length parameter, focus information setting, and shutter time, aperture size, and gain setting, the mobile terminal adopts N cameras with different parameters to take pictures, and obtains N pictures of different focal planes. It should be noted that the focal plane Refers to the plane perpendicular to the optical axis of the imaging system and containing the focal point of the imaging system. Referring to FIG. 2 , it shows a picture of a focal plane according to an embodiment of the present invention. (CCD, Charge-coupled Device) are parallel to the same focal plane, that is, the objects on the same focal plane should be clear when taking pictures, as shown in Figure 2. Because the object image "butterfly" is on the same focal plane, the obtained picture The "butterflies" in the medium are clear, while the background and foreground that are not in the focal plane are blurred (blurred). Obtain multiple pictures of different focal planes, that is, obtain multiple pictures with different clear object images. It should be noted that, in the embodiment of the present invention, the setting method of the focal length parameter can limit the focal length parameter to a smaller Within the range, for example, the focal length parameter range is 18mm-22mm, and the above-mentioned focal length range is divided into N parts on average, and different random points on the viewfinder frame are used as the focus information. In this way, multiple pictures with closer focal planes can be obtained.

步骤103,分别提取所述多张图片中的拍摄主体和背景层;Step 103, respectively extracting the subject and the background layer in the plurality of pictures;

步骤104,将所述多张图片的背景层合成为背景图片;Step 104, synthesizing the background layers of the multiple pictures into a background picture;

实际而言,因为在焦距参数在一个较小的焦距参数范围内波动,且每个摄像头所取的焦点不同,得到的多张图片对应拍摄主体的焦平面是相近的,故多张图片的拍摄主体可以认为是相近的,只是相对于不同图片的不同拍摄主体之间具有模糊与清晰的区别,例如,图片A与图片B,图片A与移动终端的镜头的距离较近,图片B与移动终端的镜头的距离较远,可以认为在拍摄图片B时,图片A的拍摄主体是模糊的,因为在拍摄图片B时,只有在图片B所处的焦平面的拍摄主体是清晰的,其中,所述拍摄主体包括人像和物像,本发明实施例中,通过DSP(Digital Signal Processing,数字信号处理器)或移动终端的CPU的处理,获得所述N张图片的拍摄主体,其中,所述拍摄主体可以包括人像和物像。In practice, because the focal length parameter fluctuates within a small focal length parameter range, and the focal points taken by each camera are different, the focal planes of the obtained multiple pictures corresponding to the subject are similar, so the shooting of multiple pictures The subjects can be considered to be similar, but there are blurred and clear differences between different photographed subjects in different pictures, for example, picture A and picture B, the distance between picture A and the lens of the mobile terminal is relatively short, and the distance between picture B and the mobile terminal The distance of the lens is relatively far, it can be considered that when taking picture B, the subject of picture A is blurred, because when taking picture B, only the subject at the focal plane of picture B is clear, wherein, all The photographed subjects include portraits and object images. In the embodiment of the present invention, the photographed subjects of the N pictures are obtained through DSP (Digital Signal Processing, Digital Signal Processing) or CPU processing of the mobile terminal, wherein the photographed Subjects can include portraits and objects.

具体应用到本发明实施例中,将所述多张图片的背景层合成为背景图片,提取出多张图片的背景层后,将所述多张图片的背景层按照图片的位置信息进行合成操作,得到背景图片,具体而言,因为所述多张是在不同的焦距范围内拍摄的多张图片,图片的背景层不会有较大的差别,只是不同的景深信息对应不同的清晰区域的背景层,本发明实施例中,将不同的景深信息对应不同的清晰区域的背景层合成为背景图片,因为第一摄像头及第二摄像头可以用测量得到拍摄主体的距离,进一步地,根据距离可以获得图片的景深信息。Specifically applied to the embodiment of the present invention, the background layers of the multiple pictures are synthesized into a background picture, and after the background layers of the multiple pictures are extracted, the background layers of the multiple pictures are synthesized according to the position information of the pictures , to get the background picture, specifically, because the multiple pictures are taken in different focal length ranges, the background layer of the picture will not have a big difference, but the different depth of field information corresponds to different clear areas The background layer, in the embodiment of the present invention, the background layer with different depth information corresponding to different clear areas is synthesized into a background picture, because the first camera and the second camera can be used to measure the distance of the subject, and further, according to the distance can be Get the depth of field information of the image.

步骤105,将所述拍摄主体合成至背景图片,获得目标图片。In step 105, the subject is synthesized into a background picture to obtain a target picture.

本发明实施例中,获取多个拍摄主体及背景图片后,可以对背景图片中的拍摄主体进行识别,再将所述多个个拍摄主体与背景图片中的拍摄主体进行对比,提取特征像素点,将特征像素点添加到所述背景图片中,获得目标图片。In the embodiment of the present invention, after obtaining multiple subjects and background pictures, the subjects in the background picture can be identified, and then the multiple subjects can be compared with the subjects in the background picture to extract feature pixels , adding feature pixels to the background image to obtain the target image.

本发明实施例中,接收用户的拍照请求,针对所述拍照请求,采用多个摄像头获取不同焦平面的多张图片,确定图片中的拍摄主体,从多张图片中提取出背景层,将背景层合成为背景图片,,获得目标图片。采用多个摄像头获取不同焦平面的图片,将不同焦平面的图片的同一拍摄主体与背景图片的拍摄主体进行比对,提取出特征像素点,将所述特征像素点添加到背景图片中,使移动终端拍摄的每一个拍摄主体可以清晰地呈现在目标图片上,利用多摄像头的特性,提高了移动终端拍摄的目标图片的清晰度,使目标图片的细节都清晰的呈现用户面前,大大增强用户的体验,提升了用户的拍照体验。In the embodiment of the present invention, a photographing request from a user is received, and for the photographing request, multiple cameras are used to obtain multiple pictures of different focal planes, the subject in the picture is determined, the background layer is extracted from the multiple pictures, and the background The layers are synthesized into a background picture, and the target picture is obtained. Using a plurality of cameras to obtain pictures of different focal planes, comparing the same subject of the pictures of different focal planes with the subject of the background picture, extracting feature pixels, adding the feature pixels to the background picture, so that Each subject taken by the mobile terminal can be clearly presented on the target picture. Using the characteristics of multiple cameras, the clarity of the target picture taken by the mobile terminal is improved, so that the details of the target picture are clearly presented in front of the user, which greatly enhances the user experience. experience, which improves the user's photo experience.

实施例二Embodiment two

参照图3,示出了本发明实施例的一种图像处理方法实施例的步骤流程图,所述移动终端包括多个摄像头;具体可以包括如下步骤:Referring to FIG. 3 , it shows a flow chart of the steps of an embodiment of an image processing method according to an embodiment of the present invention. The mobile terminal includes multiple cameras; specifically, the following steps may be included:

步骤201,接收用户的拍照请求;Step 201, receiving a camera request from a user;

本发明实施例中,采用所述移动终端进行拍照,首先接收用户触发的拍照请。In the embodiment of the present invention, the mobile terminal is used to take pictures, and firstly, a photo request triggered by a user is received.

步骤202,采用特定间隔的不同焦距参数调节所述多个摄像头;Step 202, adjusting the plurality of cameras with different focal length parameters at specific intervals;

应用于本发明实施例,焦距参数是指从移动终端的镜头的中心到成像面(也就是感光器件CCD)的距离。本发明实施例中,采用特定间隔的不同的焦距参数设置移动终端的N个摄像头,同时采用不同的焦点信息对N个摄像头进行设置,例如,所述多个摄影头的焦距参数范围为为18mm-22mm,将上述的焦距范围平均分为N份,得到多个特定间隔的焦距参数,采用所述焦距参数的设置所述多个摄影头。Applied to the embodiment of the present invention, the focal length parameter refers to the distance from the center of the lens of the mobile terminal to the imaging surface (that is, the photosensitive device CCD). In the embodiment of the present invention, different focal length parameters at specific intervals are used to set the N cameras of the mobile terminal, and different focus information is used to set the N cameras at the same time. For example, the focal length parameter range of the multiple cameras is 18mm -22mm, the above-mentioned focal length range is divided into N parts on average to obtain a plurality of focal length parameters at specific intervals, and the plurality of cameras are set by using the focal length parameters.

步骤203,所述多个摄像头响应所述拍照请求,获得多张图片;Step 203, the multiple cameras respond to the photographing request and obtain multiple pictures;

进一步的,多个摄像头响应用户的拍照请求,获得不同焦平面的多张图片,所述多张图片具有不同的景深信息,景深是拍照时主体的清晰区域,例如,要得到一张的大景深或小景深图片,需要调节不同的拍摄参数,例如:快门时间、光圈大小、增益;换而言之,分别获得清晰的不同的拍摄主体的图片,焦平面是与成像系统的光轴垂直且包含焦点信息的平面,与焦点同一平面上且与移动终端的摄像头的感光器件(CCD,Charge-coupled Device)平行的为同一焦平面,拍照时在同一焦平面的物象应该都是清晰的,得到不同焦平面的图片,即得到不同且清晰的包含拍摄主体的图片。Further, multiple cameras respond to the user's photo request and obtain multiple pictures with different focal planes. The multiple pictures have different depth of field information, and the depth of field is the clear area of the subject when taking pictures. For example, to obtain a large depth of field Or small depth of field pictures, need to adjust different shooting parameters, such as: shutter time, aperture size, gain; in other words, to obtain clear pictures of different subjects, the focal plane is perpendicular to the optical axis of the imaging system and contains The plane of focus information is on the same plane as the focus and parallel to the photosensitive device (CCD, Charge-coupled Device) of the camera of the mobile terminal. The objects on the same focal plane should be clear when taking pictures, and different The picture of the focal plane, that is, a different and clear picture containing the subject.

步骤204,获取所述图片的景深信息;Step 204, acquiring the depth of field information of the picture;

具体到本发明实施例,采用多个摄像头获得不同焦平面的多张图片后,获取多张图片的景深信息其中,所述景深信息可以为拍照时清晰的拍摄主体的距离范围。Specific to the embodiment of the present invention, after using multiple cameras to obtain multiple pictures with different focal planes, the depth of field information of the multiple pictures is obtained. The depth of field information may be the distance range of a clear subject when taking pictures.

步骤205,依据所述景深信息分别提取所述多张图片中的拍摄主体和背景层;Step 205, respectively extracting the subject and the background layer in the plurality of pictures according to the depth-of-field information;

具体而言,获取多张图片的景深信息中对应的焦点位置,因为每一张图片的焦点位置都不相同,可以得到焦点位置对应的焦点区域中的人像或物像为拍摄主体,同时,选取除拍摄主体以外的图片信息作为背景层。Specifically, the corresponding focus positions in the depth of field information of multiple pictures are obtained. Since the focus positions of each picture are different, it can be obtained that the portrait or object in the focus area corresponding to the focus position is the subject of the photograph. At the same time, select The image information other than the subject is used as the background layer.

步骤206,将所述多张图片的背景层合成为背景图片;Step 206, synthesizing the background layers of the multiple pictures into a background picture;

本发明实施例的一种优选实施例中,将所述多张图片的背景层合成为背景图片,提取出多张图片的背景层后,将所述多张图片的背景层按照图片的位置信息进行合成操作,得到背景图片,具体而言,因为所述多张图片是在不同的焦距范围内拍摄的多张图片,图片的背景层不会有较大的差别,只是不同的景深信息对应不同的清晰区域的背景层,本发明实施例中,将不同的景深信息对应不同的清晰区域的背景层合成为背景图片。In a preferred embodiment of the embodiment of the present invention, the background layers of the multiple pictures are synthesized into a background picture, and after the background layers of the multiple pictures are extracted, the background layers of the multiple pictures are combined according to the position information of the pictures Perform a synthesis operation to obtain a background picture. Specifically, because the multiple pictures are taken in different focal length ranges, the background layers of the pictures will not have a large difference, but different depth of field information corresponds to different The background layer of the clear area, in the embodiment of the present invention, the background layer corresponding to the different depth of field information is synthesized into the background picture.

步骤207,将所述拍摄主体合成至背景图片,获得目标图片。In step 207, the subject is synthesized into a background picture to obtain a target picture.

本发明实施例的一种优选实施例中,将所述拍摄主体合成至背景图片,获得目标图片的步骤包括以下子步骤:选取出所述拍摄主体的特征像素点;将所述特征像素点添加至所述背景图片,获取目标图片。In a preferred embodiment of the embodiment of the present invention, the subject is synthesized into the background image, and the step of obtaining the target image includes the following sub-steps: selecting the feature pixels of the subject; adding the feature pixels Go to the background image to obtain the target image.

本发明实施例中,采用不同的焦距参数调节所述多个摄像头;所述多个摄像头响应所述拍照请求,获得不同焦平面的多张图片;依据所述焦点信息确定所述拍摄主体;从所述背景层中合成出背景图片;将所述拍摄主体合成至背景图片,获得目标图片。可以获得不同的清晰的拍摄主体,将拍摄主体的特征像素点添加到背景图片中,可以为用户在一张图片提供多个清晰的拍摄主体,极大地提高用户的拍照体验,为用户提供高质量、高清晰度的图片。In the embodiment of the present invention, the multiple cameras are adjusted by using different focal length parameters; the multiple cameras respond to the photographing request and obtain multiple pictures of different focal planes; the subject is determined according to the focus information; from A background image is synthesized from the background layer; the subject is synthesized into the background image to obtain a target image. Different clear subjects can be obtained, and the feature pixels of the subject can be added to the background picture, which can provide users with multiple clear subjects in one picture, greatly improve the user's photo experience, and provide users with high-quality , high-resolution pictures.

需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。It should be noted that, for the method embodiment, for the sake of simple description, it is expressed as a series of action combinations, but those skilled in the art should know that the embodiment of the present invention is not limited by the described action sequence, because According to the embodiment of the present invention, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

实施例三Embodiment Three

图4是本发明一个实施例的移动终端的框图。图4所示的移动终端300包括拍照请求接收模块301、图片拍摄模块302、拍摄主体和背景层提取模块303、背景图片合成模块303和目标图片获得模块305。FIG. 4 is a block diagram of a mobile terminal according to one embodiment of the present invention. The mobile terminal 300 shown in FIG. 4 includes a camera request receiving module 301 , a picture shooting module 302 , a subject and background layer extraction module 303 , a background picture synthesis module 303 and a target picture acquisition module 305 .

拍照请求接收模块301,用于接收用户的拍照请求;A photographing request receiving module 301, configured to receive a photographing request from a user;

图片拍摄模块302,用于针对所述拍照请求采用多个摄像头拍摄多张图片;其中,所述多张图片为所述多个摄像头通过不同的焦平面拍摄得到;The picture taking module 302 is used to adopt multiple cameras to take multiple pictures in response to the photographing request; wherein, the multiple pictures are obtained by taking pictures of the multiple cameras through different focal planes;

拍摄主体和背景层提取模块303,用于分别提取所述多张图片中的拍摄主体和背景层;A subject and background layer extraction module 303, configured to extract the subject and background layers in the plurality of pictures respectively;

背景图片合成模块304,用于将所述多张图片的背景层合成为背景图片;A background picture synthesis module 304, configured to synthesize the background layers of the multiple pictures into a background picture;

目标图片获得模块305,用于将所述拍摄主体合成至背景图片,获得目标图片。A target picture obtaining module 305, configured to synthesize the subject into a background picture to obtain a target picture.

可选地,所述图片拍摄模块302包括:Optionally, the picture taking module 302 includes:

摄像头调节子模块,用于采用特定间隔的不同焦距参数调节所述多个摄像头;The camera adjustment sub-module is used to adjust the plurality of cameras with different focal length parameters at specific intervals;

图片获得子模块,用于所述多个摄像头响应所述拍照请求,获得多张图片。The picture obtaining sub-module is used for the multiple cameras to respond to the photographing request and obtain multiple pictures.

可选地,所述拍摄主体和背景层提取模块303包括:Optionally, the subject and background layer extraction module 303 includes:

景深信息获取子模块,用于获取所述图片的景深信息;Depth of field information acquisition sub-module, used to obtain the depth of field information of the picture;

拍摄主体和背景层提取子模块,用于依据所述景深信息分别提取所述多张图片中的拍摄主体和背景层。The subject and background layer extraction sub-module is used to respectively extract the subject and background layers in the plurality of pictures according to the depth of field information.

可选地,所述拍摄主体和背景层提取子模块包括:Optionally, the subject and background layer extraction submodules include:

拍摄主体选取单元,用于依据所述景深信息,选取所述多张图片中的人像或物像作为拍摄主体,所述多张图片中除拍摄主体外的部分作为背景层。The subject selection unit is configured to select, according to the depth of field information, portraits or images of objects in the plurality of pictures as the subject, and parts of the plurality of pictures other than the subject as the background layer.

可选地,所述目标图片获得模块305包括:Optionally, the target picture obtaining module 305 includes:

特征像素点选取子模块,用于选取出所述拍摄主体的特征像素点;A feature pixel point selection submodule, used to select feature pixel points of the subject;

目标图片获取子模块,用于将所述特征像素点添加至所述背景图片,获取目标图片。The target picture acquisition sub-module is used to add the feature pixel points to the background picture to acquire the target picture.

实施例四Embodiment Four

图5是本发明另一个实施例的移动终端的框图。图5所示的移动终端400包括:至少一个处理器401、存储器402、至少一个网络接口404和其他用户接口403。移动终端400中的各个组件通过总线系统404耦合在一起。可理解,总线系统405用于实现这些组件之间的连接通信。总线系统405除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图5中将各种总线都标为总线系统405。FIG. 5 is a block diagram of a mobile terminal according to another embodiment of the present invention. The mobile terminal 400 shown in FIG. 5 includes: at least one processor 401 , a memory 402 , at least one network interface 404 and other user interfaces 403 . Various components in the mobile terminal 400 are coupled together through the bus system 404 . It can be understood that the bus system 405 is used to realize connection and communication between these components. In addition to the data bus, the bus system 405 also includes a power bus, a control bus and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 405 in FIG. 5 .

其中,用户接口403可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板或者触摸屏等。Wherein, the user interface 403 may include a display, a keyboard or a pointing device (for example, a mouse, a trackball (trackball), a touch panel or a touch screen, and the like.

可以理解,本发明实施例中的存储器402可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-OnlyMemory,ROM)、可编程只读存储器(ProgrammableROM,PROM)、可擦除可编程只读存储器(ErasablePROM,EPROM)、电可擦除可编程只读存储器(ElectricallyEPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(RandomAccessMemory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(StaticRAM,SRAM)、动态随机存取存储器(DynamicRAM,DRAM)、同步动态随机存取存储器(SynchronousDRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(DoubleDataRateSDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(SynchlinkDRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambusRAM,DRRAM)。本发明实施例描述的系统和方法的存储器402旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 402 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be read-only memory (Read-OnlyMemory, ROM), programmable read-only memory (ProgrammableROM, PROM), erasable programmable read-only memory (ErasablePROM, EPROM), electrically erasable Programming read-only memory (Electrically EPROM, EEPROM) or flash memory. The volatile memory may be random access memory (Random Access Memory, RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (Synchronous DRAM, SDRAM), Double data rate synchronous dynamic random access memory (DoubleDataRateSDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (SynchlinkDRAM, SLDRAM) and direct memory bus random access Memory (Direct Rambus RAM, DRRAM). The memory 402 of the systems and methods described in embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

在一些实施方式中,存储器402存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统4021和应用程序4022。In some implementations, the memory 402 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: an operating system 4021 and an application program 4022 .

其中,操作系统4021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序4022,包含各种应用程序,例如媒体播放器(MediaPlayer)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序4022中。Among them, the operating system 4021 includes various system programs, such as framework layer, core library layer, driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program 4022 includes various application programs, such as a media player (MediaPlayer), a browser (Browser), etc., and is used to implement various application services. The program for realizing the method of the embodiment of the present invention may be included in the application program 4022 .

在本发明实施例中,通过调用存储器402存储的程序或指令,具体的,可以是应用程序4022中存储的程序或指令,处理器401用于接收用户的拍照请求;针对所述拍照请求采用多个摄像头拍摄多张图片;其中,所述多张图片为所述多个摄像头通过不同的焦平面拍摄得到;分别提取所述多张图片中的拍摄主体和背景层;将所述多张图片的背景层合成为背景图片;将所述拍摄主体合成至背景图片,获得目标图片。In the embodiment of the present invention, by calling the program or instruction stored in the memory 402, specifically, the program or instruction stored in the application program 4022, the processor 401 is used to receive the user's photographing request; A plurality of pictures are taken by a camera; wherein, the plurality of pictures are obtained by taking pictures of the plurality of cameras through different focal planes; respectively extracting the subject and the background layer in the plurality of pictures; The background layer is synthesized into a background image; the subject is synthesized into the background image to obtain a target image.

上述本发明实施例揭示的方法可以应用于处理器401中,或者由处理器401实现。处理器401可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器401中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器401可以是通用处理器、数字信号处理器(DigitalSignalProcessor,DSP)、专用集成电路(ApplicationSpecificIntegratedCircuit,ASIC)、现成可编程门阵列(FieldProgrammableGateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器402,处理器401读取存储器402中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 401 or implemented by the processor 401 . The processor 401 may be an integrated circuit chip and has signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 401 or instructions in the form of software. The above-mentioned processor 401 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or Transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 402, and the processor 401 reads the information in the memory 402, and completes the steps of the above method in combination with its hardware.

拍摄组件406包含多个摄像头,用于拍摄多张图片。The photographing component 406 includes multiple cameras for capturing multiple pictures.

可以理解的是,本发明实施例描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecificIntegratedCircuits,ASIC)、数字信号处理器(DigitalSignalProcessing,DSP)、数字信号处理设备(DSPDevice,DSPD)、可编程逻辑设备(ProgrammableLogicDevice,PLD)、现场可编程门阵列(Field-ProgrammableGateArray,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It can be understood that the embodiments described in the embodiments of the present invention may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSPDevice, DSPD), programmable logic device (ProgrammableLogicDevice, PLD ), Field-Programmable Gate Array (Field-Programmable GateArray, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this application, or a combination thereof.

对于软件实现,可通过执行本发明实施例所述功能的模块(例如过程、函数等)来实现本发明实施例所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For software implementation, the techniques described in the embodiments of the present invention may be implemented through modules (such as procedures, functions, etc.) that execute the functions described in the embodiments of the present invention. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.

可选地,处理器401用于采用特定间隔的不同焦距参数调节所述多个摄像头。Optionally, the processor 401 is configured to adjust the multiple cameras with different focal length parameters at specific intervals.

可选地,处理器401用于所述多个摄像头响应所述拍照请求,获得多张图片。Optionally, the processor 401 is used for the multiple cameras to obtain multiple pictures in response to the photographing request.

可选地,处理器401用于获取所述图片的景深信息。Optionally, the processor 401 is configured to acquire depth information of the picture.

可选地,处理器401用于依据所述景深信息分别提取所述多张图片中的拍摄主体和背景层。Optionally, the processor 401 is configured to respectively extract a subject and a background layer in the plurality of pictures according to the depth of field information.

可选地,处理器401用于依据所述景深信息,选取所述多张图片中的人像或物像作为拍摄主体,所述多张图片中除拍摄主体外的部分作为背景层。Optionally, the processor 401 is configured to select, according to the depth of field information, a portrait or an object image in the plurality of pictures as a subject, and a part of the plurality of pictures other than the subject as a background layer.

可选地,处理器401用于选取出所述拍摄主体的特征像素点。Optionally, the processor 401 is configured to select feature pixels of the subject.

可选地,处理器401用于将所述特征像素点添加至所述背景图片,获取目标图片。Optionally, the processor 401 is configured to add the feature pixel points to the background image to obtain a target image.

移动终端400能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The mobile terminal 400 can implement various processes implemented by the mobile terminal in the foregoing embodiments, and details are not described here to avoid repetition.

本发明实施例中,接收用户的拍照请求,针对所述拍照请求,采用多个摄像头获取不同焦平面的多张图片,确定图片中的拍摄主体,从多张图片中提取出背景层,将背景层合成为背景图片,,获得目标图片。采用多个摄像头获取不同焦平面的图片,将不同焦平面的图片的同一拍摄主体与背景图片的拍摄主体进行比对,提取出特征像素点,将所述特征像素点添加到背景图片中,使移动终端拍摄的每一个拍摄主体可以清晰地呈现在目标图片上,利用多摄像头的特性,提高了移动终端拍摄的目标图片的清晰度,使目标图片的细节都清晰的呈现用户面前,大大增强用户的体验,提升了用户的拍照体验。In the embodiment of the present invention, a photographing request from a user is received, and for the photographing request, multiple cameras are used to obtain multiple pictures of different focal planes, the subject in the picture is determined, the background layer is extracted from the multiple pictures, and the background The layers are synthesized into a background picture, and the target picture is obtained. Using a plurality of cameras to obtain pictures of different focal planes, comparing the same subject of the pictures of different focal planes with the subject of the background picture, extracting feature pixels, adding the feature pixels to the background picture, so that Each subject taken by the mobile terminal can be clearly presented on the target picture. Using the characteristics of multiple cameras, the clarity of the target picture taken by the mobile terminal is improved, so that the details of the target picture are clearly presented in front of the user, which greatly enhances the user experience. experience, which improves the user's photo experience.

实施例五Embodiment five

图6是本发明另一个实施例的移动终端的结构示意图。具体地,图6中的移动终端500可以为手机、平板电脑、个人数字助理(PersonalDigital Assistant,PDA)、或车载电脑等。Fig. 6 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention. Specifically, the mobile terminal 500 in FIG. 6 may be a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), or a vehicle-mounted computer.

图6中的移动终端500包括射频(RadioFrequency,RF)电路510、存储器520、输入单元530、显示单元540、处理器560、音频电路570、WiFi(WirelessFidelity)模块580和电源590。Mobile terminal 500 in FIG.

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

其中,显示单元540可用于显示由用户输入的信息或提供给用户的信息以及移动终端500的各种菜单界面。显示单元540可包括显示面板541,可选的,可以采用LCD或有机发光二极管(OrganicLight-EmittingDiode,OLED)等形式来配置显示面板541。Wherein, the display unit 540 can be used to display information input by the user or information provided to the user and various menu interfaces of the mobile terminal 500 . The display unit 540 may include a display panel 541. Optionally, the display panel 541 may be configured in the form of an LCD or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).

应注意,触控面板531可以覆盖显示面板541,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器550以确定触摸事件的类型,随后处理器560根据触摸事件的类型在触摸显示屏上提供相应的视觉输出。It should be noted that the touch panel 531 can cover the display panel 541 to form a touch display screen. When the touch display screen detects a touch operation on or near it, it is sent to the processor 550 to determine the type of the touch event, and then the processor The 560 provides corresponding visual output on the touch display screen according to the type of the touch event.

触摸显示屏包括应用程序界面显示区及常用控件显示区。该应用程序界面显示区及该常用控件显示区的排列方式并不限定,可以为上下排列、左右排列等可以区分两个显示区的排列方式。该应用程序界面显示区可以用于显示应用程序的界面。每一个界面可以包含至少一个应用程序的图标和/或widget桌面控件等界面元素。该应用程序界面显示区也可以为不包含任何内容的空界面。该常用控件显示区用于显示使用率较高的控件,例如,设置按钮、界面编号、滚动条、电话本图标等应用程序图标等。The touch display screen includes an application program interface display area and a common control display area. The arrangement of the display area of the application program interface and the display area of the commonly used controls is not limited, and may be an arrangement in which the two display areas can be distinguished, such as vertical arrangement, left-right arrangement, and the like. The application program interface display area can be used to display the interface of the application program. Each interface may include at least one interface element such as an icon of an application program and/or a widget desktop control. The application program interface display area can also be an empty interface without any content. The commonly used control display area is used to display controls with a high usage rate, for example, application icons such as setting buttons, interface numbers, scroll bars, and phonebook icons.

其中处理器560是移动终端500的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器521内的软件程序和/或模块,以及调用存储在第二存储器522内的数据,执行移动终端500的各种功能和处理数据,从而对移动终端500进行整体监控。可选的,处理器560可包括一个或多个处理单元。Wherein the processor 560 is the control center of the mobile terminal 500, utilizes various interfaces and lines to connect the various parts of the whole mobile phone, runs or executes the software programs and/or modules stored in the first memory 521, and calls the software programs and/or modules stored in the second memory 521. The data in the memory 522 executes various functions of the mobile terminal 500 and processes data, so as to monitor the mobile terminal 500 as a whole. Optionally, the processor 560 may include one or more processing units.

拍摄组件505包含多个摄像头,用于拍摄多张图片。The photographing component 505 includes multiple cameras for capturing multiple pictures.

在本发明实施例中,通过调用存储该第一存储器521内的软件程序和/或模块和/或该第二存储器522内的数据,处理器560用于接收用户的拍照请求;针对所述拍照请求采用多个摄像头拍摄多张图片;其中,所述多张图片为所述多个摄像头通过不同的焦平面拍摄得到;分别提取所述多张图片中的拍摄主体和背景层;将所述多张图片的背景层合成为背景图片;将所述拍摄主体合成至背景图片,获得目标图片。In the embodiment of the present invention, the processor 560 is configured to receive a user's photographing request by calling the software program and/or module stored in the first memory 521 and/or the data in the second memory 522; Request to use multiple cameras to take multiple pictures; wherein, the multiple pictures are obtained by the multiple cameras through different focal planes; respectively extract the subject and background layer in the multiple pictures; The background layers of the pictures are synthesized into a background picture; the subject is synthesized into the background picture to obtain a target picture.

可选地,处理器560用于采用特定间隔的不同焦距参数调节所述多个摄像头。Optionally, the processor 560 is configured to adjust the plurality of cameras with different focal length parameters at specific intervals.

可选地,处理器560用于所述多个摄像头响应所述拍照请求,获得多张图片。Optionally, the processor 560 is used for the multiple cameras to obtain multiple pictures in response to the photographing request.

可选地,处理器560用于获取所述图片的景深信息。Optionally, the processor 560 is configured to acquire depth information of the picture.

可选地,处理器560用于依据所述景深信息分别提取所述多张图片中的拍摄主体和背景层。Optionally, the processor 560 is configured to respectively extract the subject and the background layer in the plurality of pictures according to the depth of field information.

可选地,处理器560用于依据所述景深信息,选取所述多张图片中的人像或物像作为拍摄主体,所述多张图片中除拍摄主体外的部分作为背景层。Optionally, the processor 560 is configured to select, according to the depth of field information, a portrait or an object image in the plurality of pictures as a subject, and a part of the plurality of pictures other than the subject as a background layer.

可选地,处理器560用于选取出所述拍摄主体的特征像素点。Optionally, the processor 560 is configured to select feature pixels of the subject.

可选地,处理器560用于将所述特征像素点添加至所述背景图片,获取目标图片。Optionally, the processor 560 is configured to add the feature pixel points to the background picture to obtain a target picture.

可见,本发明实施例中,采用不同的焦距参数调节所述多个摄像头;所述多个摄像头响应所述拍照请求,获得不同焦平面的多张图片;依据所述焦点信息确定所述拍摄主体;从所述背景层中合成出背景图片;将所述拍摄主体合成至背景图片,获得目标图片。可以获得不同的清晰的拍摄主体,将拍摄主体的特征像素点添加到背景图片中,可以为用户在一张图片提供多个清晰的拍摄主体,极大地提高用户的拍照体验,为用户提供高质量、高清晰度的图片。It can be seen that in the embodiment of the present invention, the multiple cameras are adjusted by using different focal length parameters; the multiple cameras respond to the photographing request and obtain multiple pictures of different focal planes; the subject is determined according to the focus information ; Synthesizing a background image from the background layer; synthesizing the subject into the background image to obtain a target image. Different clear subjects can be obtained, and the feature pixels of the subject can be added to the background picture, which can provide users with multiple clear subjects in one picture, greatly improve the user's photo experience, and provide users with high-quality , high-resolution pictures.

本领域普通技术人员可以意识到,结合本发明实施例中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

Translated fromChinese
1.一种图像处理方法,应用于移动终端,所述移动终端包括多个摄像头,其特征在于,所述方法包括:1. An image processing method applied to a mobile terminal, the mobile terminal comprising a plurality of cameras, characterized in that the method comprises:接收用户的拍照请求;Receive the user's photo request;针对所述拍照请求采用多个摄像头拍摄多张图片;其中,所述多张图片为所述多个摄像头通过不同的焦平面拍摄得到;Multiple cameras are used to take multiple pictures for the photographing request; wherein, the multiple pictures are obtained by the multiple cameras through different focal planes;分别提取所述多张图片中的拍摄主体和背景层;extracting the subject and the background layer in the plurality of pictures respectively;将所述多张图片的背景层合成为背景图片;Synthesizing the background layers of the plurality of pictures into a background picture;将所述拍摄主体合成至背景图片,获得目标图片。The subject is synthesized into a background picture to obtain a target picture.2.根据权利要求1所述的方法,其特征在于,所述针对所述拍照请求采用多个摄像头拍摄多张图片的步骤包括:2. The method according to claim 1, wherein the step of using multiple cameras to capture multiple pictures for the photographing request comprises:采用特定间隔的不同焦距参数调节所述多个摄像头;adjusting the plurality of cameras with different focal length parameters at specific intervals;所述多个摄像头响应所述拍照请求,获得多张图片。The multiple cameras obtain multiple pictures in response to the photographing request.3.根据权利要求1或2所述的方法,其特征在于,所述分别提取所述多张图片中的拍摄主体和背景层的步骤包括:3. The method according to claim 1 or 2, wherein the step of extracting the subject and the background layer in the plurality of pictures respectively comprises:获取所述图片的景深信息;Obtaining the depth of field information of the picture;依据所述景深信息分别提取所述多张图片中的拍摄主体和背景层。The subject and the background layer in the plurality of pictures are respectively extracted according to the depth of field information.4.根据权利要求3所述的方法,其特征在于,所述依据所述景深信息分别提取所述多张图片中的拍摄主体和背景层的步骤包括:4. The method according to claim 3, wherein the step of extracting the subject and the background layer in the plurality of pictures according to the depth-of-field information respectively comprises:依据所述景深信息,选取所述多张图片中的人像或物像作为拍摄主体,所述多张图片中除拍摄主体外的部分作为背景层。According to the depth-of-field information, a portrait or an object image in the plurality of pictures is selected as a subject, and a part of the plurality of pictures except the subject is used as a background layer.5.根据权利要求1或2所述的方法,其特征在于,所述将所述拍摄主体合成至背景图片,获得目标图片的步骤包括:5. The method according to claim 1 or 2, wherein the step of synthesizing the subject into a background picture and obtaining a target picture comprises:选取出所述拍摄主体的特征像素点;Selecting feature pixels of the subject;将所述特征像素点添加至所述背景图片,获取目标图片。Adding the feature pixels to the background image to obtain a target image.6.一种移动终端,所述移动终端包括多个摄像头,其特征在于,所述终端包括:6. A mobile terminal, said mobile terminal comprising a plurality of cameras, characterized in that said terminal comprises:拍照请求接收模块,用于接收用户的拍照请求;A photographing request receiving module, configured to receive a photographing request from a user;图片拍摄模块,用于针对所述拍照请求采用多个摄像头拍摄多张图片;其中,所述多张图片为所述多个摄像头通过不同的焦平面拍摄得到;The picture shooting module is used to take a plurality of pictures with multiple cameras according to the photo taking request; wherein, the multiple pictures are obtained by taking pictures of the multiple cameras through different focal planes;拍摄主体和背景层提取模块,用于分别提取所述多张图片中的拍摄主体和背景层;The subject and background layer extraction module is used to extract the subject and background layers in the multiple pictures respectively;背景图片合成模块,用于将所述多张图片的背景层合成为背景图片;A background picture synthesis module, used to synthesize the background layers of the multiple pictures into a background picture;目标图片获得模块,用于将所述拍摄主体合成至背景图片,获得目标图片。A target picture obtaining module, configured to synthesize the subject into a background picture to obtain a target picture.7.根据权利要求6所述的终端,其特征在于,所述图片拍摄模块包括:7. The terminal according to claim 6, wherein the picture taking module comprises:摄像头调节子模块,用于采用特定间隔的不同焦距参数调节所述多个摄像头;The camera adjustment sub-module is used to adjust the plurality of cameras with different focal length parameters at specific intervals;图片获得子模块,用于所述多个摄像头响应所述拍照请求,获得多张图片。The picture obtaining sub-module is used for the multiple cameras to respond to the photographing request and obtain multiple pictures.8.根据权利要求6或7所述的终端,其特征在于,所述拍摄主体和背景层提取模块包括:8. The terminal according to claim 6 or 7, wherein the subject and background layer extraction module comprises:景深信息获取子模块,用于获取所述图片的景深信息;Depth of field information acquisition sub-module, used to obtain the depth of field information of the picture;拍摄主体和背景层提取子模块,用于依据所述景深信息分别提取所述多张图片中的拍摄主体和背景层。The subject and background layer extraction sub-module is used to respectively extract the subject and background layers in the plurality of pictures according to the depth of field information.9.根据权利要求8所述的终端,其特征在于,所述拍摄主体和背景层提取子模块包括:9. The terminal according to claim 8, wherein the subject and background layer extraction submodules include:拍摄主体选取单元,用于依据所述景深信息,选取所述多张图片中的人像或物像作为拍摄主体,所述多张图片中除拍摄主体外的部分作为背景层。The subject selection unit is configured to select, according to the depth-of-field information, portraits or images of objects in the plurality of pictures as the subject, and parts of the plurality of pictures other than the subject as the background layer.10.根据权利要求6或7所述的终端,其特征在于,所述目标图片获得模块包括:10. The terminal according to claim 6 or 7, wherein the target picture obtaining module comprises:特征像素点选取子模块,用于选取出所述拍摄主体的特征像素点;A feature pixel point selection submodule, used to select feature pixel points of the subject;目标图片获取子模块,用于将所述特征像素点添加至所述背景图片,获取目标图片。The target picture acquisition sub-module is used to add the feature pixel points to the background picture to acquire the target picture.
CN201610879637.1A2016-09-302016-09-30 An image processing method and mobile terminalActiveCN106454086B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610879637.1ACN106454086B (en)2016-09-302016-09-30 An image processing method and mobile terminal

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610879637.1ACN106454086B (en)2016-09-302016-09-30 An image processing method and mobile terminal

Publications (2)

Publication NumberPublication Date
CN106454086Atrue CN106454086A (en)2017-02-22
CN106454086B CN106454086B (en)2021-01-08

Family

ID=58172526

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610879637.1AActiveCN106454086B (en)2016-09-302016-09-30 An image processing method and mobile terminal

Country Status (1)

CountryLink
CN (1)CN106454086B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106973237A (en)*2017-05-252017-07-21维沃移动通信有限公司A kind of image pickup method and mobile terminal
CN107172346A (en)*2017-04-282017-09-15维沃移动通信有限公司A kind of weakening method and mobile terminal
CN109005314A (en)*2018-08-272018-12-14维沃移动通信有限公司A kind of image processing method and terminal
CN109005354A (en)*2018-09-252018-12-14努比亚技术有限公司Image pickup method, mobile terminal and computer readable storage medium
CN111901525A (en)*2020-07-292020-11-06西安欧亚学院Multi-camera artificial intelligence image processing method
WO2020227971A1 (en)*2019-05-152020-11-19Microsoft Technology Licensing, LlcImage generation
CN112261292A (en)*2020-10-202021-01-22Oppo广东移动通信有限公司Image acquisition method, terminal, chip and storage medium
CN114756161A (en)*2020-12-252022-07-15西安诺瓦星云科技股份有限公司 Display screen management method, device and system, and computer-readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101064773A (en)*2006-04-262007-10-31杭州草莓资讯有限公司Multi-lens scene synthesis digital camera system and method
CN103780840A (en)*2014-01-212014-05-07上海果壳电子有限公司High-quality imaging double camera shooting and imaging device and method thereof
CN104349063A (en)*2014-10-272015-02-11东莞宇龙通信科技有限公司Method, device and terminal for controlling camera shooting
US20150215516A1 (en)*2014-01-272015-07-30Ratheon CompanyImaging system and methods with variable lateral magnification
CN104954689A (en)*2015-06-302015-09-30努比亚技术有限公司Method and shooting device for acquiring photo through double cameras

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101064773A (en)*2006-04-262007-10-31杭州草莓资讯有限公司Multi-lens scene synthesis digital camera system and method
CN103780840A (en)*2014-01-212014-05-07上海果壳电子有限公司High-quality imaging double camera shooting and imaging device and method thereof
US20150215516A1 (en)*2014-01-272015-07-30Ratheon CompanyImaging system and methods with variable lateral magnification
CN104349063A (en)*2014-10-272015-02-11东莞宇龙通信科技有限公司Method, device and terminal for controlling camera shooting
CN104954689A (en)*2015-06-302015-09-30努比亚技术有限公司Method and shooting device for acquiring photo through double cameras

Cited By (11)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107172346A (en)*2017-04-282017-09-15维沃移动通信有限公司A kind of weakening method and mobile terminal
CN107172346B (en)*2017-04-282020-02-07维沃移动通信有限公司Virtualization method and mobile terminal
CN106973237A (en)*2017-05-252017-07-21维沃移动通信有限公司A kind of image pickup method and mobile terminal
CN109005314A (en)*2018-08-272018-12-14维沃移动通信有限公司A kind of image processing method and terminal
CN109005314B (en)*2018-08-272020-07-28维沃移动通信有限公司Image processing method and terminal
CN109005354A (en)*2018-09-252018-12-14努比亚技术有限公司Image pickup method, mobile terminal and computer readable storage medium
WO2020227971A1 (en)*2019-05-152020-11-19Microsoft Technology Licensing, LlcImage generation
CN111901525A (en)*2020-07-292020-11-06西安欧亚学院Multi-camera artificial intelligence image processing method
CN112261292A (en)*2020-10-202021-01-22Oppo广东移动通信有限公司Image acquisition method, terminal, chip and storage medium
CN112261292B (en)*2020-10-202022-08-16Oppo广东移动通信有限公司Image acquisition method, terminal, chip and storage medium
CN114756161A (en)*2020-12-252022-07-15西安诺瓦星云科技股份有限公司 Display screen management method, device and system, and computer-readable storage medium

Also Published As

Publication numberPublication date
CN106454086B (en)2021-01-08

Similar Documents

PublicationPublication DateTitle
CN106791400B (en) Image display method and mobile terminal
CN106454086A (en)Image processing method and mobile terminal
CN107395976B (en) A shooting parameter setting method and mobile terminal
CN107257439A (en)A kind of image pickup method and mobile terminal
CN106998428A (en)The image pickup method and mobile terminal of a kind of mobile terminal
CN106101545B (en) Image processing method and mobile terminal
CN105872148A (en)Method and mobile terminal for generating high dynamic range images
CN105847674A (en)Preview image processing method based on mobile terminal, and mobile terminal therein
CN107197169A (en)A kind of high dynamic range images image pickup method and mobile terminal
CN105979156A (en)Panoramically photographing method and mobile terminal
CN106534685A (en)Panoramic image generation method and mobile terminal
CN106791357A (en)A kind of image pickup method and mobile terminal
CN106060386A (en)Preview image generation method and mobile terminal
CN106506962A (en) Image processing method and mobile terminal
CN107181913A (en)A kind of photographic method and mobile terminal
CN106454085B (en) Image processing method and mobile terminal
CN106161932B (en) A camera method and mobile terminal
CN106162150B (en)A kind of photographic method and mobile terminal
CN107222681B (en)A kind of processing method and mobile terminal of image data
CN106993139B (en)A kind of image pickup method and mobile terminal
CN107026982A (en)The photographic method and mobile terminal of a kind of mobile terminal
CN106231182A (en)A kind of photographic method and mobile terminal
CN106101440A (en)A kind of self-timer method and mobile terminal
CN106210508B (en) A shooting preview method, wearable device and mobile terminal
CN106657600B (en) Image processing method and mobile terminal

Legal Events

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

[8]ページ先頭

©2009-2025 Movatter.jp