CN112272267A - Shooting control method, shooting control device and electronic equipment - Google Patents

Shooting control method, shooting control device and electronic equipment Download PDF

Info

Publication number
CN112272267A
CN112272267A CN202011144425.1A CN202011144425A CN112272267A CN 112272267 A CN112272267 A CN 112272267A CN 202011144425 A CN202011144425 A CN 202011144425A CN 112272267 A CN112272267 A CN 112272267A
Authority
CN
China
Prior art keywords
camera
image
rotate
angle
shot
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.)
Pending
Application number
CN202011144425.1A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011144425.1A priority Critical patent/CN112272267A/en
Publication of CN112272267A publication Critical patent/CN112272267A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/50Constructional details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • 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/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects

Landscapes

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

Abstract

The invention provides a shooting control method, which comprises the following steps: acquiring an image shot by a camera in the process of shooting the image by the camera; and when the camera is determined to be controlled to rotate according to the image shot by the camera, controlling a driving assembly to drive the camera to rotate. The invention also provides a shooting control device and electronic equipment. According to the invention, whether the camera needs to rotate is analyzed and determined according to the image shot by the camera, so that when the shot object shot at present is a plane object which is not vertical to the optical axis of the camera, for example, the camera can be controlled to rotate to enable the plane object to be vertical or nearly vertical to the optical axis of the camera, and thus, the shooting effect is improved; the important target objects can be captured timely and clearly, and wonderful images can be shot.

Description

