WO2018196854A1 - 一种拍照方法、拍照装置及移动终端 - Google Patents

一种拍照方法、拍照装置及移动终端 Download PDF

Info

Publication number
WO2018196854A1
WO2018196854A1 PCT/CN2018/084823 CN2018084823W WO2018196854A1 WO 2018196854 A1 WO2018196854 A1 WO 2018196854A1 CN 2018084823 W CN2018084823 W CN 2018084823W WO 2018196854 A1 WO2018196854 A1 WO 2018196854A1
Authority
WO
WIPO (PCT)
Prior art keywords
layer
distance
camera
image
sharpness
Prior art date
Application number
PCT/CN2018/084823
Other languages
English (en)
French (fr)
Inventor
张晓亮
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018196854A1 publication Critical patent/WO2018196854A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/45Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from two or more image sensors being of different type or operating in different modes, e.g. with a CMOS sensor for moving images in combination with a charge-coupled device [CCD] for still images
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio

Definitions

  • the present disclosure relates to the field of photographing technology, and in particular, to a photographing method, a photographing device, and a mobile terminal.
  • dual cameras have the same pixels, some dual cameras have different pixels, some dual cameras are divided into a telephoto lens and a wide viewing angle lens, and some dual cameras include a color sensor and a black and white sensor.
  • a photographed object for example, a person
  • a background object for example, a landscape
  • the proportion of the photographed object for example, a person
  • the background for example, the scenery
  • the scenery is not well represented.
  • it is usually only a blurring operation on the background object, and the landscape in the distance cannot be zoomed in or enlarged to reflect the details of the landscape.
  • a photographing method includes: causing a first camera and a second camera to focus on two different positions in a photograph preview interface to obtain a first focus object corresponding to the first camera and a second focus object corresponding to the second camera; extracting an image around the first focus object as a first layer, extracting an image around the second focus object as a second layer; And/or the second layer performs processing; and merges the first layer and the second layer with the photo preview interface to generate a composite photo.
  • a camera apparatus includes: a focusing module configured to cause a first camera and a second camera to focus on two different positions in a photo preview interface to obtain a first camera corresponding a first in-focus object and a second in-focus object corresponding to the second camera; an image layering module configured to extract an image around the first in-focus object as a first layer, and extract an image around the second in-focus object a second layer; a layer processing module configured to process the first layer and/or the second layer; and a photo composition module configured to connect the first layer and the second layer
  • the photo preview interfaces are merged to generate a composite photo.
  • a mobile terminal comprising a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, the application being configured It is used to perform the photographing method described above.
  • a computer readable storage medium storing a computer executable program is provided.
  • the computer executable program is run on a processor, a photographing method according to an embodiment of the present disclosure may be implemented.
  • FIG. 1 is a flowchart of a photographing method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of photographing a person's landscape photograph using a photographing method provided according to an embodiment of the present disclosure
  • FIG. 3 is a schematic diagram of a sharpness focusing method according to an embodiment of the present disclosure
  • FIG. 4 is a flow chart of step S20 of Figure 1;
  • FIG. 5 is a flow chart of step S40 of Figure 1;
  • FIG. 6 is a schematic structural block diagram of a photographing apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural block diagram of an image layering module of FIG. 6;
  • FIG. 8 is a schematic structural block diagram of a layer processing module of FIG. 6;
  • FIG. 9 is a schematic structural block diagram of the photo synthesizing module of FIG. 6.
  • FIG. 1 is a flowchart of a photographing method according to an embodiment of the present disclosure.
  • the method can be applied to a photographing device having a dual camera, such as a camera, an electronic device having a photographing function, and the like.
  • the photographing method includes steps S10 to S40:
  • step S10 the first camera and the second camera are caused to focus on two different positions in the photo preview interface to obtain a first in-focus object corresponding to the first camera and a second in-focus object corresponding to the second camera.
  • step S20 an image around the first in-focus object is extracted as a first layer, and an image around the second in-focus object is extracted as a second layer.
  • step S30 the first layer and/or the second layer are processed.
  • step S40 the first layer and the second layer are merged with the photo preview interface to generate a composite photo.
  • the image captured by the dual camera is divided into two layers by simultaneously focusing the objects at different focus points by using the dual camera.
  • the two layers can be individually adjusted to synthesize the photos the user needs, improving the user experience.
  • the first camera when photographing a person's landscape photo, the first camera may be used to capture a person image (the first layer in the figure), and the second camera may be used to capture a landscape image. (the second layer in the picture).
  • the pixel near the selected focal plane of the landscape image can be used as a layer, and the layer is enlarged, so that the character image and the landscape image are more suitable, thereby improving the user's photographing experience.
  • the dual camera is simultaneously mounted on one side of the mobile terminal.
  • the camera preview interface of the mobile terminal displays the view image of the first camera.
  • the dual cameras are capable of auto-focusing, and simultaneously focus on two different positions in the photo preview interface, the two different positions being the focus positions of the two cameras, at the two focus positions.
  • Two focal planes are formed, and the focus mode is determined by image sharpness judgment, which may also be called contrast focus.
  • image sharpness judgment which may also be called contrast focus.
  • the method before the step S10, further includes: receiving a shooting instruction of the mobile terminal.
  • the first camera is used to take a picture of a first focus object (such as a character)
  • the second camera is used to take a picture of a second focus object (such as a background of a person).
  • the step S20 includes a sub-step S21 and a sub-step S22.
  • sub-step S21 the image around the first in-focus object is sharply identified, and all the pixels around the first in-focus object whose sharpness is higher than the pre-stored sharpness threshold are extracted to form a first layer.
  • sub-step S22 the image around the second in-focus object is sharply identified, and all the pixels around the second in-focus object whose sharpness is higher than the sharpness threshold are extracted to form a second layer.
  • the sharpness threshold is set by the user according to experience, and may also be preset in the camera by the research and development personnel.
  • the two cameras share the same sharpness threshold to form two layers.
  • the two cameras may also employ different sharpness thresholds to perform finer adjustment operations on the two layers.
  • the step S30 includes a sub-step of performing an enlargement, reduction or movement operation on the first layer or the second layer.
  • the step S30 includes the sub-steps:
  • the center position of the two-finger connection is obtained, and it is determined whether the center position is in the area of the first layer or the second layer, and when the distance between the two fingers becomes larger, Enlarging the layer in which the center position is located, and reducing the layer where the center position is when the distance becomes smaller;
  • the preview interface and the image content of each layer are saved, and for the saved image content, the enlargement and reduction operations and the moving operation of the images of the first layer and the second layer are performed. , adjust the size and position of each layer image.
  • the first layer or the second layer may also be edited, modified, and the like.
  • the person and/or the background is beautified by image processing.
  • the second layer (the landscape image in FIG. 2) may be processed (for example, enlarged or reduced), or the first layer may be processed, or simultaneously The layer and the second layer are processed.
  • the step S40 includes sub-step S41 - sub-step S45.
  • the first distance between the first camera and the first focusing object is acquired according to the distance between the first camera lens and the image capturing sensor; and according to the distance between the second camera lens and the image capturing sensor, Obtaining a second distance between the second camera and the second in-focus object.
  • sub-step S42 determining whether the first distance is smaller than the second distance, wherein if the first distance is smaller than the second distance, proceeding to sub-step S43, if the first distance is not less than When the second distance is described, the sub-step S44 is entered.
  • the first layer is used as the uppermost layer
  • the second layer is used as the middle layer layer
  • the photo preview interface is used as the lowermost layer.
  • the second layer is used as the uppermost layer
  • the first layer is used as the middle layer layer
  • the photo preview interface is used as the lowermost layer.
  • sub-step S45 the layers are merged in the order of the topmost layer, the middle layer, and the lowermost layer to generate a composite photo.
  • the uppermost layer covers the intermediate layer layer when performing an enlargement, reduction or movement operation. That is to say, the layer closer to the camera has a higher priority during operation.
  • the display module if the first layer is the uppermost layer, the first layer and the second layer are displayed on the photo preview interface, wherein the image of the first layer blocks part of the second layer. And the images of the first layer and the second layer block a part of the photo preview interface.
  • the image of the first layer and the second layer changes with the camera of the terminal, and the image content also changes.
  • the method further includes: saving the synthesized photo to the storage device, and displaying the synthesized photo through the display module according to the user request.
  • FIG. 6 is a schematic structural block diagram of a photographing apparatus according to an embodiment of the present disclosure.
  • the photographing apparatus 100 includes a focus module 10, an image layering module 20, a layer processing module 30, and a photo composition module 40.
  • the focusing module 10 is configured to focus the first camera and the second camera on two different positions in the photo preview interface to obtain a first in-focus object corresponding to the first camera and a second in-focus object corresponding to the second camera.
  • the image layering module 20 is configured to extract an image around the first in-focus object as a first layer, and extract an image around the second in-focus object as a second layer.
  • the layer processing module 30 is configured to process the first layer and/or the second layer.
  • the photo composition module 40 is configured to merge the first layer and the second layer with the photo preview interface to generate a composite photo.
  • the image captured by the dual camera is divided into two layers by simultaneously focusing the objects at different focus points by using the dual camera.
  • the two layers can be individually adjusted to synthesize the photos the user needs, improving the user experience.
  • the first camera when photographing a person's landscape photo, the first camera may be used to capture a person image (the first layer in the figure), and the second camera may be used to capture a landscape image. (the second layer in the picture).
  • the landscape image is far away, the pixel near the selected focal plane of the landscape image can be used as a layer, and the layer is enlarged, so that the character image and the landscape image are more suitable, thereby improving the user's photographing experience. .
  • the dual camera is simultaneously mounted on one side of the mobile terminal.
  • the camera preview interface of the mobile terminal displays the view image of the first camera.
  • the dual cameras are capable of auto-focusing, and simultaneously focus on two different positions in the photo preview interface, the two different positions being the focus positions of the two cameras, at the two focus positions.
  • Two focal planes are formed, and the focus mode is determined by image sharpness judgment, which may also be called contrast focus.
  • image sharpness judgment which may also be called contrast focus.
  • the image layering module includes: a first sharpness identifying unit 21 and a second sharpness identifying unit 22.
  • the first sharpness recognition unit 21 is configured to perform sharpness recognition on an image around the first in-focus object, and extract all pixel points of the image pixel sharpness around the first in-focus object that are higher than a pre-stored sharpness threshold.
  • the first layer is configured to perform sharpness recognition on an image around the first in-focus object, and extract all pixel points of the image pixel sharpness around the first in-focus object that are higher than a pre-stored sharpness threshold.
  • the second sharpness recognizing unit 22 is configured to perform sharpness recognition on an image around the second in-focus object, and extract all pixel points of the image in which the image sharpness around the second in-focus object is higher than the sharpness threshold. Form a second layer.
  • the sharpness threshold is set by the user according to experience, and may also be preset in the camera by the research and development personnel.
  • the two cameras share the same sharpness threshold to form two layers.
  • the two cameras may also employ different sharpness thresholds to perform finer adjustment operations on the two layers.
  • the layer processing module is further configured to perform an enlargement, reduction or movement operation on the image in the first layer or the second layer.
  • the layer processing module includes a layer scaling unit 31, and a layer moving unit 32.
  • the layer scaling unit 31 is configured to acquire a center position of the two-finger connection when the two fingers are detected on the display screen, and determine whether the center position is in the area of the first layer or the second layer, in the double When the distance between the fingers becomes larger, the layer in which the center position is located is enlarged, and when the distance becomes smaller, the layer in which the center position is located is reduced.
  • the layer moving unit 32 is configured to determine whether the single finger position is in the area of the first layer or the second layer when a single finger is detected on the display screen, and the single finger position is located when the single finger moves The layer follows the single finger to move.
  • the preview interface and the image content of each layer are saved, and for the saved image content, the enlargement and reduction operations and the moving operation of the images of the first layer and the second layer are performed. , adjust the size and position of each layer image.
  • the first layer or the second layer may also be edited, modified, and the like.
  • the person and/or the background is beautified by image processing.
  • the second layer (such as the landscape image in FIG. 2) may be processed (for example, enlarged or reduced), or the first layer may be processed, or the first layer and the first layer may be simultaneously processed.
  • the second layer is processed.
  • the photo synthesis module includes: a distance acquisition unit 41, a determination unit 42, and a merging unit 43.
  • the distance acquiring unit 41 is configured to acquire a first distance between the first camera and the first focusing object according to a distance between the first camera lens and the image capturing sensor; according to a distance between the second camera lens and the image capturing sensor Obtaining a second distance between the second camera and the second focusing object.
  • the determining unit 42 is configured to determine whether the first distance is smaller than the second distance, wherein if the first distance is smaller than the second distance, the first layer is used as an upper layer, and The second layer is used as the middle layer layer, and the photo preview interface is used as the bottom layer; if the first distance is not less than the second distance, the second layer is used as the top layer. The layer is used as the middle layer layer, and the photo preview interface is used as the bottom layer.
  • the merging unit 43 is configured to merge the layers in the order of the topmost layer, the middle layer layer, and the bottommost layer to generate a composite photo.
  • the uppermost layer covers the intermediate layer layer when performing an enlargement, reduction or movement operation. That is to say, the layer closer to the camera has a higher priority during operation.
  • the display module if the first layer is the uppermost layer, the first layer and the second layer are displayed on the photo preview interface, wherein the image of the first layer blocks part of the second layer. And the images of the first layer and the second layer block a part of the photo preview interface.
  • the image of the first layer and the second layer changes with the camera of the terminal, and the image content also changes.
  • the photographing apparatus further includes: a saving module configured to save the synthesized photo to the storage device; and a display module configured to display the synthesized photo according to the user request.
  • a mobile terminal comprising a memory, a processor, and at least one application stored in the memory and configured to be executed by the processor, the application being configured A photographing method according to an embodiment of the present disclosure is performed.
  • a computer readable storage medium storing a computer executable program.
  • the computer executable program When the computer executable program is run on a processor, a photographing method according to an embodiment of the present disclosure may be implemented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

