[go: up one dir, main page]

CN106375662B - A kind of image pickup method based on dual camera, device and mobile terminal - Google Patents

A kind of image pickup method based on dual camera, device and mobile terminal Download PDF

Info

Publication number
CN106375662B
CN106375662B CN201610840250.5A CN201610840250A CN106375662B CN 106375662 B CN106375662 B CN 106375662B CN 201610840250 A CN201610840250 A CN 201610840250A CN 106375662 B CN106375662 B CN 106375662B
Authority
CN
China
Prior art keywords
image
camera
area
foreground
background
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.)
Active
Application number
CN201610840250.5A
Other languages
Chinese (zh)
Other versions
CN106375662A (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.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201610840250.5A priority Critical patent/CN106375662B/en
Priority to PCT/CN2016/104069 priority patent/WO2018053906A1/en
Publication of CN106375662A publication Critical patent/CN106375662A/en
Application granted granted Critical
Publication of CN106375662B publication Critical patent/CN106375662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • 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
    • 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/957Light-field or plenoptic cameras or camera modules

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The invention proposes a kind of image pickup method based on dual camera, device and mobile terminals, this method comprises: obtaining the image of the first camera acquisition and the image of second camera acquisition;The image to first camera acquisition and the image of second camera acquisition carry out the division of foreground area and background area respectively;Foreground area removal processing is carried out to the image of first camera acquisition, forms background image;Removal processing in background area is carried out to the image of second camera acquisition, forms foreground image;The background image and the foreground image are synthesized according to the posture of setting, form final image.The present invention can in real time, dynamically adjust the posture of foreground and background in photographed scene, operate that convenient, interest is strong, improve the shooting experience of user to the greatest extent.

Description

A kind of image pickup method based on dual camera, device and mobile terminal
Technical field
The present invention relates to technical field of image processing more particularly to a kind of image pickup method based on dual camera, device and Mobile terminal.
Background technique
With the configuration of mobile terminal and the continuous promotion of performance, occur with double preceding cameras or double rear cameras Mobile terminal, especially field of mobile phones, most of mobile phone all have the configuration of double rear cameras.But mobile phone is using double at present The main purpose of rear camera is and to lack the function that differentiation processing are carried out by double rear cameras to promote effect of taking pictures Energy.User, can only be by third party's image processing software, example if you need to be adjusted processing to the foreground and background in a photo Such as, Photoshop, in graphic detail etc..Therefore, it is impossible in real time, dynamically adjust imaging posture in background and prospect.
Summary of the invention
The main purpose of the present invention is to provide a kind of image pickup method based on dual camera, device and mobile terminal, The posture of prospect and background in image is dynamically adjusted in shooting process.
The technical solution adopted by the present invention is that the image pickup method based on dual camera, comprising:
Obtain the image of the first camera acquisition and the image of second camera acquisition;
The image to first camera acquisition and the image of second camera acquisition carry out foreground area respectively With the division of background area;
Foreground area removal processing is carried out to the image of first camera acquisition, forms background image;To described The image of two cameras acquisition carries out background area removal processing, forms foreground image;
The background image and the foreground image are synthesized according to the posture of setting, form final image.
Further, the image of the image to first camera acquisition and second camera acquisition respectively Carry out the division of foreground area and background area, comprising:
Whether judge in the image of the first camera acquisition and the image of second camera acquisition comprising personage Region, if so, setting the personage region to image and the second camera acquisition of the first camera acquisition Image foreground area, remaining area in the image of first camera acquisition and the image of second camera acquisition Domain is set as background area;If it is not, each pixel then calculated in the image of the first camera acquisition is imaged to first Head first distance value, be based on the first distance value, by first camera acquire image be divided into foreground area and Background area, and calculate each pixel in the image of second camera acquisition to second camera second distance Value is based on the second distance value, the image that the second camera acquires is divided into foreground area and background area.
Further, the image to first camera acquisition carries out foreground area removal processing, forms background Image, comprising:
The content of the foreground area in the image of the first camera acquisition is deleted, and is adopted according to first camera The content of background area in the image of collection is filled the foreground area, forms the background image of content intact.
Further, the image to second camera acquisition carries out background area removal processing, forms prospect Image, comprising:
The content of the background area in the image of the second camera acquisition is deleted, formation only retains second camera shooting The foreground image of the content of foreground area in the image of head acquisition.
Further, described to synthesize the background image and the foreground image according to the posture of setting, it is formed Final image, comprising:
The foreground image is placed in the background image according to the position of setting, and to the foreground image and/ Or the background image zooms in and out adjustment and/or rotation adjustment, with shape final image.
The present invention also provides a kind of filming apparatus based on dual camera, comprising:
Module is obtained, for obtaining the image of the first camera acquisition and the image of second camera acquisition;
Division module, the image for image and second camera acquisition respectively to first camera acquisition Carry out the division of foreground area and background area;
Processing module, the image for acquiring to first camera carry out foreground area removal processing, form background Image;Removal processing in background area is carried out to the image of second camera acquisition, forms foreground image;
Synthesis module is formed for synthesizing the background image and the foreground image according to the posture of setting Final image.
Further, the division module, is specifically used for:
Whether judge in the image of the first camera acquisition and the image of second camera acquisition comprising personage Region, if so, setting the personage region to image and the second camera acquisition of the first camera acquisition Image foreground area, remaining area in the image of first camera acquisition and the image of second camera acquisition Domain is set as background area;If it is not, each pixel then calculated in the image of the first camera acquisition is imaged to first Head first distance value, be based on the first distance value, by first camera acquire image be divided into foreground area and Background area, and calculate each pixel in the image of second camera acquisition to second camera second distance Value is based on the second distance value, the image that the second camera acquires is divided into foreground area and background area.
Further, the processing module, comprising: perspective process unit and background process unit;
The perspective process unit, the content of the foreground area in image for deleting the first camera acquisition, And the foreground area is filled according to the content of the background area in the image of first camera acquisition, in formation Hold complete background image;
The background process unit, the content of the background area in image for deleting the second camera acquisition, Form the foreground image of the content of the foreground area in the image for only retaining the second camera acquisition.
Further, the synthesis module, is specifically used for:
The foreground image is placed in the background image according to the position of setting, and to the foreground image and/ Or the background image zooms in and out adjustment and/or rotation adjustment, with shape final image.
The present invention also provides a kind of mobile terminals, comprising: double preceding cameras or double rear cameras and claim 6~9 Any one of described in the filming apparatus based on dual camera.
The present invention has the beneficial effect that:
Image pickup method based on dual camera, device and mobile terminal of the present invention, user use have it is double before or When the mobile terminal of the double rear cameras of person takes pictures or records a video, a camera generates the background painting only having in photographed scene The background image in face, in addition camera generates the foreground image for there was only the foreground picture in photographed scene, then will be described before Scape image is incorporated in background image in a manner of editable.End user adjusts the posture of foreground image and background image, is formed Meet the photo or video of user's requirement.The present invention can in real time, dynamically adjust foreground and background in photographed scene Posture, operation is convenient, interest is strong, improves the shooting experience of user to the greatest extent.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the image pickup method based on dual camera of first embodiment of the invention;
Fig. 2 is the flow chart of the image pickup method based on dual camera of second embodiment of the invention;
Fig. 3 is the composed structure schematic diagram of the filming apparatus based on dual camera of third embodiment of the invention;
Fig. 4 is the composed structure schematic diagram of the filming apparatus based on dual camera of fourth embodiment of the invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with drawings and the specific embodiments, to this Invention is described in further detail.
The first embodiment of the present invention provides a kind of image pickup method based on dual camera, as shown in Figure 1, include with Lower specific steps:
Step S101: the image of the first camera acquisition and the image of second camera acquisition are obtained.
First camera and second camera be a certain mobile terminal double proactive pictures after or double rear cameras.Have The mobile terminal of double preceding cameras is that there are two front cameras for setting on the mobile terminal.Shifting with double rear cameras Dynamic terminal is that there are two rear cameras for setting on the mobile terminal.When a certain mobile terminal is shot, lead to It crosses the first camera and second camera and collects two images respectively.
Step S102: the image to first camera acquisition and the image of second camera acquisition carry out respectively The division of foreground area and background area.
Prospect refer to the main body in image before close camera scenery or personage, background refer to positioned at image In main body after, far from camera scenery.
Specifically, step S102, comprising:
Whether judge in the image of the first camera acquisition and the image of second camera acquisition comprising personage Region, if so, setting the personage region to image and the second camera acquisition of the first camera acquisition Image foreground area, remaining area in the image of first camera acquisition and the image of second camera acquisition Domain is set as background area;If it is not, each pixel then calculated in the image of the first camera acquisition is imaged to first Head first distance value, be based on the first distance value, by first camera acquire image be divided into foreground area and Background area, and calculate each pixel in the image of second camera acquisition to second camera second distance Value is based on the second distance value, the image that the second camera acquires is divided into foreground area and background area.
Step S103: foreground area removal processing is carried out to the image of first camera acquisition, forms background image; Removal processing in background area is carried out to the image of second camera acquisition, forms foreground image.
Specifically, the image to first camera acquisition carries out foreground area removal processing, Background is formed Picture, comprising:
The content of the foreground area in the image of the first camera acquisition is deleted, and is adopted according to first camera The content of background area in the image of collection is filled the foreground area, forms the background image of content intact.
Since after the content of foreground area in the image for deleting the first camera acquisition, first camera is adopted Foreground area in the image of collection does not have pattern and color, needs the background area in the image using first camera acquisition The pattern and color in domain are filled foreground area, so that the picture of the background image is complete.
The image to second camera acquisition carries out background area removal processing, forms foreground image, comprising:
The content of the background area in the image of the second camera acquisition is deleted, formation only retains second camera shooting The foreground image of the content of foreground area in the image of head acquisition.
Step S104: the background image and the foreground image are synthesized according to the posture of setting, are formed final Image.
Specifically, step S104, comprising:
The foreground image is placed in the background image according to the position of setting, and to the foreground image and/ Or the background image zooms in and out adjustment and/or rotation adjustment, with shape final image.
The second embodiment of the present invention provides a kind of image pickup method based on dual camera, as shown in Fig. 2, include with Lower specific steps:
Step S201: double preceding cameras or double rear cameras are carried out with the setting of screening-mode.If screening-mode is arranged For the screening-mode for adjusting foreground and background posture, S202 is thened follow the steps, if setting common screening-mode for screening-mode, Then conventionally shot using double preceding cameras or double rear cameras.
Mobile terminal with double preceding cameras is that there are two front cameras for setting on the mobile terminal.With double The mobile terminal of rear camera is that there are two rear cameras for setting on the mobile terminal.
Step S202: function setting is carried out to double preceding cameras or double rear cameras.A camera is arranged to be used to form Foreground image, another camera are used to form background image.
In the present embodiment, the first camera is provided for form the camera of background image, by second camera It is provided for forming the camera of foreground image.
Step S203: a certain scene is shot by the double preceding cameras set or double rear cameras, is closed In two images of a certain scene.
Step S204: respectively described two images are carried out with the division of foreground area and background area.
In general, be all in the image of user's shooting by personage in conjunction with landscape, and using personage as the main body in image, Landscape is as the background in image.Whether the shooting based on user is accustomed to, first determine whether comprising personage region in image, if so, Then set the personage region to the foreground area of described image, remaining region in described image is set as background area; If it is not, then calculating the distance value of each pixel in image, the distance value is each pixel in image to acquisition institute Described image is divided into prospect based on the distance value of each pixel in described image by the distance for stating the camera of image Region and background area.
Further, the distance value based on each pixel in described image, is divided into prospect for described image Region and background area, comprising:
Based on the distance value of each pixel in described image, described image is divided into multiple connected regions, Mei Gelian The distance between each pixel in logical area difference is within the set range;
The smallest connected region of average distance value is set foreground area by the average distance value for calculating each connected region, will Other regions in described image are set as background area.
Step S205: foreground area removal processing is carried out to an image, forms background image;To another image into Row background area removal processing, forms foreground image.
Specifically, being arranged according to the function of being carried out in step S202 to double preceding cameras or double rear cameras, first is taken the photograph As head acquired image is handled as follows:
Step A1: deleting the content of the foreground area in described image, when the content of the foreground area in image is deleted, The foreground area of described image forms the region of black pattern-free.
Step A2: the profile of the background area in described image is extracted, according to the profile of the background area in described image Module topology is carried out to the foreground area, the foreground area described in topological Contour filling is opened up so that the foreground area has Flutter profile skeleton.
Step A3: using the content of the background area in described image, by filling algorithm and algorithm of generating layered regions, gradually By the fills of the background area to the foreground area with topological profile skeleton, the back of content intact is ultimately formed Scape image.
It is arranged according to the function of being carried out in step S202 to double preceding cameras or double rear cameras, second camera is adopted The image of collection is handled as follows:
The content of the background area in described image is deleted, the foreground image for only retaining the content of foreground area is formed.
Step S206: according to the positional relationship and scale of foreground image and background image in former shooting image, by institute Foreground image is stated to be placed in the background image.
Step S207: pose adjustment is carried out to the foreground image and background image, to form final image.
Specifically, the pose adjustment includes: the position for adjusting foreground image in background image, and to foreground image Adjustment, rotation adjustment are zoomed in and out with background image.
The third embodiment of the present invention provides a kind of filming apparatus based on dual camera, as shown in figure 3, include with Lower component part:
Module 301 is obtained, for obtaining the image of the first camera acquisition and the image of second camera acquisition.
Specifically, first camera and second camera are double preceding cameras or double rear camera shootings on mobile terminal Head.It takes the mobile phone as an example, there is the mobile phone of double preceding cameras or double rear cameras when a certain scene is taken pictures and imaged, institute It states two on mobile phone cameras and collects two images about a certain scene.
Division module 302, for respectively to first camera acquisition image and the second camera acquisition The division of image progress foreground area and background area.
Prospect refer to the main body in image before close camera scenery or personage, background refer to positioned at image In main body after, far from camera scenery.
Specifically, division module 302, is specifically used for
Whether judge in the image of the first camera acquisition and the image of second camera acquisition comprising personage Region, if so, setting the personage region to image and the second camera acquisition of the first camera acquisition Image foreground area, remaining area in the image of first camera acquisition and the image of second camera acquisition Domain is set as background area;If it is not, each pixel then calculated in the image of the first camera acquisition is imaged to first Head first distance value, be based on the first distance value, by first camera acquire image be divided into foreground area and Background area, and calculate each pixel in the image of second camera acquisition to second camera second distance Value is based on the second distance value, the image that the second camera acquires is divided into foreground area and background area.
Processing module 303, the image for acquiring to first camera carry out foreground area removal processing, form back Scape image;Removal processing in background area is carried out to the image of second camera acquisition, forms foreground image.
Specifically, processing module 303, comprising: perspective process unit and background process unit;
The perspective process unit, the content of the foreground area in image for deleting the first camera acquisition, And the foreground area is filled according to the content of the background area in the image of first camera acquisition, in formation Hold complete background image;
The background process unit, the content of the background area in image for deleting the second camera acquisition, Form the foreground image of the content of the foreground area in the image for only retaining the second camera acquisition.
Synthesis module 304, for the background image and the foreground image to be synthesized according to the posture of setting, shape At final image.
Specifically, synthesis module 304, is specifically used for:
The foreground image is placed in the background image according to the position of setting, and to the foreground image and/ Or the background image zooms in and out adjustment and/or rotation adjustment, with shape final image.
The fourth embodiment of the present invention provides a kind of filming apparatus based on dual camera, as shown in figure 4, include with Lower component part:
Screening-mode setup module 401, for double preceding cameras or double rear cameras to be carried out with the setting of screening-mode.If Screening-mode is set to the screening-mode of adjustment foreground and background posture, then Trigger Function setup module 402, if mould will be shot Formula is set as common screening-mode, then is conventionally shot using double preceding cameras or double rear cameras.
Function setup module 402, for carrying out function setting to double preceding cameras or double rear cameras.One camera shooting is set Head is used to form foreground image, another camera is used to form background image.
In the present embodiment, the first camera is provided for form the camera of background image, by second camera It is provided for forming the camera of foreground image.
Shooting module 403 shoots a certain scene for passing through the double preceding cameras set or double rear cameras, Obtain two images about a certain scene.
Division module 404, for respectively described two images to be carried out with the division of foreground area and background area.
In general, be all in the image of user's shooting by personage in conjunction with landscape, and using personage as the main body in image, Landscape is as the background in image.Whether the shooting based on user is accustomed to, first determine whether comprising personage region in image, if so, Then set the personage region to the foreground area of described image, remaining region in described image is set as background area; If it is not, then calculating the distance value of each pixel in image, the distance value is each pixel in image to acquisition institute Described image is divided into foreground area based on the distance value of each pixel in image by the distance for stating the camera of image The background area and.
Specifically, division module 404, is specifically used for:
Based on the distance value of each pixel in image, described image is divided into multiple connected regions, each connected region In the distance between each pixel difference within the set range;
The smallest connected region of average distance value is set foreground area by the average distance value for calculating each connected region, will Other regions in described image are set as background area.
Processing module 405 forms background image for carrying out foreground area removal processing to an image;To other one A image carries out background area removal processing, forms foreground image.
Specifically, the processing module 405, comprising: perspective process unit and background process unit;
Function setting is carried out to double preceding cameras or double rear cameras according in function setup module 402, is taken the photograph for first As head acquired image, the perspective process unit is specifically used for:
The content for deleting the foreground area in described image, when the content of the foreground area in image is deleted, the figure The foreground area of picture forms the region of black pattern-free.
The profile for extracting the background area in described image, according to the profile of the background area in described image to before described Scene area carries out module topology, the foreground area described in topological Contour filling, so that the foreground area has topological profile bone Frame.
It, gradually will be described by filling algorithm and algorithm of generating layered regions using the content of the background area in described image The fills of background area ultimately form the Background of content intact to the foreground area with topological profile skeleton Picture.
Function setting is carried out to double preceding cameras or double rear cameras according in function setup module 402, is taken the photograph for second As head acquired image, the background process unit is specifically used for:
The content of the background area in described image is deleted, the foreground image for only retaining the content of foreground area is formed.
Image synthesis module 406, for the positional relationship and ratio according to foreground image and background image in former shooting image Example size, the foreground image is placed in the background image.
Pose adjustment module 407, for carrying out pose adjustment to the foreground image and background image, to be formed finally Image.
Specifically, the pose adjustment includes: the position for adjusting foreground image in background image, and to foreground image Adjustment, rotation adjustment are zoomed in and out with background image.
The fifth embodiment of the present invention, a kind of mobile terminal, comprising: double preceding cameras or double rear cameras and this hair The filming apparatus based on dual camera introduced in bright 3rd embodiment or fourth embodiment.Movement with double preceding cameras Terminal is that there are two front cameras for setting on the mobile terminal;Mobile terminal with double rear cameras is in the shifting There are two rear cameras for setting in dynamic terminal.
The image pickup method based on dual camera, device and the mobile terminal introduced in the embodiment of the present invention, user use tool When having the mobile terminal of double preceding or double rear cameras to be taken pictures or recorded a video, a camera, which generates, to be only had in photographed scene Background frame background image, in addition camera generates the foreground image for there was only the foreground picture in photographed scene, then The foreground image is incorporated in background image in a manner of editable.The appearance of end user adjustment foreground image and background image State forms the photo or video for meeting user's requirement.The present invention can in real time, dynamically adjust prospect in photographed scene and The posture of background, operation is convenient, interest is strong, improves the shooting experience of user to the greatest extent.
The above description is only an embodiment of the present invention, is not intended to restrict the invention, for those skilled in the art For member, the invention may be variously modified and varied.All within the spirits and principles of the present invention, it is made it is any modification, Equivalent replacement, improvement etc., should be included within scope of the presently claimed invention.

Claims (8)

1.一种基于双摄像头的拍摄方法,其特征在于,包括:1. a method for shooting based on dual cameras, is characterized in that, comprising: 获取第一摄像头采集的图像和第二摄像头采集的图像;acquiring the image collected by the first camera and the image collected by the second camera; 分别对所述第一摄像头采集的图像和所述第二摄像头采集的图像进行前景区域和背景区域的划分;The image collected by the first camera and the image collected by the second camera are respectively divided into a foreground area and a background area; 对所述第一摄像头采集的图像进行前景区域移除处理,形成背景图像;对所述第二摄像头采集的图像进行背景区域移除处理,形成前景图像;Perform foreground area removal processing on the image collected by the first camera to form a background image; perform background area removal processing on the image collected by the second camera to form a foreground image; 将所述背景图像和所述前景图像按照设定的姿态进行合成,形成最终图像;Synthesize the background image and the foreground image according to the set posture to form a final image; 其中,所述分别对所述第一摄像头采集的图像和所述第二摄像头采集的图像进行前景区域和背景区域的划分,包括:Wherein, performing the division of the foreground area and the background area on the image collected by the first camera and the image collected by the second camera respectively includes: 判断所述第一摄像头采集的图像和所述第二摄像头采集的图像中是否包含人物区域,若是,则将所述人物区域设置为所述第一摄像头采集的图像和所述第二摄像头采集的图像的前景区域,所述第一摄像头采集的图像和所述第二摄像头采集的图像中的其余区域设置为背景区域;若否,则计算所述第一摄像头采集的图像中的每个像素点到第一摄像头的第一距离值,基于所述第一距离值,将所述第一摄像头采集的图像划分为前景区域和背景区域,并计算所述第二摄像头采集的图像中的每个像素点到第二摄像头的第二距离值,基于所述第二距离值,将所述第二摄像头采集的图像划分为前景区域和背景区域;Determine whether the image collected by the first camera and the image collected by the second camera contains a person area, and if so, set the person area as the image collected by the first camera and the image collected by the second camera. The foreground area of the image, the remaining areas in the image collected by the first camera and the image collected by the second camera are set as the background area; if not, calculate each pixel in the image collected by the first camera. The first distance value to the first camera, based on the first distance value, the image collected by the first camera is divided into a foreground area and a background area, and each pixel in the image collected by the second camera is calculated A second distance value from the point to the second camera, and based on the second distance value, the image collected by the second camera is divided into a foreground area and a background area; 所述基于所述第一距离值,将所述第一摄像头采集的图像划分为前景区域和背景区域,具体包括:The dividing the image collected by the first camera into a foreground area and a background area based on the first distance value, specifically including: 基于所述图像中的每个像素点的距离值,将所述图像划分为多个连通区,每个连通区中的各个像素点之间的距离差值均在设定范围内;Based on the distance value of each pixel in the image, the image is divided into a plurality of connected regions, and the distance difference between each pixel in each connected region is within a set range; 计算每个连通区的平均距离值,将平均距离值最小的连通区设置为前景区域,将所述图像中的其他区域设置为背景区域。Calculate the average distance value of each connected area, set the connected area with the smallest average distance value as the foreground area, and set other areas in the image as the background area. 2.根据权利要求1所述的基于双摄像头的拍摄方法,其特征在于,所述对所述第一摄像头采集的图像进行前景区域移除处理,形成背景图像,包括:2. The dual-camera-based shooting method according to claim 1, wherein, performing a foreground area removal process on the image collected by the first camera to form a background image, comprising: 删除所述第一摄像头采集的图像中的前景区域的内容,并根据所述第一摄像头采集的图像中的背景区域的内容对所述前景区域进行填充,形成内容完整的背景图像。The content of the foreground area in the image collected by the first camera is deleted, and the foreground area is filled according to the content of the background area in the image collected by the first camera to form a background image with complete content. 3.根据权利要求1所述的基于双摄像头的拍摄方法,其特征在于,所述对所述第二摄像头采集的图像进行背景区域移除处理,形成前景图像,包括:3. The dual-camera-based shooting method according to claim 1, wherein the background region removal process is performed on the image collected by the second camera to form a foreground image, comprising: 删除所述第二摄像头采集的图像中的背景区域的内容,形成只保留所述第二摄像头采集的图像中的前景区域的内容的前景图像。Deleting the content of the background area in the image collected by the second camera forms a foreground image that only retains the content of the foreground area in the image collected by the second camera. 4.根据权利要求1所述的基于双摄像头的拍摄方法,其特征在于,所述将所述背景图像和所述前景图像按照设定的姿态进行合成,形成最终图像,包括:4. The dual-camera-based shooting method according to claim 1, wherein the background image and the foreground image are synthesized according to a set posture to form a final image, comprising: 将所述前景图像按照设定的位置放置于所述背景图像中,并对所述前景图像和/或所述背景图像进行缩放调整和/或旋转调整,以形状最终图像。The foreground image is placed in the background image according to the set position, and the foreground image and/or the background image is scaled and/or rotated to shape the final image. 5.一种基于双摄像头的拍摄装置,其特征在于,包括:5. A photographing device based on dual cameras, characterized in that, comprising: 获取模块,用于获取第一摄像头采集的图像和第二摄像头采集的图像;an acquisition module, configured to acquire the image collected by the first camera and the image collected by the second camera; 划分模块,用于分别对所述第一摄像头采集的图像和所述第二摄像头采集的图像进行前景区域和背景区域的划分;a dividing module, configured to divide the foreground area and the background area respectively on the image collected by the first camera and the image collected by the second camera; 处理模块,用于对所述第一摄像头采集的图像进行前景区域移除处理,形成背景图像;对所述第二摄像头采集的图像进行背景区域移除处理,形成前景图像;a processing module, configured to perform foreground area removal processing on the image collected by the first camera to form a background image; perform background area removal processing on the image collected by the second camera to form a foreground image; 合成模块,用于将所述背景图像和所述前景图像按照设定的姿态进行合成,形成最终图像;a synthesis module, used for synthesizing the background image and the foreground image according to the set posture to form a final image; 其中,所述划分模块,具体用于:Wherein, the dividing module is specifically used for: 判断所述第一摄像头采集的图像和所述第二摄像头采集的图像中是否包含人物区域,若是,则将所述人物区域设置为所述第一摄像头采集的图像和所述第二摄像头采集的图像的前景区域,所述第一摄像头采集的图像和所述第二摄像头采集的图像中的其余区域设置为背景区域;若否,则计算所述第一摄像头采集的图像中的每个像素点到第一摄像头的第一距离值,基于所述第一距离值,将所述第一摄像头采集的图像划分为前景区域和背景区域,并计算所述第二摄像头采集的图像中的每个像素点到第二摄像头的第二距离值,基于所述第二距离值,将所述第二摄像头采集的图像划分为前景区域和背景区域;Determine whether the image collected by the first camera and the image collected by the second camera contains a person area, and if so, set the person area as the image collected by the first camera and the image collected by the second camera. The foreground area of the image, the remaining areas in the image collected by the first camera and the image collected by the second camera are set as the background area; if not, calculate each pixel in the image collected by the first camera. The first distance value to the first camera, based on the first distance value, the image collected by the first camera is divided into a foreground area and a background area, and each pixel in the image collected by the second camera is calculated A second distance value from the point to the second camera, and based on the second distance value, the image collected by the second camera is divided into a foreground area and a background area; 所述基于所述第一距离值,将所述第一摄像头采集的图像划分为前景区域和背景区域,具体包括:The dividing the image collected by the first camera into a foreground area and a background area based on the first distance value, specifically including: 基于所述图像中的每个像素点的距离值,将所述图像划分为多个连通区,每个连通区中的各个像素点之间的距离差值均在设定范围内;Based on the distance value of each pixel in the image, the image is divided into a plurality of connected regions, and the distance difference between each pixel in each connected region is within a set range; 计算每个连通区的平均距离值,将平均距离值最小的连通区设置为前景区域,将所述图像中的其他区域设置为背景区域。Calculate the average distance value of each connected area, set the connected area with the smallest average distance value as the foreground area, and set other areas in the image as the background area. 6.根据权利要求5所述的基于双摄像头的拍摄装置,其特征在于,所述处理模块,包括:前景处理单元和背景处理单元;6. The dual-camera-based shooting device according to claim 5, wherein the processing module comprises: a foreground processing unit and a background processing unit; 所述前景处理单元,用于删除所述第一摄像头采集的图像中的前景区域的内容,并根据所述第一摄像头采集的图像中的背景区域的内容对所述前景区域进行填充,形成内容完整的背景图像;The foreground processing unit is configured to delete the content of the foreground area in the image collected by the first camera, and fill the foreground area according to the content of the background area in the image collected by the first camera to form content full background image; 所述背景处理单元,用于删除所述第二摄像头采集的图像中的背景区域的内容,形成只保留所述第二摄像头采集的图像中的前景区域的内容的前景图像。The background processing unit is configured to delete the content of the background area in the image collected by the second camera, and form a foreground image that only retains the content of the foreground area in the image collected by the second camera. 7.根据权利要求5所述的基于双摄像头的拍摄装置,其特征在于,所述合成模块,具体用于:7. The photographing device based on dual cameras according to claim 5, wherein the synthesis module is specifically used for: 将所述前景图像按照设定的位置放置于所述背景图像中,并对所述前景图像和/或所述背景图像进行缩放调整和/或旋转调整,以形状最终图像。The foreground image is placed in the background image according to the set position, and the foreground image and/or the background image is scaled and/or rotated to shape the final image. 8.一种移动终端,其特征在于,包括:双前摄像头或双后摄像头,以及权利要求5~7中任一项所述的基于双摄像头的拍摄装置。8 . A mobile terminal, comprising: dual front cameras or dual rear cameras, and the dual-camera-based shooting device according to any one of claims 5 to 7 .
CN201610840250.5A 2016-09-22 2016-09-22 A kind of image pickup method based on dual camera, device and mobile terminal Active CN106375662B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610840250.5A CN106375662B (en) 2016-09-22 2016-09-22 A kind of image pickup method based on dual camera, device and mobile terminal
PCT/CN2016/104069 WO2018053906A1 (en) 2016-09-22 2016-10-31 Dual camera-based shooting method and device, and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610840250.5A CN106375662B (en) 2016-09-22 2016-09-22 A kind of image pickup method based on dual camera, device and mobile terminal

Publications (2)

Publication Number Publication Date
CN106375662A CN106375662A (en) 2017-02-01
CN106375662B true CN106375662B (en) 2019-04-12

Family

ID=57898025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610840250.5A Active CN106375662B (en) 2016-09-22 2016-09-22 A kind of image pickup method based on dual camera, device and mobile terminal

Country Status (2)

Country Link
CN (1) CN106375662B (en)
WO (1) WO2018053906A1 (en)

Families Citing this family (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3958557B1 (en) 2015-04-23 2024-09-25 Apple Inc. Digital viewfinder user interface for multiple cameras
US10009536B2 (en) 2016-06-12 2018-06-26 Apple Inc. Applying a simulated optical effect based on data received from multiple camera sensors
CN106851113A (en) * 2017-03-30 2017-06-13 努比亚技术有限公司 A kind of photographic method and mobile terminal based on dual camera
CN107133939A (en) * 2017-04-24 2017-09-05 努比亚技术有限公司 A kind of picture synthesis method, equipment and computer-readable recording medium
CN108810326B (en) * 2017-04-27 2022-11-18 中兴通讯股份有限公司 A photographing method, device and mobile terminal
DK180859B1 (en) 2017-06-04 2022-05-23 Apple Inc USER INTERFACE CAMERA EFFECTS
CN109218630B (en) * 2017-07-06 2022-04-12 腾讯科技(深圳)有限公司 Multimedia information processing method and device, terminal and storage medium
CN107767430A (en) * 2017-09-21 2018-03-06 努比亚技术有限公司 One kind shooting processing method, terminal and computer-readable recording medium
CN108174088A (en) * 2017-12-26 2018-06-15 上海展扬通信技术有限公司 Brightness adjustment method, device, terminal and computer-readable storage medium
CN108322644A (en) * 2018-01-18 2018-07-24 努比亚技术有限公司 A kind of image processing method, mobile terminal and computer readable storage medium
US11112964B2 (en) 2018-02-09 2021-09-07 Apple Inc. Media capture lock affordance for graphical user interface
US10375313B1 (en) 2018-05-07 2019-08-06 Apple Inc. Creative camera
US11722764B2 (en) 2018-05-07 2023-08-08 Apple Inc. Creative camera
CN108965695A (en) * 2018-06-27 2018-12-07 努比亚技术有限公司 A kind of image pickup method, mobile terminal and computer readable storage medium
DK201870623A1 (en) 2018-09-11 2020-04-15 Apple Inc. User interfaces for simulated depth effects
US11128792B2 (en) 2018-09-28 2021-09-21 Apple Inc. Capturing and displaying images with multiple focal planes
US11321857B2 (en) 2018-09-28 2022-05-03 Apple Inc. Displaying and editing images with depth information
CN110012229B (en) * 2019-04-12 2021-01-08 维沃移动通信有限公司 Image processing method and terminal
US11706521B2 (en) 2019-05-06 2023-07-18 Apple Inc. User interfaces for capturing and managing visual media
US11770601B2 (en) 2019-05-06 2023-09-26 Apple Inc. User interfaces for capturing and managing visual media
US10645294B1 (en) 2019-05-06 2020-05-05 Apple Inc. User interfaces for capturing and managing visual media
CN111901477B (en) * 2019-05-06 2021-05-25 苹果公司 User interface for capturing and managing visual media
CN110210494A (en) * 2019-05-13 2019-09-06 深圳传音控股股份有限公司 Image processing method and computer installation
CN110430364A (en) * 2019-08-26 2019-11-08 武汉众果科技有限公司 A kind of stingy figure local dynamic station figure synthetic method of taking pictures of photographing
CN112991242A (en) * 2019-12-13 2021-06-18 RealMe重庆移动通信有限公司 Image processing method, image processing apparatus, storage medium, and terminal device
US11054973B1 (en) 2020-06-01 2021-07-06 Apple Inc. User interfaces for managing media
US11212449B1 (en) 2020-09-25 2021-12-28 Apple Inc. User interfaces for media capture and management
US11539876B2 (en) 2021-04-30 2022-12-27 Apple Inc. User interfaces for altering visual media
US11778339B2 (en) 2021-04-30 2023-10-03 Apple Inc. User interfaces for altering visual media
US12112024B2 (en) 2021-06-01 2024-10-08 Apple Inc. User interfaces for managing media styles
CN113794831B (en) * 2021-08-13 2023-08-25 维沃移动通信(杭州)有限公司 Video shooting method, device, electronic equipment and medium
WO2024258752A1 (en) * 2023-06-16 2024-12-19 Qualcomm Incorporated Composite image generation based on image segmentation

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5940139A (en) * 1996-08-07 1999-08-17 Bell Communications Research, Inc. Background extraction in a video picture
CN101938604A (en) * 2009-07-02 2011-01-05 联想(北京)有限公司 Image processing method and camera
CN102063610A (en) * 2009-11-13 2011-05-18 鸿富锦精密工业(深圳)有限公司 Image identification system and method thereof
CN104580910A (en) * 2015-01-09 2015-04-29 宇龙计算机通信科技(深圳)有限公司 Image synthesis method and system based on front camera and rear camera
CN105611146A (en) * 2015-09-30 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Imaging method based on double cameras and apparatus thereof
CN105678696A (en) * 2014-11-20 2016-06-15 联想(北京)有限公司 Image acquisition method and electronic equipment
CN105957045A (en) * 2016-04-29 2016-09-21 珠海市魅族科技有限公司 Picture synthesis method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105005992B (en) * 2015-07-07 2016-03-30 南京华捷艾米软件科技有限公司 A Method of Background Modeling and Foreground Extraction Based on Depth Map

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5940139A (en) * 1996-08-07 1999-08-17 Bell Communications Research, Inc. Background extraction in a video picture
CN101938604A (en) * 2009-07-02 2011-01-05 联想(北京)有限公司 Image processing method and camera
CN102063610A (en) * 2009-11-13 2011-05-18 鸿富锦精密工业(深圳)有限公司 Image identification system and method thereof
CN105678696A (en) * 2014-11-20 2016-06-15 联想(北京)有限公司 Image acquisition method and electronic equipment
CN104580910A (en) * 2015-01-09 2015-04-29 宇龙计算机通信科技(深圳)有限公司 Image synthesis method and system based on front camera and rear camera
CN105611146A (en) * 2015-09-30 2016-05-25 宇龙计算机通信科技(深圳)有限公司 Imaging method based on double cameras and apparatus thereof
CN105957045A (en) * 2016-04-29 2016-09-21 珠海市魅族科技有限公司 Picture synthesis method and device

Also Published As

Publication number Publication date
CN106375662A (en) 2017-02-01
WO2018053906A1 (en) 2018-03-29

Similar Documents

Publication Publication Date Title
CN106375662B (en) A kind of image pickup method based on dual camera, device and mobile terminal
CN105100615B (en) Image preview method, device and terminal
CN111641778B (en) A shooting method, device and equipment
TWI554936B (en) Image processing device, image processing method and computer product program
CN104125407B (en) The image pickup method and mobile terminal of movement locus of object
TWI602152B (en) Image capturing device and image processing method thereof
WO2022001806A1 (en) Image transformation method and apparatus
CN105282421B (en) A kind of mist elimination image acquisition methods, device and terminal
CN104159033B (en) Method and device for optimizing shooting effect
CN103973963B (en) Image acquisition device and image processing method thereof
CN101872491A (en) Photometric stereo-based free-view re-illumination method and system
WO2015192547A1 (en) Method for taking three-dimensional picture based on mobile terminal, and mobile terminal
CN105847676A (en) Image processing method and apparatus
CN110611768B (en) Multiple exposure photographic method and device
CN113850709B (en) Image transformation method and device
CN105657394A (en) Shooting method, shooting device and mobile terminal based on dual cameras
CN105979163A (en) Shooting method and device
WO2017128750A1 (en) Image collection method and image collection device
CN111654624B (en) Shooting prompting method and device and electronic equipment
CN106162024A (en) Photo processing method and device
CN107093165A (en) The fast display method and device of a kind of recursive image
CN104320576B (en) A kind of image processing method and image processing apparatus for portable terminal
CN114299244A (en) Oral cavity three-dimensional reconstruction method, system and storage medium based on smart phone
CN113066163A (en) A three-dimensional reconstruction method of human body shape based on two-dimensional images
CN104539842A (en) Intelligent photographing method and photographing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant