CN112637497B - Shooting control method and device and electronic equipment - Google Patents

Shooting control method and device and electronic equipment Download PDF

Info

Publication number
CN112637497B
CN112637497B CN202011522758.3A CN202011522758A CN112637497B CN 112637497 B CN112637497 B CN 112637497B CN 202011522758 A CN202011522758 A CN 202011522758A CN 112637497 B CN112637497 B CN 112637497B
Authority
CN
China
Prior art keywords
rotation angle
straight line
plane
target
shooting
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
CN202011522758.3A
Other languages
Chinese (zh)
Other versions
CN112637497A (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 Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202011522758.3A priority Critical patent/CN112637497B/en
Publication of CN112637497A publication Critical patent/CN112637497A/en
Application granted granted Critical
Publication of CN112637497B publication Critical patent/CN112637497B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects

Abstract

The application discloses a shooting control method and device and electronic equipment, and belongs to the technical field of communication. The method comprises the following steps: acquiring a rotation angle of electronic equipment displaying a shooting picture in a first plane as a target rotation angle, wherein the first plane is a plane where a screen of the electronic equipment is located; and under the condition that at least one of the first straight line and the second straight line is detected in the shooting picture, controlling a camera of the electronic equipment to rotate in the first plane according to a third rotation angle of the third straight line, so that an included angle between the third straight line and the target direction is smaller than or equal to a first preset threshold value. Therefore, the embodiment of the application can solve the problems that in the prior art, a method for shooting a picture or a video of a target object meeting a certain direction requirement is high in cost and cannot be popularized to mass users.

Description

Shooting control method and device and electronic equipment
Technical Field
The application belongs to the technical field of communication, and particularly relates to a shooting control method and device and electronic equipment.
Background
At present, in the prior art, when a user uses a mobile phone to shoot, the composition is performed by manually adjusting any angle such as a horizontal angle, a vertical angle, a rotation angle and the like of holding the mobile phone. When a user shoots a landscape with the horizon or shoots the appearance of a building group, the horizon is always required to be kept horizontal, and the vertical line is kept vertical, so that the occurrence of a picture which is askew and falls down is avoided, the shot object accords with the impression of human eyes, and the stable state is kept. Therefore, it is important that the mobile phone is placed horizontally for shooting and the picture is horizontally and vertically shot.
The user can also correct the composition angle through post-editing, for example, by using the horizontal axis, the central axis, and the center of the photo as the pivot through the picture editing software, and by stretching and deforming, the photo can be adjusted vertically, horizontally, and rotationally.
Therefore, the pictures taken by the mobile phone can only be horizontally and vertically arranged by elaborate composition arrangement at the early stage and correction means at the later stage. For an ordinary user, the shooting mode has high learning cost and use cost, namely, the user needs to spend a great deal of time and energy to search for a horizontal and vertical view angle, and excessive correction can cause pixel loss and blurring when the correction function is used at a later stage. In addition, for a mobile phone photographer to take a horizontal, flat and vertical picture, certain aesthetic bases, sharp observation power and certain shooting experience are required.
In addition, the imaging circle of the shift lens is larger than that of the traditional lens, and the lens can be deviated from the center by starting the translation function, so that the shot scene is changed. Such as a lens shift up or with a large imaging circle, the entire building can be photographed without tilting the camera, so that a non-distorted image can be photographed. However, the shift lens is very expensive and can only be used in digital single lens reflex.
Therefore, the existing method for shooting the photo or the video of the target object meeting the requirement of a certain direction has higher cost and cannot popularize the public users.
Content of application
The embodiment of the application aims to provide a shooting control method, a shooting control device and electronic equipment, which can solve the problems that in the prior art, a method for shooting a picture or a video of a target object meeting a certain direction requirement is high in cost and cannot be popularized to public users.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a shooting control method, including:
acquiring a rotation angle of electronic equipment displaying a shooting picture in a first plane as a target rotation angle, wherein the first plane is a plane where a screen of the electronic equipment is located;
under the condition that at least one of a first straight line and a second straight line is detected in the shooting picture, controlling a camera of the electronic equipment to rotate in the first plane according to a third rotation angle of a third straight line, so that an included angle between the third straight line and a target direction is smaller than or equal to a first preset threshold value;
the absolute value of the difference between the absolute value of a first rotation angle of the first straight line relative to a first preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, and the signs of the first rotation angle and the target rotation angle are opposite;
the absolute value of the difference between the absolute value of the second rotation angle of the second straight line relative to a second preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, the signs of the second rotation angle and the target rotation angle are opposite, and the second preset direction is perpendicular to the first preset direction;
the third straight line is one of the first straight line and the second straight line, when the third straight line is the first straight line, the third rotation angle is the first rotation angle, and the target direction is the first preset direction; and when the third straight line is the second straight line, the third rotation angle is the second rotation angle, and the target direction is the second preset direction.
In a second aspect, an embodiment of the present application provides a shooting control apparatus, including: the device comprises a rotation angle acquisition module, a display module and a display module, wherein the rotation angle acquisition module is used for acquiring a rotation angle of electronic equipment displaying a shooting picture in a first plane as a target rotation angle, and the first plane is a plane where a screen of the electronic equipment is located;
the first rotation module is used for controlling a camera of the electronic equipment to rotate in the first plane according to a third rotation angle of a third straight line under the condition that at least one of the first straight line and the second straight line is detected in the shot picture, so that an included angle between the third straight line and a target direction is smaller than or equal to a first preset threshold value;
the absolute value of the difference between the absolute value of a first rotation angle of the first straight line relative to a first preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, and the signs of the first rotation angle and the target rotation angle are opposite;
the absolute value of the difference between the absolute value of the second rotation angle of the second straight line relative to a second preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, the signs of the second rotation angle and the target rotation angle are opposite, and the second preset direction is perpendicular to the first preset direction;
the third straight line is one of the first straight line and the second straight line, when the third straight line is the first straight line, the third rotation angle is the first rotation angle, and the target direction is the first preset direction; and when the third straight line is the second straight line, the third rotation angle is the second rotation angle, and the target direction is the second preset direction.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, a rotation angle of an electronic device displaying a shot picture in a first plane where a screen of the electronic device is located can be obtained to serve as a target rotation angle, and then, when at least one of a first straight line and a second straight line is detected in the shot picture, a camera of the electronic device is controlled to rotate in the first plane according to a rotation direction of the first straight line or the second straight line, so that an included angle between the first straight line and the first preset direction is smaller than or equal to a first preset threshold, or an included angle between the second straight line and the first preset direction is smaller than or equal to the first preset threshold.
The absolute value of the difference between the first rotation angle of the first straight line relative to the first preset direction and the target rotation angle is smaller than or equal to a second preset threshold value, and the sign of the difference is opposite to that of the second preset threshold value, which indicates that the deflection of the first straight line relative to the first preset direction in the shooting picture is caused by the rotation of the electronic equipment; similarly, the absolute value of the difference between the second rotation angle of the second straight line relative to the second preset direction and the target rotation angle is smaller than or equal to a second preset threshold and has an opposite sign, which indicates that the deflection of the second straight line relative to the second preset direction in the shooting picture is caused by the rotation of the electronic device. Therefore, in the embodiment of the application, when at least one of the first straight line and the second straight line is detected in the captured image, the camera of the electronic device may be controlled to rotate to compensate the rotation angle of the electronic device, so that the first straight line in the captured image is parallel to the first preset direction as much as possible, or the second straight line in the captured image is parallel to the second preset direction as much as possible.
Therefore, when a picture or a video with a target object meeting the requirement of a certain direction is shot, whether the rotation angle of the electronic equipment enables the shot object to deviate from the expected direction or not can be automatically detected, so that compensation is performed through rotation of the camera, a user does not need to manually rotate the electronic equipment or perform post correction processing, and the user does not need to have professional shooting experience.
Drawings
Fig. 1 is a flowchart of a photographing control method in an embodiment of the present application;
fig. 2 is a flowchart of a specific implementation of a shooting control method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of the range of Lx and Ly;
FIG. 4 is a schematic diagram of the option L1;
fig. 5 is a schematic diagram showing changes in photographed images before and after the pan-tilt gyroscope is rotated;
fig. 6 is a block diagram showing the configuration of the photographing control apparatus in the embodiment of the present application;
FIG. 7 shows one of the block diagrams of an electronic device provided by an embodiment of the application;
fig. 8 shows a second block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, 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 terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
Referring to fig. 1, an embodiment of the present invention provides a photographing control method, which may include:
step 101: and acquiring the rotation angle of the electronic equipment displaying the shooting picture in the first plane as a target rotation angle.
The first plane is a plane where a screen of the electronic device is located. For example, when the electronic device is rotated clockwise by X degrees in the first plane, the target rotation angle is-X degrees, and when the electronic device is rotated counterclockwise by X degrees in the first plane, the target rotation angle is + X degrees.
In addition, optionally, step 101 may be executed when it is detected that the shot picture belongs to a preset scene. For example, when it is detected that the captured picture belongs to a building scene, a street view, or a beach scene, the rotation angle of the electronic device displaying the captured picture in the first plane is acquired as the target rotation angle.
Step 102: and under the condition that at least one of the first straight line and the second straight line is detected in the shooting picture, controlling a camera of the electronic equipment to rotate in the first plane according to a third rotation angle of a third straight line, so that an included angle between the third straight line and the target direction is smaller than or equal to a first preset threshold value.
The absolute value of the difference between the absolute value of a first rotation angle of the first straight line relative to a first preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, and the signs of the first rotation angle and the target rotation angle are opposite;
the absolute value of the difference between the absolute value of the second rotation angle of the second straight line relative to a second preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, the signs of the second rotation angle and the target rotation angle are opposite, and the second preset direction is perpendicular to the first preset direction;
the third straight line is one of the first straight line and the second straight line, when the third straight line is the first straight line, the third rotation angle is the first rotation angle, and the target direction is the first preset direction; and when the third straight line is the second straight line, the third rotation angle is the second rotation angle, and the target direction is the second preset direction.
Here, the first rotation angle of the first straight line with respect to the first preset direction is: the first straight line rotates in the shooting picture according to a first target angle and then rotates by a rotation angle parallel to the first preset direction, and the first target angle is an included angle between the first straight line and the first preset direction;
the second rotation angle of the second straight line relative to the second preset direction is: and the second straight line rotates in the shooting picture according to a second target angle and then rotates by a rotation angle parallel to the second preset direction, and the second target angle is an included angle between the second straight line and the second preset direction.
In addition, when the rotation direction is counterclockwise, the sign of the rotation angle is "positive"; when the rotation angle is clockwise, the sign of the rotation angle is "negative". Therefore, the target rotation angle, the first rotation angle, the second rotation angle, and the third rotation angle have a "positive" sign when the rotation direction is counterclockwise, and have a "negative" sign when the rotation direction is clockwise.
Further, optionally, the first preset threshold may be 0 °, and the second preset threshold may be 0 °.
As can be seen from the above description, in the embodiment of the present application, if only the first straight line is detected in the shooting picture, the camera is controlled to rotate in the first plane according to the first rotation angle of the first straight line, so that the included angle between the first straight line and the first preset direction is smaller than or equal to the first preset threshold, that is, the camera is controlled to rotate in the first plane, so that the first straight line is parallel to the first preset direction as much as possible.
If only the second straight line is detected in the shot picture, the camera is controlled to rotate in the first plane according to the second rotation angle of the second straight line, so that the included angle between the second straight line and the second preset direction is smaller than or equal to the first preset threshold value, namely, the camera is controlled to rotate in the first plane, so that the second straight line is parallel to the second preset direction as far as possible.
If the first straight line and the second straight line are detected in the shooting picture at the same time, selecting one straight line from the first straight line and the second straight line, and controlling the camera to rotate in the first plane according to the rotation angle of the selected straight line so that the included angle between the selected straight line and the direction corresponding to the selected straight line is smaller than or equal to a first preset threshold value.
In addition, if the included angle between the third straight line and the target direction is smaller than or equal to the first preset threshold, for example, the included angle is 0, then the rotation is not performed.
That is, when the third straight line is the first straight line, if the absolute value of the first rotation angle of the first straight line relative to the first preset direction is smaller than or equal to the first preset threshold, for example, the absolute value of the first rotation angle is 0, then the third straight line does not rotate; when the third straight line is the second straight line, if the absolute value of the second rotation angle of the second straight line relative to the second preset direction is smaller than or equal to the first preset threshold, for example, the absolute value of the second rotation angle is 0, the second straight line does not rotate.
The absolute value of the difference between the first rotation angle and the target rotation angle is smaller than or equal to a second preset threshold value, and the signs of the difference are opposite, which indicates that the deflection of the first straight line in the shooting picture relative to the first preset direction is caused by the rotation of the electronic equipment in the first plane; similarly, the absolute value of the difference between the second rotation angle and the target rotation angle is smaller than or equal to a second preset threshold and has opposite signs, which indicates that the deflection of the second straight line in the shooting picture relative to the second preset direction is caused by the rotation of the electronic device in the first plane. Therefore, in the embodiment of the application, when at least one of the first straight line and the second straight line is detected in the captured image, the camera of the electronic device may be controlled to rotate in the first plane to compensate for the rotation angle of the electronic device in the first plane, so that the first straight line in the captured image is parallel to the first preset direction as much as possible, or the second straight line in the captured image is parallel to the second preset direction as much as possible.
Therefore, when a photo or a video with a target object meeting a certain direction requirement is shot, whether the rotation angle of the electronic device can automatically detect whether the deviation of the shot object in the shot picture from the expected direction occurs or not (namely, whether the deviation of the shot object in the shot picture from the expected direction is caused by the rotation of the electronic device) can be detected, so that the compensation can be performed through the rotation of the camera, the user does not need to manually rotate the electronic device or perform the post correction processing, and the user does not need to have professional shooting experience.
Optionally, when the first straight line and the second straight line are detected in the shooting picture, the third straight line is one of the first straight line and the second straight line, which has the longest length.
Wherein, the direction of the longest straight line in first straight line and the second straight line can be more accurate the direction of representing the target object orientation of being shot, consequently selects the longest straight line in first straight line and the second straight line to according to the rotation angle of this straight line of electing, the control camera rotates, compensation electronic equipment's that can be more accurate rotation, and then further promote the shooting effect.
In addition, the first straight line includes a plurality of straight lines having an absolute value of a difference between a magnitude of the rotation angle with respect to the first preset direction and a magnitude of the target rotation angle smaller than or equal to a second preset threshold value and having opposite signs, and the second straight line includes a plurality of straight lines having an absolute value of a difference between a magnitude of the rotation angle with respect to the second preset direction and a magnitude of the target rotation angle smaller than or equal to the second preset threshold value and having opposite signs.
Optionally, the process of detecting the first straight line in the captured picture includes:
detecting a straight line in the shooting picture as a candidate straight line;
and selecting a straight line with an included angle with the first preset direction smaller than a third preset threshold value from the candidate straight lines to serve as the first straight line.
In the embodiment of the application, a hough transform method may be adopted to detect a straight line in a shot picture. The Hough Transform (Hough Transform) is a method for detecting simple geometric shapes such as straight lines and circles in image processing. The prototype of the hough transform is as follows:
void HoughLines(InputArray image,OutputArray lines,double rho,double theta,int threshold,double srn=0,double stn=0);
the input of the Hough transform is a binary contour image which is often a result image obtained by edge detection; the output is an array containing a plurality of Vec2f points, each element in the array being a binary floating point data pair < rou, theta >, rou representing the distance of the line from the origin of coordinates, theta representing the angle. Since the hough transform is actually an exhaustive algorithm, rho represents the step size of the distance and theta represents the step size of the angle.
Therefore, when the picture of the captured picture in step 101 is input using the prototype of the hough transform, a plurality of straight lines in the captured picture can be output.
In addition, according to the subject and the shooting habit in shooting, a type of photo which intentionally uses oblique lines to break the smoothness of the picture, such as diagonal line composition and vanishing line composition, needs to be removed. Namely, the embodiment of the application is only used for meeting the situation that the shot object deviates from the expected direction in the shot picture due to the fact that the common user is not stable in the handheld electronic equipment and does not have aesthetic awareness of shooting. Therefore, in the embodiment of the present application, after the straight lines in the captured picture are detected, straight lines with an inclination angle meeting a certain requirement (for example, an included angle between the straight lines and the first preset direction is required to be less than 10 degrees, that is, a rotation angle relative to the first preset direction is required to be within a range of negative 10 degrees and positive 10 degrees) need to be selected from the straight lines, so that the rotation of the electronic device is prevented from being compensated by using the camera in a scene of diagonal composition or vanishing line composition, that is, false capturing of the scene of diagonal composition and vanishing line composition is avoided.
Optionally, before selecting a straight line, of which an included angle with the first preset direction is smaller than a third preset threshold, from the candidate straight lines, to serve as the first straight line, the method further includes:
and eliminating straight lines with the length smaller than a first preset length from the candidate straight lines.
Therefore, in the embodiment of the application, after the candidate straight lines in the shooting picture are detected, the straight lines with the length smaller than the first preset length can be removed, so that the straight lines with the included angle with the first preset direction smaller than the third preset threshold value are selected from the remaining straight lines to be used as the first straight lines. That is, the candidate straight line whose length is greater than or equal to the first preset length and whose included angle with the first preset direction is smaller than the third preset threshold may be used as the first straight line.
The direction of the candidate straight line with the longer length can more accurately represent the direction of the shot target object, therefore, the candidate straight line with the length larger than or equal to the first preset length and the included angle with the first preset direction smaller than the third preset threshold value is selected as the first straight line, and when the camera is controlled to rotate according to the first rotating angle of the first straight line, the rotation of the electronic equipment can be more accurately compensated, and the shooting effect is further improved.
In addition, OpenCV provides a function HoughLinesP. OpenCV is a cross-platform computer vision and machine learning software library based on berkeley software suite (BSD) licensing. The HoughLinesP function is as follows:
void HoughLinesP(InputArray image,OutputArray lines,double rho,double theta,int threshold,double minLineLength=0,double maxLineGap=0);
the output of HoughLinesP is a Vector of Vec4 i. That is, each element of the Vector represents a straight line and is composed of a 4-element floating point array, one set of the first two points and one set of the last two points represent the starting point and the ending point of the straight line in the image. From this, it can be seen that the length of the candidate straight line detected in the above-described captured image can be calculated by using the HoughLinesP function.
Optionally, the process of detecting the second straight line in the shot picture includes:
detecting a straight line in the shooting picture as a candidate straight line;
and selecting a straight line with an included angle with the second preset direction smaller than a third preset threshold value from the candidate straight lines to serve as the second straight line.
Optionally, before selecting a straight line, of which an included angle with the second preset direction is smaller than a third preset threshold, from the candidate straight lines to serve as the second straight line, the method further includes:
and eliminating straight lines with the length smaller than a first preset length from the candidate straight lines.
Therefore, the process of detecting the second straight line in the shot picture is similar to the process of detecting the first straight line in the shot picture, and is not described in detail here.
Optionally, a pan-tilt gyroscope is arranged inside the electronic device, and the pan-tilt gyroscope is fixedly connected with the camera;
the controlling the camera of the electronic device to rotate in the first plane according to the third rotation angle of the third straight line includes:
and controlling the holder gyroscope to rotate in the first plane according to the third rotation angle.
And controlling the holder gyroscope to rotate according to a third rotation angle in the first plane, namely controlling the holder gyroscope to rotate according to the third rotation angle and the rotation direction of the third rotation angle in the first plane.
Therefore, in the embodiment of the application, the inside cloud platform gyroscope that is provided with of electronic equipment, and this cloud platform gyroscope and camera fixed connection, consequently, the rotation angle that cloud platform gyroscope can real-time detection electronic equipment, and cloud platform gyroscope still can drive the camera and rotate together to change and shoot the angle. Therefore, in the embodiment of the application, the camera can be driven to rotate according to the third rotation angle in the first plane through the holder gyroscope.
Optionally, before controlling the camera of the electronic device to rotate in the first plane according to the third rotation angle of the third straight line, the method further includes:
displaying the third straight line in the shooting picture;
executing a preset prompting operation, wherein the preset prompting operation is used for instructing a user to execute a preset operation on the third straight line displayed in the shooting picture;
the controlling the camera of the electronic device to rotate in the first plane according to the third rotation angle of the third straight line includes:
and under the condition of receiving the preset operation, controlling the camera to rotate in the first plane according to a third rotation angle of the third straight line.
Therefore, in the embodiment of the application, after the third straight line in the shooting picture is determined, the third straight line may be displayed in the shooting picture, and the user is prompted to perform a preset operation on the displayed third straight line so as to trigger the step of "controlling the camera of the electronic device to rotate in the first plane according to the third rotation angle of the third straight line". For example, after the third straight line is displayed, the user may be prompted to click on the third straight line, so as to trigger the change of the shooting angle of the camera, so that the third straight line is parallel to the target direction as much as possible.
Optionally, before the step of acquiring the rotation angle of the electronic device displaying the shooting picture in the first plane, the method further includes:
receiving an adjustment operation on a shooting angle;
and responding to the adjustment operation, and controlling the camera to rotate according to a fourth rotation angle indicated by the adjustment operation.
Therefore, in the embodiment of the present application, the shooting angle can be changed through the operation of the user before the step 101, so that the shooting at a specific angle is realized, more shooting modes are provided for the user, and further more shooting requirements can be met.
Optionally, the controlling the camera to rotate according to the fourth rotation angle indicated by the adjustment operation includes:
controlling the camera to rotate in a target plane according to the fourth rotation angle;
wherein the target plane is the first plane or a second plane perpendicular to the first plane;
when the target plane is the first plane, after the camera is controlled to rotate in the target plane according to the fourth rotation angle, the method further includes:
and respectively rotating the first preset direction and the second preset direction in the shooting picture according to the fourth rotation angle.
Therefore, the shooting at a specific angle that can be realized in the embodiment of the present application includes two cases of the camera rotating in the first plane and the camera rotating in the second plane, where the camera rotating in the first plane corresponds to: shooting in an inclined mode; the camera rotates in the second plane, and then corresponds to: and carrying out elevation angle or depression angle shooting.
When the camera rotates in the first plane, namely when the camera is obliquely shot, after the camera is controlled to rotate in the first plane according to the fourth rotation angle, the first preset direction and the second preset direction can be synchronously adjusted, so that the adjusted first preset direction and the adjusted second preset direction are matched with the changed shooting angle, and a user can shoot a picture or a video at a specific angle without rotating the electronic equipment.
In addition, when the camera rotates in the second plane, that is, when the camera performs the elevation angle or depression angle shooting, after the camera is controlled to rotate in the first plane according to the fourth rotation angle, the first preset direction and the second preset direction do not need to be synchronously adjusted, that is, the first preset direction and the second preset direction are kept unchanged.
Specifically, the following target scenes are exemplified as an application scene in which the shooting angle, the first preset direction and the second preset direction are rotated according to the fourth rotation angle:
for example, the first preset direction is a horizontal direction, the second preset direction is a vertical direction, and a pencil needs to be photographed in a certain photographing scene, but the pencil is placed at an angle of 45 degrees with the horizontal direction, at this time, a user may change the first preset direction to rotate the pencil counterclockwise by 45 degrees in a photographing picture, change the second preset direction to rotate the pencil counterclockwise by 45 degrees in the photographing picture, and control the camera to rotate counterclockwise by 45 degrees in the first plane to change a photographing angle of the camera, and then execute the step 101 and the step 102, so that a picture or a video of the pencil parallel to the horizontal direction in the photographing picture can be photographed without rotating the electronic device.
Optionally, after controlling the camera to rotate in the target plane according to the fourth rotation angle, the method further includes:
when the electronic equipment is detected to rotate and return in the direction opposite to the rotating direction of the fourth rotating angle in the target plane, controlling the camera to rotate in the target plane according to the magnitude of the fourth rotating angle and the direction opposite to the rotating direction of the fourth rotating angle;
wherein, when the target plane is the first plane, the method further comprises:
and under the condition that the electronic equipment is detected to rotate and recover along the direction opposite to the rotation direction of the fourth rotation angle in the target plane, respectively controlling the first preset direction and the second preset direction, and rotating according to the size of the fourth rotation angle and the direction opposite to the rotation direction of the fourth rotation angle in the shooting picture.
For example, after the shooting angle of the camera is fixed to be 45 degrees in the first plane in the counterclockwise direction in the horizontal direction, if the user rotates the handheld electronic device in the first plane in the counterclockwise direction (i.e., in the clockwise direction) at the first moment and then resumes the rotation in the video shooting process, the camera is controlled to rotate 45 degrees in the first plane in the clockwise direction from the current angle, the first preset direction is controlled to resume the horizontal direction, and the second preset direction is controlled to resume the vertical direction, so as to resume the shooting at the normal angle.
Or, in the process of controlling the camera to perform elevation shooting in other scenes, if the user rotates the handheld electronic device in the second plane in the opposite direction of the elevation at the first moment and then restores the angle, the camera is controlled to perform flat angle shooting, that is, shooting at a normal angle is restored.
Therefore, in the embodiment of the application, in the process of shooting at the specific angle, the user can also restore to the normal shooting angle by rotating the electronic equipment, and the operation process is simple and convenient.
Optionally, after the camera is controlled to rotate in the target plane according to the magnitude of the fourth rotation angle and a direction opposite to the rotation direction of the fourth rotation angle, the method further includes:
under the condition that the electronic equipment is detected to rotate and recover along the rotation direction of the fourth rotation angle in the target plane, controlling the camera to rotate according to the fourth rotation angle in the target plane;
wherein, when the target plane is the first plane, the method further comprises:
and under the condition that the electronic equipment is detected to rotate and recover along the rotation direction of the fourth rotation angle in the target plane, respectively controlling the first preset direction and the second preset direction, and rotating according to the fourth rotation angle in the shooting picture.
For example, after the first time in the target scene, the user rotates the handheld electronic device in the counterclockwise direction in the first plane at the second time and then resumes the rotation, the camera is controlled to rotate counterclockwise by 45 degrees in the first plane from the current angle, the first preset direction is controlled to resume the direction after rotating counterclockwise by 45 degrees in the horizontal direction, and the second preset direction is controlled to resume the direction after rotating counterclockwise by 45 degrees in the vertical direction, so as to resume the shooting at the specific angle.
Or, in the process of controlling the camera to shoot at the elevation angle in other scenes, if the user rotates the handheld electronic device in the second plane in the opposite direction of the elevation angle at the first moment and then restores, the camera is controlled to shoot at the flat angle; and then, if the user rotates the handheld electronic equipment in the second plane to the direction of the elevation angle at the second moment and recovers, controlling the camera to shoot the elevation angle again.
Therefore, in the embodiment of the application, after the shooting at the specific angle is performed, if the shooting is recovered to the normal shooting, the electronic device can be further rotated to enter the specific angle again for shooting, and the operation process is simple and convenient.
Optionally, before receiving the operation of adjusting the shooting angle, the method further includes:
displaying a preset indication mark in the shooting picture;
the receiving of the adjustment operation of the shooting angle comprises:
and receiving a dragging operation of the preset indication mark, wherein a rotation angle of the dragging operation is the fourth rotation angle.
Therefore, the preset indication mark can be displayed in the shooting picture, so that a user can modify the shooting angle by dragging the preset indication mark, wherein the rotating angle of the dragged preset indication mark is the fourth rotating angle which needs to be rotated to control the camera to shoot at a specific angle.
In addition, the specific camera rotates in the first plane or the second plane according to the fourth rotation angle, and the camera may default to rotate in one of the first plane or the second plane; the user can also select the first plane and the second plane by himself, for example, options of the first plane and the second plane are provided in the photographing setting interface, so that the user can select the first plane and the second plane by himself.
Optionally, the receiving an operation of adjusting a shooting angle includes:
receiving an operation of inputting the fourth rotation angle in the electronic device as the adjustment operation.
Therefore, the user can input a specific rotation angle in the electronic equipment to control the camera to shoot at a specific angle. Here, the rotation angle input by the user includes an angle size and a rotation direction.
As described above, the specific implementation of the shooting control method according to the embodiment of the present application can be as shown in fig. 2, which is described in detail below.
Step 201: using AI scene recognition technology, it is recognized whether the current shooting scene is a building, a street view, or a beach, if yes, step 202 is executed.
Step 202: straight lines in the captured picture are detected as candidate straight lines.
Step 203: selecting a straight line Lx and a straight line Ly from the candidate straight lines, and recording a first rotation angle of the Lx relative to the horizontal direction and a second rotation angle of the Ly relative to the vertical direction;
among the candidate straight lines, a straight line which forms an included angle with the horizontal direction of less than 10 degrees and has a length of more than or equal to one half of the length of the X axis in the shooting picture is marked as Lx; the straight line which has an included angle with the vertical direction smaller than 10 degrees and has the length larger than or equal to one half of the length of the Y axis in the shooting picture is marked as Ly;
in addition, the range of the first rotation angle of Lx with respect to the horizontal direction, and the range of the second rotation angle of Ly with respect to the vertical direction may be as shown in fig. 3;
step 204: a holder gyroscope arranged in the electronic equipment judges the rotation angle of the electronic equipment in a first plane where a screen of the electronic equipment is located, and the rotation angle is recorded as a target rotation angle;
step 205: comparing the target rotation angle with the first rotation angle and the second rotation angle, selecting L1, and displaying L1 as a yellow straight line in the shooting picture, wherein the yellow straight line is named L2;
selecting a rotation angle with the same size and opposite sign as the target rotation angle from the first rotation angle and the second rotation angle, and if the rotation angle and the second rotation angle are both the same size and opposite sign as the target rotation angle, selecting one of Lx and Ly with longer length as L1; if one of the first rotation angle and the second rotation angle is equal to the target rotation angle in magnitude and opposite in sign, the straight line to which the rotation angle belongs is L1;
here, if the angle of L1 is zero, the flow ends;
for example, if the rotation angle of the electronic device with respect to the horizontal direction on the photographing screen Lx shown in fig. 4 is-3 °, the target rotation angle of the electronic device is +3 °, the Lx is named L1, and L2 is displayed on the photographing screen;
step 206: displaying a prompt on the shooting picture to prompt the user to click the straight line L2;
step 207: after the user clicks the L2, the pan-tilt gyroscope rotates, wherein the angle at which the user can see that the image is taken changes in the image taken, i.e., the straight line L2 rotates to 0 °. Wherein, the change of the shooting picture before and after the rotation of the tripod head gyroscope is shown in fig. 5.
Thereafter, step 208 may be performed;
step 208: and clicking to take a picture.
Therefore, by using the shooting control method provided by the embodiment of the application, a user can shoot a horizontal and vertical picture by lightly clicking the shooting key without moving the electronic equipment and only maintaining the original shooting posture.
Before the step 203, the following step H1 may be further included:
step H1: dragging the crossed straight line displayed in the shooting picture by a user to rotate, and displaying the real-time angle in the picture; the user can continue to rotate to a required angle or directly input the required angle into the electronic equipment, the shooting angle of the picture is fixed (for example, inclined shooting, elevation shooting or depression shooting) according to the requirement of the user, and the shooting angle of the picture can be anchored through automatic adjustment of a tripod head gyroscope and recorded as special angle shooting;
if the step H1 is present before the step 203, after the step 207, the following step H2 may be further included:
step H2: in the video shooting process, if the user holds the electronic equipment to rotate in the opposite direction of a specific angle at the first moment and then recovers, the normal shooting is recovered; after the normal shooting is resumed, if the user rotates the handheld electronic device in the direction of the specific angle at the second moment and then resumes, the easy-specific-angle shooting is continued.
Therefore, the shooting control method of the embodiment of the application can realize the shooting method for assisting the user in quickly shooting the horizontal and vertical picture, and has the advantages that the angle calculation of the straight line recognition of the image algorithm and the rotation angle detection of the electronic equipment by the pan-tilt gyroscope are combined, wherein the correlation is that when the angle of a certain straight line Lx or Ly is recognized to be capable of offsetting with the rotation angle of the electronic equipment, a horizontal or vertical picture of a certain line can be shot through the rotation of the electronic equipment, and therefore the non-horizontal or non-vertical line in the shot picture is rotated to be horizontal, vertical or to a specific inclination angle through the rotation of the pan-tilt gyroscope.
In addition, according to the embodiment of the application, a picture which is horizontal, vertical or at a specific inclination angle can be obtained when the electronic equipment only can be shot at a certain angle.
It should be noted that, in the shooting control method provided in the embodiment of the present application, the execution subject may be the shooting control apparatus or, or a control module in the shooting control apparatus for executing the method of loading shooting control. In the embodiment of the present application, a method for executing loading shooting control by a shooting control apparatus is taken as an example, and a shooting control method provided in the embodiment of the present application is described.
Referring to fig. 6, an embodiment of the present invention provides a photographing control apparatus, and the photographing control apparatus 600 may include the following modules:
a rotation angle obtaining module 601, configured to obtain a rotation angle of an electronic device displaying a shooting picture in a first plane as a target rotation angle, where the first plane is a plane where a screen of the electronic device is located;
a first rotation module 602, configured to, when at least one of a first straight line and a second straight line is detected in the captured picture, control a camera of the electronic device to rotate in the first plane according to a third rotation angle of a third straight line, so that an included angle between the third straight line and a target direction is smaller than or equal to a first preset threshold;
the absolute value of the difference between the absolute value of a first rotation angle of the first straight line relative to a first preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, and the signs of the first rotation angle and the target rotation angle are opposite;
the absolute value of the difference between the absolute value of the second rotation angle of the second straight line relative to a second preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, the signs of the second rotation angle and the target rotation angle are opposite, and the second preset direction is perpendicular to the first preset direction;
the third straight line is one of the first straight line and the second straight line, when the third straight line is the first straight line, the third rotation angle is the first rotation angle, and the target direction is the first preset direction; and when the third straight line is the second straight line, the third rotation angle is the second rotation angle, and the target direction is the second preset direction.
Optionally, when the first straight line and the second straight line are detected in the shooting picture, the third straight line is one of the first straight line and the second straight line, which has the longest length.
Optionally, the apparatus further includes a detecting module 603, configured to detect the first line in the captured picture;
the detection module 603 is specifically configured to:
detecting a straight line in the shooting picture as a candidate straight line;
and selecting a straight line with an included angle with the first preset direction smaller than a third preset threshold value from the candidate straight lines to serve as the first straight line.
Optionally, the apparatus further comprises:
a removing module 604, configured to remove, from the candidate straight lines, a straight line with a length smaller than a first preset length.
Optionally, a pan-tilt gyroscope is arranged inside the electronic device, and the pan-tilt gyroscope is fixedly connected with the camera;
the first rotation module 602 is specifically configured to:
and controlling the holder gyroscope to rotate in the first plane according to the third rotation angle.
Optionally, the apparatus further comprises:
a first display module 605, configured to display the third straight line in the shooting picture;
a prompt module 606, configured to execute a preset prompt operation, where the preset prompt operation is used to instruct a user to execute a preset operation on the third straight line displayed in the shooting picture;
the first rotation module 602 is specifically configured to:
and under the condition of receiving the preset operation, controlling the camera to rotate in the first plane according to a third rotation angle of the third straight line.
Optionally, the apparatus further comprises:
an operation receiving module 607 for receiving an adjustment operation of a shooting angle;
a second rotation module 608, configured to, in response to the adjustment operation, control the camera to rotate according to a fourth rotation angle indicated by the adjustment operation.
Optionally, the second rotation module 608 is specifically configured to:
controlling the camera to rotate in a target plane according to the fourth rotation angle;
wherein the target plane is the first plane or a second plane perpendicular to the first plane;
when the target plane is the first plane, the apparatus further includes:
a third rotating module 609, configured to rotate the first preset direction and the second preset direction in the shooting picture according to the fourth rotation angle, respectively.
Optionally, the apparatus further comprises:
a fourth rotation module 610, configured to, when it is detected that the electronic device rotates and recovers in the direction opposite to the rotation direction of the fourth rotation angle in the target plane, control the camera to rotate in the target plane according to the magnitude of the fourth rotation angle and the direction opposite to the rotation direction of the fourth rotation angle;
wherein, when the target plane is the first plane, the fourth selecting module 610 is further configured to:
and under the condition that the electronic equipment is detected to rotate and recover along the direction opposite to the rotation direction of the fourth rotation angle in the target plane, respectively controlling the first preset direction and the second preset direction, and rotating according to the size of the fourth rotation angle and the direction opposite to the rotation direction of the fourth rotation angle in the shooting picture.
Optionally, the apparatus further comprises:
a fifth rotation module 611, configured to control the camera to rotate according to the fourth rotation angle in the target plane when it is detected that the electronic device rotates and recovers in the rotation direction of the fourth rotation angle in the target plane;
wherein, when the target plane is the first plane, the fifth rotating module 611 is further configured to:
and under the condition that the electronic equipment is detected to rotate and recover along the rotation direction of the fourth rotation angle in the target plane, respectively controlling the first preset direction and the second preset direction, and rotating according to the fourth rotation angle in the shooting picture.
Optionally, the apparatus further comprises:
a second display module 612, configured to display a preset indication identifier in the shooting picture;
the operation receiving module 607 is specifically configured to:
and receiving a dragging operation of the preset indication mark, wherein a rotation angle of the dragging operation is the fourth rotation angle.
Optionally, the operation receiving module 607 is specifically configured to:
receiving an operation of inputting the fourth rotation angle in the electronic device as the adjustment operation.
As can be seen from the above description, the photographing control apparatus 600 according to the embodiment of the present application can acquire the rotation angle of the electronic device displaying the photographed image in the first plane where the screen is located, as the target rotation angle, and then control the camera of the electronic device to rotate in the first plane according to the rotation direction of the first straight line or the second straight line when at least one of the first straight line and the second straight line is detected in the photographed image, so that the included angle between the first straight line and the first preset direction is smaller than or equal to the first preset threshold, or the included angle between the second straight line and the first preset direction is smaller than or equal to the first preset threshold.
The absolute value of the difference between the first rotation angle of the first straight line relative to the first preset direction and the target rotation angle is smaller than or equal to a second preset threshold value, and the sign of the difference is opposite to that of the second preset threshold value, which indicates that the deflection of the first straight line relative to the first preset direction in the shooting picture is caused by the rotation of the electronic equipment; similarly, the absolute value of the difference between the second rotation angle of the second straight line relative to the second preset direction and the target rotation angle is smaller than or equal to a second preset threshold and has an opposite sign, which indicates that the deflection of the second straight line relative to the second preset direction in the shooting picture is caused by the rotation of the electronic device. Therefore, in the case that at least one of the first straight line and the second straight line is detected in the shooting picture, the shooting control apparatus 600 according to the embodiment of the present application may control the camera of the electronic device to rotate so as to compensate the rotation angle of the electronic device, so that the first straight line in the shooting picture is parallel to the first preset direction as much as possible, or the second straight line in the shooting picture is parallel to the second preset direction as much as possible.
Therefore, when a picture or a video with a target object meeting a certain direction requirement is taken, the shooting control device 600 of the embodiment of the application can automatically detect whether the rotation angle of the electronic device makes the deviation between the shot object and an expected direction, so that the compensation is performed through the rotation of the camera, the user does not need to manually rotate the electronic device or perform post correction processing, and the user does not need to have professional shooting experience.
The shooting control device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The photographing control apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The shooting control device provided in the embodiment of the present application can implement each process implemented in the method embodiment of fig. 1, and is not described here again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in this embodiment of the present application, and includes a processor 701, a memory 702, and a program or an instruction stored in the memory 702 and executable on the processor 701, where the program or the instruction is executed by the processor 701 to implement each process of the foregoing shooting control method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810.
Those skilled in the art will appreciate that the electronic device 800 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 810 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 810 is configured to acquire a rotation angle of an electronic device displaying a shooting picture in a first plane, where the rotation angle is used as a target rotation angle, so that when at least one of a first straight line and a second straight line is detected in the shooting picture, a camera of the electronic device is controlled to rotate in the first plane according to a third rotation angle of a third straight line, so that an included angle between the third straight line and a target direction is smaller than or equal to a first preset threshold;
the first plane is a plane where a screen of the electronic equipment is located;
the absolute value of the difference between the absolute value of a first rotation angle of the first straight line relative to a first preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, and the signs of the first rotation angle and the target rotation angle are opposite;
the absolute value of the difference between the absolute value of the second rotation angle of the second straight line relative to a second preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, the signs of the second rotation angle and the target rotation angle are opposite, and the second preset direction is perpendicular to the first preset direction;
the third straight line is one of the first straight line and the second straight line, when the third straight line is the first straight line, the third rotation angle is the first rotation angle, and the target direction is the first preset direction; and when the third straight line is the second straight line, the third rotation angle is the second rotation angle, and the target direction is the second preset direction.
Therefore, the electronic device 800 according to the embodiment of the present application can acquire the rotation angle of the electronic device displaying the captured image in the first plane where the screen is located as the target rotation angle, and then, when at least one of the first straight line and the second straight line is detected in the captured image, control the camera of the electronic device to rotate in the first plane according to the rotation direction of the first straight line or the second straight line, so that the included angle between the first straight line and the first preset direction is smaller than or equal to the first preset threshold, or the included angle between the second straight line and the first preset direction is smaller than or equal to the first preset threshold.
The absolute value of the difference between the first rotation angle of the first straight line relative to the first preset direction and the target rotation angle is smaller than or equal to a second preset threshold value, and the sign of the difference is opposite to that of the second preset threshold value, which indicates that the deflection of the first straight line relative to the first preset direction in the shooting picture is caused by the rotation of the electronic equipment; similarly, the absolute value of the difference between the second rotation angle of the second straight line relative to the second preset direction and the target rotation angle is smaller than or equal to a second preset threshold and has an opposite sign, which indicates that the deflection of the second straight line relative to the second preset direction in the shooting picture is caused by the rotation of the electronic device. Therefore, in the electronic device 800 according to the embodiment of the present application, when at least one of the first straight line and the second straight line is detected in the captured image, the camera of the electronic device may be controlled to rotate to compensate the rotation angle of the electronic device, so that the first straight line in the captured image is parallel to the first preset direction as much as possible, or the second straight line in the captured image is parallel to the second preset direction as much as possible.
Therefore, when the electronic device 800 in the embodiment of the application shoots a picture or a video with a target object meeting a certain direction requirement, whether the rotation angle of the electronic device can automatically detect whether the shot object deviates from an expected direction or not can be detected, so that compensation is performed through rotation of the camera without manually rotating the electronic device or performing post correction processing by a user, and without the user having professional shooting experience, therefore, the shooting control method in the embodiment of the application has low cost and can be popularized to public users.
Optionally, when the first straight line and the second straight line are detected in the shooting picture, the third straight line is one of the first straight line and the second straight line, which has the longest length.
Optionally, the process of detecting the first straight line in the captured picture by the processor 810 includes:
detecting a straight line in the shooting picture as a candidate straight line;
and selecting a straight line with an included angle with the first preset direction smaller than a third preset threshold value from the candidate straight lines to serve as the first straight line.
Optionally, the processor 810 selects, from the candidate straight lines, a straight line having an included angle with the first preset direction smaller than a third preset threshold, to be used as the first straight line, and is further configured to:
and eliminating straight lines with the length smaller than a first preset length from the candidate straight lines.
Optionally, a pan-tilt gyroscope is arranged inside the electronic device, and the pan-tilt gyroscope is fixedly connected with the camera;
the processor 810, when controlling the camera of the electronic device to rotate in the first plane according to a third rotation angle of a third straight line, is specifically configured to:
and controlling the holder gyroscope to rotate in the first plane according to the third rotation angle.
Optionally, before the processor 810 controls the camera of the electronic device to rotate in the first plane according to a third rotation angle of a third straight line, the display unit 806 is configured to:
displaying the third straight line in the shooting picture;
the processor 810 is further configured to execute a preset prompting operation, where the preset prompting operation is used to instruct a user to execute a preset operation on the third straight line displayed in the shooting picture;
when the processor 810 controls the camera of the electronic device to rotate in the first plane according to a third rotation angle of a third straight line, specifically, the processor is configured to:
in a case where the user input unit 807 receives the preset operation, the trigger processor 810 controls the camera to rotate within the first plane according to a third rotation angle of the third straight line.
Optionally, the processor 810 is configured to obtain a rotation angle of the electronic device displaying the shooting picture in the first plane, and the user input unit 807 is further configured to: receiving an adjustment operation on a shooting angle;
the processor 810 is configured to control the camera to rotate according to a fourth rotation angle indicated by the adjustment operation in response to the adjustment operation.
Optionally, when the processor 810 controls the camera to rotate according to the fourth rotation angle indicated by the adjustment operation, the processor is specifically configured to:
controlling the camera to rotate in a target plane according to the fourth rotation angle;
wherein the target plane is the first plane or a second plane perpendicular to the first plane;
when the target plane is the first plane, the processor 810, according to the fourth rotation angle, after controlling the camera to rotate in the target plane, is further configured to:
and respectively rotating the first preset direction and the second preset direction in the shooting picture according to the fourth rotation angle.
Optionally, after controlling the camera to rotate in the target plane according to the fourth rotation angle, the processor 810 is further configured to:
when the electronic equipment is detected to rotate and return in the direction opposite to the rotating direction of the fourth rotating angle in the target plane, controlling the camera to rotate in the target plane according to the magnitude of the fourth rotating angle and the direction opposite to the rotating direction of the fourth rotating angle;
wherein, when the target plane is the first plane, the method further comprises:
and under the condition that the electronic equipment is detected to rotate and recover along the direction opposite to the rotation direction of the fourth rotation angle in the target plane, respectively controlling the first preset direction and the second preset direction, and rotating according to the size of the fourth rotation angle and the direction opposite to the rotation direction of the fourth rotation angle in the shooting picture.
Optionally, after the processor 810 controls the camera to rotate in the target plane according to the magnitude of the fourth rotation angle and the direction opposite to the rotation direction of the fourth rotation angle, the processor is further configured to:
under the condition that the electronic equipment is detected to rotate and recover along the rotation direction of the fourth rotation angle in the target plane, controlling the camera to rotate according to the fourth rotation angle in the target plane;
wherein, when the target plane is the first plane, the method further comprises:
and under the condition that the electronic equipment is detected to rotate and recover along the rotation direction of the fourth rotation angle in the target plane, respectively controlling the first preset direction and the second preset direction, and rotating according to the fourth rotation angle in the shooting picture.
Optionally, before the user input unit 803 receives the adjustment operation on the shooting angle, it is further configured to:
displaying a preset indication mark in the shooting picture;
when the user input unit 807 receives an operation of adjusting a shooting angle, the user input unit is specifically configured to:
and receiving a dragging operation of the preset indication mark, wherein a rotation angle of the dragging operation is the fourth rotation angle.
Optionally, when the user input unit 807 receives an operation of adjusting a shooting angle, the user input unit is specifically configured to:
receiving an operation of inputting the fourth rotation angle in the electronic device as the adjustment operation.
It should be understood that in the embodiment of the present application, the input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics Processing Unit 8041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes a touch panel 8071 and other input devices 8072. A touch panel 8071, also referred to as a touch screen. The touch panel 8071 may include two portions of a touch detection device and a touch controller. Other input devices 8072 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. The memory 809 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. The processor 810 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 processor 810.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned shooting control method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above-mentioned embodiment of the shooting control method, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
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. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
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 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 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 (15)

1. A shooting control method, characterized by comprising:
acquiring a rotation angle of electronic equipment displaying a shooting picture in a first plane as a target rotation angle, wherein the first plane is a plane where a screen of the electronic equipment is located;
under the condition that at least one of a first straight line and a second straight line is detected in the shooting picture, controlling a camera of the electronic equipment to rotate in the first plane according to a third rotation angle of a third straight line, so that an included angle between the third straight line and a target direction is smaller than or equal to a first preset threshold value;
the absolute value of the difference between the absolute value of a first rotation angle of the first straight line relative to a first preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, and the signs of the first rotation angle and the target rotation angle are opposite;
the absolute value of the difference between the absolute value of the second rotation angle of the second straight line relative to a second preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, the signs of the second rotation angle and the target rotation angle are opposite, and the second preset direction is perpendicular to the first preset direction;
the third straight line is one of the first straight line and the second straight line, when the third straight line is the first straight line, the third rotation angle is the first rotation angle, and the target direction is the first preset direction; and when the third straight line is the second straight line, the third rotation angle is the second rotation angle, and the target direction is the second preset direction.
2. The shooting control method according to claim 1, wherein, when the first straight line and the second straight line are detected in the shooting screen, the third straight line is one of the first straight line and the second straight line that has the longest length.
3. The shooting control method according to claim 1, wherein the process of detecting the first straight line in the shooting picture includes:
detecting a straight line in the shooting picture as a candidate straight line;
and selecting a straight line with an included angle with the first preset direction smaller than a third preset threshold value from the candidate straight lines to serve as the first straight line.
4. The shooting control method according to claim 3, wherein before the selecting, as the first straight line, a straight line having an angle smaller than a third preset threshold with respect to the first preset direction from the candidate straight lines, the method further comprises:
and eliminating straight lines with the length smaller than a first preset length from the candidate straight lines.
5. The shooting control method according to claim 1, wherein a pan-tilt gyroscope is arranged inside the electronic device, and the pan-tilt gyroscope is fixedly connected with the camera;
the controlling the camera of the electronic device to rotate in the first plane according to the third rotation angle of the third straight line includes:
and controlling the holder gyroscope to rotate in the first plane according to the third rotation angle.
6. The shooting control method according to claim 1, wherein before controlling the camera of the electronic apparatus to rotate in the first plane according to a third rotation angle of a third straight line, the method further comprises:
displaying the third straight line in the shooting picture;
executing a preset prompting operation, wherein the preset prompting operation is used for instructing a user to execute a preset operation on the third straight line displayed in the shooting picture;
the controlling the camera of the electronic device to rotate in the first plane according to the third rotation angle of the third straight line includes:
and under the condition of receiving the preset operation, controlling the camera to rotate in the first plane according to a third rotation angle of the third straight line.
7. The shooting control method according to claim 1, wherein the method further comprises, before the electronic device that displays the shooting picture is rotated by the angle in the first plane:
receiving an adjustment operation on a shooting angle;
and responding to the adjustment operation, and controlling the camera to rotate according to a fourth rotation angle indicated by the adjustment operation.
8. The shooting control method according to claim 7, wherein the controlling the camera to rotate according to a fourth rotation angle instructed by the adjustment operation includes:
controlling the camera to rotate in a target plane according to the fourth rotation angle;
wherein the target plane is the first plane or a second plane perpendicular to the first plane;
when the target plane is the first plane, after the camera is controlled to rotate in the target plane according to the fourth rotation angle, the method further includes:
and respectively rotating the first preset direction and the second preset direction in the shooting picture according to the fourth rotation angle.
9. The shooting control method according to claim 8, wherein after controlling the camera to rotate within a target plane according to the fourth rotation angle, the method further comprises:
when the electronic equipment is detected to rotate and return in the direction opposite to the rotating direction of the fourth rotating angle in the target plane, controlling the camera to rotate in the target plane according to the magnitude of the fourth rotating angle and the direction opposite to the rotating direction of the fourth rotating angle;
wherein, when the target plane is the first plane, the method further comprises:
and under the condition that the electronic equipment is detected to rotate and recover along the direction opposite to the rotation direction of the fourth rotation angle in the target plane, respectively controlling the first preset direction and the second preset direction, and rotating according to the size of the fourth rotation angle and the direction opposite to the rotation direction of the fourth rotation angle in the shooting picture.
10. The shooting control method according to claim 9, wherein after controlling the camera to rotate in a direction opposite to a magnitude of the fourth rotation angle and a rotation direction of the fourth rotation angle within the target plane, the method further comprises:
under the condition that the electronic equipment is detected to rotate and recover along the rotation direction of the fourth rotation angle in the target plane, controlling the camera to rotate according to the fourth rotation angle in the target plane;
wherein, when the target plane is the first plane, the method further comprises:
and under the condition that the electronic equipment is detected to rotate and recover along the rotation direction of the fourth rotation angle in the target plane, respectively controlling the first preset direction and the second preset direction, and rotating according to the fourth rotation angle in the shooting picture.
11. The shooting control method according to claim 7, wherein before the receiving of the adjustment operation of the shooting angle, the method further comprises:
displaying a preset indication mark in the shooting picture;
the receiving of the adjustment operation of the shooting angle comprises:
and receiving a dragging operation of the preset indication mark, wherein a rotation angle of the dragging operation is the fourth rotation angle.
12. The shooting control method according to claim 7, wherein the receiving of the adjustment operation of the shooting angle includes:
receiving an operation of inputting the fourth rotation angle in the electronic device as the adjustment operation.
13. A shooting control apparatus, characterized in that the apparatus comprises: the device comprises a rotation angle acquisition module, a display module and a display module, wherein the rotation angle acquisition module is used for acquiring a rotation angle of electronic equipment displaying a shooting picture in a first plane as a target rotation angle, and the first plane is a plane where a screen of the electronic equipment is located;
the first rotation module is used for controlling a camera of the electronic equipment to rotate in the first plane according to a third rotation angle of a third straight line under the condition that at least one of the first straight line and the second straight line is detected in the shot picture, so that an included angle between the third straight line and a target direction is smaller than or equal to a first preset threshold value;
the absolute value of the difference between the absolute value of a first rotation angle of the first straight line relative to a first preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, and the signs of the first rotation angle and the target rotation angle are opposite;
the absolute value of the difference between the absolute value of the second rotation angle of the second straight line relative to a second preset direction and the absolute value of the target rotation angle is smaller than or equal to a second preset threshold, the signs of the second rotation angle and the target rotation angle are opposite, and the second preset direction is perpendicular to the first preset direction;
the third straight line is one of the first straight line and the second straight line, when the third straight line is the first straight line, the third rotation angle is the first rotation angle, and the target direction is the first preset direction; and when the third straight line is the second straight line, the third rotation angle is the second rotation angle, and the target direction is the second preset direction.
14. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the photographing control method according to any one of claims 1 to 12.
15. A readable storage medium, characterized in that a program or instructions is stored thereon, which when executed by a processor, implements the steps of the photographing control method according to any one of claims 1 to 12.
CN202011522758.3A 2020-12-21 2020-12-21 Shooting control method and device and electronic equipment Active CN112637497B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011522758.3A CN112637497B (en) 2020-12-21 2020-12-21 Shooting control method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011522758.3A CN112637497B (en) 2020-12-21 2020-12-21 Shooting control method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112637497A CN112637497A (en) 2021-04-09
CN112637497B true CN112637497B (en) 2022-04-01

Family

ID=75320438

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011522758.3A Active CN112637497B (en) 2020-12-21 2020-12-21 Shooting control method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112637497B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114143462A (en) * 2021-11-30 2022-03-04 维沃移动通信有限公司 Shooting method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105007410A (en) * 2015-06-30 2015-10-28 广东欧珀移动通信有限公司 Large viewing angle camera control method and user terminal
CN108476288A (en) * 2017-05-24 2018-08-31 深圳市大疆创新科技有限公司 Filming control method and device
CN110099219A (en) * 2019-06-13 2019-08-06 Oppo广东移动通信有限公司 Panorama shooting method and Related product
CN110401799A (en) * 2019-08-02 2019-11-01 睿魔智能科技(深圳)有限公司 A kind of auto-tracking shooting method and system
CN111669462A (en) * 2020-05-30 2020-09-15 华为技术有限公司 Method and related device for displaying image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201404133A (en) * 2012-07-09 2014-01-16 Wistron Corp Automatic photographing device and method
CN106293303A (en) * 2015-05-12 2017-01-04 中兴通讯股份有限公司 The spinning solution of terminal screen display picture and device
CN107466385B (en) * 2016-08-03 2021-06-01 深圳市大疆灵眸科技有限公司 Cloud deck control method and system
CN109582264B (en) * 2018-11-19 2022-02-01 维沃移动通信有限公司 Image display method and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105007410A (en) * 2015-06-30 2015-10-28 广东欧珀移动通信有限公司 Large viewing angle camera control method and user terminal
CN108476288A (en) * 2017-05-24 2018-08-31 深圳市大疆创新科技有限公司 Filming control method and device
CN110099219A (en) * 2019-06-13 2019-08-06 Oppo广东移动通信有限公司 Panorama shooting method and Related product
CN110401799A (en) * 2019-08-02 2019-11-01 睿魔智能科技(深圳)有限公司 A kind of auto-tracking shooting method and system
CN111669462A (en) * 2020-05-30 2020-09-15 华为技术有限公司 Method and related device for displaying image

Also Published As

Publication number Publication date
CN112637497A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
WO2019134516A1 (en) Method and device for generating panoramic image, storage medium, and electronic apparatus
WO2017088678A1 (en) Long-exposure panoramic image shooting apparatus and method
US9807299B2 (en) Image capture methods and systems with positioning and angling assistance
CN102207674A (en) Panorama image shooting apparatus and method
CN112637500B (en) Image processing method and device
US20230370720A1 (en) Focusing method and apparatus, electronic device, and medium
WO2022022633A1 (en) Image display method and apparatus, and electronic device
CN113329172B (en) Shooting method and device and electronic equipment
CN112261294B (en) Shooting method and device and electronic equipment
CN112653843A (en) Shooting method and device based on holder and electronic equipment
CN113473004A (en) Shooting method and device
CN112040126A (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN112637497B (en) Shooting control method and device and electronic equipment
CN114125179B (en) Shooting method and device
CN113055606B (en) Shooting method and device and electronic equipment
CN111654623B (en) Photographing method and device and electronic equipment
CN112399092A (en) Shooting method and device and electronic equipment
CN112672057A (en) Shooting method and device
CN112672059B (en) Shooting method and shooting device
CN114339029B (en) Shooting method and device and electronic equipment
CN114222069B (en) Shooting method, shooting device and electronic equipment
CN113891005B (en) Shooting method and device and electronic equipment
CN112492213B (en) Image shooting method and device and electronic equipment
CN117479003A (en) Processing method and electronic equipment
CN115118879A (en) Image shooting and displaying method and device, electronic equipment and readable storage medium

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