本申请公开了一种拍照方法、拍照装置及移动终端。该方法包括:使第一摄像头和第二摄像头对拍照预览界面内的两个不同位置进行对焦,以获取第一摄像头对应的第一对焦物体和第二摄像头对应的第二对焦物体;提取所述第一对焦物体周围的图像作为第一图层,提取所述第二对焦物体周围的图像作为第二图层;对所述第一图层和/或第二图层进行处理;以及将第一图层和第二图层与所述拍照预览界面合并,以生成合成照片。

Description

一种拍照方法、拍照装置及移动终端 技术领域
本公开涉及拍照技术领域,尤其涉及一种拍照方法、拍照装置及移动终端。
背景技术
随着智能手机的日益发展,越来越多的手机配备有双摄像头。相应的是,需要更多的应用支持具有双摄像头的手机。双摄像头的方案比较多。例如,有的双摄像头具有相同的像素,有的双摄像头具有不同的像素,有的双摄像头分为一个长焦镜头和一个广视角镜头,有的双摄像头包括一个彩色传感器和一个黑白传感器。在双摄像头的应用中存在一些问题。比如,在被拍照对象(例如,人)距离背景物(例如,风景)比较远的情况下,被拍照对象看起来大,而背景物看起来很小。这样,被拍照对象(例如,人)与背景物(例如,风景)比例不协调,不能很好地体现风景。然而,在对双摄像头拍摄的照片进行处理的时候,通常只是对于背景物进行虚化的操作,不能将远处的风景拉近或者放大,体现风景的细节。
发明内容
根据本公开的第一方面,提供的一种拍照方法,包括:使第一摄像头和第二摄像头对拍照预览界面内的两个不同位置进行对焦,以获取第一摄像头对应的第一对焦物体和第二摄像头对应的第二对焦物体;提取所述第一对焦物体周围的图像作为第一图层,提取所述第二对焦物体周围的图像作为第二图层;对所述第一图层和/或第二图层进行处理;以及将第一图层和第二图层与所述拍照预览界面合并,以生成合成照片。
根据本公开的第二方面,提供的一种拍照装置,包括:对焦模块,被配置为使第一摄像头和第二摄像头对拍照预览界面内的 两个不同位置进行对焦,以获取第一摄像头对应的第一对焦物体和第二摄像头对应的第二对焦物体;图像分层模块,被配置为提取所述第一对焦物体周围的图像作为第一图层,提取所述第二对焦物体周围的图像作为第二图层;图层处理模块,被配置为对所述第一图层和/或第二图层进行处理;以及照片合成模块,被配置为将第一图层和第二图层与所述拍照预览界面合并,以生成合成照片。
根据本公开的第三方面,提供了一种移动终端,包括存储器、处理器和至少一个被存储在所述存储器中并被配置为由所述处理器执行的应用程序,所述应用程序被配置为用于执行以上所述的拍照方法。
根据本公开的第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行程序。当所述计算机可执行程序在处理器上运行时,可以实现根据本公开实施例的拍照方法。
附图说明
图1为根据本公开实施例提供的一种拍照方法的流程图;
图2为利用根据本公开实施例提供的拍照方法拍摄人物风景照片的示意图;
图3根据本公开实施例提供的锐度对焦方法的示意图;
图4为图1中步骤S20的流程图;
图5为图1中步骤S40的流程图;
图6为根据本公开实施例提供的一种拍照装置的示意性结构框图;
图7为图6中图像分层模块的示意性结构框图;
图8为图6中图层处理模块的示意性结构框图;以及
图9为图6中照片合成模块的示意性结构框图。
参照附图,将对本公开的目的、功能及优点进行详细描述。
具体实施方式
为了使本公开所要解决的技术问题、技术方案及有益效果更加清楚、明白,以下结合附图和实施例,对本公开进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本公开,并不用于限定本公开。
图1为根据本公开实施例提供的一种拍照方法的流程图。所述方法可应用于具有双摄像头的拍照装置,例如照相机、具有拍照功能的电子设备等。如图1所示,所述拍照方法包括步骤S10-步骤S40:
在步骤S10中,使第一摄像头和第二摄像头对拍照预览界面内的两个不同位置进行对焦,以获取第一摄像头对应的第一对焦物体和第二摄像头对应的第二对焦物体。
在步骤S20中,提取所述第一对焦物体周围的图像作为第一图层,提取所述第二对焦物体周围的图像作为第二图层。
在步骤S30中,对所述第一图层和/或第二图层进行处理。
在步骤S40中,将第一图层和第二图层与所述拍照预览界面合并,以生成合成照片。
在本实施例中,通过利用双摄像头对不同焦点处的物体进行同时对焦,将双摄像头拍摄到的图像分为两个图层。两个图层可以进行单独调整,从而合成用户需要的照片,提高了用户体验。
在一个示例性实施例中,如图2所示,在拍摄人物风景照片时,可以将第一摄像头用于拍摄人物图像(图中的第一图层),将第二摄像头用于拍摄风景图像(图中的第二图层)。此时,风景图像较远,则可将风景图像中选中的风景焦平面附近的像素点作为一个图层,对该图层进行放大,使得人物图像和风景图像更契合,提高了用户的拍照体验。在本实施例中,所述双摄像头同时安装在移动终端的一侧。在拍照时,根据用户的设置或移动终端的出厂设置,移动终端的拍照预览界面显示第一摄像头的取景图像。
在本实施例中,所述双摄像头皆可自动对焦,并且对拍照预览界面内的两个不同位置同时进行对焦,所述两个不同位置即为两个摄像头的焦点位置,在两个焦点位置形成两个焦平面,对焦方式采用图像锐度判断进行对焦,也可以称作反差对焦。对于一定范围内的像素的对比,可以判断成像是否在焦点位置。如图3所示,当图像采集传感器没有在焦点位置时,成像是模糊的,一定范围内的像素间对比度低,即锐度低。而当图像采集传感器在焦点位置时,成像是清晰的,一定范围内的像素间对比度高,即锐度高。当对比度或者锐度高于一个阈值时,可以认为图像采集传感器在焦平面上。
在本实施例中,所述步骤S10之前,所述方法还包括:接收移动终端的拍摄指令。此时,第一摄像头用于对第一对焦物体(比如人物)进行拍照,第二摄像头用于对第二对焦物体(比如人物的背景)进行拍照。
如图4所示,在本实施例中,所述步骤S20包括子步骤S21和子步骤S22。
在子步骤S21中,对所述第一对焦物体周围的图像进行锐度识别,提取所述第一对焦物体周围的锐度高于预存锐度阈值的所有像素点,形成第一图层。
在子步骤S22中,对所述第二对焦物体周围的图像进行锐度识别,提取所述第二对焦物体周围的锐度高于所述锐度阈值的所有像素点,形成第二图层。
在本实施例中,所述锐度阈值由用户根据经验自行设置,也可以由研发人员预先设置在摄像头内。在本实施例中,两个摄像头共用同一个锐度阈值,形成两个图层。
在其他实施例中,两个摄像头也可以分别采用不同的锐度阈值,从而对两个图层进行更精细的调整操作。
在本实施例中,所述步骤S30包括子步骤:对所述第一图层或第二图层进行放大、缩小或移动操作。
在一个示例性实施例中,所述步骤S30包括子步骤:
当在显示屏上检测到双指时,获取双指连线的中心位置,判断所述中心位置是位于第一图层还是第二图层的区域内,在双指间的距离变大时,放大所述中心位置所在的图层,在所述距离变小时,缩小所述中心位置所在的图层;以及
当在显示屏上检测到单指时,判断单指位置是位于第一图层还是第二图层的区域内,单指进行移动时,所述单指位置所在的图层跟随所述单指进行移动。
在本实施例中,在接收拍照指令后,保存预览界面和各图层的图像内容,对于保存的图像内容,通过对第一图层和第二图层的图像的放大和缩小操作和移动操作,调整各个图层图像的大小和位置。
在一个示例性实施例中,还可以对第一图层或第二图层进行编辑、修改等操作。比如,通过图像处理对人物和/或背景进行美化。
在本实施例中,在步骤S30中,可以对第二图层(图2中的风景图像)进行处理(例如,放大或缩小),也可以对第一图层进行处理,或者同时对第一图层和第二图层进行处理。
如图5所示,在本实施例中,所述步骤S40包括子步骤S41-子步骤S45。
在子步骤S41中,根据第一摄像头镜片与图像采集传感器的距离,获取所述第一摄像头与所述第一对焦物体之间的第一距离;根据第二摄像头镜片与图像采集传感器的距离,获取所述第二摄像头与所述第二对焦物体之间的第二距离。
在子步骤S42中,判断所述第一距离是否小于所述第二距离,其中,若所述第一距离小于所述第二距离,则进入子步骤S43,若所述第一距离不小于所述第二距离,则进入子步骤S44。
在子步骤S43中,将所述第一图层作为最上层图层,将所述第二图层作为中间层图层,将所述拍照预览界面作为最下层图层。
在子步骤S44中,将所述第二图层作为最上层图层,将所述第一图层作为中间层图层,将所述拍照预览界面作为最下层图层。
在子步骤S45中,按照最上层图层、中间层图层和最下层图层的顺序合并图层,生成合成照片。
在本实施例中,所述最上层图层在进行放大、缩小或移动操作时,覆盖所述中间层图层。也就是说,在操作时,距离摄像头更近的图层具有更高的优先级。从显示模块来看,若第一图层为最上层图层,则在拍照预览界面之上,显示第一图层和第二图层,其中第一图层的图像遮挡第二图层的一部分,而第一图层和第二图层的图像又遮挡拍照预览界面的一部分。
在本实施例中,当拍摄过程中双摄像头晃动或移动时,第一图层和第二图层的图像随终端的摄像头的晃动,图像内容也会发生变化。
在本实施例中,在所述子步骤S45之后,所述方法还包括:将合成后的照片保存至存储装置中,并根据用户请求通过显示模块显示合成后的照片。
图6为根据本公开实施例提供的一种拍照装置的示意性结构框图。如图6所示,根据本实施例的拍照装置100包括:对焦模块10、图像分层模块20、图层处理模块30和照片合成模块40。
对焦模块10被配置为使第一摄像头和第二摄像头对拍照预览界面内的两个不同位置进行对焦,以获取第一摄像头对应的第一对焦物体和第二摄像头对应的第二对焦物体。
图像分层模块20被配置为提取所述第一对焦物体周围的图像作为第一图层,提取所述第二对焦物体周围的图像作为第二图层。
图层处理模块30被配置为对所述第一图层和/或第二图层进行处理。
照片合成模块40被配置为将第一图层和第二图层与所述拍照预览界面合并,以生成合成照片。
在本实施例中,通过利用双摄像头对不同焦点处的物体进行同时对焦,将双摄像头拍摄到的图像分为两个图层。两个图层可 以进行单独调整,从而合成用户需要的照片,提高了用户体验。
在一个示例性实施例中,如图2所示,在拍摄人物风景照片时,可以将第一摄像头用于拍摄人物图像(图中的第一图层),将第二摄像头用于拍摄风景图像(图中的第二图层)。此时,风景图像较远,则可将风景图像中选中的风景焦平面附近的像素点作为一个图层,对该图层进行放大,使得人物图像和风景图像更契合,提高了用户的拍照体验。
在本实施例中,所述双摄像头同时安装在移动终端的一侧。在拍照时,根据用户的设置或移动终端的出厂设置,移动终端的拍照预览界面显示第一摄像头的取景图像。
在本实施例中,所述双摄像头皆可自动对焦,并且对拍照预览界面内的两个不同位置同时进行对焦,所述两个不同位置即为两个摄像头的焦点位置,在两个焦点位置形成两个焦平面,对焦方式采用图像锐度判断进行对焦,也可以称作反差对焦。对于一定范围内的像素的对比,可以判断成像是否在焦点位置。如图3所示,当图像采集传感器没有在焦点位置时,成像是模糊的,一定范围内的像素间对比度低,即锐度低。而当图像采集传感器在焦点位置时,成像是清晰的,一定范围内的像素间对比度高,即锐度高。当对比度或者锐度高于一个阈值时,可以认为图像采集传感器在焦平面上。
如图7所示,在本实施例中,所述图像分层模块包括:第一锐度识别单元21和第二锐度识别单元22。
第一锐度识别单元21被配置为对所述第一对焦物体周围的图像进行锐度识别,提取所述第一对焦物体周围的图像像素锐度高于预存锐度阈值的所有像素点,形成第一图层。
第二锐度识别单元22被配置为对所述第二对焦物体周围的图像进行锐度识别,提取所述第二对焦物体周围的图像像素锐度高于所述锐度阈值的所有像素点,形成第二图层。
在本实施例中,所述锐度阈值由用户根据经验自行设置,也可以由研发人员预先设置在摄像头内。在本实施例中,两个摄像 头共用同一个锐度阈值,形成两个图层。
在其他实施例中,两个摄像头也可以分别采用不同的锐度阈值,从而对两个图层进行更精细的调整操作。
如图8所示,在本实施例中,所述图层处理模块还被配置为对所述第一图层或第二图层内的图像进行放大、缩小或移动操作。
在一个示例性实施例中,所述图层处理模块包括:图层缩放单元31,和图层移动单元32。
图层缩放单元31被配置为当在显示屏上检测到双指时,获取双指连线的中心位置,判断所述中心位置是位于第一图层还是第二图层的区域内,在双指间的距离变大时,放大所述中心位置所在的图层,在所述距离变小时,缩小所述中心位置所在的图层。
图层移动单元32被配置为当在显示屏上检测到单指时,判断单指位置是位于第一图层还是第二图层的区域内,单指进行移动时,所述单指位置所在的图层跟随所述单指进行移动。
在本实施例中,在接收拍照指令后,保存预览界面和各图层的图像内容,对于保存的图像内容,通过对第一图层和第二图层的图像的放大和缩小操作和移动操作,调整各个图层图像的大小和位置。
在一个示例性实施例中,还可以对第一图层或第二图层进行编辑、修改等操作。比如,通过图像处理对人物和/或背景进行美化。
在本实施例中,可以对第二图层(比如图2中的风景图像)进行处理(例如,放大或缩小),也可以对第一图层进行处理,或者同时对第一图层和第二图层进行处理。
如图9所示,在本实施例中,所述照片合成模块包括:距离获取单元41、判断单元42和合并单元43。
距离获取单元41被配置为根据第一摄像头镜片与图像采集传感器的距离,获取所述第一摄像头与所述第一对焦物体之间的第一距离;根据第二摄像头镜片与图像采集传感器的距离,获取所述第二摄像头与所述第二对焦物体之间的第二距离。
判断单元42被配置为判断所述第一距离是否小于所述第二距离,其中,若所述第一距离小于所述第二距离,则将所述第一图层作为最上层图层,将所述第二图层作为中间层图层,将所述拍照预览界面作为最下层图层;若所述第一距离不小于所述第二距离,则将所述第二图层作为最上层图层,将所述第一图层作为中间层图层,将所述拍照预览界面作为最下层图层。
合并单元43被配置为按照最上层图层、中间层图层和最下层图层的顺序合并图层,以生成合成照片。
在本实施例中,所述最上层图层在进行放大、缩小或移动操作时,覆盖所述中间层图层。也就是说,在操作时,距离摄像头更近的图层具有更高的优先级。从显示模块来看,若第一图层为最上层图层,则在拍照预览界面之上,显示第一图层和第二图层,其中第一图层的图像遮挡第二图层的一部分,而第一图层和第二图层的图像又遮挡拍照预览界面的一部分。
在本实施例中,当拍摄过程中双摄像头晃动或移动时,第一图层和第二图层的图像随终端的摄像头的晃动,图像内容也会发生变化。
在本实施例中,所述拍照装置还包括:保存模块,被配置为使合成后的照片保存至存储装置中;以及显示模块,被配置为根据用户请求显示合成后的照片。
根据本公开的一个实施例,还提供了一种移动终端,包括存储器、处理器和至少一个存储在所述存储器中并被配置为由所述处理器执行的应用程序,所述应用程序被配置为执行根据本公开实施例的拍照方法。
根据本公开的一个实施例,还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行程序。当所述计算机可执行程序在处理器上运行时,可以实现根据本公开实施例的拍照方法。
需要说明的是,上述装置实施例与方法实施例属于同一构思。因此,其具体实现过程可以详见方法实施例。另外,装置实施例中的技术特征同样适用于方法实施例,这里不再赘述。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件来实现,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本公开各个实施例所述的方法。
以上参照附图说明了本公开的优选实施例,并非因此局限本公开的权利范围。本领域技术人员不脱离本公开的范围和实质内所作的任何修改、等同替换和改进,均应在本公开的权利范围之内。

