Movatterモバイル変換


[0]ホーム

URL:


CN110913133B - Shooting method and electronic device - Google Patents

Shooting method and electronic device
Download PDF

Info

Publication number
CN110913133B
CN110913133BCN201911168848.4ACN201911168848ACN110913133BCN 110913133 BCN110913133 BCN 110913133BCN 201911168848 ACN201911168848 ACN 201911168848ACN 110913133 BCN110913133 BCN 110913133B
Authority
CN
China
Prior art keywords
camera
image
preview image
electronic device
input
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
CN201911168848.4A
Other languages
Chinese (zh)
Other versions
CN110913133A (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 CN201911168848.4ApriorityCriticalpatent/CN110913133B/en
Publication of CN110913133ApublicationCriticalpatent/CN110913133A/en
Application grantedgrantedCritical
Publication of CN110913133BpublicationCriticalpatent/CN110913133B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明实施例公开的拍摄方法及电子设备,涉及通信技术领域,用以解决传统背景虚化技术由于得到的被拍摄主体的轮廓不准确,使得最终的背景虚化图像的背景虚化效果较差的问题。该方法包括:接收第一输入;响应于第一输入,控制第二摄像头移动,根据第一摄像头采集的第一预览图像和移动后的第二摄像头采集的第二预览图像,获取目标图像;其中,第二摄像头移动后的位置与目标对象之间的第一距离小于第一摄像头与该目标对象之间的距离,且第一距离小于或等于预定阈值,该目标图像为:以该目标对象为拍摄主体、且背景虚化的图像。

Figure 201911168848

The photographing method and electronic device disclosed in the embodiments of the present invention relate to the field of communication technology and are used to solve the problem that the background blurring effect of the final background blurring image is poor due to the inaccurate outline of the photographed subject obtained by the traditional background blurring technology. The problem. The method includes: receiving a first input; in response to the first input, controlling a second camera to move, and obtaining a target image according to a first preview image collected by the first camera and a second preview image collected by the moved second camera; wherein , the first distance between the moved position of the second camera and the target object is smaller than the distance between the first camera and the target object, and the first distance is less than or equal to a predetermined threshold, and the target image is: take the target object as Take an image of the subject with a blurred background.

Figure 201911168848

Description

Shooting method and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a shooting method and electronic equipment.
Background
With the increasing requirements of people on image display effect and the continuous development of terminal technology, the photographing mode also tends to be diversified, wherein the frequency of using background blurring in the portrait photographing mode is higher and higher.
At present, the conventional background blurring method mainly measures a distance between a subject to be photographed and a camera, and performs blurring processing on a non-subject in an original image according to the measured distance to obtain an image with a blurred background.
However, when the distance between the subject to be photographed and the camera exceeds the predetermined threshold, in the process of performing background blurring processing on the original image according to the conventional background blurring method, the final background blurring effect of the background blurring image may be poor due to inaccuracy of the obtained contour of the subject to be photographed.
Disclosure of Invention
The embodiment of the invention provides a shooting method and electronic equipment, and aims to solve the problem that the background blurring effect of a final background blurring image is poor due to the fact that the obtained outline of a shot main body is inaccurate in the traditional background blurring technology.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present invention provides a shooting method applied to an electronic device including a first camera and a movable second camera, where the method includes: receiving a first input; responding to the first input, controlling the second camera to move, and acquiring a target image according to a first preview image acquired by the first camera and a second preview image acquired by the second camera after moving; wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject.
In a second aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes a first camera and a movable second camera, and the electronic device includes: the device comprises a receiving module, a control module and an acquisition module; the receiving module is used for receiving a first input; the control module is used for responding to the first input received by the receiving module and controlling the second camera to move; the acquisition module is used for acquiring a target image according to a first preview image acquired by the first camera and a second preview image acquired by the second camera after moving; wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, and when executed by the processor, the electronic device implements the steps of the shooting method in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the photographing method as in the first aspect.
In an embodiment of the present invention, the electronic device may receive a first input; responding to the first input, controlling the second camera to move, and acquiring a target image according to a first preview image acquired by the first camera and a second preview image acquired by the second camera after moving; wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject. According to the scheme, when a target image which takes the target object as a shooting main body and has a blurred background needs to be shot, a user can trigger the electronic equipment through first input to control the second camera to be close to the target object and move to a position where the distance between the second camera and the target object is smaller than or equal to a preset threshold value, and then the target image is obtained according to a first preview image collected by the first camera and a second preview image collected by the second camera after moving. The second camera after moving is closer to the target object, and the contour of the target object in the collected second preview image is clearer, so that the target image with better background blurring effect can be obtained, and the problem that the final background blurring effect of the background blurring image is poorer due to inaccurate contour of the shot main body obtained by the traditional background blurring technology is solved.
Drawings
Fig. 1 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention;
fig. 2 is a flowchart of a shooting method according to an embodiment of the present invention;
fig. 3 is one of schematic views of an interface of a shooting method according to an embodiment of the present invention;
fig. 4 is a second flowchart of a photographing method according to an embodiment of the present invention;
fig. 5 is a third flowchart of a shooting method according to an embodiment of the present invention;
FIG. 6 is a fourth flowchart of a photographing method according to an embodiment of the present invention;
FIG. 7 is a fifth flowchart of a photographing method according to an embodiment of the present invention;
fig. 8 is a sixth flowchart of a photographing method according to an embodiment of the present invention;
fig. 9 is a second schematic view of an interface of a shooting method according to the embodiment of the invention;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 11 is a hardware schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The term "and/or" herein is an association relationship describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The symbol "/" herein denotes a relationship in which the associated object is or, for example, a/B denotes a or B.
The terms "first," "second," "third," and "fourth," etc. in the description and in the claims of the present application are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first input, the second input, the third input, the fourth input, etc. are used to distinguish between different inputs, rather than to describe a particular order of inputs.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the embodiments of the present invention, unless otherwise specified, "a plurality" means two or more, for example, a plurality of processing units means two or more processing units; plural elements means two or more elements, and the like.
Background blurring: i.e. making the depth of field shallow, focusing the focus on the subject.
Background blurring image: the shot subject is clear, and the background is blurred. Here, the background is theoretically the contents of the shot other than the subject of the shot. In practice, the background may be the shot content whose distance from the subject is inconsistent (i.e., the shot content whose distance from the camera is inconsistent with the distance from the subject to the camera). That is, in the background blurring shooting mode, the shot background blurring image is an image in which the subject and the content of the shot that is at the same distance from the subject are clear, and the other content of the shot that is at a different distance from the subject is blurred. However, in practice, when an image recognition algorithm (recognizing the subject) or a background blurring algorithm (blurring the contents of the image other than the subject) is added to the background blurring image capturing mode, the background blurring image captured may be an image in which the subject is clear and the contents of the image other than the subject are blurred.
In the embodiment of the present invention, the target image may be a background blurring image in any of the above cases.
The embodiment of the invention provides a shooting method, wherein electronic equipment can receive a first input; responding to the first input, controlling the second camera to move, and acquiring a target image according to a first preview image acquired by the first camera and a second preview image acquired by the second camera after moving; wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject. According to the scheme, when a target image which takes the target object as a shooting main body and has a blurred background needs to be shot, a user can trigger the electronic equipment through first input to control the second camera to be close to the target object and move to a position where the distance between the second camera and the target object is smaller than or equal to a preset threshold value, and then the target image is obtained according to a first preview image collected by the first camera and a second preview image collected by the second camera after moving. The second camera after moving is closer to the target object, and the contour of the target object in the collected second preview image is clearer, so that the target image with better background blurring effect can be obtained, and the problem that the final background blurring effect of the background blurring image is poorer due to inaccurate contour of the shot main body obtained by the traditional background blurring technology is solved.
The following describes a software environment applied to the shooting method provided by the embodiment of the present invention, taking an android operating system as an example.
Fig. 1 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention. In fig. 1, the architecture of the android operating system includes 4 layers, which are respectively: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).
The application program layer comprises various application programs (including system application programs and third-party application programs) in an android operating system.
The application framework layer is a framework of the application, and a developer can develop some applications based on the application framework layer under the condition of complying with the development principle of the framework of the application.
The system runtime layer includes libraries (also called system libraries) and android operating system runtime environments. The library mainly provides various resources required by the android operating system. The android operating system running environment is used for providing a software environment for the android operating system.
The kernel layer is an operating system layer of an android operating system and belongs to the bottommost layer of an android operating system software layer. The kernel layer provides kernel system services and hardware-related drivers for the android operating system based on the Linux kernel.
Taking an android operating system as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the shooting method provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 1, so that the shooting method may run based on the android operating system shown in fig. 1. That is, the processor or the electronic device may implement the shooting method provided by the embodiment of the present invention by running the software program in the android operating system.
The electronic device in the embodiment of the invention can be a mobile electronic device or a non-mobile electronic device. The mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), etc.; the non-mobile electronic device may be a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, or the like; the embodiments of the present invention are not particularly limited.
The electronic equipment in the embodiment of the invention comprises the first camera and the movable second camera, wherein whether the first camera is movable or not is not limited. In the embodiment of the invention, the second camera is movable, and comprises a second camera which is not separated from the electronic equipment and a second camera which is separated from the electronic equipment. When the second camera is not separated from the electronic equipment, the second camera can be in communication interaction with the electronic equipment in a wired connection and/or wireless connection mode; after the second camera is separated from the electronic equipment, the second camera can communicate with the electronic equipment in a wireless connection mode. In the embodiment of the present invention, the electronic device may further include a first gyroscope (for measuring a shooting angle of the first camera), and the second camera may further include a second gyroscope (for measuring a shooting angle of the second camera).
An execution subject of the shooting method provided in the embodiment of the present invention may be the electronic device (including a mobile electronic device and a non-mobile electronic device), or may also be a functional module and/or a functional entity capable of implementing the method in the electronic device, which may be determined specifically according to actual use requirements, and the embodiment of the present invention is not limited. The following takes an electronic device as an example to exemplarily describe the shooting method provided by the embodiment of the invention.
Referring to fig. 2, an embodiment of the present invention provides a shooting method applied to an electronic device including a first camera and a movable second camera, where the method may includesteps 201 to 203 described below.
Step 201, the electronic device receives a first input.
Optionally, the first input may be a click input of the user on the screen of the electronic device, a slide input of the user on the screen of the electronic device, or other feasibility inputs, which may be determined according to actual usage requirements, and the embodiment of the present invention is not limited.
Illustratively, the click input may be any number of click inputs or multi-finger click inputs, such as a single click input, a double click input, a three click input, a double-finger click input, or a three-finger click input; the slide input may be a slide input in an arbitrary direction or a multi-finger slide input, for example, an upward slide input, a downward slide input, a leftward slide input, a rightward slide input, a two-finger slide input, or a three-finger slide input.
Step 202, the electronic device controls the second camera to move in response to the first input.
Optionally, in the embodiment of the present invention, the electronic device may control the second camera to move by responding to a first input of the user controlling the second camera to move; the electronic device may also automatically control the second camera to move when detecting that the distance between the electronic device and the target object is greater than a preset threshold. The preset threshold is greater than or equal to the predetermined threshold, the electronic device may determine a distance between the electronic device and the target object through a distance sensor (e.g., an infrared sensor, etc.), or determine the distance between the electronic device and the target object by analyzing a preview image acquired by the electronic device through a camera (a first camera, a second camera, or another camera), and any related technology may be referred to as a method for how the electronic device specifically acquires the distance between the electronic device and the target object, which is not described herein.
It should be noted that, in the embodiment of the present invention, the electronic device and the second camera control the second camera to move in a communication interaction manner. For example, the electronic device acquires movement information (how to move, where to move, or the like) of the second camera through the first input, and then transmits the movement information to the second camera; the second camera receives the movement information from the electronic device and moves according to the movement information.
And step 203, the electronic equipment acquires a target image according to the first preview image acquired by the first camera and the second preview image acquired by the second camera after moving.
Wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject.
In the embodiment of the present invention, the target object is a shooting subject, and the predetermined threshold may be determined according to an actual use requirement, which is not limited in the embodiment of the present invention. When the distance between the second camera and the target object is smaller than or equal to the preset threshold value, the second preview image acquired by the second camera basically only comprises the target object and possibly comprises a small part of other objects, namely, the second preview image is basically an image of a shooting subject, and the small part is an image of a background except the shooting subject. The first preview image collected by the first camera is a full scene image of the shooting subject and the background.
Illustratively, when the user selects the background blurring shooting mode on the electronic device and aims at a shooting scene, the second camera is controlled to move (the second camera is controlled to be separated from the electronic device and move to a position where the distance from the target object is less than or equal to a preset threshold value) in response to the first input. The state of the second camera after moving is shown in fig. 3, the mark "0" indicates the electronic device, the mark "1" indicates the first camera, the mark "2" indicates the second camera, the mark "3" indicates the target object (i.e., the shooting subject), the distance from the second camera to the target object is less than or equal to a predetermined threshold, and the second camera basically only collects the image of the target object.
It can be understood that, because the second camera is closer to the photographic subject and has a smaller depth of field, the second preview image has a background blurring effect, that is, the image of the photographic subject is clearer, and the images of other backgrounds are more blurred, so that the electronic device can more accurately obtain the contour information of the photographic subject according to the second preview image, and thus a target image with a better background blurring effect (for example, the photographic subject is clearer, the boundary between the background content and the photographic subject is more accurate, and the background blurring effect is closer to the real situation) can be obtained based on the second preview image.
It should be noted that, in the embodiment of the present invention, the electronic device acquires the second preview image through communication interaction with the second camera. For example, after the second camera acquires the second preview image, the second camera sends the second preview image to the electronic device; the electronic device receives a second preview image from the second camera.
In the embodiment of the invention, the electronic equipment responds to the first input and controls the second camera to move according to the first input. After the second camera moves to a position where the distance from the target object is less than or equal to a predetermined threshold, the electronic device may obtain, by using an image processing method, a target image in which the target object is a subject to be photographed and the background is blurred, according to the first preview image acquired by the first camera and the second preview image acquired by the second camera.
The embodiment of the invention provides a shooting method, wherein electronic equipment can receive a first input; responding to the first input, controlling the second camera to move, and acquiring a target image according to a first preview image acquired by the first camera and a second preview image acquired by the second camera after moving; wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject. According to the scheme, when a target image which takes the target object as a shooting main body and has a blurred background needs to be shot, a user can trigger the electronic equipment through first input to control the second camera to be close to the target object and move to a position where the distance between the second camera and the target object is smaller than or equal to a preset threshold value, and then the target image is obtained according to a first preview image collected by the first camera and a second preview image collected by the second camera after moving. The second camera after moving is closer to the target object, and the contour of the target object in the collected second preview image is clearer, so that the target image with better background blurring effect can be obtained, and the problem that the final background blurring effect of the background blurring image is poorer due to inaccurate contour of the shot main body obtained by the traditional background blurring technology is solved.
Optionally, in this embodiment of the present invention, the electronic device may first obtain, according to the second preview image, contour information of the target object, and then, in combination with the contour information, perform background blurring processing on background content (content other than the target object in the first preview image) in the first preview image, so as to obtain a target image with the target object as a shooting subject and with a blurred background.
Illustratively, in conjunction with fig. 2, as shown in fig. 4, thestep 203 may be specifically implemented by the followingsteps 203a to 203 b.
And step 203a, the electronic equipment acquires first information according to the second preview image.
The first information is used to characterize a contour of the target object.
In the embodiment of the present invention, any related technology may be referred to as a method for how to obtain the contour information of the target object in the second preview image, which is not limited in the embodiment of the present invention and is not described herein again.
And 203b, the electronic device performs background blurring processing on the first preview image according to the first information to obtain the target image.
In the embodiment of the invention, the electronic equipment determines the contour information of the target object in the first preview image according to the first information, and then performs background blurring processing on the background content in the first preview image to obtain the target object. The background blurring processing method may refer to any related technology, and the embodiments of the present invention are not limited and are not described herein again.
In the embodiment of the invention, the second camera is closer to the target object, and the contour of the target object in the acquired second preview image is clearer, so that the contour information of the target object obtained according to the second preview image is more accurate, and the background blurring effect of the target object obtained by combining the first preview image is better.
Optionally, in this embodiment of the present invention, the electronic device may first obtain, according to the second preview image, contour information of the target object and an image of the target object, then perform, in combination with the contour information, background blurring processing on background content (content other than the target object in the first preview image) in the first preview image to obtain an intermediate image that takes the target object as a shooting subject and has a blurred background, and finally synthesize the image of the target object and the intermediate image to generate the target image that takes the target object as a shooting subject and has a blurred background.
Illustratively, referring to fig. 4, as shown in fig. 5, after thestep 203a, the shooting method provided by the embodiment of the present invention may further include astep 203c, where thestep 203b may be specifically realized by the followingsteps 203b 1-203 b 2.
And step 203c, the electronic equipment acquires the first image according to the second preview image.
The first image is an image of the target object.
In the embodiment of the present invention, any related technology may be referred to as a method for obtaining a target object in a second preview image, which is not limited in the embodiment of the present invention and is not described herein again.
Step 203b1, the electronic device performs background blurring processing on the first preview image according to the first information to obtain a second image.
The second image is an image in which the target object is a subject and the background is blurred. The second image is an intermediate image.
Step 203b2, the electronic device synthesizes the first image and the second image to obtain the target image.
In the embodiment of the present invention, any related technology may be referred to for a method for synthesizing the first image and the second image, which is not limited in the embodiment of the present invention and is not described herein again.
It should be noted that, in the embodiment of the present invention, the execution sequence of thestep 203c and the step 203b1 is not limited, for example, thestep 203c may be executed first, and then the step 203b1 may be executed; step 203b1 may be executed first, and then step 203c may be executed;step 203c and step 203b1 may also be performed simultaneously.
In the embodiment of the invention, because the second camera is closer to the target object, and the image of the target object in the second preview image (relative to the image of the target object in the first preview image) is relatively clear, the image of the target object obtained according to the second preview image is relatively clear, and the background blurring effect of the target object obtained by synthesizing the first image and the second image is relatively good.
Optionally, in the embodiment of the present invention, the electronic device may first obtain the first image according to the second preview image, then perform background blurring processing on the first preview image according to the first image to obtain the second image, and finally synthesize the first image and the second image to obtain the target image. In this embodiment of the present invention, the electronic device may further obtain the target image according to the first preview image and the second preview image by using other methods, which is not limited in this embodiment of the present invention.
Alternatively, the first input may be an input for triggering the electronic device to determine a subject (i.e., a target object) to be photographed, and then the electronic device automatically controls the second camera to move to a position where a distance from the target object is less than or equal to a predetermined threshold value according to the determined target object.
Illustratively, the first input is a user input to the target object in the third preview image; the third preview image is a preview image collected by the first camera or the second camera; referring to fig. 5, as shown in fig. 6, afterstep 202, the photographing method provided by the embodiment of the present invention may further includestep 204 described below.
And step 204, the electronic equipment updates the preview image acquired by the second camera into a second preview image.
Optionally, in this embodiment of the present invention, before the first input, the electronic device only displays a third preview image, where the third preview image is an image captured by the first camera, and the user triggers the electronic device to control the second camera to move through the first input to the third preview image, and when the distance from the second camera to the target object is less than or equal to a predetermined threshold, the electronic device updates the third preview image to the first preview image (the first preview image and the third preview image may be identical (the position shooting angle of the electronic device and the shooting parameters (depth of field, zoom multiple, etc.) of the first camera are not changed), or may not be identical (at least one of the position shooting angle of the electronic device and the shooting parameters (depth of field, zoom multiple, etc.) of the first camera is changed), etc.), and the embodiment of the present invention is not limited), and displaying a second preview image, where the first preview image and the second preview image may be displayed in different areas on the same screen of the electronic device, or may be displayed on different screens of the electronic device.
Optionally, in this embodiment of the present invention, before the first input, only a third preview image is displayed on the electronic device, where the third preview image is an image acquired by the second camera, the user triggers the electronic device to control the second camera to move through the first input to the third preview image, and when the distance from the second camera to the target object is less than or equal to a predetermined threshold, the electronic device updates the third preview image to the second preview image (the second preview image is different from the third preview image (at least the position of the second camera is changed)), and displays the first preview image, where the first preview image and the second preview image may be displayed in different areas on the same screen of the electronic device, or may be displayed on different screens of the electronic device, which is not limited in this embodiment of the present invention.
Optionally, in the embodiment of the present invention, before the first input, a third preview image and a fourth preview image are displayed on the electronic device (the third preview image and the fourth preview image may be displayed in different areas on the same screen of the electronic device, or may be displayed on different screens of the electronic device), where the third preview image is an image acquired by the first camera, and the fourth preview image is an image acquired by the second camera. The user triggers the electronic device to control the second camera to move through a first input to the third preview image, when the distance from the second camera to the target object is smaller than or equal to a predetermined threshold, the electronic device updates the third preview image into the first preview image (the first preview image and the third preview image may be identical (the position shooting angle of the electronic device and the shooting parameters (depth of field, zoom multiple, etc.) of the first camera are not changed), or may not be identical (at least one of the position shooting angle of the electronic device and the shooting parameters (depth of field, zoom multiple, etc.) of the first camera is changed), the embodiment of the present invention is not limited), and the fourth preview image is updated into the second preview image (the second preview image and the fourth preview image are not identical (at least the position of the second camera is changed)), the first preview image and the second preview image may be displayed in different areas on the same screen of the electronic device, or may be displayed on different screens of the electronic device.
Optionally, in the embodiment of the present invention, before the first input, a third preview image and a fourth preview image are displayed on the electronic device (the third preview image and the fourth preview image may be displayed in different areas on the same screen of the electronic device, or may be displayed on different screens of the electronic device), where the third preview image is an image acquired by the second camera, and the fourth preview image is an image acquired by the first camera. The user triggers the electronic device to control the second camera to move by a first input to the third preview image, when the distance from the second camera to the target object is less than or equal to a predetermined threshold, the electronic device updates the third preview image to the second preview image (the second preview image is different from the third preview image (at least the position of the second camera is changed)), and updates the fourth preview image to the first preview image (the first preview image and the fourth preview image may be identical (the position shooting angle of the electronic device, the shooting parameters (depth of field, zoom multiple, etc.) of the first camera, etc. are not changed), or may not be identical (at least one of the position shooting angle of the electronic device, the shooting parameters (depth of field, zoom multiple, etc.) of the first camera, etc.), and the embodiments of the present invention are not limited), the first preview image and the second preview image may be displayed in different areas on the same screen of the electronic device, or may be displayed on different screens of the electronic device.
In the embodiment of the invention, the first input is used for triggering the electronic equipment to determine the shooting subject (namely the target object), so that the operation of a user can be simplified, and the second camera can move more accurately and rapidly under the control of the electronic equipment.
Optionally, the first input may be an input for a user to adjust displacement change of the second camera, and the electronic device first obtains a displacement to be moved of the second camera corresponding to the first input, and then controls the second camera to move according to the displacement to be moved.
Illustratively, the first input is an input for a user to adjust the displacement change of the second camera; referring to fig. 5, as shown in fig. 7, beforestep 202, the shooting method provided in the embodiment of the present invention may further includestep 205 described below, and step 202 may specifically be implemented bystep 202a described below.
And step 205, the electronic device responds to the first input, and obtains the displacement to be moved of the second camera corresponding to the first input.
The first input may be a click input or a slide input of the user on the target identifier, and the embodiment of the present invention is not limited. The target identifier is used for indicating an operation of controlling the movement of the second camera, and the target identifier includes at least one identifier, and each identifier may indicate a different movement operation on the second camera, and may include, for example: a left shift operation, a right shift operation, an up shift operation, a down shift operation, a forward operation, a backward operation, and the like.
The first input may also be an input that a user sets a position of the second camera in the target input control, and then the electronic device determines, according to the first input, a displacement to be moved of the second camera.
Step 202a, the electronic device controls the second camera to move according to the displacement to be moved.
The electronic equipment determines the displacement to be moved of the second camera according to the first input, and then controls the second camera to move according to the displacement to be moved.
In the embodiment of the invention, the first input is input for adjusting the displacement change of the second camera by the user, so that more intuitive operation experience can be provided for the user, and the user can control the second camera to move to a position required by the user through the first input, so that an effect desired by the user is obtained.
Optionally, in the embodiment of the present invention, in addition to changing the displacement of the second camera, the shooting angle of the second camera may also be changed.
Illustratively, in conjunction with fig. 2, as shown in fig. 8, beforestep 203, the photographing method provided by the embodiment of the present invention may further includesteps 206 to 207 described below.
Step 206, the electronic device receives a second input.
The second input is used for adjusting the shooting angle of the first camera.
When the user considers that the shooting angle needs to be changed, the shooting angles of the first camera and the second camera can be adjusted through the second input, so that a target image which meets the requirements of the user better can be obtained.
And step 207, the electronic equipment responds to the second input, adjusts the shooting angle of the first camera, and adjusts the shooting angle of the second camera according to the shooting angle of the first camera.
Because the target image needs to be acquired according to the first preview image and the second preview image, the shooting angle of the second camera needs to be adjusted according to the shooting angle of the first camera.
In the embodiment of the invention, the shooting angles of the first camera and the second camera are adjusted through the second input, so that a target image which meets the requirements of a user better is obtained.
Optionally, a first gyroscope and a second gyroscope are respectively arranged in the first camera and the second camera, the electronic device can obtain the adjustment amount of the shooting angle of the first camera through the first gyroscope, and then adjust the shooting angle of the second camera through the second gyroscope according to the adjustment amount.
Illustratively, thisstep 207 may be specifically realized by the following steps 207a to 207 c.
And step 207a, the electronic equipment responds to the second input and adjusts the shooting angle of the first camera.
And step 207b, the electronic device obtains the adjustment amount of the shooting angle of the first camera through a first gyroscope of the electronic device.
In the embodiment of the present invention, any related technology may be referred to in the method for obtaining the adjustment amount of the shooting angle of the first camera through the first gyroscope, and the embodiment of the present invention is not limited and is not described herein again.
And step 207c, the electronic device adjusts the shooting angle of the second camera through the second gyroscope according to the adjustment amount.
The second gyroscope is arranged in the second camera.
In the embodiment of the present invention, the method for adjusting the shooting angle of the second camera by the electronic device through the second gyroscope according to the adjustment amount may refer to any related technology, and the embodiment of the present invention is not limited and is not described herein again.
It should be noted that, in this embodiment of the present invention, beforestep 207, the electronic device and the second camera interactively transmit the adjustment amount through communication. For example, after acquiring the adjustment amount, the electronic device sends the adjustment amount to the second camera; the second camera receives the adjustment amount from the electronic equipment, and adjusts the shooting angle of the second camera through the second gyroscope according to the adjustment amount.
If the second gyroscope detects that the shooting angle of the second camera suddenly changes (such as wind blows), the second camera feeds back the change of the shooting angle to the electronic device. The electronic equipment can control the second camera to recover the original shooting angle, or the electronic equipment can display prompt information to prompt a user that the shooting angle of the second camera is changed, please adapt to the shooting angle of the first camera, and prompt the user how to adjust, and the user can adjust the shooting angle of the first camera according to the prompt information (after the electronic equipment measures that the shooting angle of the first camera is adjusted through the first gyroscope, the electronic equipment can pass through the prompt information again to prompt the user that the shooting angle is adjusted).
In the embodiment of the invention, the shooting angles of the first camera and the second camera are adjusted by combining the first gyroscope and the second gyroscope, so that the flexibility of the first camera and the second camera for acquiring preview images can be increased, the flexibility of obtaining a target object can be ensured, and a better target image can be obtained.
Illustratively, as shown in fig. 9, the electronic device displays a first preview image in a first area indicated by a mark "4", displays a second preview image in a second area indicated by a mark "5", and displays a shutter control in a third area indicated by a mark "6". The user can also set the shooting parameters of the first camera through the operation on the first area, set the shooting parameters of the second camera through the operation on the second area, and control the second camera to move through the operation on the second area. Thestep 203 may specifically be that the electronic device receives a third input of the shutter control from the user, and in response to the third input, acquires the target image according to the first preview image and the second preview image.
In the embodiment of the present invention, afterstep 203, the electronic device may display the target image, and when the user selects another photographing mode or closes the photographing application, the electronic device controls the second camera to return to the electronic device.
The drawings in the embodiments of the present invention are all exemplified by the drawings in the independent embodiments, and when the embodiments of the present invention are specifically implemented, each of the drawings can also be implemented by combining any other drawings which can be combined, and the embodiments of the present invention are not limited. For example, referring to fig. 4, afterstep 203b, the shooting method provided in the embodiment of the present invention may further includesteps 206 to 207 described above.
As shown in fig. 10, an embodiment of the present invention provides anelectronic device 120, where theelectronic device 120 includes a first camera and a movable second camera, and theelectronic device 120 includes: a receivingmodule 121, acontrol module 122 and an obtainingmodule 123; the receivingmodule 121 is configured to receive a first input; thecontrol module 122, configured to control the second camera to move in response to the first input received by the receivingmodule 121; the obtainingmodule 123 is configured to obtain a target image according to a first preview image collected by the first camera and a second preview image collected by the second camera after the movement; wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject.
Optionally, the obtainingmodule 123 is specifically configured to obtain first information according to the second preview image, where the first information is used to represent the contour of the target object; and performing background blurring processing on the first preview image according to the first information to obtain the target image.
Optionally, the obtainingmodule 123 is further specifically configured to obtain a first image according to the second preview image before performing background blurring processing on the first preview image according to the first information to obtain the target image, where the first image is an image of the target object; the obtainingmodule 123 is specifically configured to perform background blurring processing on the first preview image according to the first information to obtain a second image, where the second image is an image that takes the target object as a shooting subject and has a blurred background; and synthesizing the first image and the second image to obtain the target image.
Optionally, the first input is input of the target object in the third preview image by the user; the third preview image is a preview image collected by the first camera or the second camera; theelectronic device 120 further includes: adisplay module 124; thedisplay module 124 is configured to update the preview image captured by the second camera to the second preview image after thecontrol module 122 controls the second camera to move.
Optionally, the obtainingmodule 123 is further configured to obtain a to-be-moved displacement of the second camera corresponding to the first input before thecontrol module 122 controls the second camera to move; thecontrol module 122 is specifically configured to control the second camera to move according to the displacement to be moved acquired by theacquisition module 123.
Optionally, theelectronic device 120 further includes: anadjustment module 125; the receivingmodule 121 is further configured to receive a second input before the obtainingmodule 123 obtains the target image according to the first preview image collected by the first camera and the second preview image collected by the moved second camera, where the second input is used to adjust a shooting angle of the first camera; theadjusting module 125 is configured to adjust a shooting angle of the first camera in response to the second input received by the receivingmodule 121, and adjust a shooting angle of the second camera according to the shooting angle of the first camera.
Optionally, the adjustingmodule 125 is specifically configured to obtain an adjustment amount of a shooting angle of the first camera through a first gyroscope of the electronic device; according to the adjustment amount, the shooting angle of the second camera is adjusted through the second gyroscope, and the second gyroscope is arranged in the second camera.
It should be noted that, as shown in fig. 10, modules that are necessarily included in theelectronic device 120 are indicated by solid line boxes, such as the receivingmodule 121, thecontrol module 122, and the obtainingmodule 123; modules that may or may not be included in theelectronic device 120 are illustrated with dashed boxes, such as adisplay module 124 and anadjustment module 125.
The electronic device provided in the embodiment of the present invention is capable of implementing each process shown in any one of fig. 2 to 9 in the above method embodiments, and details are not described here again to avoid repetition.
The embodiment of the invention provides electronic equipment, which can receive a first input; responding to the first input, controlling the second camera to move, and acquiring a target image according to a first preview image acquired by the first camera and a second preview image acquired by the second camera after moving; wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject. According to the scheme, when a target image which takes the target object as a shooting main body and has a blurred background needs to be shot, a user can trigger the electronic equipment through first input to control the second camera to be close to the target object and move to a position where the distance between the second camera and the target object is smaller than or equal to a preset threshold value, and then the target image is obtained according to a first preview image collected by the first camera and a second preview image collected by the second camera after moving. The second camera after moving is closer to the target object, and the contour of the target object in the collected second preview image is clearer, so that the target image with better background blurring effect can be obtained, and the problem that the final background blurring effect of the background blurring image is poorer due to inaccurate contour of the shot main body obtained by the traditional background blurring technology is solved.
Fig. 11 is a schematic hardware structure diagram of an electronic device implementing various embodiments of the present application. As shown in fig. 11, theelectronic device 100 includes but is not limited to:radio frequency unit 101,network module 102,audio output unit 103,input unit 104,sensor 105,display unit 106,user input unit 107,interface unit 108,memory 109,processor 110, and power supply 111. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 11 does not constitute a limitation of electronic devices, which may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a wearable device, a pedometer, and the like.
Wherein, theuser input unit 107 is used for receiving a first input; theprocessor 110 is configured to respond to the first input, control the second camera to move, and obtain a target image according to a first preview image acquired by the first camera and a second preview image acquired by the second camera after the second camera moves; wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject.
According to the electronic device provided by the embodiment of the invention, the electronic device can receive the first input; responding to the first input, controlling the second camera to move, and acquiring a target image according to a first preview image acquired by the first camera and a second preview image acquired by the second camera after moving; wherein, the first distance between the position of the second camera after moving and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to the predetermined threshold, and the target image is: and an image in which the background is blurred and the target object is taken as a subject. According to the scheme, when a target image which takes the target object as a shooting main body and has a blurred background needs to be shot, a user can trigger the electronic equipment through first input to control the second camera to be close to the target object and move to a position where the distance between the second camera and the target object is smaller than or equal to a preset threshold value, and then the target image is obtained according to a first preview image collected by the first camera and a second preview image collected by the second camera after moving. The second camera after moving is closer to the target object, and the contour of the target object in the collected second preview image is clearer, so that the target image with better background blurring effect can be obtained, and the problem that the final background blurring effect of the background blurring image is poorer due to inaccurate contour of the shot main body obtained by the traditional background blurring technology is solved.
It should be understood that, in the embodiment of the present invention, theradio frequency unit 101 may be used for receiving and sending signals during a message transmission or call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by theprocessor 110; in addition, the uplink data is transmitted to the base station. Typically,radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, theradio frequency unit 101 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via thenetwork module 102, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
Theaudio output unit 103 may convert audio data received by theradio frequency unit 101 or thenetwork module 102 or stored in thememory 109 into an audio signal and output as sound. Also, theaudio output unit 103 may also provide audio output related to a specific function performed by the electronic apparatus 100 (e.g., a call signal reception sound, a message reception sound, etc.). Theaudio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
Theinput unit 104 is used to receive an audio or video signal. Theinput Unit 104 may include a Graphics Processing Unit (GPU) 1041 and amicrophone 1042, and theGraphics processor 1041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on thedisplay unit 106. The image frames processed by thegraphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via theradio frequency unit 101 or thenetwork module 102. Themicrophone 1042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via theradio frequency unit 101 in case of a phone call mode.
Theelectronic device 100 also includes at least onesensor 105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of thedisplay panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off thedisplay panel 1061 and/or the backlight when theelectronic device 100 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); thesensors 105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
Thedisplay unit 106 is used to display information input by a user or information provided to the user. TheDisplay unit 106 may include aDisplay panel 1061, and theDisplay panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Theuser input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, theuser input unit 107 includes atouch panel 1071 andother input devices 1072.Touch panel 1071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 1071 (e.g., operations by a user on or neartouch panel 1071 using a finger, stylus, or any suitable object or attachment). Thetouch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to theprocessor 110, and receives and executes commands sent by theprocessor 110. In addition, thetouch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to thetouch panel 1071, theuser input unit 107 may includeother input devices 1072. Specifically,other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, thetouch panel 1071 may be overlaid on thedisplay panel 1061, and when thetouch panel 1071 detects a touch operation thereon or nearby, thetouch panel 1071 transmits the touch operation to theprocessor 110 to determine the type of the touch event, and then theprocessor 110 provides a corresponding visual output on thedisplay panel 1061 according to the type of the touch event. Although in fig. 11, thetouch panel 1071 and thedisplay panel 1061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, thetouch panel 1071 and thedisplay panel 1061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
Theinterface unit 108 is an interface for connecting an external device to theelectronic apparatus 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. Theinterface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within theelectronic apparatus 100 or may be used to transmit data between theelectronic apparatus 100 and the external device.
Thememory 109 may be used to store software programs as well as various data. Thememory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, thememory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
Theprocessor 110 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in thememory 109 and calling data stored in thememory 109, thereby performing overall monitoring of the electronic device.Processor 110 may include one or more processing units; alternatively, theprocessor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into theprocessor 110.
Theelectronic device 100 may further include a power supply 111 (e.g., a battery) for supplying power to each component, and optionally, the power supply 111 may be logically connected to theprocessor 110 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, theelectronic device 100 includes some functional modules that are not shown, and are not described in detail herein.
Optionally, an embodiment of the present invention further provides an electronic device, which may include theprocessor 110 shown in fig. 11, thememory 109, and a computer program stored on thememory 109 and capable of being executed on theprocessor 110, where the computer program, when executed by theprocessor 110, implements each process of the shooting method shown in any one of fig. 2 to 9 in the foregoing method embodiments, and can achieve the same technical effect, and details are not described here to avoid repetition.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the shooting method shown in any one of fig. 2 to 9 in the foregoing method embodiments, and can achieve the same technical effect, and details are not repeated here to avoid repetition. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (12)