Shooting control method, shooting control device and electronic equipment
Technical Field
The present invention relates to the field of shooting technologies, and in particular, to a shooting control method, a shooting control apparatus, and an electronic device using the method.
Background
At present, with the progress of technology, the photographing effect of mobile phones, cameras and other photographing equipment is better and better. The images captured by mobile phones, cameras and other photographing equipment during photographing are generally front-end scenes/objects of cameras contained in the camera circular window angle extending outwards, and scenes in various positions in the window angle can be imaged according to the angle formed by the actual scene and the optical axis of the cameras. However, when the object to be photographed deviates from the optical axis of the camera rather than being perpendicular to the optical axis, local distortion of the image is often caused to a greater or lesser extent, and particularly, when an existing camera is used for photographing a planar scene/object which is not perpendicular to the optical axis of the camera, the obtained picture may have local depth due to the actual angle between the scene at different positions of the photographed plane and the optical axis of the camera, which is not beneficial to identifying details of the planar scene. For example: when the mobile phone is used for scanning the code, when the mobile phone camera cannot be over against the two-dimensional code due to objective reasons, the two-dimensional code imaged at the moment can not be recognized due to the fact that local image depth exists, and user experience is influenced.
Disclosure of Invention
The present invention provides a shooting control method, a shooting control device and an electronic apparatus applying the method, so as to solve the above problems.
In order to solve the technical problem, in one aspect, an electronic device is provided, which includes a camera, a driving assembly, and a processor. The camera is used for shooting images; the driving assembly is connected with the camera; the processor is connected with the camera and the driving component and used for acquiring images shot by the camera in the process of shooting the images by the camera and controlling the driving component to drive the camera to rotate when the situation that the camera needs to be controlled to rotate is determined according to the images shot by the camera.
In a second aspect, there is provided a photographing control method including: acquiring an image shot by a camera in the process of shooting the image by the camera; and when the camera is determined to be controlled to rotate according to the image shot by the camera, controlling a driving assembly to drive the camera to rotate.
In a third aspect, there is provided a photographing control apparatus including an image acquisition unit and a control unit. The image acquisition unit is used for acquiring the image shot by the camera in the process of shooting the image by the camera. The control unit is used for controlling the driving assembly to drive the camera to rotate when the camera needs to be controlled to rotate according to the image shot by the camera.
In a fourth aspect, there is provided a computer-readable storage medium having stored therein a computer program to be executed by a processor to implement a photographing control method, wherein the photographing control method includes: acquiring an image shot by a camera in the process of shooting the image by the camera; and when the camera is determined to be controlled to rotate according to the image shot by the camera, controlling a driving assembly to drive the camera to rotate.
According to the method and the device, whether the camera needs to rotate or not can be analyzed and determined according to the image shot by the camera, so that when the shot object shot at present is a plane object which is not perpendicular to the optical axis of the camera, for example, the camera can be controlled to rotate to enable the plane object to be perpendicular to or close to the optical axis of the camera, and therefore the shooting effect is improved; the important target object M1 can be captured timely and clearly, and a wonderful image can be shot.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a block diagram of an electronic device in an embodiment of the present application.
Fig. 2 is a schematic diagram of a relationship between a minimum distance value and a maximum distance value between a subject to be photographed and a camera and an included angle between a normal of a surface of the subject to be photographed and an optical axis of the camera in an embodiment of the present application.
Fig. 3 is a schematic diagram illustrating a relationship between a contour line of a subject and an angle between a normal line of a surface of the subject and an optical axis of a camera according to another embodiment of the present application.
Fig. 4 is a schematic diagram of obtaining a target angle according to a distance between a target object position and a center position of a currently-captured image and an image distance in other embodiments of the present application.
Fig. 5 is a flowchart of a shooting control method in an embodiment of the present application.
Fig. 6 is a block diagram of a configuration of a photographing control apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is to be understood that the terminology used in the embodiments of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
Please refer to fig. 1, which is a block diagram of an electronic device 100 according to an embodiment of the present application. As shown in fig. 1, the electronic device 100 includes a camera 1, a driving assembly 2, and a processor 3. The camera 1 is used for shooting images, and the driving assembly is connected with the camera and used for driving the camera to rotate. The processor is connected with the camera 1 and the driving component 2 and is used for acquiring images shot by the camera 1 in the process of shooting the images by the camera 1 and controlling the driving component 2 to drive the camera 1 to rotate when the camera 1 needs to be controlled to rotate according to the images shot by the camera 1.
Therefore, in the application, whether the camera 1 needs to be rotated can be analyzed and determined according to the image shot by the camera 1, so that when the shot object shot at present is a plane object which is not perpendicular to the optical axis of the camera, for example, the camera can be controlled to rotate to enable the plane object to be perpendicular to or close to perpendicular to the optical axis of the camera, and the shooting effect is improved.
In some embodiments, when the processor 3 determines that it is necessary to control the camera 1 to rotate according to the image captured by the camera 1, it further determines a target angle and a target direction that the camera 1 needs to rotate according to the image captured by the camera 1, and controls the driving assembly 2 to drive the camera 1 to rotate the target angle towards the target direction.
That is, in some embodiments, when the processor 3 determines that it is necessary to control the camera 1 to rotate according to the image captured by the camera 1, it further determines a target angle and a target direction that the camera 1 needs to rotate currently according to the image captured by the camera 1, and then controls the driving assembly 2 to drive the camera 1 to rotate the target angle towards the target direction.
Wherein, "shoot" in this application has included and has taken a picture, has taken a picture and has swept operations such as sign indicating number, in this application, the image that camera 1 was taken can be for taking a picture after camera 1 opened, take a picture or sweep the framing image that the operation such as sign indicating number obtained when sweeping.
In an embodiment, the camera 1 is a depth-of-field camera, the image captured by the camera 1 is a depth-of-field image including depth-of-field information, the processor 3 determines distances between positions of the captured object and the camera 1 according to the depth-of-field information in the image captured by the camera 1 to obtain a plurality of distance values, calculates an included angle between a normal of a surface of the captured object and an optical axis of the camera according to at least the plurality of distance values, and determines that the camera 1 needs to be controlled to rotate when it is determined that the included angle is greater than a preset angle.
When the camera 1 is a depth camera, the image shot by the camera 1 includes depth information reflecting the distance between each pixel point and the camera, and the processor 3 determines the distance between each position of the shot object and the camera 1 according to the depth information in the image shot by the camera 1 to obtain a plurality of distance values. Each position of the object may be a position corresponding to each pixel point in the captured image, or a position corresponding to an area including a plurality of pixel points.
In some embodiments, the processor 3 may calculate an angle between a normal of the surface of the object and the optical axis of the camera according to at least a minimum distance value and a maximum distance value of the plurality of distance values.
Fig. 2 is a schematic diagram showing the relationship between the minimum distance and the maximum distance between the object and the camera and the included angle between the normal F1 of the surface of the object and the optical axis Z1 of the camera.
As shown in fig. 2, let a minimum distance value between a subject and the camera 1 be d1, a maximum distance value be d2, and a perpendicular distance between two positions corresponding to the minimum distance value and the maximum distance value in a direction perpendicular to the optical axis of the camera be d 3. The vertical distance d3 can be derived from the image distance of the two positions in the image corresponding to the minimum distance value and the maximum distance value and the relationship between the image distance and the object distance.
As shown in fig. 2, an angle θ between a normal F1 of the surface of the subject and the optical axis Z1 of the camera satisfies the tangent equation: tag θ is (d2-d1)/d3, so that the included angle θ can be obtained according to the tangent equation.
That is, in some embodiments, the calculating, by the processor 3, an included angle between the normal of the surface of the object and the optical axis of the camera according to at least the minimum distance value and the maximum distance value of the plurality of distance values may include: the processor 3 obtains an included angle theta between a normal F1 of the surface of the shot object and a camera optical axis Z1 according to a difference value between a minimum distance value and a maximum distance value in a plurality of distance values and a vertical distance between two positions corresponding to the minimum distance value and the maximum distance value in a direction perpendicular to the camera optical axis.
The preset angle is an angle which is not distorted when an included angle theta between a normal F1 of the surface of the shooting object and a camera optical axis Z1 is smaller than the preset angle. For example, the preset angle may be an angle less than 10 degrees. When the included angle θ between the normal F1 of the surface of the object and the camera optical axis Z1 is smaller than 10 degrees, it can be considered that the surface of the object is substantially perpendicular to the camera optical axis Z1, that is, the camera 1 is shooting the surface of the object substantially right, and no image distortion is caused.
Wherein, the determining, by the processor 3, the current target angle and the target direction that need to be rotated by the camera 1 according to the image captured by the camera 1 may include: the processor 3 determines that the direction parallel to the normal F1 of the surface of the shot object and the camera optical axis Z1 when the camera 1 rotates by an angle smaller than 90 degrees is the target direction, calculates the difference between the included angle θ and the preset angle, and determines that any angle value in the range of the difference and the included angle is larger than or equal to the target angle. Then, the processor 3 controls the driving assembly 2 to drive the camera 1 to rotate towards the target direction by the target angle.
That is, when the included angle between the camera optical axis Z1 and the normal F1 of the surface of the object is greater than a preset angle, the target direction is a direction in which the camera optical axis Z1 is parallel to the normal F1 of the surface of the object when the camera 1 rotates by an angle smaller than 90 degrees in the direction. And the target angle is any angle in the range of being greater than or equal to the difference value and being less than or equal to the included angle. Therefore, when the processor 3 controls the driving assembly 2 to drive the camera 1 to rotate towards the target direction by the target angle, the included angle between the camera optical axis Z1 and the normal F1 of the surface of the object is smaller than the preset angle, so that the camera 1 can shoot the surface of the object approximately right away, and image distortion is not caused.
In other embodiments, the processor 3 may perform image processing on the image captured by the camera 1, where the image processing includes: and converting the image into a gray image, and performing enhancement processing on a horizontal line in the image by using edge detection to obtain a contour line of a shot object in the image. And the processor 3 calculates an included angle between the normal of the surface of the shot object and the optical axis of the camera according to the contour line, and determines that the camera needs to be controlled to rotate when the included angle is determined to be larger than a preset angle.
Specifically, the Hough transform can be used for image processing, that is, the Hough transform is used for converting the image into a gray image, edge detection is used for performing enhancement processing on a horizontal line in the image, and a processing process such as a contour line of a shot object in the image is obtained.
That is, in other embodiments, the angle between the normal of the surface of the object and the optical axis of the camera may be derived from the contour line of the object in the image.
Fig. 3 is a schematic diagram illustrating a relationship between an outline of a subject and an angle between a normal F1 of a surface of the subject and an optical axis Z1 of a camera according to another embodiment. In some scenes, for example, the shot object B1 is a two-dimensional code, when scanning the shot object B1 which is a two-dimensional code, if the normal F1 of the surface of the two-dimensional code has an angle θ with the optical axis Z1 of the camera, the two first opposite sides S1 (horizontal sides in (a) of fig. 3) of the shot object B1/two-dimensional code will have a smaller size in the image than the two second opposite sides S2 (vertical sides in (a) of fig. 3).
Therefore, after the first side S1 of the two-dimensional code is imaged by the camera 1, the first side S1 corresponds to a preset proportion (image-to-object distance ratio) of the projection of the first side S1 on a plane perpendicular to the camera optical axis Z1, while since the two-dimensional code is generally square, the actual length of the second side S2 of the two-dimensional code is equal to the actual length of the first side S1, and if the normal F1 of the surface of the object does not have the included angle with the camera optical axis Z1, the length of the first side S1 in the image should be equal to the length of the second side S2 in the image. Therefore, as shown in (b) of fig. 3, assuming that the length of the second side S2 of the two-dimensional code in the image is L1, and the length of the first side S1 in the image is L2, the cosine equation can be obtained: cos θ is L2/L1, and the angle θ is obtained according to the cosine equation.
In fig. 3, for convenience of illustration, as shown in fig. 3 (B), the schematic size of the object B1 in the image and the object B1 in the image are placed on the same side, and obviously, for the actual object distance, when the length L1 of the second side S2 in the image and the length L2 of the first side S1 in the image of the two-dimensional code are multiplied by the same image-distance object distance ratio, the cosine formula is still satisfied: cos θ is L2/L1.
Likewise, the processor 3 may further determine that, when the camera 1 is rotated by an angle smaller than 90 degrees, a direction in which the camera optical axis Z1 is parallel to the normal F1 of the surface of the object is the target direction, calculate a difference between the included angle θ and the preset angle, and determine any angle value in a range greater than or equal to the difference and less than or equal to the included angle as the target angle. Then, the processor 3 controls the driving assembly 2 to drive the camera 1 to rotate towards the target direction by the target angle.
As shown in fig. 1, the camera 1 includes an image sensor 11, the driving component 2 is specifically connected to the image sensor 11 of the camera 1, and can drive the image sensor 11 to rotate, and the processor 3 is specifically configured to control the driving component 2 to drive the image sensor 11 to rotate.
That is, in some embodiments, the driving assembly 2 only controls the image sensor 11 to rotate, and the aforementioned camera optical axis Z1 refers to an axis in the normal direction of the light inlet surface of the image sensor 11. By controlling the rotation of the image sensor 11, it is satisfied that the light entering surface of the image sensor 11 is substantially aligned/parallel with the surface of the subject, thereby improving the imaging effect.
The image sensor 11 may be a CMOS image sensor or the like.
As shown in fig. 1, the camera 1 further includes a lens 12, wherein when the driving assembly 2 drives only the image sensor 11 to rotate, the lens 12 is rotatably connected to the image sensor 11 or has a space therebetween. Therefore, the driving component 2 does not drive the lens 12 to rotate when driving the image sensor 11 to rotate.
Obviously, in other embodiments, the lens 12 may also be fixedly connected with the image sensor 11 to form an integral structure, and both are accommodated in the camera lens barrel to form a packaged camera. The driving assembly 2 may be integrally connected with the camera head 1 while driving the lens 12 and the image sensor 11 to rotate.
In some embodiments, the driving assembly 2 may be a micro-cloud stage assembly, and the camera 1 is located on the driving assembly 2, and can rotate in all directions under the driving of the driving assembly 2. Obviously, when the driving assembly 2 only controls the image sensor 11 to rotate, the camera 1 only has the image sensor 11 on the driving assembly 2. When the driving assembly 2 controls the whole camera 1 to rotate, the whole camera 1 is located on the driving assembly 2.
Fig. 4 is a schematic diagram illustrating the target angle obtained according to the distance between the position of the target object M1 and the center position of the currently captured image and the image distance in other embodiments. In other embodiments, the determining, by the processor 3, that the camera 1 needs to be controlled to rotate according to the image captured by the camera 1 may further include: when the processor 3 determines that there is a target object M1 in the image captured by the camera 1 and the target object M1 is not at the center position of the currently captured image, it determines that the camera 1 needs to be controlled to rotate.
Wherein the target object M1 may be a smiling face, an elder, a flower, or the like.
The processor 3 determines a target angle and a target direction that the camera 1 needs to rotate according to the image captured by the camera 1, and may further include: the processor 3 calculates the distance between the position of the target object M1 in the currently captured image and the center position of the image and the orientation at the center position, and determines the target angle and the target direction that the camera 1 needs to rotate according to the distance and the orientation, respectively, so that the center position of the image captured after the camera 1 rotates the target angle and the target direction is the target object M1.
Specifically, the target angle and the target direction are angles and directions such that the center of the image obtained by rotating the camera 1 by the target angle in the target direction and then capturing the image again becomes the target object M1.
Further, the target direction may be the same as the orientation in which the target object M1 position is located at the center position of the currently captured image, for example, when the target object M1 position is located rightward of the center position of the currently captured image, the target direction is rightward, and when the target object M1 position is located leftward of the center position of the currently captured image, the target direction is leftward.
Wherein the target angle may be derived according to the distance between the position of the target object M1 and the center position of the currently captured image and the image distance.
As shown in fig. 4, if the distance between the position of the target object M1 in the image imaged by the camera 1 and the center position of the image is d4 and the image distance is d5, the deviation angle θ 2 of the target object M1 satisfies the tangent equation: tag θ 2 is d4/d5, so that the deviation angle θ 2 may be the target angle.
Thus, in some shooting scenes, when it is found that the target object M1 or the like is not located at the middle position of the image, the camera 1 may be rotated so that the target object M1 is located at the middle position of the image, and a brilliant picture may be captured.
The target object M1 may be stored in the electronic device 100 for the user to select in advance, for example, the user may preselect which objects are the target object M1, and during the subsequent shooting process, the rotating camera 1 may be automatically controlled so that the target objects M1 are located at the center of the image.
Obviously, in other embodiments, similar to the previous embodiments, the difference between the deviation angle θ 2 and the preset angle may also be obtained, and any angle value in the range greater than or equal to the difference and less than or equal to the included angle may be determined as the target angle.
As shown in fig. 1, the electronic device 100 further includes a memory 4, and the aforementioned target object M1, the preset angle, and the like may be preset and stored in the memory 4.
The electronic device 100 may be a mobile phone, a tablet computer, a digital camera, or other electronic devices with a camera.
The processor 3 can be a central processing unit, a singlechip, a digital signal processor and the like. The memory 4 may be a solid state memory, a memory card, or the like.
Please refer to fig. 5, which is a flowchart illustrating a photographing control method according to an embodiment of the present application. The shooting control method can be applied to the electronic device 100, and the execution sequence of the steps included in the shooting control method is not limited to the execution sequence in fig. 5. As shown in fig. 5, the photographing control method may include the steps of:
s501: and acquiring the image shot by the camera in the process of shooting the image by the camera.
S503: and when the camera is determined to be controlled to rotate according to the image shot by the camera, controlling a driving assembly to drive the camera to rotate.
Wherein, in some embodiments, the controlling the driving component to drive the camera to rotate comprises: determining a target angle and a target direction of the camera to be rotated according to the image shot by the camera, and controlling the driving assembly to drive the camera to rotate the target angle towards the target direction.
In one embodiment, the camera is a depth-of-field camera, and the image shot by the camera is a depth-of-field image including depth-of-field information; the determining that the camera needs to be controlled to rotate according to the image shot by the camera comprises the following steps: determining the distance between each position of the shot object and the camera according to the depth of field information in the image shot by the camera to obtain a plurality of distance values; calculating an included angle between a normal of the surface of the shot object and an optical axis of the camera according to the plurality of distance values; and when the included angle is determined to be larger than the preset angle, determining that the camera needs to be controlled to rotate.
Further, in some embodiments, the calculating an angle between a normal of the surface of the object and an optical axis of the camera according to at least the plurality of distance values may include: and calculating an included angle between the normal of the surface of the shot object and the optical axis of the camera according to at least the minimum distance value and the maximum distance value in the plurality of distance values.
Further, the calculating an included angle between the normal of the surface of the object and the optical axis of the camera according to at least the minimum distance value and the maximum distance value of the plurality of distance values may include: and obtaining an included angle between the normal of the surface of the shot object and the optical axis Z1 of the camera according to the difference value between the minimum distance value and the maximum distance value in the plurality of distance values and the vertical distance of the two positions corresponding to the minimum distance value and the maximum distance value in the direction vertical to the optical axis of the camera.
In another embodiment, the determining that the camera needs to be controlled to rotate according to the image captured by the camera includes: the processor is used for processing the images shot by the camera, and comprises the following steps: converting the image into a gray image, and performing enhancement processing on a horizontal line in the image by using edge detection to obtain a contour line of a shot object in the image; then calculating an included angle between the normal of the surface of the shot object and the optical axis of the camera according to the contour line; and when the included angle is determined to be larger than the preset angle, determining that the camera needs to be controlled to rotate.
Further, the calculating an included angle between a normal of the surface of the object to be shot and the optical axis of the camera according to the contour line may include: the length of the second side of the object in the image is L1, and the length of the adjacent first side in the image is the cosine formula: cos θ is L2/L1, and the angle is derived from the cosine equation.
In the foregoing embodiment, the determining a target angle and a target direction that a camera needs to rotate according to an image captured by the camera includes: determining that a direction in which an optical axis of the camera is parallel to a normal of a surface of the object to be photographed can be the target direction when the camera is rotated by an angle smaller than 90 degrees; calculating the difference value between the included angle and the preset angle, and determining any angle value in the range which is greater than or equal to the difference value and less than or equal to the included angle as the target angle.
In some embodiments, the camera includes an image sensor, the driving assembly is specifically connected to the image sensor of the camera, and the controlling the driving assembly to drive the camera to rotate includes: and controlling the driving component to drive the image sensor to rotate.
In other embodiments, the determining that the camera rotation needs to be controlled according to the image captured by the camera may further include: and when determining that a target object exists in the image shot by the camera and the target object is not in the center position of the current shot image, determining that the camera needs to be controlled to rotate.
Wherein the target subject may be a smiling face, an elder, a flower, or the like.
In other embodiments, the determining a target angle and a target direction that the camera needs to rotate according to the image captured by the camera may include: and calculating the distance between the position of the target object in the currently shot image and the center position of the image and the position at the center position, and respectively determining a target angle and a target direction of the camera which need to be rotated according to the distance and the position, so that the center position of the image shot after the camera rotates the target angle and the target direction is the target object M1.
The shooting control method of the present application can be applied to the electronic device 100, and the method steps included correspond to the functional operations performed by the electronic device 100, and reference may be made to the foregoing description for more specific method steps. And will not be described in detail herein.
Fig. 6 is a block diagram of a photographing control device according to an embodiment of the present application. As shown in fig. 6, the present application further provides an image capturing control apparatus 200, wherein the image capturing control apparatus 200 can be applied to the electronic device 100. The photographing control apparatus 200 includes an image acquisition unit 201 and a control unit 202. The image acquiring unit 201 is configured to acquire an image captured by the camera in the process of capturing the image by the camera. The control unit 202 is configured to control the driving assembly to drive the camera to rotate when it is determined that the camera needs to be controlled to rotate according to the image captured by the camera.
In some embodiments, the controlling unit 202, the controlling the driving assembly to drive the camera to rotate, may include: the control unit 202 determines a target angle and a target direction to be rotated by the camera according to the image captured by the camera, and controls the driving assembly to drive the camera to rotate the target angle towards the target direction.
In some embodiments, the camera is a depth camera, and the image captured by the camera is a depth image including depth information; the control unit 202 determines that the camera needs to be controlled to rotate according to the image captured by the camera, and may include: the control unit 202 determines distances between each position of the object to be shot and the camera according to depth information in the image shot by the camera to obtain a plurality of distance values; calculating an included angle between a normal of the surface of the shot object and an optical axis of the camera according to the plurality of distance values; and when the included angle is determined to be larger than the preset angle, determining that the camera needs to be controlled to rotate.
In other embodiments, the determining, by the control unit 202, that the camera needs to be controlled to rotate according to the image captured by the camera may include: the control unit 202 performs image processing on the image captured by the camera, including: converting the image into a gray image, and performing enhancement processing on a horizontal line in the image by using edge detection to obtain a contour line of a shot object in the image; the control unit 202 calculates an included angle between a normal of the surface of the shot object and the optical axis of the camera according to the contour line; and when the included angle is determined to be larger than the preset angle, determining that the camera needs to be controlled to rotate.
The determining, by the control unit 202, a target angle and a target direction that the camera needs to rotate according to the image captured by the camera may include: the control unit 202 determines that a direction in which the optical axis of the camera is parallel to a normal line of the surface of the object to be photographed can be made the target direction when the camera is rotated by an angle smaller than 90 degrees; calculating the difference value between the included angle and the preset angle, and determining any angle value in the range which is greater than or equal to the difference value and less than or equal to the included angle as the target angle.
The camera specifically includes an image sensor, the driving assembly is specifically connected to the image sensor of the camera, and the control unit 202 controls the driving assembly to drive the camera to rotate, which may include: the control unit 202 controls the driving component to drive the image sensor to rotate.
The photographing control apparatus 200 may be a hardware unit or a software module, for example, the image obtaining unit 201 and the control unit 202 may be both hardware logic circuits integrated in the processor 3 of the electronic device 100, or hardware logic circuits independent of the processor 3, or may also be computer program modules, and are invoked by the processor 3 of the electronic device 100 for execution.
As described above, the photographing control apparatus 200 of the present application may be applied to the electronic device 100, the functional operation of the photographing control apparatus 200 corresponds to the functional operation performed by the electronic device 100, and more specific functional operation may refer to the related description of the electronic device 100. And will not be described in detail herein.
Embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, where the computer program is executed by a processor to implement part or all of the steps of any one of the methods described in the above method embodiments. The processor may include the processor 3 of the electronic device 100 and any other processor with processing function, such as any other single chip microcomputer, digital signal processor, and the like.
In some embodiments, the computer readable storage medium may be the memory 4 of the electronic device 100, so that the computer program is stored in the memory 4, and can be called by the processor 3 of the electronic device 100 to execute part or all of the steps of any of the methods.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a processor to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package. The processor may include the processor 3 of the electronic device 100 and any other processor having processing functionality. Therefore, the electronic device 100, the shooting control method, and the shooting control apparatus of the present application can control the camera 1 to rotate according to the shot image, and can control the camera to rotate so that the plane object is perpendicular or nearly perpendicular to the optical axis of the camera when the current shot object is, for example, a plane object that is not perpendicular to the optical axis of the camera, thereby improving the shooting effect. More wonderful images can be taken.
Reference is made herein to various exemplary embodiments. However, those skilled in the art will recognize that changes and modifications may be made to the exemplary embodiments without departing from the scope hereof. For example, the various operational steps, as well as the components used to perform the operational steps, may be implemented in differing ways depending upon the particular application or consideration of any number of cost functions associated with operation of the system (e.g., one or more steps may be deleted, modified or incorporated into other steps).
Additionally, as will be appreciated by those skilled in the art, the principles herein may be reflected in a computer program product on a computer readable storage medium preloaded with computer readable program code, i.e., program instructions. Any tangible, non-transitory computer-readable storage medium may be used, including magnetic storage devices (hard disks, floppy disks, etc.), optical storage devices (CD-ROMs, DVDs, Blu Ray disks, etc.), flash memory, and/or the like. These computer program instructions may be loaded onto a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions which execute on the computer or other programmable data processing apparatus create means for implementing the functions specified. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including means for implementing the function specified. The computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified.
The foregoing is illustrative of embodiments of the present invention, and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the embodiments of the present invention and are intended to be within the scope of the present invention.

