CN111416935B - Shooting method and electronic equipment - Google Patents
Shooting method and electronic equipment Download PDFInfo
- Publication number
- CN111416935B CN111416935B CN202010188816.7A CN202010188816A CN111416935B CN 111416935 B CN111416935 B CN 111416935B CN 202010188816 A CN202010188816 A CN 202010188816A CN 111416935 B CN111416935 B CN 111416935B
- Authority
- CN
- China
- Prior art keywords
- user
- camera
- deflection
- speed
- angle
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/695—Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/57—Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
- H04N23/611—Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/62—Control of parameters via user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Studio Devices (AREA)
Abstract
The embodiment of the invention provides a shooting method and electronic equipment, wherein the electronic equipment is provided with a first camera and a second camera which are arranged oppositely, and the method comprises the following steps: under the condition that shooting operation is received, acquiring the movement speed and the movement direction of a user through the first camera; determining a rotation speed according to the movement speed; and controlling the second camera to perform rotary shooting along the motion direction at the rotating speed. The invention can solve the problem that the shooting scheme in the related technology is easy to be interfered by the shaking of the camera body when the shooting is carried out in a multi-angle view finding mode, and further the quality of the shot image or video is poor.
Description
Technical Field
The invention relates to the technical field of intelligent terminals, in particular to a shooting method and electronic equipment.
Background
Along with the popularization of electronic equipment such as smart phones and tablet computers, more and more users adopt the electronic equipment to take pictures and make video recordings, and the requirements of the users on the pictures are more and more.
When taking a picture, the user often has a high requirement on the shooting angle, and hopes to realize multi-angle view, so when using the fixed camera fixedly connected with the terminal body to carry out multi-angle view-finding shooting, the range of the shooting angle can only be adjusted by adjusting the position of the body by the user, which easily causes shaking and instability of the body, thereby causing discontinuous pictures of the shot images or videos and influencing the quality of the pictures or videos.
Therefore, the shooting scheme in the related art is easily interfered by the shaking of the body to cause the problem of poor quality of the shot image or video when shooting in a multi-angle view.
Disclosure of Invention
The embodiment of the invention provides a shooting method and electronic equipment, and aims to solve the problem that shooting schemes in the related art are susceptible to machine body shake interference during multi-angle framing shooting, so that the quality of shot images or videos is poor.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a shooting method, which is applied to an electronic device, where the electronic device has a first camera and a second camera that are arranged oppositely, and the method includes:
under the condition that shooting operation is received, acquiring the movement speed and the movement direction of a user through the first camera;
determining a rotation speed according to the movement speed;
and controlling the second camera to perform rotary shooting along the motion direction at the rotating speed.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device has a first camera and a second camera that are arranged oppositely, and the electronic device includes:
the acquisition module is used for acquiring the movement speed and the movement direction of a user through the first camera under the condition of receiving shooting operation;
the determining module is used for determining the rotating speed according to the moving speed;
and the control module is used for controlling the second camera to carry out rotary shooting along the motion direction at the rotating speed.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the photographing method.
In a fourth aspect, the 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 being executed by a processor, the computer program implements the steps of the shooting method.
In the embodiment of the invention, when multi-angle framing shooting is carried out, a user does not need to move the electronic equipment to change a shooting angle in a shooting process, and the embodiment of the invention can firstly acquire the movement speed and the movement direction of the user through the first camera under the condition of receiving shooting operation, then determine the rotation speed according to the movement speed, and finally control the second camera to carry out rotary shooting at the rotation speed along the movement direction of the user, wherein the second camera is a camera which is arranged opposite to the first camera and is used for collecting shot images, so that multi-angle framing photos or videos can be shot by utilizing the second camera. In the shooting process, the electronic equipment does not need to change the position, so that the machine body shaking rate is low, and the second camera used for shooting only needs to be controlled to carry out rotary framing shooting along with the moving direction and the moving speed of the user facing the first camera, so that the influence of the machine body shaking on the deviation among different frame pictures in the shot multi-angle image or video is reduced, and the shooting quality of the image and the video is improved; moreover, the moving direction and the moving speed of the second camera for shooting are matched with the moving direction and the moving speed of a user facing the screen of the electronic equipment, so that the shot multi-angle images or videos can be consistent with the visual angle of the user, and the visual angle limit in multi-angle shooting is reduced; in addition, when the second camera for controlling shooting rotates, the user does not need to perform any manual operation on the electronic equipment, and only needs to swing the head of the user, so that the shooting angle and the shooting range can be adjusted in a non-contact mode of the screen of the electronic equipment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic diagram of a handset according to one embodiment of the invention;
FIG. 2 is an enlarged schematic view of the rotatable lift camera of FIG. 1 of the present invention;
FIG. 3 is a flow chart of a photographing method according to an embodiment of the present invention;
fig. 4 is a flowchart of a photographing method according to another embodiment of the present invention;
FIG. 5 is a schematic view of a translation of a face of a user facing a first camera according to an embodiment of the present invention;
fig. 6 is a flowchart of a photographing method according to still another embodiment of the present invention;
FIG. 7 is a schematic diagram of a coordinate system before and after deflection of a human face according to an embodiment of the present invention;
FIG. 8 is a schematic view of a face deflection angle of one embodiment of the present invention;
FIG. 9 is a block diagram of an electronic device of one embodiment of the invention;
fig. 10 is a schematic diagram of a hardware structure 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, not all, embodiments of the present invention. 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 invention.
The embodiment of the invention provides a shooting method, which can be used for shooting pictures with multi-angle framing, such as panoramic pictures or wide-angle pictures, and also can be used for shooting videos with multi-angle framing.
The shooting method is applied to electronic equipment, and the electronic equipment is provided with at least two cameras, namely a front camera and a rear camera.
The rear camera is a rotatable lifting camera. The rotation here may include rotation of any angle of 0 to 360 degrees in a horizontal plane, and/or rotation of any angle of 0 to 360 degrees in a vertical plane.
Fig. 1 schematically shows a schematic view of a mobile phone including a lift camera that can rotate in any angle from 0 to 360 degrees in the horizontal plane.
The front side of the mobile phone is provided with a front camera and a 3D structured light sensor, and the back side of the mobile phone is provided with a rotatable lifting camera 10.
Fig. 2 is an enlarged schematic view of the rotatable lift camera 10 in fig. 1, and as shown in fig. 2, the rotatable lift camera 10 is a columnar camera having a rotation axis, and the columnar rotatable lift camera 10 has one more rotation degree of freedom based on the translational degree of freedom of lift, under this scheme, the rotatable lift camera 10 can rotate in the horizontal plane by any angle from 0 degree to 360 degrees in the direction of the arrow in fig. 2 after ejecting the mobile phone body. Because the rotatable lifting camera 10 is hidden in the internal structure of the mobile phone when not in use, the whole display effect of the whole screen of the mobile phone can be kept.
Referring to fig. 3, a flowchart of a shooting method according to an embodiment of the present invention is shown, and is applied to an electronic device (e.g., a mobile phone shown in fig. 1) having a first camera (a front camera and a 3D structured light sensor in fig. 1) and a second camera (e.g., a rotatable up-down camera 10 in fig. 1) that are arranged opposite to each other, where the method specifically includes the following steps:
the shooting operation may be a shooting operation that triggers shooting of a multi-angle photograph (e.g., panoramic or wide-angle photograph), or may be a shooting operation that triggers video shooting.
The shooting operation can be triggered by a manual trigger operation of a user on a shooting control in a shooting preview interface, or can be triggered by a preset action of a human face of the user.
It should be noted that, in the embodiment of the present invention, a rear camera (i.e., a second camera) is used to capture an image or a video, that is, a preview image displayed on a capture preview interface is an image captured by the rear camera.
In this step, as shown in fig. 1, for example, the motion speed and the motion direction of a user (mainly a human face) facing the front of the mobile phone may be acquired through a front camera and a 3D structured light sensor.
wherein the moving speed may be determined as the rotation speed, or the moving speed may be multiplied by a preset coefficient, and the multiplication result is taken as the rotation speed.
And 103, controlling the second camera to perform rotary shooting along the motion direction at the rotating speed.
For example, as shown in fig. 1 and fig. 2, after determining the moving speed and moving direction of the head of the user facing the screen of the mobile phone to rotate to the right (or to the left, or to the up or to the down) through the front camera and the 3D structured light sensor, the rotatable lifting camera 10 may be controlled to perform the rotation shooting at the same angle or at a proportional angle along the head rotating direction (e.g. to the right), so that the mobile phone may capture a multi-angle image through the rotatable lifting camera 10 in the angle range from the starting angle to the ending angle as shown in fig. 2, thereby generating a multi-angle, e.g. a wide-angle photograph, or a video.
In the embodiment of the invention, when multi-angle framing shooting is carried out, a user does not need to move the electronic equipment to change a shooting angle in a shooting process, and the embodiment of the invention can firstly acquire the movement speed and the movement direction of the user through the first camera under the condition of receiving shooting operation, then determine the rotation speed according to the movement speed, and finally control the second camera to carry out rotary shooting at the rotation speed along the movement direction of the user, wherein the second camera is a camera which is arranged opposite to the first camera and is used for collecting shot images, so that multi-angle framing photos or videos can be shot by utilizing the second camera. In the shooting process, the electronic equipment does not need to change the position, so that the machine body shaking rate is low, and the second camera used for shooting only needs to be controlled to carry out rotary framing shooting along with the moving direction and the moving speed of the user facing the first camera, so that the influence of the machine body shaking on the deviation among different frame pictures in the shot multi-angle image or video is reduced, and the shooting quality of the image and the video is improved; moreover, the moving direction and the moving speed of the second camera for shooting are matched with the moving direction and the moving speed of a user facing the screen of the electronic equipment, so that the shot multi-angle images or videos can be consistent with the visual angle of the user, and the visual angle limit in multi-angle shooting is reduced; in addition, when the second camera for controlling shooting rotates, the user does not need to perform any manual operation on the electronic equipment, and only needs to swing the head of the user, so that the shooting angle and the shooting range can be adjusted in a non-contact mode of the screen of the electronic equipment.
Referring to fig. 4, a flowchart of a shooting method according to another embodiment of the present invention is shown, and is applied to the electronic device described above, for example, the mobile phone shown in fig. 1, where the method specifically includes the following steps:
for example, a cell phone may receive a capture operation in which a user selects to capture a wide-angle photograph or video.
Optionally, after receiving the shooting operation, the depth information of the face of the user may be collected by a 3D structured light sensor on the front of the mobile phone, and/or a two-dimensional image of the face of the user may be collected by a front-facing camera (e.g., an RGB camera) on the front of the mobile phone, and when the depth information or the two-dimensional image matches with the identity information of the authenticated user, it may be determined that the face identity verification passes, and the rotatable lifting camera 10 in fig. 1 may be triggered to pop up, where the pop-up effect is as shown in fig. 2.
Optionally, after the three-dimensional face information of the user facing the screen of the mobile phone is obtained by the mobile phone through the first camera, for example, the front camera and the 3D structured light sensor, a target region in the face, such as a pupil and the like, a nose tip and the like, having identification features may be identified and locked. Therefore, when a wide-angle picture or video is shot, the authentication step before the camera is popped up is added, and the shooting safety can be improved.
In the step, the movement of the target area can be tracked and positioned through the front camera and the 3D structured light sensor, and the displacement of the target area before and after the movement is calculated in real time. The user's face can be moved by means of translation or rotation.
For example, fig. 5 shows a schematic view of a translation of a face of a user facing a first camera.
In fig. 5, the face is translated, and the method of the embodiment of the present invention may obtain the displacement of the nose region in the face along the direction of the arrow (i.e. the first direction).
When the face of the user can move in a translation mode, the moving distance of the target area can be identified as the displacement; when the face of the user can move in a rotating manner, the arc length corresponding to the rotation of the target area can be used as the displacement.
The first direction may then comprise one of the following: horizontal right, horizontal left, vertical up, vertical down.
Before the displacement of the target area in the face of the user is obtained through the first camera, it is determined that the user sends a 'nodding' signal once under the condition that the displacement of the target area in the face of the user along the vertical direction of the screen reaches a certain displacement threshold value through recognition, so that the displacement of the target area in the face of the user is obtained through the first camera, namely, the displacement after the nodding signal is the displacement used for controlling the rotation of the second camera in the step and comprises the first direction.
the length of time for which the displacement occurs is the length of time it takes for the displacement to occur.
where the bits are removed by shifting the duration, the average velocity, i.e. the first velocity of the target region here, can be obtained.
And 204, determining the movement speed of the user according to the first speed, and determining the movement direction of the user according to the first direction.
the moving speed may be used as the rotation speed of the second camera, or the rotation speed may be obtained by multiplying the moving speed by a scaling factor (greater than zero and less than one).
And step 206, controlling the second camera to perform rotary shooting along the moving direction at the rotating speed.
For example, the head is horizontally translated or rotated, the rotatable up-and-down camera 10 in fig. 2 can be controlled to rotate at a constant speed in the direction indicated by the arrow (i.e., horizontal rotation). The starting angle of the shooting is shown in fig. 2, and the ending angle of the shooting is shown in fig. 2.
Optionally, in the process of rotational shooting, if the "nodding" signal is detected, the first camera is controlled to stop tracking the movement of the target area, the second camera is also controlled to stop rotating and stopping shooting, the second camera is rebounded to the inner shell of the mobile phone, and the generated multi-angle photo or multi-angle video is displayed in the shooting preview interface.
Optionally, when the second camera is horizontally rotatable, the user may use the mobile phone in a vertical screen mode to perform multi-angle shooting on a horizontal plane by performing head translation or head rotation in a horizontal direction, and may use the mobile phone in a horizontal screen mode to perform multi-angle shooting on a vertical plane by performing head translation or head rotation (e.g., nodding) in a vertical direction;
optionally, when the second camera is vertically rotatable, the user may perform multi-angle shooting on a horizontal plane by performing head translation or head rotation in a horizontal direction in a landscape mode, and perform multi-angle shooting on a vertical plane by performing head translation or head rotation (e.g., nodding) in a vertical mode in a portrait mode.
In the embodiment of the invention, when multi-angle framing shooting is carried out, a first speed can be determined based on the displacement and the displacement duration of a target area in a human face facing a first camera, the movement speed of a user is determined based on the first speed, and the movement direction of the user is determined based on the first direction of the displacement, so that the second camera can be controlled to carry out rotary shooting along the movement direction at a rotation speed corresponding to the movement speed, and the aim of multi-angle shooting is fulfilled. When a user selects to shoot a wide-angle picture or a wide-angle video, the front 3D structured light sensor can identify three-dimensional face information, capture and position a target area, and control the second camera to rotate according to the displacement direction and the first speed of the target area.
Optionally, in an embodiment, when the user needs to perform the shooting of the rotation shooting at any angle (for example, within less than 150 degrees), in step 204, if the displacement duration is within a third preset duration and the displacement is greater than a first preset displacement threshold, the first speed is determined as the movement speed of the user, and the first direction is determined as the movement direction of the user.
Specifically, if the displacement of the target region is calculated in real time within a third preset time period to be greater than a first preset displacement threshold (indicating that the head is not accidentally translated or swung with a small amplitude), for example, when the horizontal displacement (such as a panning operation) is greater than a certain displacement threshold within a certain time threshold, then a direction within a displacement period during which the nose region starts to move to the end of the movement, for example, and a first speed in a horizontal direction of the screen (such as panning) for example, may be obtained.
In the embodiment of the invention, the displacement corresponding to the first speed can be determined as the movement speed of the user only when the displacement of the face target area is greater than the first preset displacement threshold, so that the situation that the unintentional slight swing of the head of the user is regarded as the action of controlling the rotation of the second camera can be avoided, and the accuracy of controlling the rotation of the camera for taking a picture by the face of the user is improved.
Optionally, in an embodiment, in executing step 206, the second camera may be controlled to perform rotation shooting in the first direction at the rotation speed; (optionally, if the displacement of the target area in the second direction is greater than or equal to a second preset displacement threshold value within a fourth preset duration), controlling the second camera to stop the rotational shooting, wherein the second direction is perpendicular to the first direction.
Specifically, for example, when the second camera is controlled to rotate, the motion direction of the head is horizontal translation or rotation, and when the head is translated or rotated in the vertical direction (for example, nodding), and the displacement is greater than a second preset displacement threshold value at which the head of the user unintentionally translates and swings, the second camera is controlled to stop performing the above-mentioned rotation shooting, that is, nodding operation here is an instruction to stop shooting, and when the user needs to stop multi-angle shooting, the user only needs to perform a large-amplitude displacement of the face in a second direction perpendicular to the first direction in which the second camera is controlled to rotate, without performing any touch operation on the screen of the mobile phone, and thus the non-contact shooting stop can be realized.
In addition, when determining the displacement of the target area in the second direction, the displacement may also be obtained by the first camera, and the specific obtaining method refers to the above, and is not described herein again.
Optionally, in another embodiment, when the user needs to take a picture or a video shot with a large wide angle (e.g. 180 degrees, e.g. 360 degrees), in step 204, if the displacement duration is within a third preset duration and the displacement is greater than a third preset displacement threshold, determining the first speed as the movement speed of the user, and determining the first direction or a third direction opposite to the first direction as the movement direction of the user; accordingly, when step 206 is executed, the second camera is controlled to perform rotational shooting in the first direction or the third direction at the rotational speed.
When the first camera detects that the displacement of the target area is greater than a third preset displacement threshold (the third preset displacement threshold is greater than the first preset displacement threshold) within a certain time threshold, the first speed may be determined as the movement speed of the user. For example, if the first direction is horizontal right, the determined user movement direction may be horizontal right, or horizontal left, and since the movement direction is the direction in which the second camera rotates, the second camera may perform rotational shooting at a constant speed (for example, 360 degrees, and further, for example, 180 degrees, etc., greater than a certain angle (for example, the angle is 150 degrees)) at the movement speed left or right (i.e., clockwise or counterclockwise rotation), so as to generate a wide-angle picture or a wide-angle video with a preset shooting angle.
In the embodiment of the invention, when a user needs to take panoramic pictures or panoramic videos, the head of the user can move to a larger extent within a shorter preset time, so that the second camera is directly triggered to rotate by a preset angle, and the shooting convenience and stability within a preset angle range are improved.
Referring to fig. 6, a flowchart of a shooting method according to another embodiment of the present invention is shown, and is applied to the electronic device, for example, the mobile phone shown in fig. 1, where the method specifically includes the following steps:
for example, a cell phone may receive a user selection to take a wide-angle photograph or video.
Optionally, after receiving the shooting operation, the depth information of the face of the user may be collected by a 3D structured light sensor on the front of the mobile phone, and/or a two-dimensional image of the face of the user may be collected by a front-facing camera (e.g., an RGB camera) on the front of the mobile phone, and when the depth information or the two-dimensional image matches with the identity information of the authenticated user, it may be determined that the face identity verification passes, and the rotatable lifting camera 10 in fig. 1 may be triggered to pop up, where the pop-up effect is as shown in fig. 2.
After the identity authentication is passed, a first deflection angle and a first deflection direction of the face of the user can be acquired through the front-facing camera and the 3D structured light sensor.
Here there is a yaw angle and a yaw direction because the head of the user facing the first camera is rotated.
Optionally, in an embodiment, when the first deflection angle of the face of the user is acquired by the first camera, the following may be implemented: acquiring three-dimensional information of a face of a user through the first camera; and determining a first deflection angle of the face according to the variation of the three-dimensional information.
Specifically, a three-dimensional coordinate system is established for a user face facing a first camera through the first camera (a front RGB camera and a 3D structured light sensor), so as to acquire three-dimensional information of the face, and then when the user rotates the head, the three-dimensional information of the face changes, a first deflection angle of the face may be determined according to a change amount of the three-dimensional information of the face (for example, a first vector between coordinates of a nose before the face rotates and an origin of the coordinate system is acquired, and a second vector between new coordinates of the nose after the face rotates and the origin of the coordinate system is acquired, then, a spatial angle between the two vectors is calculated, and the spatial angle is determined as the first deflection angle of the face).
In the embodiment of the invention, the variation of the three-dimensional information of the user face facing the first camera can be obtained through the first camera, and the first deflection angle of the face is determined according to the variation, so that the calculation of the deflection angle of the face is more accurate, and the rotation angle of the second camera is ensured to be matched with the deflection angle of the face.
Optionally, in another embodiment, when the first deflection angle of the face of the user is obtained by the first camera, the following may also be implemented: before the face is rotated, a three-dimensional coordinate system as shown in the left side of fig. 7 is established for the face, and then, after the face is rotated, another three-dimensional coordinate system as shown in the right side of fig. 7 is re-established, wherein the reference points of the two three-dimensional coordinate systems established before and after the face is rotated are the same, and the original points are the same. For example, the origin is the head center position, and the three coordinate axes are also kept unchanged relative to the departure direction of the face. Therefore, when the deflection angle of the human face is calculated, the spatial included angle between the Y axis and the Y 'axis or between the X axis and the X' axis can be calculated, and the spatial included angle is used as the first deflection angle of the human face. Wherein the coordinate system before rotation is constituted by the X-Y-Z axis in fig. 7, and the coordinate system after rotation is constituted by the X ' -Y ' -Z ' axis in fig. 7, wherein the coordinate origins of the two coordinate systems are the same.
The Y axis and the Z axis are respectively parallel to the coordinate axis of the mobile phone screen and respectively point to the horizontal axis and the longitudinal axis of the mobile phone screen. The X axis is perpendicular to the plane of the mobile phone and points to the front of the mobile phone, namely a screen with a front camera. This coordinate system is directed to the front screen of the phone in fig. 1, the sensation emanating from the face of a person.
The head rotation process can be understood as a process in which a three-dimensional coordinate system bound with the head moves along with the head. Therefore, in order to determine the deflection angle of the face, the first deflection angle of the face may be determined according to the spatial angle of the three-dimensional coordinate system before and after the deflection of the face.
For example, the processor of the mobile phone may calculate an angle between the spatial straight lines of the X axis and the X 'axis in fig. 7, or calculate an angle between the spatial straight lines of the Y axis and the Y' axis in fig. 7, and determine the angle as the first deflection angle of the human face.
In the embodiment of the invention, the three-dimensional coordinate systems respectively corresponding to the front and the back of the rotation of the face can be determined through the first camera, and the first deflection angle of the face is determined according to the space included angle of the three-dimensional coordinate systems before and after the deflection of the face, so that the calculation of the deflection angle of the face is more accurate, and the rotation angle of the second camera is ensured to be matched with the deflection angle of the face.
Optionally, in an embodiment, when the first camera acquires the movement speed and the movement direction of the user, a second deflection angle and a second deflection direction of the face of the user may be acquired by the first camera; then, controlling a lighting surface of the second camera to rotate by the second deflection angle from an initial orientation along the second deflection direction, wherein the initial orientation is a direction which is from a front screen of the electronic device to a back screen and is perpendicular to a plane of the back screen;
the front screen is the screen where the first camera is located, and the back screen is the screen where the second camera is located.
In general, when a user needs to take a wide-angle or panoramic photograph (or video), the head is deflected to the left or right as much as possible, and then the user moves the camera-fixed mobile phone from the deflected position to the leftmost or rightmost position to take the photograph.
Therefore, in consideration of the requirement of the user, the method according to the embodiment of the present invention, before controlling the second camera to perform the rotation shooting at the rotation angle, first needs to keep the orientation of the lighting surface of the second camera consistent with the orientation of the face, so that when the face rotates again, the second camera is controlled to perform the rotation shooting, which can ensure that the angle or the orientation of the second camera when the second camera starts shooting is substantially consistent with the angle or the orientation of the face.
The principle of obtaining the second deflection angle and the second deflection direction is similar to the above-mentioned principle of obtaining the first deflection angle and the first deflection direction, and is not described herein again.
Then, when the step of acquiring a first deflection angle and a first deflection direction of the face of the user by the first camera in step 301 is executed, a first deflection angle and a first deflection direction of the face of the user from the second deflection angle may be acquired by the first camera, where the first deflection direction is opposite to the second deflection direction.
For example, as shown in fig. 8, a human face is deflected to the left by an angle a from an orientation 11 facing the front of the mobile phone, then the second camera is controlled to deflect to the left by an angle a from an initial orientation, then a first deflection direction and a first deflection angle, for example, a b angle is deflected to the right, of the human face starting from the angle a shown in fig. 8 are obtained by the first camera, then in step 306, the second camera may be controlled to perform rotational shooting by an angle b from the angle a to the right, and the shooting range is an angle range from 12 to 13.
In the embodiment of the present invention, before the second camera is controlled to perform the rotation shooting along the rotation direction corresponding to the first deflection direction and the first deflection angle, the second camera may be controlled to deflect the second deflection angle along the second deflection direction from the initial orientation according to the second deflection angle and the second deflection direction of the human face, so that the orientation when the second camera starts the rotation shooting is consistent with the orientation of the human face, and the actual shooting requirements of the user on the panoramic picture and the video are met.
for example, the angular velocity may be obtained by dividing the first deflection angle by the first deflection time period.
And 304, determining the movement speed of the user according to the angular speed, and determining the movement direction of the user according to the first deflection direction.
the movement speed may be used as the rotation speed, or the movement speed may be multiplied by a preset proportionality coefficient (greater than 0 and less than 1) to obtain the rotation speed.
And step 306, controlling the second camera to perform rotary shooting along the moving direction at the rotating speed.
In the embodiment of the invention, when multi-angle framing shooting is carried out, the rotating speed and the moving direction of the second camera can be determined based on the deflection angle and the deflection direction of the face facing the first camera, and the second camera can be controlled to carry out rotary shooting at the rotating speed along the moving direction, so that the aim of multi-angle shooting is fulfilled. The rotation angle of the second camera for multi-angle shooting and the deflection angle of the face can be kept basically synchronous, and non-contact shooting angle control is achieved.
Optionally, in an embodiment, when the user needs to perform rotational shooting at any angle (for example, rotational shooting at an angle less than 150 degrees) in the step 304, if the first deflection time period is within a first preset time period and the first deflection angle is greater than a first preset angle threshold, the movement speed of the user is determined according to the angular speed, and the first deflection direction is determined as the movement direction of the user.
Specifically, if the obtained coordinate system of the face is a spatial angle before and after the deflection within a first preset time period, for example, the b angle of the deflection of the face in fig. 8 is greater than a first preset angle threshold (that is, is not a small-amplitude swing head of the uncontrolled camera), the angular velocity may be used as the motion velocity of the user, or a preset formula is used to convert the angular velocity to generate the motion velocity of the user.
In the embodiment of the invention, the movement speed of the user can be determined according to the angular speed of the face when the first deflection angle of the face is greater than the first preset angle threshold, so that the situation that the unintentional slight swing of the head of the user is regarded as the action of controlling the rotation of the second camera can be avoided, and the accuracy of controlling the rotation of the camera for photographing by the face of the user is improved.
Optionally, in an embodiment, when the step 306 is executed, the second camera may be controlled to perform rotation shooting along the first deflection direction at the rotation speed; and if a third deflection angle of the face which continues to deflect after deflecting the first deflection angle within a second preset time length is smaller than or equal to a first preset angle threshold, controlling the second camera to stop the rotary shooting.
For example, as shown in fig. 8, the second camera is controlled to rotate at the rotation speed by an angle b in the arrow direction of the angle b to perform rotational shooting. If the face continues to deflect by the angle c after deflecting to the position of the angle b within the second preset time length, and the angle c is smaller than the first preset angle threshold (namely the angle c is very small), it indicates that the face of the user stops deflecting, and therefore, after a very small third deflection angle of the face is detected, the second camera is controlled to stop rotating and shooting.
Considering the head movement of the user and the non-machine swing, the swing is hardly stopped, and therefore, the third deflection angle is smaller than the first preset angle threshold value as the condition for stopping the rotary shooting, and the multi-angle shooting of the second camera can be controlled more accurately based on the rotation of the human face.
It should be noted that the third deflection angle is also a third deflection angle of the human face acquired by the first camera. This third deflection angle is the deflection angle proceeding from angle b in fig. 8.
Optionally, in another embodiment, when the user needs to take a picture or a video shot with a large wide angle (e.g. 180 degrees, e.g. 360 degrees), in the step 304, if the first deflection time period is within a first preset time period and the first deflection angle is less than or equal to a first preset angle threshold, determining a preset speed as the motion speed of the user, and determining the first deflection direction or a third deflection direction opposite to the first deflection direction as the motion direction of the user;
then, when the step 306 is executed, the second camera may be controlled to perform rotational shooting at the preset speed for a preset angle (which may be the same as or different from the preset angle in the embodiment of fig. 2, for example, the preset angle is 360 degrees, or a large angle greater than 150 degrees, such as 180 degrees) in the first yaw direction or the third yaw direction.
Specifically, for example, within a certain time threshold, the deflection angle b of the human face is small (smaller than or equal to the first preset angle threshold), and the second camera may be controlled to perform the rotation shooting of the preset angle in the left or right (or clockwise or counterclockwise) direction at a preset speed.
Alternatively, if there is a deflection angle a in fig. 8 performed first before the deflection angle b, in this step, in the case that it is determined that the deflection direction corresponding to the deflection angle b is opposite to the deflection direction of the deflection angle a, and the deflection angle b is smaller than the first preset angle threshold, the second camera may be controlled to perform, for example, 360-degree rotation shooting in the left or right (or clockwise or counterclockwise) direction at a preset speed.
In the embodiment of the invention, when a user needs to take a picture or a video with a large wide angle, the head of the user can rotate in a short time with a small amplitude, so that the second camera is directly triggered to rotate by a preset angle, and the shooting convenience and stability in a preset angle range are improved.
In the embodiment of the invention, as the second camera has a certain shooting range, the second camera is controlled to rotate to shoot by the rotation of the face, so that the shooting angle of the camera is greatly expanded, a wide-angle or panoramic picture is convenient to shoot, and the method is particularly suitable for shooting scenes of group pictures and scenery; in addition, in the shooting process, the user does not need to touch the screen of the electronic equipment, only the face is required to rotate to different degrees, namely, under the condition that the screen is not required to be touched, the second camera can be rotated and shot in a full-automatic mode, the hand touch screen is avoided, interference and shaking of shooting angles are avoided, in addition, due to the fact that the second camera rotates at a constant speed under automatic control during rotating shooting, displacement deviation between the shot wide-angle images or the frames of images in the video is lower, and the change of the shooting angles is more accurate and stable.
Referring to FIG. 9, a block diagram of an electronic device of one embodiment of the invention is shown. The electronic equipment of the embodiment of the invention can realize the details of the shooting method in the embodiment and achieve the same effect. The electronic device has a first camera and a second camera which are arranged oppositely, and the electronic device shown in fig. 9 includes:
an obtaining module 501, configured to obtain a movement speed and a movement direction of a user through the first camera when a shooting operation is received;
a determining module 502 for determining a rotation speed according to the movement speed;
and a control module 503, configured to control the second camera to perform rotation shooting along the moving direction at the rotation speed.
Optionally, the obtaining module 501 includes:
the first obtaining submodule is used for obtaining a first deflection angle and a first deflection direction of the face of the user through the first camera;
the second obtaining submodule is used for obtaining a first deflection time length corresponding to the first deflection angle;
the first determining submodule is used for determining the angular speed of the face of the user according to the first deflection angle and the first deflection time length;
and the second determining submodule is used for determining the movement speed of the user according to the angular speed and determining the movement direction of the user according to the first deflection direction.
Optionally, the first obtaining sub-module includes:
the first acquisition unit is used for acquiring three-dimensional information of a face of a user through the first camera;
and the determining unit is used for determining a first deflection angle of the human face according to the variation of the three-dimensional information.
Optionally, the obtaining module 501 further includes:
the third obtaining submodule is used for obtaining a second deflection angle and a second deflection direction of the face of the user through the first camera;
the first control submodule is used for controlling the lighting surface of the second camera to rotate by the second deflection angle along the second deflection direction from an initial orientation, wherein the initial orientation is a direction which is perpendicular to the plane of the back screen and points to the back screen from the front screen of the electronic equipment;
the first obtaining submodule is further configured to obtain, by the first camera, a first deflection angle and a first deflection direction at which the face deflects from the second deflection angle, where the first deflection direction is opposite to the second deflection direction.
Optionally, the second determining sub-module is further configured to determine, if the first deflection time length is within a first preset time length and the first deflection angle is greater than a first preset angle threshold, a movement speed of the user according to the angular speed, and determine the first deflection direction as the movement direction of the user.
Optionally, the control module 503 includes:
the second control submodule is used for controlling the second camera to carry out rotary shooting along the first deflection direction at the rotating speed;
and the third control sub-module is used for controlling the second camera to stop the rotary shooting if a third deflection angle of the face which continues to deflect after deflecting the first deflection angle within a second preset time length is smaller than or equal to a first preset angle threshold value.
Optionally, the second determining sub-module is further configured to determine a preset speed as the movement speed of the user and determine the first deflection direction or a third deflection direction opposite to the first deflection direction as the movement direction of the user if the first deflection time length is within a first preset time length and the first deflection angle is less than or equal to a first preset angle threshold;
the control module 503 includes:
and the fourth control submodule is used for controlling the second camera to carry out rotary shooting at a preset angle at the preset speed along the first deflection direction or the third deflection direction.
Optionally, the obtaining module 501 includes:
the fourth acquisition submodule is used for acquiring the displacement of a target area in the face of the user through the first camera, wherein the displacement comprises a first direction;
a fifth obtaining submodule, configured to obtain a displacement duration corresponding to the displacement;
the third determining submodule is used for determining the first speed of the target area according to the displacement and the displacement duration;
and the fourth determining submodule is used for determining the movement speed of the user according to the first speed and determining the movement direction of the user according to the first direction.
Optionally, the fourth determining submodule is further configured to determine the first speed as the movement speed of the user and determine the first direction as the movement direction of the user if the displacement duration is within a third preset duration and the displacement is greater than a first preset displacement threshold.
Optionally, the control module 503 includes:
the fifth control submodule is used for controlling the second camera to carry out rotary shooting along the first direction at the rotating speed;
and the sixth control submodule is used for controlling the second camera to stop the rotary shooting if the displacement of the target area in the second direction is greater than or equal to a second preset displacement threshold, wherein the second direction is vertical to the first direction.
Optionally, the fourth determining sub-module is further configured to determine the first speed as the movement speed of the user and determine the first direction or a third direction opposite to the first direction as the movement direction of the user if the displacement duration is within a third preset duration and the displacement is greater than a third preset displacement threshold;
the control module 503 includes:
and the seventh control submodule is used for controlling the second camera to carry out rotary shooting at a preset angle along the first direction or the third direction at the rotating speed.
The electronic device provided by the embodiment of the present invention can implement each process implemented by the electronic device in the above method embodiments, and is not described herein again to avoid repetition.
The electronic equipment can obtain the movement speed and the movement direction of the user through the first camera under the condition of receiving shooting operation, then determines the rotation speed according to the movement speed, and finally controls the second camera to carry out rotary shooting at the rotation speed along the movement direction of the user, wherein the second camera is a camera which is arranged opposite to the first camera and is used for collecting shot images, so that the second camera can be used for shooting multi-angle framed pictures or videos. In the shooting process, the electronic equipment does not need to change the position, so that the machine body shaking rate is low, and the second camera used for shooting only needs to be controlled to carry out rotary framing shooting along with the moving direction and the moving speed of the user facing the first camera, so that the influence of the machine body shaking on the deviation among different frame pictures in the shot multi-angle image or video is reduced, and the shooting quality of the image and the video is improved; moreover, the moving direction and the moving speed of the second camera for shooting are matched with the moving direction and the moving speed of a user facing the screen of the electronic equipment, so that the shot multi-angle images or videos can be consistent with the visual angle of the user, and the visual angle limit in multi-angle shooting is reduced; in addition, when the second camera for controlling shooting rotates, the user does not need to perform any manual operation on the electronic equipment, and only needs to swing the head of the user, so that the shooting angle and the shooting range can be adjusted in a non-contact mode of the screen of the electronic equipment.
Fig. 10 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
The electronic device 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. The electronic device 400 also has a first camera and a second camera disposed opposite each other. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 10 does not constitute a limitation of the electronic device, and that the electronic device 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 terminal, a wearable device, a pedometer, and the like.
The processor 410 is used for acquiring the movement speed and the movement direction of the user through the first camera under the condition that the shooting operation is received; determining a rotation speed according to the movement speed; and controlling the second camera to perform rotary shooting along the motion direction at the rotating speed.
In the embodiment of the invention, when multi-angle framing shooting is carried out, a user does not need to move the electronic equipment to change a shooting angle in a shooting process, and the embodiment of the invention can firstly acquire the movement speed and the movement direction of the user through the first camera under the condition of receiving shooting operation, then determine the rotation speed according to the movement speed, and finally control the second camera to carry out rotary shooting at the rotation speed along the movement direction of the user, wherein the second camera is a camera which is arranged opposite to the first camera and is used for collecting shot images, so that multi-angle framing photos or videos can be shot by utilizing the second camera. In the shooting process, the electronic equipment does not need to change the position, so that the machine body shaking rate is low, and the second camera used for shooting only needs to be controlled to carry out rotary framing shooting along with the moving direction and the moving speed of the user facing the first camera, so that the influence of the machine body shaking on the deviation among different frame pictures in the shot multi-angle image or video is reduced, and the shooting quality of the image and the video is improved; moreover, the moving direction and the moving speed of the second camera for shooting are matched with the moving direction and the moving speed of a user facing the screen of the electronic equipment, so that the shot multi-angle images or videos can be consistent with the visual angle of the user, and the visual angle limit in multi-angle shooting is reduced; in addition, when the second camera for controlling shooting rotates, the user does not need to perform any manual operation on the electronic equipment, and only needs to swing the head of the user, so that the shooting angle and the shooting range can be adjusted in a non-contact mode of the screen of the electronic equipment.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 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. Further, the radio unit 401 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 the network module 402, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the electronic apparatus 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 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 the radio frequency unit 401 in case of the phone call mode.
The electronic device 400 also includes at least one sensor 405, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 4061 and/or the backlight when the electronic apparatus 400 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); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 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, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, 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 the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 10, the touch panel 4071 and the display panel 4061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the electronic device, and this is not limited herein.
The interface unit 408 is an interface for connecting an external device to the electronic apparatus 400. 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. The interface unit 408 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 the electronic apparatus 400 or may be used to transmit data between the electronic apparatus 400 and an external device.
The memory 409 may be used to store software programs as well as various data. The memory 409 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, the memory 409 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.
The processor 410 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 the memory 409 and calling data stored in the memory 409, thereby performing overall monitoring of the electronic device. Processor 410 may include one or more processing units; preferably, the processor 410 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 the processor 410.
The electronic device 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 400 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when being executed by the processor 410, the computer program implements each process of the above shooting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The 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 above-mentioned shooting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. 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 invention 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 a terminal (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 invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (8)
1. A shooting method is applied to an electronic device, the electronic device is provided with a first camera and a second camera which are oppositely arranged, and the method is characterized by comprising the following steps:
under the condition that shooting operation is received, acquiring the movement speed and the movement direction of a user through the first camera; wherein the acquiring of the movement speed and the movement direction of the user comprises: acquiring the movement speed and the movement direction of a user through a first deflection angle and a first deflection direction of the face of the user, or acquiring the displacement of a target area in the face of the user through a first camera to acquire the movement speed and the movement direction of the user;
determining a rotation speed according to the movement speed;
controlling the second camera to perform rotary shooting along the motion direction at the rotation speed;
the obtaining of the movement speed and the movement direction of the user through the first deflection angle and the first deflection direction of the face of the user includes:
acquiring a first deflection angle and a first deflection direction of the face of a user through the first camera;
acquiring a first deflection time length corresponding to the first deflection angle;
determining the angular speed of the face of the user according to the first deflection angle and the first deflection duration;
determining the movement speed of the user according to the angular speed, and determining the movement direction of the user according to the first deflection direction;
the obtaining of the movement speed and the movement direction of the user through the first camera further comprises:
acquiring a second deflection angle and a second deflection direction of the face of the user through the first camera;
controlling a lighting surface of the second camera to rotate by the second deflection angle along the second deflection direction from an initial orientation, wherein the initial orientation is a direction which is perpendicular to a plane of a back screen and points from a front screen of the electronic device to the back screen;
wherein, the obtaining of the first deflection angle and the first deflection direction of the face of the user through the first camera includes:
and acquiring a first deflection angle and a first deflection direction of the human face from the second deflection angle through the first camera, wherein the first deflection direction is opposite to the second deflection direction.
2. The method of claim 1, wherein the obtaining, by the first camera, a first deflection angle of a face of a user comprises:
acquiring three-dimensional information of a face of a user through the first camera;
and determining a first deflection angle of the face according to the variation of the three-dimensional information.
3. The method of claim 1, wherein determining the speed of movement of the user based on the angular velocity and the direction of movement of the user based on the first direction of deflection comprises:
if the first deflection time length is within a first preset time length and the first deflection angle is larger than a first preset angle threshold value, determining the movement speed of the user according to the angular speed, and determining the first deflection direction as the movement direction of the user.
4. The method according to claim 1 or 3, wherein the controlling the second camera to perform rotational photographing at the rotational speed in the moving direction comprises:
controlling the second camera to perform rotary shooting along the first deflection direction at the rotating speed;
and if a third deflection angle of the face which continues to deflect after deflecting the first deflection angle within a second preset time length is smaller than or equal to a first preset angle threshold, controlling the second camera to stop the rotary shooting.
5. The method of claim 1,
the determining the motion speed of the user according to the angular speed and the determining the motion direction of the user according to the first deflection direction further comprises:
if the first deflection time length is within a first preset time length and the first deflection angle is smaller than or equal to a first preset angle threshold value, determining a preset speed as the movement speed of the user, and determining the first deflection direction or a third deflection direction opposite to the first deflection direction as the movement direction of the user;
the controlling the second camera to perform rotational shooting at the rotation speed in the moving direction includes:
and controlling the second camera to perform rotary shooting at a preset angle along the first deflection direction or the third deflection direction at the preset speed.
6. The method of claim 1, wherein the obtaining of the movement speed and the movement direction of the user through the first camera to obtain the displacement of the target area in the face of the user comprises:
acquiring displacement of a target area in a face of a user through the first camera, wherein the displacement comprises a first direction;
acquiring displacement duration corresponding to the displacement;
determining a first speed of the target area according to the displacement and the displacement duration;
and determining the movement speed of the user according to the first speed, and determining the movement direction of the user according to the first direction.
7. The method of claim 6, wherein determining the speed of movement of the user based on the first speed and determining the direction of movement of the user based on the first direction comprises:
and if the displacement duration is within a third preset duration and the displacement is greater than a first preset displacement threshold, determining the first speed as the movement speed of the user and determining the first direction as the movement direction of the user.
8. An electronic device having a first camera and a second camera disposed opposite to each other, the electronic device comprising:
the acquisition module is used for acquiring the movement speed and the movement direction of a user through the first camera under the condition of receiving shooting operation; wherein the acquiring of the movement speed and the movement direction of the user comprises: acquiring the movement speed and the movement direction of a user through a first deflection angle and a first deflection direction of the face of the user, or acquiring the displacement of a target area in the face of the user through a first camera to acquire the movement speed and the movement direction of the user;
the determining module is used for determining the rotating speed according to the moving speed;
the control module is used for controlling the second camera to carry out rotary shooting along the motion direction at the rotating speed;
the acquisition module includes:
the first obtaining submodule is used for obtaining a first deflection angle and a first deflection direction of the face of the user through the first camera;
the second obtaining submodule is used for obtaining a first deflection time length corresponding to the first deflection angle;
the first determining submodule is used for determining the angular speed of the face of the user according to the first deflection angle and the first deflection time length;
the second determining submodule is used for determining the movement speed of the user according to the angular speed and determining the movement direction of the user according to the first deflection direction;
the acquisition module further comprises:
the third obtaining submodule is used for obtaining a second deflection angle and a second deflection direction of the face of the user through the first camera;
the first control submodule is used for controlling the lighting surface of the second camera to rotate by the second deflection angle along the second deflection direction from an initial orientation, wherein the initial orientation is a direction which is perpendicular to the plane of the back screen and points to the back screen from the front screen of the electronic equipment;
the first obtaining submodule is further configured to obtain, by the first camera, a first deflection angle and a first deflection direction at which the face deflects from the second deflection angle, where the first deflection direction is opposite to the second deflection direction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010188816.7A CN111416935B (en) | 2020-03-17 | 2020-03-17 | Shooting method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010188816.7A CN111416935B (en) | 2020-03-17 | 2020-03-17 | Shooting method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111416935A CN111416935A (en) | 2020-07-14 |
CN111416935B true CN111416935B (en) | 2021-10-19 |
Family
ID=71493043
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010188816.7A Active CN111416935B (en) | 2020-03-17 | 2020-03-17 | Shooting method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111416935B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111787234A (en) * | 2020-08-12 | 2020-10-16 | 努比亚技术有限公司 | Shooting control method and device and computer readable storage medium |
CN115423930B (en) * | 2022-07-28 | 2023-09-26 | 荣耀终端有限公司 | Image acquisition method and electronic equipment |
CN116320765B (en) * | 2023-04-06 | 2024-01-26 | 如你所视(北京)科技有限公司 | Method, apparatus, device, medium and program product for generating panoramic image |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001036798A (en) * | 1999-06-18 | 2001-02-09 | Woon Yong Kim | Method and device for controlling pan/tilt camera |
CN104238669A (en) * | 2014-09-04 | 2014-12-24 | 广东欧珀移动通信有限公司 | Method and device for controlling rotation of camera of mobile terminal and mobile terminal |
CN105827960A (en) * | 2016-03-21 | 2016-08-03 | 乐视网信息技术(北京)股份有限公司 | Imaging method and device |
CN106911891A (en) * | 2017-02-15 | 2017-06-30 | 惠州Tcl移动通信有限公司 | The method and system that a kind of VR auxiliary is taken photo by plane |
CN206790637U (en) * | 2017-06-09 | 2017-12-22 | 中国科学院心理研究所 | A kind of remote shooting system based on the dynamic control of head |
CN109756663A (en) * | 2017-08-25 | 2019-05-14 | 北京悉见科技有限公司 | A kind of control method of AR equipment, device and AR equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108363415A (en) * | 2018-03-29 | 2018-08-03 | 燕山大学 | A kind of vision remote control servomechanism and method applied to underwater robot |
-
2020
- 2020-03-17 CN CN202010188816.7A patent/CN111416935B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001036798A (en) * | 1999-06-18 | 2001-02-09 | Woon Yong Kim | Method and device for controlling pan/tilt camera |
CN104238669A (en) * | 2014-09-04 | 2014-12-24 | 广东欧珀移动通信有限公司 | Method and device for controlling rotation of camera of mobile terminal and mobile terminal |
CN105827960A (en) * | 2016-03-21 | 2016-08-03 | 乐视网信息技术(北京)股份有限公司 | Imaging method and device |
CN106911891A (en) * | 2017-02-15 | 2017-06-30 | 惠州Tcl移动通信有限公司 | The method and system that a kind of VR auxiliary is taken photo by plane |
CN206790637U (en) * | 2017-06-09 | 2017-12-22 | 中国科学院心理研究所 | A kind of remote shooting system based on the dynamic control of head |
CN109756663A (en) * | 2017-08-25 | 2019-05-14 | 北京悉见科技有限公司 | A kind of control method of AR equipment, device and AR equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111416935A (en) | 2020-07-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3780577B1 (en) | Photography method and mobile terminal | |
CN109361869B (en) | Shooting method and terminal | |
CN108881733B (en) | Panoramic shooting method and mobile terminal | |
CN107707817B (en) | video shooting method and mobile terminal | |
CN108989672B (en) | Shooting method and mobile terminal | |
CN111416935B (en) | Shooting method and electronic equipment | |
CN109474786B (en) | Preview image generation method and terminal | |
CN111010512A (en) | Display control method and electronic equipment | |
CN110213485B (en) | Image processing method and terminal | |
CN109241832B (en) | Face living body detection method and terminal equipment | |
CN111031234B (en) | Image processing method and electronic equipment | |
CN111432195A (en) | Image shooting method and electronic equipment | |
KR20220005087A (en) | Filming method and terminal | |
CN108924422B (en) | Panoramic photographing method and mobile terminal | |
CN108881721B (en) | Display method and terminal | |
CN108174110B (en) | Photographing method and flexible screen terminal | |
CN110769154B (en) | Shooting method and electronic equipment | |
CN110457885B (en) | Operation method and electronic equipment | |
CN110908517B (en) | Image editing method, image editing device, electronic equipment and medium | |
CN110602390B (en) | Image processing method and electronic equipment | |
CN111031246A (en) | Shooting method and electronic equipment | |
CN109005337B (en) | Photographing method and terminal | |
CN108156386B (en) | Panoramic photographing method and mobile terminal | |
WO2021136181A1 (en) | Image processing method and electronic device | |
CN108628508B (en) | Method for adjusting clipping window and mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |