CN111031246A - Shooting method and electronic equipment - Google Patents

Shooting method and electronic equipment Download PDF

Info

Publication number
CN111031246A
CN111031246A CN201911345101.1A CN201911345101A CN111031246A CN 111031246 A CN111031246 A CN 111031246A CN 201911345101 A CN201911345101 A CN 201911345101A CN 111031246 A CN111031246 A CN 111031246A
Authority
CN
China
Prior art keywords
camera
angle
electronic device
image
variation
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
CN201911345101.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.)
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 CN201911345101.1A priority Critical patent/CN111031246A/en
Publication of CN111031246A publication Critical patent/CN111031246A/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/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 method and electronic equipment, wherein the electronic equipment comprises a rotatable camera, and the method comprises the following steps: in the process of acquiring a first image of a shooting object through the camera, and under the condition that the spatial attitude information of the electronic equipment is changed within a first time length, acquiring the angle change and the displacement change of the electronic equipment within the first time length; determining a rotation angle of the camera based on the angle variation and the displacement variation; controlling the camera to rotate according to the rotation angle, and outputting a second image acquired by the rotated camera; wherein the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image. Therefore, the shooting operation of the user can be effectively simplified, and the shooting effect of the long-focus shooting can be improved.

Description

Shooting method and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a shooting method and an electronic device.
Background
With the development of the technology, the shooting capability of electronic equipment such as a smart phone is greatly improved. At present, a great development trend of a camera of an electronic device is optical zooming, and in combination with digital zooming, a zoom magnification of as much as 50 times can be obtained, so that a user can shoot farther pictures through the camera of the electronic device. However, in the process of using the camera to shoot a long-range view, the shake of the electronic device due to the excessively high zoom magnification may cause a large movement on the picture, so that the shooting preview interface is difficult to align with the long-range view area to be shot, thereby affecting the shooting effect of the long-range view.
Disclosure of Invention
The embodiment of the invention provides a shooting method and electronic equipment, which can solve the problem of poor shooting effect of long-focus shooting of the conventional electronic equipment.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a shooting method applied to an electronic device, where the electronic device includes a rotatable camera, and the method includes:
in the process of acquiring a first image of a shooting object through the camera, and under the condition that the spatial attitude information of the electronic equipment is changed within a first time length, acquiring the angle change and the displacement change of the electronic equipment within the first time length;
determining a rotation angle of the camera based on the angle variation and the displacement variation;
controlling the camera to rotate according to the rotation angle, and outputting a second image acquired by the rotated camera;
wherein the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes a rotatable camera, and the electronic device further includes:
the acquisition module is used for acquiring the angle variation and the displacement variation of the electronic equipment in a first time length under the condition that the spatial attitude information of the electronic equipment is changed in the first time length in the process of acquiring the first image of the shooting object through the camera;
the determining module is used for determining the rotation angle of the camera based on the angle variation and the displacement variation;
the output module is used for controlling the camera to rotate according to the rotation angle and outputting a second image acquired by the rotated camera;
wherein the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the above-mentioned shooting method.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the shooting method described above.
In the embodiment of the invention, in the process of acquiring the first image of the shooting object through the camera, and under the condition that the spatial attitude information of the electronic equipment is changed in the first time length, the angle variation and the displacement variation of the electronic equipment in the first time length are acquired; determining a rotation angle of the camera based on the angle variation and the displacement variation; controlling the camera to rotate according to the rotation angle, and outputting a second image acquired by the rotated camera; wherein the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image. Therefore, under the condition that the electronic equipment shakes to cause the spatial posture of the electronic equipment to change, the shooting angle of the camera can be changed by rotating the camera, so that the shot object is restored to the position of the shot object in the preview interface before shaking, the preview interface of the shot object is restored, the spatial position of the electronic equipment is adjusted again to align the shot object, the shooting angle of the camera can be adjusted by controlling the rotation of the camera, the automatic alignment of the shot object is realized, the shooting operation of a user is effectively simplified, and the shooting effect of long-focus shooting can be improved.
Drawings
Fig. 1 is a flowchart of a photographing method provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of a camera according to an embodiment of the present invention;
fig. 3 is a schematic displacement diagram of a camera provided in an embodiment of the present invention;
FIG. 4 is a second schematic diagram of the photographing according to the embodiment of the present invention;
FIG. 5 is a block diagram of an electronic device according to an embodiment of the present invention;
fig. 6 is a second structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a shooting method according to an embodiment of the present invention, where the shooting method according to the embodiment of the present invention is applied to an electronic device, the electronic device includes a rotatable camera, and the camera is freely rotatable relative to a housing of the electronic device, as shown in fig. 1, the shooting method includes the following steps:
step 101, in the process of acquiring a first image of a shooting object through the camera, and under the condition that the spatial attitude information of the electronic equipment changes within a first time length, acquiring an angle change amount and a displacement change amount of the electronic equipment within the first time length.
In this step, the photographic subject may be a distant photographic subject, and the first image may be a telephoto photographic image with respect to the photographic subject, that is, the first image may be an image that is perfectly aligned with the photographic subject.
The electronic equipment comprises a camera which can be used for long-focus shooting, and the camera can freely rotate relative to a shell of the electronic equipment. In the actual shooting process, the camera needs to be turned on first, and the camera for telephoto shooting is started, so that the lens magnification can be gradually enlarged and positioned near a target distant view (shooting object) in a shooting preview interface in a two-finger sliding mode, and an image collected by the camera can be as shown in fig. 2.
When a user holds the electronic device to shoot a long shot, the shot object moves out of the preview interface due to shaking of the user. Moreover, in the long-focus shooting process, due to the fact that the long-focus magnification is too high, the electronic device slightly shakes to reflect that huge movement can occur on the preview interface, and the shooting object part moves out of the preview interface.
The judgment basis that the spatial attitude information of the electronic device changes within the first duration can be judged based on the rotation range of the camera. Namely, the spatial position of the electronic equipment is changed, so that the shooting object partially moves out of the preview interface, and the shooting object is restored to the position in the preview interface before shaking by rotating the camera. If the variation range of the spatial position of the electronic equipment is large, the shooting object cannot be restored to the position of the shooting object in the preview interface before shaking only by rotating the camera, the current shooting is finished, and the user executes the alignment operation again.
If the spatial attitude information of the electronic equipment changes within the first time length, namely the camera can be rotated to restore the shooting object to the position of the shooting object in the preview interface before shaking, the angle change amount and the displacement change amount of the electronic equipment within the first time length are determined.
The angle variation of the electronic equipment can be obtained through calculation according to data acquired by a gyroscope of the electronic equipment; the displacement variation of the electronic equipment can be calculated through data collected by an accelerometer of the electronic equipment. The angle variation and the displacement variation of the electronic equipment in the first time length can be acquired through external auxiliary equipment, for example, the space position variation information of the electronic equipment is acquired through the external auxiliary equipment, and the acquired space position variation information is sent to the electronic equipment through communication modes such as Bluetooth and WiFi, so that the electronic equipment calculates the angle variation and the displacement variation based on the space position variation information.
And 102, determining the rotation angle of the camera based on the angle variation and the displacement variation.
In the step, as the camera is a part of the electronic equipment, the camera moves along with the electronic equipment under the condition that the spatial position of the electronic equipment is changed; therefore, the angle variation and the displacement variation of the electronic device are the angle variation and the displacement variation of the camera.
The rotation angle of the camera can be calculated through the angle variation and the displacement variation, so that after the camera rotates according to the rotation angle, the shooting object can be restored to the position of the shooting object in the preview interface before shaking (before the position of the electronic device is not changed).
In the process of calculating the rotation angle, a first rotation angle of the camera can be calculated firstly based on the angle variation; then, calculating a second rotation angle of the camera based on the displacement variation; because the three-dimensional coordinate system can be established under the condition that the spatial position of the electronic device changes, the first rotation angle and the second rotation angle are both spatial angles, namely vector angles (for example, an angle in an X direction, an angle in a Y direction, and an angle in a Z direction); and the rotation angle may be a vector sum of the first rotation angle and the second rotation angle.
In the process of calculating the second rotation angle, the second rotation angle can be calculated based on the relative distance change between the electronic equipment and the shooting object. For example, the relative distance between the electronic device and the shooting object may be acquired, and then the second rotation angle of the camera may be calculated based on the acquired displacement variation and based on the relative distance and the displacement variation.
And 103, controlling the camera to rotate according to the rotation angle, and outputting a second image acquired by the rotated camera.
In this step, the second image is an image obtained by rotating the camera, and the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image, that is, after the camera is rotated by the rotation angle, the photographic subject can be returned to the position of the preview interface before shaking (before the position of the electronic device is not changed).
In the shooting process of the shooting object, the collected first image can be stored in a buffer queue all the time, so that the subsequently collected image frame can be compared with the first image, and the first image is the image frame completely aligned with the shooting object.
Therefore, under the condition that the electronic equipment shakes to cause the spatial posture of the electronic equipment to change, the shooting angle of the camera can be changed by rotating the camera, so that the shot object is restored to the position of the shot object in the preview interface before shaking, the preview interface of the shot object is restored, the spatial position of the electronic equipment is adjusted again to align the shot object, the shooting angle of the camera can be adjusted by controlling the rotation of the camera, the automatic alignment of the shot object is realized, the shooting operation of a user is effectively simplified, and the shooting effect of long-focus shooting can be improved.
The first time length may be a time length required for generating one frame of image, a time length required for shaking once by a user, or a time length customized by the user.
For example, when each frame of image is generated, the electronic device may calculate, based on angular acceleration data collected by a gyroscope of the electronic device and linear acceleration data collected by an accelerometer of the electronic device, and an elapsed time of the frame of image, an angle rotated by the electronic device and a displacement generated during a period of generating the frame of image, that is, an angle change amount and a displacement change amount of the electronic device in the first time period.
Whether the numerical values of the angle variation and the displacement variation are within a reasonable threshold range or not can be judged, if the numerical values exceed the reasonable threshold range, for example, if the camera cannot be rotated to restore the shooting object to the position of the shooting object in the preview interface before shaking, the camera is abandoned to be rotated, and the user is reminded to perform the alignment operation again; and if the distance is within a reasonable threshold value range, determining the rotation angle of the camera, and controlling the camera to rotate according to the rotation angle so as to restore the position of the shooting object in the preview interface before shaking.
Optionally, according to the rotation angle, controlling the camera to rotate, and outputting a second image acquired by the camera after rotation, includes: receiving a first input for the photographic subject in a photographic preview interface; responding to the first input, and controlling the camera to rotate according to the rotation angle; and outputting a second image collected by the camera after the camera rotates.
In this embodiment, the first input may be a click operation or a press operation on a photographic subject in the photographic preview interface, and is used to trigger the camera to rotate and output a second image acquired by the rotated camera, where a position of the photographic subject in the second image is the same as a position of the photographic subject in the first image. This can realize automatic shooting of the photographic subject.
In the process of determining the rotation angle, a three-dimensional coordinate system (an X direction, a Y direction, and a Z direction) can be established, the Z direction is a direction in which the camera faces the photographic subject, that is, a direction in which a connection line between the camera and the photographic subject is located, and a plane formed by the X direction and the Y direction is a plane perpendicular to the Z direction.
Wherein, based on the angular acceleration data collected by the gyroscope of the electronic device, the angle variation of the electronic device can be calculated, and the components of the calculated angle variation in the three directions of XYZ are expressed as (theta)x,θy,θz) Since the camera moves along with the electronic device, the camera needs to be controlled to rotate by a first rotation angle (-theta) in order to correct the angular deviation caused by the camera itselfx,-θy,-θz)。
Wherein, based on the linear acceleration data collected by the accelerometer of the electronic device, the displacement variation of the electronic device can be calculated, and the components of the calculated displacement variation in the three directions of XYZ are represented as (d)x,dy,dz) Because the camera is far away from the shooting object, the electronic deviceThe distance change in the Z direction caused by the spare space position change can be ignored, so the displacement change quantity of the camera can be represented by d (d ═ d)x,dy0), in order to correct the displacement variation of the camera caused by the spatial position variation of the electronic device, as shown in FIG. 3, an angle α required for the rotation of the camera is arctan (d/L), where L represents the distance from the camera to the shooting object, and the size of L can be obtained from a depth map obtained by the bronze drum double-shot algorithm or the depth learning algorithmx/L),arctan(dy/L),0)。
Vector addition is carried out on the first rotating angle and the second rotating angle, and then the rotating angle (-theta) of the camera can be obtainedx+arctan(dx/L),-θy+arctan(dy/L),-θz)。
Optionally, after the electronic device calculates the rotation angle of the camera, the camera may be controlled to rotate rapidly according to the rotation angle, so that the image area acquired by the camera is consistent with the image area acquired by the electronic device before shaking, and the acquired image is displayed on a preview interface. As shown in fig. 4, the rightmost image is an image acquired by the camera after the electronic device shakes; after the camera is controlled to rotate rapidly according to the rotation angle, the image acquisition visual angle is cut back to the original shooting area, namely as shown by the middle image; the captured image will be displayed on the preview interface as shown in the leftmost image.
After the camera is rotated and is switched back to the original shooting area, the operation of a user for the shooting button can be received, and shooting is carried out so as to obtain a long-range image of a shooting object.
Optionally, under the condition that the spatial posture information of the electronic device changes within a first time period, acquiring an angle variation and a displacement variation of the electronic device within the first time period includes: acquiring change information of the space attitude information of the electronic equipment within a first time period; and under the condition that the change information meets a preset condition, acquiring the angle change and the displacement change of the electronic equipment in the first time length.
In the embodiment, when the spatial attitude information of the electronic device changes, the shooting object part moves out of the preview interface; if the camera is rotated to restore the shooting object to the position of the shooting object in the preview interface before shaking, the change information meets the preset condition.
If the spatial position variation range of the electronic equipment is large, the shooting object cannot be restored to the position of the shooting object in the preview interface before shaking only by rotating the camera, the current shooting is finished, and the user executes the alignment operation again.
Therefore, the camera can be effectively prevented from being rotated inefficiently, and the shooting experience of a user is improved.
Optionally, the obtaining of the angle variation and the displacement variation of the electronic device in the first time period includes: acquiring a first position of the shooting object in a current preview image; determining an offset amount of the electronic device relative to the photographic subject based on the first position and a second position of the photographic subject in the first image; and calculating the angle variation and the displacement variation of the electronic equipment in the first time length based on the offset.
In this embodiment, the offset of the electronic device relative to the photographic object in the first time period can be calculated by the first position of the photographic object in the current preview image and the second position of the photographic object in the first image and based on the depth information of the photographic object, and further, the angle variation and the displacement variation of the electronic device in the first time period can be obtained. By adopting the mode, the accuracy of angle variation and displacement variation can be improved, the accuracy of the rotation angle is further improved, and the long-focus shooting effect of the shooting object is improved.
In the shooting method provided by the embodiment of the invention, in the process of acquiring a first image of a shooting object through the camera, and under the condition that the spatial attitude information of the electronic equipment is changed within a first time length, the angle change and the displacement change of the electronic equipment within the first time length are acquired; determining a rotation angle of the camera based on the angle variation and the displacement variation; controlling the camera to rotate according to the rotation angle, and outputting a second image acquired by the rotated camera; wherein the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image. Therefore, the camera is rotated to change the shooting angle of the camera, so that the shooting object can be restored to the position of the shooting object in the preview interface before shaking, the spatial position of the electronic equipment is adjusted again relative to the shooting object, the shooting object can be aligned, the shooting angle of the camera can be adjusted by controlling the rotation of the camera, the automatic alignment of the shooting object is realized, the shooting operation of a user is effectively simplified, and the shooting effect of long-focus shooting can be improved.
Referring to fig. 5, fig. 5 is a structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device 500 includes:
an obtaining module 501, configured to obtain, in a process of acquiring a first image of a shooting object through the camera, and under a condition that spatial attitude information of the electronic device changes within a first time duration, an angle change amount and a displacement change amount of the electronic device within the first time duration;
a determining module 502, configured to determine a rotation angle of the camera based on the angle variation and the displacement variation;
the output module 503 is configured to control the camera to rotate according to the rotation angle, and output a second image acquired by the rotated camera;
wherein the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image.
Optionally, the determining module 502 includes:
a first determination unit configured to determine a first rotation angle of the camera based on the angle variation;
a second determination unit configured to determine a second rotation angle of the camera based on the displacement variation;
and the obtaining unit is used for obtaining the vector sum of the first rotating angle and the second rotating angle to obtain the rotating angle of the camera.
Optionally, the second determining unit includes:
the acquisition subunit is used for acquiring the relative distance between the electronic equipment and the shooting object;
and the calculating subunit is used for calculating to obtain a second rotation angle of the camera according to the relative distance and the displacement variation.
Optionally, the obtaining module 501 includes:
the first acquisition unit is used for acquiring the change information of the space attitude information of the electronic equipment within a first time length;
and the second acquisition unit is used for acquiring the angle variation and the displacement variation of the electronic equipment in the first time length under the condition that the change information meets the preset condition.
Optionally, the obtaining module 501 includes:
a third acquisition unit, configured to acquire a first position of the photographic subject in a current preview image;
a third determination unit configured to determine an offset amount of the electronic device with respect to the photographic subject based on the first position and a second position of the photographic subject in the first image;
and the calculating unit is used for calculating the angle variation and the displacement variation of the electronic equipment in the first time length based on the offset.
The electronic device 500 can implement each process implemented by the electronic device in the method embodiments of fig. 1 to fig. 4, and details are not repeated here to avoid repetition.
Referring to fig. 6, fig. 6 is a schematic diagram of a hardware structure of an electronic device for implementing various embodiments of the present invention, and as shown in fig. 6, the electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 6 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
In the process of acquiring a first image of a shooting object through the camera, and under the condition that the spatial attitude information of the electronic equipment changes within a first time length, the sensor 605 is configured to acquire an angle change amount and a displacement change amount of the electronic equipment within the first time length; the processor 610 is configured to determine a rotation angle of the camera based on the angle variation and the displacement variation; controlling the camera to rotate according to the rotation angle, and outputting a second image acquired by the rotated camera; wherein the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image.
Optionally, the processor 610 is configured to: determining a first rotation angle of the camera based on the angle variation; determining a second rotation angle of the camera based on the displacement variation; and acquiring the vector sum of the first rotating angle and the second rotating angle to obtain the rotating angle of the camera.
Optionally, the input unit 604 is configured to obtain a relative distance between the electronic device and the photographic subject; the processor 610 is configured to calculate a second rotation angle of the camera according to the relative distance and the displacement variation.
Optionally, the input unit 604 is configured to obtain change information of the spatial attitude information of the electronic device within a first time period; the processor 610 is configured to obtain an angle variation and a displacement variation of the electronic device within the first duration when the change information satisfies a preset condition.
Optionally, the processor 610 is configured to: acquiring a first position of the shooting object in a current preview image; determining an offset amount of the electronic device relative to the photographic subject based on the first position and a second position of the photographic subject in the first image; and calculating the angle variation and the displacement variation of the electronic equipment in the first time length based on the offset.
The electronic device 600 can implement the processes implemented by the electronic device in the foregoing embodiments, and in order to avoid repetition, the details are not described here.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 610; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio frequency unit 601 may also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 602, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 may also provide audio output related to a specific function performed by the electronic apparatus 600 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used to receive audio or video signals. The input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics processor 6041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphic processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 601 in case of the phone call mode.
The electronic device 600 also includes at least one sensor 605, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 6061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 6061 and/or the backlight when the electronic apparatus 600 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 605 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 606 is used to display information input by the user or information provided to the user. The Display unit 606 may include a Display panel 6061, and the Display panel 6061 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 6071 using a finger, stylus, or any suitable object or accessory). The touch panel 6071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 610, receives a command from the processor 610, and executes the command. In addition, the touch panel 6071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, the other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 6071 can be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation on or near the touch panel 6071, the touch operation is transmitted to the processor 610 to determine the type of the touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although the touch panel 6071 and the display panel 6061 are shown in fig. 6 as two separate components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the electronic device, and this is not limited here.
The interface unit 608 is an interface for connecting an external device to the electronic apparatus 600. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 600 or may be used to transmit data between the electronic device 600 and external devices.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 609 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 610 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 609, and calling data stored in the memory 609, thereby performing overall monitoring of the electronic device. Processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The electronic device 600 may further include a power supply 611 (e.g., a battery) for supplying power to the various components, and preferably, the power supply 611 may be logically connected to the processor 610 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In addition, the electronic device 600 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 610, a memory 609, and a computer program stored in the memory 609 and capable of running on the processor 610, where the computer program is executed by the processor 610 to implement each process of the foregoing shooting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned shooting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (12)