Claims (14)

1. An electronic device, characterized in that the electronic device comprises:
a camera for capturing an image;
the driving assembly is connected with the camera;
and the processor is connected with the camera and the driving component and used for acquiring the image shot by the camera in the process of shooting the image by the camera and controlling the driving component to drive the camera to rotate when the camera needs to be controlled to rotate according to the image shot by the camera.
2. The electronic device of claim 1, wherein when the processor determines that the camera needs to be controlled to rotate according to the image captured by the camera, the processor further determines a target angle and a target direction in which the camera needs to be rotated according to the image captured by the camera, and controls the driving component to drive the camera to rotate the target angle towards the target direction.
3. The electronic device according to claim 2, wherein the camera is a depth of field camera, the image captured by the camera is a depth of field image including depth of field information, the processor determines distances between positions of the object and the camera according to the depth of field information in the image captured by the camera to obtain a plurality of distance values, calculates an included angle between a normal of a surface of the object and an optical axis of the camera according to at least the plurality of distance values, and determines that the camera needs to be controlled to rotate when it is determined that the included angle is greater than a preset angle.
4. The electronic device of claim 2, wherein the processor performs image processing on the image captured by the camera, comprising: converting the image into a gray image, and performing enhancement processing on a horizontal line in the image by using edge detection to obtain a contour line of a shot object in the image; and the processor calculates an included angle between the normal of the surface of the shot object and the optical axis of the camera according to the contour line, and determines that the camera needs to be controlled to rotate when the included angle is determined to be larger than a preset angle.
5. The electronic device according to claim 3 or 4, wherein the processor determines that a direction in which the optical axis of the camera is parallel to a normal line of the surface of the subject to be photographed when the camera is rotated by an angle smaller than 90 degrees is the target direction, calculates a difference between the included angle and the preset angle, and determines any angle value in a range greater than or equal to the difference and less than or equal to the included angle as the target angle, thereby controlling the driving assembly to drive the camera to rotate by the target angle toward the target direction.
6. The electronic device of claim 1, wherein the camera comprises an image sensor, the driving component is specifically connected to the image sensor of the camera, and the processor is configured to control the driving component to drive the image sensor to rotate.
7. A shooting control method, characterized by comprising:
acquiring an image shot by a camera in the process of shooting the image by the camera;
and when the camera is determined to be controlled to rotate according to the image shot by the camera, controlling a driving assembly to drive the camera to rotate.
8. The shooting control method according to claim 7, wherein the controlling the driving assembly to drive the camera to rotate includes:
determining a target angle and a target direction of the camera to be rotated according to the image shot by the camera, and controlling the driving assembly to drive the camera to rotate the target angle towards the target direction.
9. The shooting control method according to claim 8, wherein the camera is a depth camera, and the image shot by the camera is a depth image including depth information;
the determining that the camera needs to be controlled to rotate according to the image shot by the camera comprises the following steps:
determining the distance between each position of the shot object and the camera according to the depth of field information in the image shot by the camera to obtain a plurality of distance values;
calculating an included angle between a normal of the surface of the shot object and an optical axis of the camera according to the plurality of distance values; and
and when the included angle is determined to be larger than the preset angle, determining that the camera needs to be controlled to rotate.
10. The shooting control method according to claim 8, wherein the determining that the camera rotation needs to be controlled based on the image shot by the camera includes:
and carrying out image processing on the image shot by the camera, wherein the image processing comprises the following steps: converting the image into a gray image, and performing enhancement processing on a horizontal line in the image by using edge detection to obtain a contour line of a shot object in the image;
calculating an included angle between the normal of the surface of the shot object and the optical axis of the camera according to the contour line; and
and when the included angle is determined to be larger than the preset angle, determining that the camera needs to be controlled to rotate.
11. The shooting control method according to claim 9 or 10, wherein the determining a target angle and a target direction that the camera needs to rotate according to the image shot by the camera comprises:
determining that a direction in which an optical axis of the camera is parallel to a normal of a surface of the object to be photographed can be the target direction when the camera is rotated by an angle smaller than 90 degrees;
calculating the difference value between the included angle and the preset angle, and determining any angle value in the range which is greater than or equal to the difference value and less than or equal to the included angle as the target angle.
12. The shooting control method according to claim 1, wherein the camera includes an image sensor, the driving component is specifically connected to the image sensor of the camera, and the controlling the driving component to drive the camera to rotate includes:
and controlling the driving component to drive the image sensor to rotate.
13. A shooting control apparatus, characterized by comprising:
the image acquisition unit is used for acquiring the image shot by the camera in the process of shooting the image by the camera;
and the control unit is used for controlling the driving assembly to drive the camera to rotate when the camera needs to be controlled to rotate according to the image shot by the camera.
14. A computer-readable storage medium, characterized in that a computer program is stored therein for execution by a processor to implement the photographing control method according to any one of claims 7-12.
CN202011144425.1A 2020-10-22 2020-10-22 Shooting control method, shooting control device and electronic equipment Pending CN112272267A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011144425.1A CN112272267A (en) 2020-10-22 2020-10-22 Shooting control method, shooting control device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011144425.1A CN112272267A (en) 2020-10-22 2020-10-22 Shooting control method, shooting control device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112272267A true CN112272267A (en) 2021-01-26