Translated fromChinese
1.一种拍摄方法,应用于包括第一摄像头和可移动的第二摄像头的电子设备,其特征在于,所述方法包括:1. a photographing method, applied to an electronic device comprising a first camera and a movable second camera, wherein the method comprises:接收第一输入;receive a first input;响应于所述第一输入,控制所述第二摄像头移动,根据所述第一摄像头采集的第一预览图像和移动后的所述第二摄像头采集的第二预览图像,获取目标图像;In response to the first input, the second camera is controlled to move, and a target image is acquired according to the first preview image collected by the first camera and the second preview image collected by the moved second camera;所述根据所述第一摄像头采集的第一预览图像和移动后的所述第二摄像头采集的第二预览图像,获取目标图像,包括:The acquiring a target image according to the first preview image collected by the first camera and the second preview image collected by the moved second camera includes:根据所述第二预览图像,获取第一信息,所述第一信息用于表征目标对象的轮廓;obtaining first information according to the second preview image, where the first information is used to represent the contour of the target object;根据所述第一信息,对所述第一预览图像进行背景虚化处理,得到所述目标图像;performing background blur processing on the first preview image according to the first information to obtain the target image;所述根据所述第一信息,对所述第一预览图像进行背景虚化处理,得到所述目标图像之前,所述方法还包括:Before performing background blur processing on the first preview image according to the first information to obtain the target image, the method further includes:根据所述第二预览图像,获取第一图像,所述第一图像为所述目标对象的像;obtaining a first image according to the second preview image, where the first image is an image of the target object;所述根据所述第一信息,对所述第一预览图像进行背景虚化处理,得到所述目标图像,包括:The performing background blurring processing on the first preview image according to the first information to obtain the target image includes:根据所述第一信息,对所述第一预览图像进行背景虚化处理,得到第二图像,所述第二图像为以所述目标对象为拍摄主体、且背景虚化的图像;According to the first information, perform background blurring processing on the first preview image to obtain a second image, where the second image is an image with the target object as the main subject and the background is blurred;将所述第一图像和所述第二图像合成,得到所述目标图像;combining the first image and the second image to obtain the target image;其中,所述第二摄像头移动后的位置与目标对象之间的第一距离小于所述第一摄像头与所述目标对象之间的距离,且所述第一距离小于或等于预定阈值,所述目标图像为:以所述目标对象为拍摄主体、且背景虚化的图像。Wherein, the first distance between the moved position of the second camera and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to a predetermined threshold, the The target image is: an image with the target object as the main subject and a blurred background.2.根据权利要求1所述的方法,其特征在于,所述第一输入为用户对第三预览图像中的所述目标对象的输入;所述第三预览图像为所述第一摄像头或所述第二摄像头采集的预览图像;2 . The method according to claim 1 , wherein the first input is a user input to the target object in a third preview image; the third preview image is the first camera or the the preview image collected by the second camera;所述控制所述第二摄像头移动之后,还包括:After the controlling the movement of the second camera, the method further includes:将所述第二摄像头采集的预览图像更新为所述第二预览图像。The preview image collected by the second camera is updated to the second preview image.3.根据权利要求1所述的方法,其特征在于,所述控制所述第二摄像头移动之前,所述方法还包括:3. The method according to claim 1, wherein before the controlling the movement of the second camera, the method further comprises:获取与所述第一输入对应的所述第二摄像头的待移动位移;acquiring the to-be-moved displacement of the second camera corresponding to the first input;所述控制所述第二摄像头移动,包括:The controlling the movement of the second camera includes:根据所述待移动位移,控制所述第二摄像头移动。According to the displacement to be moved, the second camera is controlled to move.4.根据权利要求1至3中的任一项所述的方法,其特征在于,所述根据所述第一摄像头采集的第一预览图像和移动后的所述第二摄像头采集的第二预览图像,获取目标图像之前,所述方法还包括:4. The method according to any one of claims 1 to 3, wherein the first preview image collected according to the first camera and the second preview collected by the moved second camera image, before acquiring the target image, the method further includes:接收第二输入,所述第二输入用于调整所述第一摄像头的拍摄角度;receiving a second input, where the second input is used to adjust the shooting angle of the first camera;响应于所述第二输入,调整所述第一摄像头的拍摄角度,并根据所述第一摄像头的拍摄角度,调整所述第二摄像头的拍摄角度。In response to the second input, the shooting angle of the first camera is adjusted, and the shooting angle of the second camera is adjusted according to the shooting angle of the first camera.5.根据权利要求4所述的方法,其特征在于,所述根据所述第一摄像头的拍摄角度,调整所述第二摄像头的拍摄角度,包括:5. The method according to claim 4, wherein the adjusting the shooting angle of the second camera according to the shooting angle of the first camera comprises:通过所述电子设备的第一陀螺仪,获取所述第一摄像头的拍摄角度的调整量;Obtain the adjustment amount of the shooting angle of the first camera through the first gyroscope of the electronic device;根据所述调整量,通过第二陀螺仪调整所述第二摄像头的拍摄角度,所述第二陀螺仪设置于所述第二摄像头中。According to the adjustment amount, the shooting angle of the second camera is adjusted by a second gyroscope, and the second gyroscope is arranged in the second camera.6.一种电子设备,所述电子设备包括第一摄像头和可移动的第二摄像头,其特征在于,所述电子设备包括:接收模块、控制模块和获取模块;6. An electronic device comprising a first camera and a movable second camera, wherein the electronic device comprises: a receiving module, a control module and an acquisition module;所述接收模块,用于接收第一输入;the receiving module, for receiving the first input;所述控制模块,用于响应于所述接收模块接收的所述第一输入,控制所述第二摄像头移动;the control module, configured to control the movement of the second camera in response to the first input received by the receiving module;所述获取模块,用于根据所述第一摄像头采集的第一预览图像和移动后的所述第二摄像头采集的第二预览图像,获取目标图像;the obtaining module, configured to obtain a target image according to the first preview image collected by the first camera and the second preview image collected by the moved second camera;所述获取模块,具体用于根据所述第二预览图像,获取第一信息,所述第一信息用于表征目标对象的轮廓;根据所述第一信息,对所述第一预览图像进行背景虚化处理,得到所述目标图像;The acquiring module is specifically configured to acquire first information according to the second preview image, where the first information is used to characterize the outline of the target object; according to the first information, perform a background on the first preview image. bokeh processing to obtain the target image;所述获取模块,还具体用于在所述根据所述第一信息,对所述第一预览图像进行背景虚化处理,得到所述目标图像之前,根据所述第二预览图像,获取第一图像,所述第一图像为所述目标对象的像;The obtaining module is further specifically configured to obtain the first preview image according to the second preview image before performing background blurring processing on the first preview image according to the first information to obtain the target image. an image, the first image is an image of the target object;所述获取模块,具体用于根据所述第一信息,对所述第一预览图像进行背景虚化处理,得到第二图像,所述第二图像为以所述目标对象为拍摄主体、且背景虚化的图像;将所述第一图像和所述第二图像合成,得到所述目标图像;The acquisition module is specifically configured to perform background blur processing on the first preview image according to the first information to obtain a second image, where the target object is the subject and the background A blurred image; synthesizing the first image and the second image to obtain the target image;其中,所述第二摄像头移动后的位置与目标对象之间的第一距离小于所述第一摄像头与所述目标对象之间的距离,且所述第一距离小于或等于预定阈值,所述目标图像为:以所述目标对象为拍摄主体、且背景虚化的图像。Wherein, the first distance between the moved position of the second camera and the target object is less than the distance between the first camera and the target object, and the first distance is less than or equal to a predetermined threshold, the The target image is: an image with the target object as the main subject and a blurred background.7.根据权利要求6所述的电子设备,其特征在于,所述第一输入为用户对第三预览图像中的所述目标对象的输入;所述第三预览图像为所述第一摄像头或所述第二摄像头采集的预览图像;所述电子设备还包括:显示模块;7 . The electronic device according to claim 6 , wherein the first input is a user input to the target object in a third preview image; the third preview image is the first camera or the The preview image collected by the second camera; the electronic device further includes: a display module;所述显示模块,用于在所述控制模块控制所述第二摄像头移动之后,将所述第二摄像头采集的预览图像更新为所述第二预览图像。The display module is configured to update the preview image collected by the second camera to the second preview image after the control module controls the movement of the second camera.8.根据权利要求6所述的电子设备,其特征在于,所述获取模块,还用于在所述控制模块控制所述第二摄像头移动之前,获取与所述第一输入对应的所述第二摄像头的待移动位移;8 . The electronic device according to claim 6 , wherein the obtaining module is further configured to obtain the first input corresponding to the first input before the control module controls the movement of the second camera. 9 . The displacement of the two cameras to be moved;所述控制模块,具体用于根据所述获取模块获取的所述待移动位移,控制所述第二摄像头移动。The control module is specifically configured to control the movement of the second camera according to the displacement to be moved obtained by the obtaining module.9.根据权利要求6至8中的任一项所述的电子设备,其特征在于,所述电子设备还包括:调整模块;9. The electronic device according to any one of claims 6 to 8, wherein the electronic device further comprises: an adjustment module;所述接收模块,还用于在所述获取模块根据所述第一摄像头采集的第一预览图像和移动后的所述第二摄像头采集的第二预览图像,获取目标图像之前,接收第二输入,所述第二输入用于调整所述第一摄像头的拍摄角度;The receiving module is further configured to receive a second input before the obtaining module obtains the target image according to the first preview image collected by the first camera and the second preview image collected by the moved second camera , the second input is used to adjust the shooting angle of the first camera;所述调整模块,用于响应于所述接收模块接收的所述第二输入,调整所述第一摄像头的拍摄角度,并根据所述第一摄像头的拍摄角度,调整所述第二摄像头的拍摄角度。The adjustment module is configured to adjust the shooting angle of the first camera in response to the second input received by the receiving module, and adjust the shooting angle of the second camera according to the shooting angle of the first camera angle.10.根据权利要求9所述的电子设备,其特征在于,所述调整模块,具体用于通过所述电子设备的第一陀螺仪,获取所述第一摄像头的拍摄角度的调整量;根据所述调整量,通过第二陀螺仪调整所述第二摄像头的拍摄角度,所述第二陀螺仪设置于所述第二摄像头中。10. The electronic device according to claim 9, wherein the adjustment module is specifically configured to obtain the adjustment amount of the shooting angle of the first camera through the first gyroscope of the electronic device; According to the adjustment amount, the shooting angle of the second camera is adjusted by a second gyroscope, and the second gyroscope is arranged in the second camera.11.一种电子设备,其特征在于,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至5中任一项所述的拍摄方法的步骤。11. An electronic device, characterized in that it comprises a processor, a memory and a computer program stored on the memory and running on the processor, the computer program being executed by the processor to achieve the right The steps of the photographing method described in any one of requirements 1 to 5.12.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5中任一项所述的拍摄方法的步骤。12. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the shooting according to any one of claims 1 to 5 is realized steps of the method.
CN201911168848.4A2019-11-252019-11-25 Shooting method and electronic deviceActiveCN110913133B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201911168848.4ACN110913133B (en)2019-11-252019-11-25 Shooting method and electronic device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201911168848.4ACN110913133B (en)2019-11-252019-11-25 Shooting method and electronic device