1. A shooting method is applied to an electronic device, wherein the electronic device comprises a rotatable camera, and the method comprises the following steps:
in the process of acquiring a first image of a shooting object through the camera, and under the condition that the spatial attitude information of the electronic equipment is changed within a first time length, acquiring the angle change and the displacement change of the electronic equipment within the first time length;
determining a rotation angle of the camera based on the angle variation and the displacement variation;
controlling the camera to rotate according to the rotation angle, and outputting a second image acquired by the rotated camera;
wherein the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image.
2. The method of claim 1, wherein determining the angle of rotation of the camera based on the amount of angular change and the amount of displacement change comprises:
determining a first rotation angle of the camera based on the angle variation;
determining a second rotation angle of the camera based on the displacement variation;
and acquiring the vector sum of the first rotating angle and the second rotating angle to obtain the rotating angle of the camera.
3. The method of claim 2, wherein determining the second angle of rotation of the camera based on the amount of change in displacement comprises:
acquiring the relative distance between the electronic equipment and the shooting object;
and calculating to obtain a second rotation angle of the camera according to the relative distance and the displacement variation.
4. The method according to any one of claims 1 to 3, wherein the obtaining of the angle change amount and the displacement change amount of the electronic device in the first time period in the case that the spatial attitude information of the electronic device changes in the first time period comprises:
acquiring change information of the space attitude information of the electronic equipment within a first time period;
and under the condition that the change information meets a preset condition, acquiring the angle change and the displacement change of the electronic equipment in the first time length.
5. The method according to any one of claims 1 to 3, wherein the obtaining of the angle change amount and the displacement change amount of the electronic device in the first time period comprises:
acquiring a first position of the shooting object in a current preview image;
determining an offset amount of the electronic device relative to the photographic subject based on the first position and a second position of the photographic subject in the first image;
and calculating the angle variation and the displacement variation of the electronic equipment in the first time length based on the offset.
6. An electronic device, comprising a rotatable camera, the electronic device further comprising:
the acquisition module is used for acquiring the angle variation and the displacement variation of the electronic equipment in a first time length under the condition that the spatial attitude information of the electronic equipment is changed in the first time length in the process of acquiring the first image of the shooting object through the camera;
the determining module is used for determining the rotation angle of the camera based on the angle variation and the displacement variation;
the output module is used for controlling the camera to rotate according to the rotation angle and outputting a second image acquired by the rotated camera;
wherein the position of the photographic subject in the second image is the same as the position of the photographic subject in the first image.
7. The electronic device of claim 6, wherein the determining module comprises:
a first determination unit configured to determine a first rotation angle of the camera based on the angle variation;
a second determination unit configured to determine a second rotation angle of the camera based on the displacement variation;
and the obtaining unit is used for obtaining the vector sum of the first rotating angle and the second rotating angle to obtain the rotating angle of the camera.
8. The electronic device according to claim 7, wherein the second determination unit includes:
the acquisition subunit is used for acquiring the relative distance between the electronic equipment and the shooting object;
and the calculating subunit is used for calculating to obtain a second rotation angle of the camera according to the relative distance and the displacement variation.
9. The electronic device of any of claims 6-8, wherein the acquisition module comprises:
the first acquisition unit is used for acquiring the change information of the space attitude information of the electronic equipment within a first time length;
and the second acquisition unit is used for acquiring the angle variation and the displacement variation of the electronic equipment in the first time length under the condition that the change information meets the preset condition.
10. The electronic device of any of claims 6-8, wherein the acquisition module comprises:
a third acquisition unit, configured to acquire a first position of the photographic subject in a current preview image;
a third determination unit configured to determine an offset amount of the electronic device with respect to the photographic subject based on the first position and a second position of the photographic subject in the first image;
and the calculating unit is used for calculating the angle variation and the displacement variation of the electronic equipment in the first time length based on the offset.
11. An electronic device, comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the photographing method according to any of claims 1 to 5.
12. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps of the photographing method according to any one of claims 1 to 5.
CN201911345101.1A 2019-12-24 2019-12-24 Shooting method and electronic equipment Pending CN111031246A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911345101.1A CN111031246A (en) 2019-12-24 2019-12-24 Shooting method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911345101.1A CN111031246A (en) 2019-12-24 2019-12-24 Shooting method and electronic equipment