Family

ID=74341536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011144425.1A Pending CN112272267A (en) 2020-10-22 2020-10-22 Shooting control method, shooting control device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112272267A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556438A (en) * 2021-06-15 2021-10-26 展讯半导体(南京)有限公司 Scanning control method, system, electronic device and storage medium
CN117499549A (en) * 2023-12-25 2024-02-02 荣耀终端有限公司 Scanning method and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104427234A (en) * 2013-09-02 2015-03-18 联想(北京)有限公司 Image distortion correction method and electronic device
CN104601889A (en) * 2015-01-20 2015-05-06 广东欧珀移动通信有限公司 Photographing method and device of mobile terminal
CN104994293A (en) * 2015-06-30 2015-10-21 广东欧珀移动通信有限公司 Control method of wide angle camera and electronic terminal
CN106027907A (en) * 2016-06-30 2016-10-12 维沃移动通信有限公司 Method for automatically adjusting camera, and mobile terminal
CN106060398A (en) * 2016-06-30 2016-10-26 维沃移动通信有限公司 Method for automatically adjusting camera and mobile terminal
CN108769478A (en) * 2018-06-08 2018-11-06 Oppo广东移动通信有限公司 Control method, control assembly and the electronic equipment of slide assemblies
CN108769419A (en) * 2018-06-04 2018-11-06 Oppo(重庆)智能科技有限公司 Photographic method, mobile terminal and computer readable storage medium
CN110210333A (en) * 2019-05-16 2019-09-06 佛山科学技术学院 A kind of focusing iris image acquiring method and device automatically
CN111405173A (en) * 2019-01-03 2020-07-10 北京字节跳动网络技术有限公司 Image acquisition method and device, point reading equipment, electronic equipment and storage medium
CN111698426A (en) * 2020-06-23 2020-09-22 广东小天才科技有限公司 Test question shooting method and device, electronic equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104427234A (en) * 2013-09-02 2015-03-18 联想(北京)有限公司 Image distortion correction method and electronic device
CN104601889A (en) * 2015-01-20 2015-05-06 广东欧珀移动通信有限公司 Photographing method and device of mobile terminal
CN104994293A (en) * 2015-06-30 2015-10-21 广东欧珀移动通信有限公司 Control method of wide angle camera and electronic terminal
CN106027907A (en) * 2016-06-30 2016-10-12 维沃移动通信有限公司 Method for automatically adjusting camera, and mobile terminal
CN106060398A (en) * 2016-06-30 2016-10-26 维沃移动通信有限公司 Method for automatically adjusting camera and mobile terminal
CN108769419A (en) * 2018-06-04 2018-11-06 Oppo(重庆)智能科技有限公司 Photographic method, mobile terminal and computer readable storage medium
CN108769478A (en) * 2018-06-08 2018-11-06 Oppo广东移动通信有限公司 Control method, control assembly and the electronic equipment of slide assemblies
CN111405173A (en) * 2019-01-03 2020-07-10 北京字节跳动网络技术有限公司 Image acquisition method and device, point reading equipment, electronic equipment and storage medium
CN110210333A (en) * 2019-05-16 2019-09-06 佛山科学技术学院 A kind of focusing iris image acquiring method and device automatically
CN111698426A (en) * 2020-06-23 2020-09-22 广东小天才科技有限公司 Test question shooting method and device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556438A (en) * 2021-06-15 2021-10-26 展讯半导体(南京)有限公司 Scanning control method, system, electronic device and storage medium
CN113556438B (en) * 2021-06-15 2022-09-27 展讯半导体(南京)有限公司 Scanning control method, system, electronic device and storage medium
CN117499549A (en) * 2023-12-25 2024-02-02 荣耀终端有限公司 Scanning method and electronic equipment
CN117499549B (en) * 2023-12-25 2024-05-14 荣耀终端有限公司 Scanning method and electronic equipment