Publications (2)

Publication NumberPublication Date
CN110913133A CN110913133A (en)2020-03-24
CN110913133Btrue CN110913133B (en)2021-03-23

Family

ID=69819402

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201911168848.4AActiveCN110913133B (en)2019-11-252019-11-25 Shooting method and electronic device

Country Status (1)

CountryLink
CN (1)CN110913133B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US11893668B2 (en)2021-03-312024-02-06Leica Camera AgImaging system and method for generating a final digital image via applying a profile to image information
US12254644B2 (en)2021-03-312025-03-18Leica Camera AgImaging system and method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113923368B (en)*2021-11-252024-06-18维沃移动通信有限公司Shooting method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105847664A (en)*2015-07-312016-08-10维沃移动通信有限公司Shooting method and device for mobile terminal
CN107231524A (en)*2017-05-312017-10-03珠海市魅族科技有限公司Image pickup method and device, computer installation and computer-readable recording medium
CN108307106A (en)*2017-12-292018-07-20维沃移动通信有限公司A kind of image processing method, device and mobile terminal
US10147216B1 (en)*2017-11-012018-12-04Essential Products, Inc.Intelligent camera

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105847664A (en)*2015-07-312016-08-10维沃移动通信有限公司Shooting method and device for mobile terminal
CN107231524A (en)*2017-05-312017-10-03珠海市魅族科技有限公司Image pickup method and device, computer installation and computer-readable recording medium
US10147216B1 (en)*2017-11-012018-12-04Essential Products, Inc.Intelligent camera
CN108307106A (en)*2017-12-292018-07-20维沃移动通信有限公司A kind of image processing method, device and mobile terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US11893668B2 (en)2021-03-312024-02-06Leica Camera AgImaging system and method for generating a final digital image via applying a profile to image information
US12254644B2 (en)2021-03-312025-03-18Leica Camera AgImaging system and method

Also Published As

Publication numberPublication date
CN110913133A (en)2020-03-24

Similar Documents

PublicationPublication DateTitle
CN110913132B (en)Object tracking method and electronic equipment
CN111182205B (en) Shooting method, electronic device and medium
CN109743498B (en)Shooting parameter adjusting method and terminal equipment
CN107592466B (en)Photographing method and mobile terminal
CN108495029B (en) A kind of photographing method and mobile terminal
CN110913131B (en) A kind of moon photographing method and electronic device
CN111541845A (en)Image processing method and device and electronic equipment
CN110933303B (en) Photographing method and electronic device
CN110908558A (en)Image display method and electronic equipment
CN111010511B (en)Panoramic body-separating image shooting method and electronic equipment
CN111083375B (en) Focusing method and electronic device
CN111083386B (en) Image processing method and electronic device
CN111147752B (en) Zoom factor adjustment method, electronic device and medium
JP7413546B2 (en) Photography method and electronic equipment
CN111601032A (en)Shooting method and device and electronic equipment
CN110769154B (en)Shooting method and electronic equipment
CN111050069B (en)Shooting method and electronic equipment
CN110913133B (en) Shooting method and electronic device
CN109246351B (en)Composition method and terminal equipment
CN110971832A (en)Image shooting method and electronic equipment
CN108174110B (en) A kind of photographing method and flexible screen terminal
CN111131706B (en) Video picture processing method and electronic device
CN109636720B (en)Image display method and terminal equipment
CN109104573B (en)Method for determining focusing point and terminal equipment
CN110958387B (en) A content update method and electronic device

Legal Events

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

[8]ページ先頭

©2009-2025 Movatter.jp