Publications (1)

Publication Number Publication Date
CN111031246A true CN111031246A (en) 2020-04-17

Family

ID=70212878

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911345101.1A Pending CN111031246A (en) 2019-12-24 2019-12-24 Shooting method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111031246A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113766121A (en) * 2021-08-10 2021-12-07 国网河北省电力有限公司保定供电分公司 Device and method for keeping image stable based on quadruped robot
CN113949805A (en) * 2020-07-17 2022-01-18 美的智慧家居科技有限公司 Control method and control device for intelligent equipment, intelligent equipment and storage medium
CN114449156A (en) * 2020-11-04 2022-05-06 北京小米移动软件有限公司 Camera control method and device, electronic equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060012701A1 (en) * 2004-07-19 2006-01-19 Samsung Electronics Co., Ltd. Auto-stabilization method in control of driving image pickup device and reading memory and photographing apparatus having the same
CN103685950A (en) * 2013-12-06 2014-03-26 华为技术有限公司 Method and device for preventing shaking of video image
CN104202531A (en) * 2014-09-23 2014-12-10 广东欧珀移动通信有限公司 Method for aerial shooting and photographing of mobile phone
CN105100614A (en) * 2015-07-24 2015-11-25 小米科技有限责任公司 Optical anti-vibration realization method, apparatus and electronic equipment
WO2016134534A1 (en) * 2015-02-28 2016-09-01 华为技术有限公司 Method for automatically adjusting camera and electronic device
CN106331511A (en) * 2016-11-16 2017-01-11 广东欧珀移动通信有限公司 Method and device of tracking shoot by intelligent terminal
CN106506965A (en) * 2016-11-29 2017-03-15 努比亚技术有限公司 A kind of image pickup method and terminal
CN106791450A (en) * 2017-02-28 2017-05-31 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN108881703A (en) * 2017-05-09 2018-11-23 杭州海康威视数字技术股份有限公司 Stabilization control method and device
CN109361860A (en) * 2018-10-30 2019-02-19 维沃移动通信(杭州)有限公司 A kind of terminal equipment control method and terminal device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060012701A1 (en) * 2004-07-19 2006-01-19 Samsung Electronics Co., Ltd. Auto-stabilization method in control of driving image pickup device and reading memory and photographing apparatus having the same
CN103685950A (en) * 2013-12-06 2014-03-26 华为技术有限公司 Method and device for preventing shaking of video image
CN104202531A (en) * 2014-09-23 2014-12-10 广东欧珀移动通信有限公司 Method for aerial shooting and photographing of mobile phone
WO2016134534A1 (en) * 2015-02-28 2016-09-01 华为技术有限公司 Method for automatically adjusting camera and electronic device
CN105100614A (en) * 2015-07-24 2015-11-25 小米科技有限责任公司 Optical anti-vibration realization method, apparatus and electronic equipment
CN106331511A (en) * 2016-11-16 2017-01-11 广东欧珀移动通信有限公司 Method and device of tracking shoot by intelligent terminal
CN106506965A (en) * 2016-11-29 2017-03-15 努比亚技术有限公司 A kind of image pickup method and terminal
CN106791450A (en) * 2017-02-28 2017-05-31 维沃移动通信有限公司 A kind of photographic method and mobile terminal
CN108881703A (en) * 2017-05-09 2018-11-23 杭州海康威视数字技术股份有限公司 Stabilization control method and device
CN109361860A (en) * 2018-10-30 2019-02-19 维沃移动通信(杭州)有限公司 A kind of terminal equipment control method and terminal device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949805A (en) * 2020-07-17 2022-01-18 美的智慧家居科技有限公司 Control method and control device for intelligent equipment, intelligent equipment and storage medium
CN114449156A (en) * 2020-11-04 2022-05-06 北京小米移动软件有限公司 Camera control method and device, electronic equipment and storage medium
CN113766121A (en) * 2021-08-10 2021-12-07 国网河北省电力有限公司保定供电分公司 Device and method for keeping image stable based on quadruped robot
CN113766121B (en) * 2021-08-10 2023-08-08 国网河北省电力有限公司保定供电分公司 Device and method for maintaining image stability based on quadruped robot