Claims (11)

  1. 一种拍照方法,包括以下步骤:
    使第一摄像头和第二摄像头对拍照预览界面内的两个不同位置进行对焦,以获取第一摄像头对应的第一对焦物体和第二摄像头对应的第二对焦物体;
    提取所述第一对焦物体周围的图像作为第一图层,提取所述第二对焦物体周围的图像作为第二图层;
    对所述第一图层和/或第二图层进行处理;以及
    将第一图层和第二图层与所述拍照预览界面合并,以生成合成照片。
  2. 根据权利要求1所述的拍照方法,其中,所述提取所述第一对焦物体周围的图像作为第一图层,提取所述第二对焦物体周围的图像作为第二图层的步骤包括:
    对所述第一对焦物体周围的图像进行锐度识别,提取所述第一对焦物体周围的锐度高于预存锐度阈值的所有像素点,形成第一图层;以及
    对所述第二对焦物体周围的图像进行锐度识别,提取所述第二对焦物体周围的锐度高于所述锐度阈值的所有像素点,形成第二图层。
  3. 根据权利要求1所述的拍照方法,其中,所述对所述第一图层和/或第二图层进行处理的步骤包括:
    对所述第一图层或第二图层内的图像进行放大、缩小或移动操作。
  4. 根据权利要求3所述的一种拍照方法,其中,对所述第一图层或第二图层内的图像进行放大、缩小操作的步骤包括:
    当在显示屏上检测到双指时,获取双指连线的中心位置,判 断所述中心位置是位于第一图层还是第二图层的区域内,在双指间的距离变大时,放大所述中心位置所在的图层,在所述距离变小时,缩小所述中心位置所在的图层,并且其中
    对所述第一图层或第二图层内的图像进行移动操作的步骤还包括:
    当在显示屏上检测到单指时,判断单指位置是位于第一图层还是第二图层的区域内,单指进行移动时,所述单指位置所在的图层跟随所述单指进行移动。
  5. 根据权利要求1所述的拍照方法,其中,所述将第一图层和第二图层与所述拍照预览界面合并,以生成合成照片的步骤包括:
    根据第一摄像头镜片与图像采集传感器的距离,获取所述第一摄像头与所述第一对焦物体之间的第一距离;根据第二摄像头镜片与图像采集传感器的距离,获取所述第二摄像头与所述第二对焦物体之间的第二距离;
    判断所述第一距离是否小于所述第二距离,其中,若所述第一距离小于所述第二距离,则将所述第一图层作为最上层图层,将所述第二图层作为中间层图层,将所述拍照预览界面作为最下层图层,若所述第一距离不小于所述第二距离,则将所述第二图层作为最上层图层,将所述第一图层作为中间层图层,将所述拍照预览界面作为最下层图层;
    按照最上层图层、中间层图层和最下层图层的顺序合并图层,以生成合成照片。
  6. 根据权利要求5所述的拍照方法,其中,所述最上层图层在进行放大、缩小或移动操作时,覆盖所述中间层图层。
  7. 一种拍照装置,包括:
    对焦模块,被配置为使第一摄像头和第二摄像头对拍照预览 界面内的两个不同位置进行对焦,获取第一摄像头对应的第一对焦物体和第二摄像头对应的第二对焦物体;
    图像分层模块,被配置为提取所述第一对焦物体周围的图像作为第一图层,提取所述第二对焦物体周围的图像作为第二图层;
    图层处理模块,被配置为对所述第一图层和/或第二图层进行处理;以及
    照片合成模块,被配置为将第一图层和第二图层与所述拍照预览界面合并,以生成合成照片。
  8. 根据权利要求7所述的拍照装置,其中,所述图像分层模块包括:
    第一锐度识别单元,被配置为对所述第一对焦物体周围的图像进行锐度识别,提取所述第一对焦物体周围的图像像素锐度高于预存锐度阈值的所有像素点,形成第一图层;以及
    第二锐度识别单元,被配置为对所述第二对焦物体周围的图像进行锐度识别,提取所述第二对焦物体周围的图像像素锐度高于所述锐度阈值的所有像素点,形成第二图层。
  9. 根据权利要求7所述的拍照装置,其中,所述图层处理模块包括:
    图层缩放单元,被配置为当在显示屏上检测到双指时,获取双指连线的中心位置,判断所述中心位置是位于第一图层还是第二图层的区域内,在双指间的距离变大时,放大所述中心位置所在的图层,在所述距离变小时,缩小所述中心位置所在的图层;以及
    图层移动单元,被配置为当在显示屏上检测到单指时,判断单指位置是位于第一图层还是第二图层的区域内,单指进行移动时,所述单指位置所在的图层跟随所述单指进行移动,并且其中
    所述照片合成模块包括:
    距离获取单元,被配置为根据第一摄像头镜片与图像采集传 感器的距离,获取所述第一摄像头与所述第一对焦物体之间的第一距离,根据第二摄像头镜片与图像采集传感器的距离,获取所述第二摄像头与所述第二对焦物体之间的第二距离;
    判断单元,被配置为判断所述第一距离是否小于所述第二距离,其中,若所述第一距离小于所述第二距离,则将所述第一图层作为最上层图层,将所述第二图层作为中间层图层,将所述拍照预览界面作为最下层图层;若所述第一距离不小于所述第二距离,则将所述第二图层作为最上层图层,将所述第一图层作为中间层图层,将所述拍照预览界面作为最下层图层;以及
    合并单元,被配置为按照最上层图层、中间层图层和最下层图层的顺序合并图层,以生成合成照片。
  10. 一种移动终端,包括存储器、处理器和至少一个被存储在所述存储器中并被配置为由所述处理器执行的应用程序,其中,所述应用程序被配置为用于执行根据权利要求1-6任一项所述的拍照方法。
  11. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行程序,其中,当所述计算机可执行程序在处理器上运行时,执行根据权利要求1-6任一项所述的拍照方法。