Similar Documents

Publication Publication Date Title
US10540806B2 (en) Systems and methods for depth-assisted perspective distortion correction
WO2018201809A1 (en) Double cameras-based image processing device and method
EP3627821B1 (en) Focusing method and apparatus for realizing clear human face, and computer device
US10026183B2 (en) Method, system and apparatus for determining distance to an object in a scene
CN106899781B (en) Image processing method and electronic equipment
JP5362087B2 (en) Method for determining distance information, method for determining distance map, computer apparatus, imaging system, and computer program
US8508652B2 (en) Autofocus method
CN109313799B (en) Image processing method and apparatus
WO2016049889A1 (en) Autofocus method, device and electronic apparatus
CN109479082B (en) Image processing method and apparatus
WO2019056527A1 (en) Capturing method and device
US20230164449A1 (en) Generation of enhanced panoramic visual content
CN112272267A (en) Shooting control method, shooting control device and electronic equipment
US9020269B2 (en) Image processing device, image processing method, and recording medium
US20110052070A1 (en) Image processing apparatus, image processing method and computer readable-medium
CN110177212A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN111932462A (en) Training method and device for image degradation model, electronic equipment and storage medium
CN114529491A (en) Image quality detection method, device, electronic equipment and storage medium
US20210027439A1 (en) Orientation adjustment of objects in images
CN109995985B (en) Panoramic image shooting method and device based on robot and robot
CN115734086A (en) Image processing method, device and system based on off-screen shooting and storage medium
CN109963085B (en) Method and device for adjusting shutter speed and robot
CN108432229A (en) It is a kind of to realize that other people take pictures the method and photographing device of effect by self-timer
US20200128183A1 (en) Prominent region detection in scenes from sequence of image frames
WO2015158953A1 (en) Transformations for image stabilization and refocus

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210126

RJ01 Rejection of invention patent application after publication