Similar Documents

Publication Publication Date Title
CN109361869B (en) Shooting method and terminal
CN107707817B (en) video shooting method and mobile terminal
CN108881733B (en) Panoramic shooting method and mobile terminal
CN111147743B (en) Camera control method and electronic equipment
CN109241832B (en) Face living body detection method and terminal equipment
CN111010511B (en) Panoramic body-separating image shooting method and electronic equipment
CN111031234B (en) Image processing method and electronic equipment
CN111031246A (en) Shooting method and electronic equipment
CN108881721B (en) Display method and terminal
CN108924422B (en) Panoramic photographing method and mobile terminal
CN108174110B (en) Photographing method and flexible screen terminal
CN110933494A (en) Picture sharing method and electronic equipment
CN111510623B (en) Shooting method and electronic equipment
CN111416935B (en) Shooting method and electronic equipment
CN111314616A (en) Image acquisition method, electronic device, medium and wearable device
CN110769154B (en) Shooting method and electronic equipment
CN110457885B (en) Operation method and electronic equipment
CN109618055B (en) Position sharing method and mobile terminal
CN108898548B (en) Display method of panorama and mobile terminal
JP7413546B2 (en) Photography method and electronic equipment
CN111182206B (en) Image processing method and device
CN111147754B (en) Image processing method and electronic device
CN110913133B (en) Shooting method and electronic equipment
CN108628508B (en) Method for adjusting clipping window and mobile terminal
CN108683849B (en) Image acquisition method and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200417