PCT/CN2018/084823 2017-04-27 2018-04-27 一种拍照方法、拍照装置及移动终端 WO2018196854A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710289228.0A CN108810326B (zh) 2017-04-27 2017-04-27 一种拍照方法、装置及移动终端
CN201710289228.0 2017-04-27

Publications (1)

Publication Number Publication Date
WO2018196854A1 true WO2018196854A1 (zh) 2018-11-01

Family

ID=63919499

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/084823 WO2018196854A1 (zh) 2017-04-27 2018-04-27 一种拍照方法、拍照装置及移动终端

Country Status (2)

Country Link
CN (1) CN108810326B (zh)
WO (1) WO2018196854A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110418056A (zh) * 2019-07-16 2019-11-05 Oppo广东移动通信有限公司 一种图像处理方法、装置、存储介质及电子设备
CN112351204A (zh) * 2020-10-27 2021-02-09 歌尔智能科技有限公司 一种拍照方法、装置、移动终端及计算机可读存储介质
CN112616022A (zh) * 2020-12-21 2021-04-06 努比亚技术有限公司 一种多点对焦方法、装置、终端及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101025405B1 (ko) * 2009-11-02 2011-03-28 중앙대학교 산학협력단 초점 조절 영상 생성 시스템, 방법 및 이를 채용한 촬영 장치
CN104270573A (zh) * 2014-10-27 2015-01-07 上海斐讯数据通信技术有限公司 多点触控对焦成像***和方法及适用的移动终端
CN104349063A (zh) * 2014-10-27 2015-02-11 东莞宇龙通信科技有限公司 一种控制摄像头拍摄的方法、装置及终端
CN104662463A (zh) * 2012-09-28 2015-05-27 佳能株式会社 图像处理装置、成像***和图像处理***

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140106927A (ko) * 2013-02-27 2014-09-04 한국전자통신연구원 파노라마 생성 장치 및 방법
CN103647903B (zh) * 2013-12-31 2016-09-07 广东欧珀移动通信有限公司 一种移动终端拍照方法及***
CN104780315A (zh) * 2015-04-08 2015-07-15 广东欧珀移动通信有限公司 摄像装置拍摄的方法和***
CN105120178A (zh) * 2015-09-21 2015-12-02 宇龙计算机通信科技(深圳)有限公司 一种多摄像头的终端的对焦拍摄方法、***与移动终端
CN106060386A (zh) * 2016-06-08 2016-10-26 维沃移动通信有限公司 一种预览图像生成方法及移动终端
CN106375662B (zh) * 2016-09-22 2019-04-12 宇龙计算机通信科技(深圳)有限公司 一种基于双摄像头的拍摄方法、装置和移动终端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101025405B1 (ko) * 2009-11-02 2011-03-28 중앙대학교 산학협력단 초점 조절 영상 생성 시스템, 방법 및 이를 채용한 촬영 장치
CN104662463A (zh) * 2012-09-28 2015-05-27 佳能株式会社 图像处理装置、成像***和图像处理***
CN104270573A (zh) * 2014-10-27 2015-01-07 上海斐讯数据通信技术有限公司 多点触控对焦成像***和方法及适用的移动终端
CN104349063A (zh) * 2014-10-27 2015-02-11 东莞宇龙通信科技有限公司 一种控制摄像头拍摄的方法、装置及终端

Also Published As

Publication number Publication date
CN108810326A (zh) 2018-11-13
CN108810326B (zh) 2022-11-18

Similar Documents

Publication Publication Date Title
US9578260B2 (en) Digital photographing apparatus and method of controlling the digital photographing apparatus
US9712751B2 (en) Camera field of view effects based on device orientation and scene content
KR101899877B1 (ko) 확대된 영상의 화질을 개선하기 위한 장치 및 방법
JP5036599B2 (ja) 撮像装置
JP4497211B2 (ja) 撮像装置、撮像方法及びプログラム
JP6157242B2 (ja) 画像処理装置及び画像処理方法
US8274572B2 (en) Electronic camera capturing a group of a plurality of specific objects
US10237466B2 (en) Recognition of degree of focus of an image
WO2022083229A1 (zh) 图像处理方法、电子装置及非易失性计算机可读存储介质
JPWO2017037978A1 (ja) 検出装置、検出方法、検出プログラムおよび撮像装置
JP4802884B2 (ja) 撮像装置、撮像画像記録方法、及び、プログラム
WO2018196854A1 (zh) 一种拍照方法、拍照装置及移动终端
US9167150B2 (en) Apparatus and method for processing image in mobile terminal having camera
JP2013183306A (ja) 撮像装置、撮像方法、及びプログラム
JP2009089220A (ja) 撮像装置
EP2200275B1 (en) Method and apparatus of displaying portrait on a display
JP2011239267A (ja) 撮像装置及び画像処理装置
JP6483661B2 (ja) 撮像制御装置、撮像制御方法およびプログラム
JP2010141609A (ja) 撮像装置
JP2020160773A (ja) 画像処理装置、撮像装置、画像処理方法およびプログラム
KR101392382B1 (ko) 휴대용 단말기에서 카메라의 파노라마 기능 구현 방법 및장치
US20230088309A1 (en) Device and method for capturing images or video
JP2010028370A (ja) 撮像装置
TWI465108B (zh) 影像擷取裝置及影像處理方法
JP2024002631A (ja) 画像処理装置、撮像装置、画像処理方法、コンピュータのプログラムおよび記録媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18791109

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18791109

Country of ref document: EP

Kind code of ref document: A1