CN104902174B - A kind of camera method for controlling rotation and terminal - Google Patents
A kind of camera method for controlling rotation and terminal Download PDFInfo
- Publication number
- CN104902174B CN104902174B CN201510260795.4A CN201510260795A CN104902174B CN 104902174 B CN104902174 B CN 104902174B CN 201510260795 A CN201510260795 A CN 201510260795A CN 104902174 B CN104902174 B CN 104902174B
- Authority
- CN
- China
- Prior art keywords
- camera
- value
- angle value
- angle
- rotation
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000001133 acceleration Effects 0.000 claims abstract description 74
- 238000001514 detection method Methods 0.000 claims description 4
- 241000208340 Araliaceae Species 0.000 claims description 2
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 claims description 2
- 235000003140 Panax quinquefolius Nutrition 0.000 claims description 2
- 235000008434 ginseng Nutrition 0.000 claims description 2
- 108010001267 Protein Subunits Proteins 0.000 claims 1
- 230000008569 process Effects 0.000 abstract description 7
- 230000005611 electricity Effects 0.000 description 12
- 230000006870 function Effects 0.000 description 8
- 230000009471 action Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- XEEYBQQBJWHFJM-UHFFFAOYSA-N Iron Chemical compound [Fe] XEEYBQQBJWHFJM-UHFFFAOYSA-N 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000002045 lasting effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 229910052742 iron Inorganic materials 0.000 description 1
- 230000007306 turnover Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Studio Devices (AREA)
Abstract
The embodiment of the invention discloses a kind of camera method for controlling rotation and terminal, wherein method includes:Camera rotation command is received, obtains the target angle angle value of input, and control the camera to start to rotate;The current velocity of rotation value of camera and current angle value are obtained with Fixed Time Interval;According to default deceleration acceleration magnitude, calculate the rotating speed of the camera from the velocity of rotation value decelerate to zero during the angle value of required rotation and the current angle value and value, as with reference to angle value;If the target angle angle value, which subtracts the difference with reference to obtained by angle value, is more than or equal to preset value, the amplitude of the supply voltage of electro-motor in the camera is improved.Rotating speed can be improved to improve camera by improving the amplitude of the supply voltage of electro-motor in camera in camera rotation process using the present invention, user time is saved, improve Consumer's Experience.
Description
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of camera method for controlling rotation and terminal.
Background technology
With the continuous development of the communication technology, the function of being integrated on mobile terminal is increasingly abundanter, especially mobile terminal
The camera function of upper offer, make user do not have to it is extra carry camera can also record whenever and wherever possible and share oneself animation and
Beautiful scenery at one's side, it is deep to be liked by users.
Nowadays, existing many manufacturer terminals are proposed electronic rotation camera, rotatable in a kind of terminal as shown in Figure 6
The structural representation of camera, the principle of electronic rotation camera are:A built-in miniature electric motor to take the photograph in camera
As head can rotate, in addition, magnet is provided with camera, on the terminal body where camera with magnetic on camera
Opening position corresponding to iron phase is additionally provided with digital hall sensor, and the angle of camera is changing when camera rotates, camera
The distance of upper magnet and digital hall sensor also changes therewith, and now the Hall value of digital hall sensor is also with numeral
The distance between Hall sensor and magnet change and changed, therefore the anglec of rotation of camera can be judged according to Hall value
Degree.
At present, electronic rotation camera its speed in rotary course be typically at the uniform velocity, when velocity of rotation is too fast, when
When camera reaches angle on target due to inertia, the angle control for largely rotating and causing camera may be also had
System is inaccurate, but when velocity of rotation is slow, it can cause the time used in rotary course longer again, waste asking for user time
Topic.
The content of the invention
The embodiments of the invention provide a kind of camera method for controlling rotation and terminal, terminal rotating camera can be improved
Rotating speed, user time is saved, improves Consumer's Experience.
The embodiments of the invention provide a kind of camera method for controlling rotation, methods described includes:
Camera rotation command is received, obtains the target angle angle value of input, and control the camera to start to rotate;
The current velocity of rotation value of camera and current angle value are obtained with Fixed Time Interval;
According to default deceleration acceleration magnitude, calculate the rotating speed of the camera from the velocity of rotation value decelerate to zero to
During required rotation angle value and the current angle value between and value, as with reference to angle value;
If the target angle angle value, which subtracts the difference with reference to obtained by angle value, is more than or equal to preset value, institute is improved
State the amplitude of the supply voltage of electro-motor in camera.
Accordingly, the embodiments of the invention provide a kind of terminal, the terminal to include:
Instruction reception unit, for receiving camera rotation command, obtain the target angle angle value of input;
Camera control unit, for controlling the camera to start to rotate;
Rotating speed acquiring unit, for obtaining the current velocity of rotation value of the camera and current with Fixed Time Interval
Angle value;
Reference value computing unit, for according to default deceleration acceleration magnitude, calculating the rotating speed of the camera from described
Velocity of rotation value decelerate to zero arrive during required rotation angle value and the current angle value between and value, make
For with reference to angle value;
Voltage control unit, subtract the difference with reference to obtained by angle value for the target angle angle value and be more than or wait
When preset value, the amplitude of the supply voltage of electro-motor in the camera is improved.
The embodiment of the present invention, camera rotation command can be received, obtain the target angle angle value of input, and control the shooting
Head starts to rotate;The current velocity of rotation value of camera and current angle value can be obtained with Fixed Time Interval;Also
According to default deceleration acceleration magnitude, can calculate the rotating speed of the camera from the velocity of rotation value decelerate to zero to process
In required rotation angle value and the current angle value between and value, as with reference to angle value;And then in the mesh
When mark angle value subtracts the difference with reference to obtained by angle value and is more than or equal to preset value, improve electronic in the camera
The amplitude of the supply voltage of motor.Camera can be improved by improving the amplitude of the supply voltage of electro-motor in camera
Rotating speed, user time is saved, improves Consumer's Experience.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, it is required in being described below to embodiment to use
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area
For logical technical staff, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of camera method for controlling rotation schematic flow sheet provided in an embodiment of the present invention;
Fig. 2 is another camera method for controlling rotation schematic flow sheet provided in an embodiment of the present invention;
Fig. 3 is a kind of terminal structure schematic diagram provided in an embodiment of the present invention;
Fig. 4 is instruction reception unit structural representation provided in an embodiment of the present invention;
Fig. 5 is reference value computing unit structural representation provided in an embodiment of the present invention;
Fig. 6 is the structural representation of rotatable camera in a kind of terminal provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, rather than whole embodiments.Based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made
Example, belongs to the scope of protection of the invention.
In the specific implementation, the terminal mentioned in the embodiment of the present invention includes but is not limited to:Smart mobile phone (such as Android
Mobile phone, IOS mobile phones), tablet personal computer, notebook computer, palm PC, the electronic equipment such as wearable intelligent equipment.
A kind of camera method for controlling rotation provided in an embodiment of the present invention and terminal are entered below in conjunction with Fig. 1 to Fig. 6
Row specifically describes.
It is a kind of camera method for controlling rotation schematic flow sheet provided in an embodiment of the present invention, as shown in the figure referring to Fig. 1
Camera method for controlling rotation may include following steps:
S101, camera rotation command is received, obtains the target angle angle value of input, and control the camera to start to turn
It is dynamic.
In the specific implementation, the camera application that user when needing rotating camera, can be provided by terminal is opened and taken pictures
Interface, rotating camera function is then operated, after inputting the target angle angle value of camera, terminal starts camera and starts to rotate.
For example, showing an axis of abscissas on terminal display action interface, each angle value of camera is uniformly marked with the reference axis, is used
Family inputs target angle angle value when selecting the target angle angle value of camera on the axis of abscissas, it is determined that after angle on target,
When terminal receives camera rotation command, start the electro-motor (giving the power electric motors) in camera, by this
Electro-motor drives camera to start to rotate.
Further, this step may particularly include:Detect the sliding trace inputted on the touch-screen of terminal;According to described
The direction of sliding trace and length, determine the target angle angle value.
In the specific implementation, terminal is provided to user inputs target angle angle value by inputting sliding trace on the touchscreen
Function, and preset the mapping relations between the length of sliding trace and direction and the angle and rotation direction to be rotated respectively.
For example, sliding trace length is 1mm, then the angle to be rotated accordingly is 2 degree, when sliding trace direction is to terminal top, is taken the photograph
As the rotation direction of head is to be rotated to 0 degree direction, when sliding trace direction is to terminal bottom, the rotation direction of camera for
360 degree of directions rotate, when the sliding trace for detecting input be 1cm, and when sliding trace direction is to terminal bottom, it is known that
The angle to be rotated is 20 degree, and rotated to 360 degree that terminal obtains current angle value and can then obtained plus the angle value to be rotated
Obtain target angle angle value;If the direction of sliding trace is at the top of terminal, terminal obtains current angle value and subtracts the angle to be rotated
Value can then obtain target angle angle value.
S102, the current velocity of rotation value of camera and current angle value are obtained with Fixed Time Interval.
In the specific implementation, magnet is provided with the rotating camera controlled referring to Fig. 6, electro-motor, where camera
Terminal body on the opening position corresponding with camera upper magnet be additionally provided with digital hall sensor, camera is taken the photograph when rotating
As the angle of head is changing, the distance of camera upper magnet and digital hall sensor also changes therewith, and now Digital Hall
The Hall value of sensor changes and changed also with the distance between digital hall sensor and magnet, therefore can pass through reading
Hall value obtains the current angle value of camera.
The rotating speed of camera mentioned in the present embodiment specifically refers to the angular speed of camera rotation, and velocity of rotation value
Specifically refer to magnitude of angular velocity when camera rotates.Angular-rate sensor (such as gyroscope), camera can be installed in camera
In rotation process, the velocity of rotation value of acquisition camera can be gone with Fixed Time Interval by the angular-rate sensor.
S103, according to default deceleration acceleration magnitude, the rotating speed for calculating the camera slows down from the velocity of rotation value
During being arrived to zero between the angle value of required rotation and the current angle value and value, as with reference to angle value.
In the specific implementation, the rotation of rotating camera is controlled by its internal electro-motor, the electro-motor is usual
For dc motor, its rotating speed is related to its supply voltage, and the generally amplitude of rotating speed and supply voltage is into positive correlation, and
Directional correlation of the rotation direction with supply voltage.
After one stable supply voltage of electro-motor in camera, electro-motor starts to enter with an acceleration magnitude
Row accelerates to rotate, and due to the influence of the resistances such as frictional force, last electro-motor tends to a stable rotating speed and rotated.It is actual
In implementation process, if desired quickly stop the rotation of camera, it is necessary to provide an opposite electricity to the electro-motor in camera
Pressure, to give electro-motor one reverse acceleration, so as to control camera timely to stop operating by electro-motor.
Control camera can be pre-set when stopping operating, the deceleration supply voltage provided to electro-motor, the deceleration supplies
The direction of piezoelectric voltage is with starting the in opposite direction of the supply voltage provided when camera is rotated to electro-motor.Same model
Terminal, its hardware configuration is identical, therefore the method that can be averaged by test of many times, obtains under the deceleration supply voltage,
Specify the deceleration acceleration magnitude that camera obtains in model terminal.And then according to deceleration acceleration magnitude, turning for camera can be calculated
Speed decelerates to zero during the angle value of required rotation and the current angle value from the velocity of rotation value
And value, as with reference to angle value.This is in theory, to start to control camera to slow down until the mistake to stop operating with reference to angle value
Cheng Zhong, final angle value when camera finally stops operating.
S104, judge that the target angle angle value subtracts whether the difference with reference to obtained by angle value is more than or equal in advance
If value.
In the specific implementation, a target angle angle value can be pre-set and with reference to the error range between angle value, work as target
(i.e. the judged result of this step is when the difference that angle value subtracts with reference to obtained by angle value is more than or equal to the error range
It is), illustrate the current angle value distance objective angle value of camera also farther out, acceleration rotation can be carried out again, therefore can transfer to hold
Row step S105, to improve the rotating speed of camera.When the difference that target angle angle value is subtracted with reference to obtained by angle value is less than the error
During scope, illustrating the current angle value of camera, distance objective angle value is close, if lasting again accelerate to rotate, may cause
Camera turns over target angle angle value, therefore can provide reverse supply voltage to the electro-motor in camera to control camera
Stop operating in time.
S105, if so, improving the amplitude of the supply voltage of electro-motor in the camera.
In the specific implementation, the rotation of rotating camera is controlled by its internal electro-motor, the electro-motor is usual
For dc motor, its rotating speed is related to its supply voltage, and the generally amplitude of rotating speed and supply voltage is into positive correlation, because
This amplitude by improving the supply voltage of electro-motor, the rotating speed of camera can be improved.
In another alternative embodiment, if step S104 judged result is no, methods described also includes:Obtain default
The deceleration supply voltage of the electro-motor;The power electric motors are supplied voltage to the deceleration, it is described to be supplied to
Slow down acceleration magnitude described in camera;According to the deceleration acceleration magnitude, the camera is controlled to stop operating.
In the specific implementation, control camera can be pre-set when stopping operating, powered electricity to the deceleration that electro-motor provides
Pressure, the direction of the deceleration supply voltage and the direction phase that the supply voltage provided when camera is rotated to electro-motor is provided
Instead.Under deceleration supply voltage control, the electro-motor in camera obtains the deceleration acceleration as described in step S103
Value.Therefore, electro-motor proceeds by underdrive after deceleration supply voltage is obtained, when the rotating speed of camera is 0,
Stop to power electric motors, to control camera to stop operating.
When the embodiment of the present invention, camera rotation command can received, and get the target angle angle value of input, control
The camera starts to rotate;The current velocity of rotation value of camera and current angle can be obtained with Fixed Time Interval
Angle value;And then according to default deceleration acceleration magnitude, the rotating speed for calculating the camera decelerates to zero from the velocity of rotation value
During arriving between the angle value of required rotation and the current angle value and value, as with reference to angle value;Work as institute
When stating target angle angle value and subtracting the difference with reference to obtained by angle value and be more than or equal to preset value, improve in the camera
The amplitude of the supply voltage of electro-motor.Can by improve electro-motor supply voltage amplitude come improve electro-motor turn
Speed, so as to control camera to improve rotating speed by electro-motor, user time is saved, improves Consumer's Experience.
In addition, the embodiment of the present invention subtracts the difference with reference to obtained by angle value determining the target angle angle value
When value is less than preset value, the power electric motors are given with default decelerating voltage, to be supplied to deceleration described in the camera
Acceleration magnitude, and then according to the deceleration acceleration magnitude, control the camera to stop operating, prevent camera because rotating speed mistake
It can not be stopped operating in time when reaching target angle angle value soon, so as to ensure the control accuracy of rotation angle of camera.
It is another camera method for controlling rotation schematic flow sheet provided in an embodiment of the present invention referring to Fig. 2, as schemed institute
The camera method for controlling rotation shown may include following steps:
S201, camera rotation command is received, obtains the target angle angle value of input, and control the camera to start to turn
It is dynamic.
In the specific implementation, the camera application that user when needing rotating camera, can be provided by terminal is opened and taken pictures
Interface, rotating camera function is then operated, after inputting the target angle angle value of camera, terminal starts camera and starts to rotate.
For example, showing an axis of abscissas on terminal display action interface, each angle value of camera is uniformly marked with the reference axis, is used
Family inputs target angle angle value when selecting the target angle angle value of camera on the axis of abscissas, it is determined that after angle on target,
When terminal receives camera rotation command, start the electro-motor (giving the power electric motors) in camera, by this
Electro-motor drives camera to start to rotate.
Further, this step may particularly include:Detect the sliding trace inputted on the touch-screen of terminal;According to described
The direction of sliding trace and length, determine the target angle angle value.
In the specific implementation, terminal is provided to user inputs target angle angle value by inputting sliding trace on the touchscreen
Function, and preset the mapping relations between the length of sliding trace and direction and the angle and rotation direction to be rotated respectively.
For example, sliding trace length is 1mm, then the angle to be rotated accordingly is 2 degree, when sliding trace direction is to terminal top, is taken the photograph
As the rotation direction of head is to be rotated to 0 degree direction, when sliding trace direction is to terminal bottom, the rotation direction of camera for
360 degree of directions rotate, when the sliding trace for detecting input be 1cm, and when sliding trace direction is to terminal bottom, it is known that
The angle to be rotated is 20 degree, and rotated to 360 degree that terminal obtains current angle value and can then obtained plus the angle value to be rotated
Obtain target angle angle value;If the direction of sliding trace is at the top of terminal, terminal obtains current angle value and subtracts the angle to be rotated
Value can then obtain target angle angle value.
S202, the current velocity of rotation value of camera and current angle value are obtained with Fixed Time Interval.
In the specific implementation, magnet is provided with the rotating camera controlled referring to Fig. 6, electro-motor, where camera
Terminal body on the opening position corresponding with camera upper magnet be additionally provided with digital hall sensor, camera is taken the photograph when rotating
As the angle of head is changing, the distance of camera upper magnet and digital hall sensor also changes therewith, and now Digital Hall
The Hall value of sensor changes and changed also with the distance between digital hall sensor and magnet, therefore can pass through reading
Hall value judges the current angle value of camera.
The rotating speed of camera mentioned in the present embodiment specifically refers to the angular speed of camera rotation, and velocity of rotation value
Specifically refer to magnitude of angular velocity when camera rotates.Angular-rate sensor (such as gyroscope), camera can be installed in camera
In rotation process, the velocity of rotation value of acquisition camera can be gone with Fixed Time Interval by the angular-rate sensor.
S203, the angular acceleration values of the camera in current time interval are obtained, as deceleration acceleration magnitude.
In the specific implementation, control camera can be pre-set when stopping operating, powered electricity to the deceleration that electro-motor provides
Pressure, the direction of the deceleration supply voltage and the direction phase that the supply voltage provided when camera is rotated to electro-motor is provided
Instead.And the deceleration supply voltage may be configured as reducing speed now with camera when rotating, the confession of electro-motor in previous interval
The opposite voltage of piezoelectric voltage amplitude equidirectional.The deceleration supply voltage of electro-motor is set in this way, shooting can be made
The angular acceleration of the deceleration acceleration that head obtains when slowing down and camera in deceleration previous interval is in the same size in opposite direction.
S204, according to the deceleration acceleration magnitude and the velocity of rotation value, the rotating speed of the camera is calculated from described
Velocity of rotation value decelerate to zero arrive during required rotation angle value.
S205, between the required angle value rotated and the current angle value and value is calculated, as reference
Angle value.
According to deceleration acceleration magnitude, the rotating speed that can calculate camera decelerates to zero during from the velocity of rotation value
Between the angle value of required rotation and the current angle value and value, as with reference to angle value.This is with reference to angle value
In theory, start to control camera to slow down during stopping operating, final angle when camera finally stops operating
Value.
S206, judge that the target angle angle value subtracts whether the difference with reference to obtained by angle value is more than or equal in advance
If value.
In the specific implementation, a target angle angle value can be pre-set and with reference to the error range between angle value, work as target
When the difference that angle value subtracts with reference to obtained by angle value is more than or equal to the error range, illustrate when the current angle of preceding camera
Angle value distance objective angle value also farther out, can carry out acceleration rotation again, therefore can transfer to perform step S207, to improve camera
Rotating speed.When the difference that target angle angle value is subtracted with reference to obtained by angle value is less than the error range, illustrate that camera is current
Distance objective angle value is close for angle value, if lasting again accelerate to rotate, camera may be caused to turn over target angle angle value, because
This can transfer to perform step S208~S209, to control camera to stop operating in time.
S207, improve the amplitude of the supply voltage of electro-motor in the camera.
In the specific implementation, the rotation of rotating camera is controlled by its internal electro-motor, the electro-motor is usual
For dc motor, its rotating speed is related to its supply voltage, and the generally amplitude of rotating speed and supply voltage is into positive correlation, because
This amplitude by improving the supply voltage of electro-motor, the rotating speed of camera can be improved.
S208, the voltage opposite with amplitude equidirectional in current time interval is provided to the electro-motor, to provide
To the acceleration magnitude that slows down described in the camera.
S209, according to the deceleration acceleration magnitude, the camera is controlled to stop operating.
In the specific implementation, control camera can be pre-set when stopping operating, powered electricity to the deceleration that electro-motor provides
Pressure, the direction of the deceleration supply voltage and the direction phase that the supply voltage provided when camera is rotated to electro-motor is provided
Instead.In the present embodiment, the deceleration supply voltage may be configured as with camera reduce speed now rotation when, electricity in previous interval
Move the opposite voltage of the supply voltage amplitude equidirectional of motor.The deceleration power supply electricity of electro-motor is set in this way
Pressure, the angular acceleration size one of the deceleration acceleration obtained when camera can be made to slow down and camera in deceleration previous interval
Cause in opposite direction.Electro-motor proceeds by underdrive after deceleration supply voltage is obtained, until the rotating speed of camera is 0
When, stop to power electric motors, to control camera to stop operating.
When the embodiment of the present invention, camera rotation command can received, and get the target angle angle value of input, control
The camera starts to rotate;The current velocity of rotation value of camera and current angle can be obtained with Fixed Time Interval
Angle value;The angular acceleration values of the camera in current time interval can be also obtained, as deceleration acceleration magnitude, and then according to institute
State deceleration acceleration magnitude and the velocity of rotation value, calculate the rotating speed of the camera from the velocity of rotation value decelerate to zero to
During required rotation angle value;When the target angle angle value subtract the difference with reference to obtained by angle value be more than or
When person is equal to preset value, the amplitude of the supply voltage of electro-motor in the camera is improved.Can be by improving electro-motor
The amplitude of supply voltage improves the rotating speed of electro-motor, so as to control camera to improve rotating speed by electro-motor, economizes on
The family time, improve Consumer's Experience.
In addition, the embodiment of the present invention subtracts the difference with reference to obtained by angle value determining the target angle angle value
When value is less than preset value, the voltage opposite with amplitude equidirectional in current time interval is provided to the electro-motor, to carry
The acceleration magnitude that slows down described in the camera is supplied, and then according to the deceleration acceleration magnitude, controls the camera to stop turning
It is dynamic, prevent camera from can not be stopped operating in time when reaching target angle angle value because rotating speed is too fast, so as to ensure camera
The control accuracy of the anglec of rotation.
Referring to Fig. 3, a kind of terminal structure schematic diagram provided in an embodiment of the present invention, as shown in the figure terminal can at least wrap
Include:Instruction reception unit 301, camera control unit 302, rotating speed acquiring unit 303, reference value computing unit 304 and voltage
Control unit 305.
Instruction reception unit 301, for receiving camera rotation command, obtain the target angle angle value of input.
In the specific implementation, the camera application that user when needing rotating camera, can be provided by terminal is opened and taken pictures
Interface, rotating camera function is then operated, after inputting the target angle angle value of camera, camera control unit 302, which starts, to be taken the photograph
As head starts to rotate.For example, showing an axis of abscissas on terminal display action interface, camera is uniformly marked with the reference axis
Each angle value, user on the axis of abscissas select camera target angle angle value when, that is, input target angle angle value, it is determined that
After angle on target, when command reception list 301 receives camera rotation command, start the camera control unit in camera
302 (can be specially the electro-motor in camera), control camera start to rotate.
Further, referring to Fig. 4, Fig. 4 is instruction reception unit structural representation provided in an embodiment of the present invention, as schemed institute
The instruction reception unit 301 shown may particularly include:Sliding trace detection sub-unit 3101 and angle on target determination subelement 3102.
Sliding trace detection sub-unit 3101, for detecting the sliding trace inputted on the touch-screen of terminal;
Angle on target determination subelement 3102, for the direction according to the sliding trace and length, determine the target
Angle value.
In the specific implementation, terminal is provided to user inputs target angle angle value by inputting sliding trace on the touchscreen
Function, and preset the mapping relations between the length of sliding trace and direction and the angle and rotation direction to be rotated respectively.
For example, sliding trace length is 1mm, then the angle to be rotated accordingly is 2 degree, when sliding trace direction is to terminal top, is taken the photograph
As the rotation direction of head is to be rotated to 0 degree direction, when sliding trace direction is to terminal bottom, the rotation direction of camera for
360 degree of directions rotate, when it is 1cm that sliding trace detection sub-unit 3101, which detects the sliding trace of input, and sliding trace
When direction is to terminal bottom, it is known that the angle to be rotated is 20 degree, and rotated to 360 degree, so as to which angle on target determines that son is single
Member 3102 can obtain current angle value plus the angle value to be rotated to determine target angle angle value;If the direction of sliding trace be to
At the top of terminal, the acquisition current angle value of angle on target determination subelement 3102 subtracts the angle value to be rotated and can determine that angle on target
Value.
Camera control unit 302, for controlling the camera to start to rotate.
Rotating speed acquiring unit 303, for obtaining the current velocity of rotation value of the camera with Fixed Time Interval and working as
Preceding angle value.
In the specific implementation, magnet is provided with the rotating camera controlled referring to Fig. 6, electro-motor, where camera
Terminal body on the opening position corresponding with camera upper magnet be additionally provided with digital hall sensor, camera is taken the photograph when rotating
As the angle of head is changing, the distance of camera upper magnet and digital hall sensor also changes therewith, and now Digital Hall
The Hall value of sensor changes and changed also with the distance between digital hall sensor and magnet, therefore can pass through reading
Hall value obtains the current angle value of camera.
The rotating speed of camera mentioned in the present embodiment specifically refers to the angular speed of camera rotation, and velocity of rotation value
Specifically refer to magnitude of angular velocity when camera rotates.Rotating speed acquiring unit 303 may particularly include the angle speed installed in camera
Sensor (such as gyroscope) is spent, camera can be gone in rotation process by rotating speed acquiring unit 303 with Fixed Time Interval
Obtain the velocity of rotation value of camera.
Reference value computing unit 304, according to default deceleration acceleration magnitude, the rotating speed of the camera is calculated from described turn
Dynamic velocity amplitude decelerate to zero arrive during required rotation angle value and the current angle value between and value, as
With reference to angle value.
In the specific implementation, the rotation of rotating camera is controlled by its internal electro-motor, the electro-motor is usual
For dc motor, its rotating speed is related to its supply voltage, and the generally amplitude of rotating speed and supply voltage is into positive correlation, and
Directional correlation of the rotation direction with supply voltage.
After one stable supply voltage of electro-motor in camera, electro-motor starts to enter with an acceleration magnitude
Row accelerates to rotate, and due to the influence of the resistances such as frictional force, last electro-motor tends to a stable rotating speed and rotated.It is actual
In implementation process, if desired quickly stop the rotation of camera, it is necessary to provide an opposite electricity to the electro-motor in camera
Pressure, to give electro-motor one reverse acceleration, so as to control camera timely to stop operating by electro-motor.
Control camera can be pre-set when stopping operating, the deceleration supply voltage provided to electro-motor, the deceleration supplies
The direction of piezoelectric voltage is with starting the in opposite direction of the supply voltage provided when camera is rotated to electro-motor.Same model
Terminal, its hardware configuration is identical, therefore the method that can be averaged by test of many times, obtains under the deceleration supply voltage,
Specify the deceleration acceleration magnitude that camera obtains in model terminal.And then reference value computing unit 304 is according to deceleration acceleration magnitude,
Can calculate the rotating speed of camera from the velocity of rotation value decelerate to zero during the angle value of required rotation with it is described
Between current angle value and value, as with reference to angle value.This is in theory, to start to control camera to slow down with reference to angle value
During stopping operating, final angle value when camera finally stops operating.
Further, referring to Fig. 5, Fig. 5 is reference value computing unit structural representation provided in an embodiment of the present invention, is such as schemed
Shown reference value computing unit 304 may particularly include:Acceleration obtains subelement 3401, rotational angle obtains subelement 3402
With reference value computation subunit 3403.
Acceleration obtains subelement 3401, for obtaining the angular acceleration values of the camera in current time interval, makees
For deceleration acceleration magnitude;Rotational angle obtains subelement 3402, for according to the deceleration acceleration magnitude and the velocity of rotation
Value, calculate the rotating speed of the camera from the velocity of rotation value decelerate to zero during required rotation angle value;
Reference value computation subunit 3403, between the required angle value rotated and the current angle value and value is calculated,
As with reference to angle value.
Control camera can be pre-set when slowing down and stopping operating, the deceleration supply voltage of electro-motor in camera,
The deceleration supply voltage may be configured as with camera reduce speed now rotation when, the supply voltage of electro-motor in previous interval
The opposite voltage of amplitude equidirectional.The deceleration supply voltage of electro-motor is set in this way, camera can be made to slow down
When the deceleration acceleration that obtains and camera in deceleration previous interval angular acceleration it is in the same size in opposite direction.Therefore,
Acceleration, which obtains subelement 3401, can obtain the angular acceleration values of the camera in current time interval, as deceleration acceleration
Value, so rotational angle obtain subelement 3402 can be according to the deceleration acceleration magnitude and the velocity of rotation value, described in calculating
The rotating speed of camera from the velocity of rotation value decelerate to zero during required rotation angle value, turn finally to value meter
Operator unit 3403 calculates between the required angle value rotated and the current angle value and value, as reference angle
Angle value.
Voltage control unit 305, for the target angle angle value subtract the difference with reference to obtained by angle value be more than or
When person is equal to preset value, the amplitude of the supply voltage of electro-motor in the camera is improved.
In the specific implementation, a target angle angle value can be pre-set and with reference to the error range between angle value, work as target
When the difference that angle value subtracts with reference to obtained by angle value is more than or equal to the error range, illustrate when the current angle of preceding camera
Angle value distance objective angle value also farther out, can carry out acceleration rotation again, therefore voltage control unit 305 can improve the camera
The amplitude of the supply voltage of interior electro-motor, to improve the rotating speed of camera.
In another alternative embodiment, the terminal also includes:Voltage acquisition unit 306, for the target angle angle value
When subtracting the difference with reference to obtained by angle value and being less than preset value, the deceleration power supply electricity of the default electro-motor is obtained
Pressure.
Accordingly, the voltage control unit 305, it is additionally operable to supply voltage to the electro-motor confession with the deceleration
Electricity, to be supplied to the acceleration magnitude that slows down described in the camera.
The camera control unit 302, it is additionally operable to according to the deceleration acceleration magnitude, controls the camera to stop turning
It is dynamic.
In the specific implementation, control camera can be pre-set when stopping operating, voltage control unit 305 carries to electro-motor
The deceleration supply voltage of confession, the direction of the deceleration supply voltage is with starting the confession provided when camera is rotated to electro-motor
Piezoelectric voltage it is in opposite direction.When the difference that target angle angle value subtracts with reference to obtained by angle value is less than preset value, voltage control unit
305 supply voltage to power electric motors with the default deceleration, electronic in camera under deceleration supply voltage control
Motor obtains the deceleration acceleration magnitude described in reference value computing unit 304.Therefore, electro-motor is obtaining deceleration supply voltage
Afterwards, camera control unit 302 controls camera to reduce speed now by the electro-motor, and when rotating speed is 0, voltage control is single
Member 305 stops to power electric motors, to control camera to stop operating.
In another alternative embodiment, the voltage control unit 305, it is additionally operable to the target angle angle value and subtracts the ginseng
When examining the difference obtained by angle value and being less than preset value, provided and amplitude equidirectional in current time interval to the electro-motor
Opposite voltage, to be supplied to the acceleration magnitude that slows down described in the camera.
Accordingly, the camera control unit 302, it is additionally operable to, according to the deceleration acceleration magnitude, control the shooting
Head stops operating.
In the specific implementation, control camera can be pre-set when stopping operating, powered electricity to the deceleration that electro-motor provides
Pressure, the direction of the deceleration supply voltage and the direction phase that the supply voltage provided when camera is rotated to electro-motor is provided
Instead.In the present embodiment, the deceleration supply voltage may be configured as with camera reduce speed now rotation when, electricity in previous interval
Move the opposite voltage of the supply voltage amplitude equidirectional of motor.The deceleration power supply electricity of electro-motor is set in this way
Pressure, the angular acceleration size one of the deceleration acceleration obtained when camera can be made to slow down and camera in deceleration previous interval
Cause in opposite direction.Electro-motor proceeds by deceleration and turned after the deceleration supply voltage that voltage control unit 305 provides is obtained
Dynamic, camera control unit 302 controls camera to reduce speed now by electro-motor, when the rotating speed of camera is 0, voltage
Control unit 305 stops to power electric motors, to control camera to stop operating.
The embodiment of the present invention, camera rotation command can be received in specified receiving unit 301, and get the mesh of input
When marking angle value, the camera is controlled to start to rotate by camera control unit 302;Rotating speed acquiring unit 303 is with fixation
Time interval obtains the current velocity of rotation value of camera and current angle value;And then reference value computing unit 304
According to default deceleration acceleration magnitude, calculate the rotating speed of the camera from the velocity of rotation value decelerate to zero during institute
Between the angle value that rotates and the current angle value and value is needed, as with reference to angle value;When the target angle angle value
When subtracting the difference with reference to obtained by angle value and being more than or equal to preset value, voltage control unit 305 improves the shooting
The amplitude of the supply voltage of electro-motor in head.It can be taken the photograph by improving the amplitude of the supply voltage of electro-motor in camera to carry
As head raising rotating speed, user time is saved, improves Consumer's Experience.
Step in present invention method can be sequentially adjusted, merged and deleted according to actual needs.
Unit in terminal of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with
The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium
In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, abbreviation RAM) etc..
A kind of camera method for controlling rotation and terminal disclosed in the embodiment of the present invention are described in detail above, with
The upper disclosed interest field for being only present pre-ferred embodiments, the present invention can not being limited with this certainly, therefore according to
The equivalent variations that the claims in the present invention are made, still belong to the scope that the present invention is covered.
Claims (10)
- A kind of 1. camera method for controlling rotation, it is characterised in that including:Camera rotation command is received, obtains the target angle angle value of input, and control the camera to start to rotate;The current velocity of rotation value of camera and current angle value are obtained with Fixed Time Interval;According to default deceleration acceleration magnitude, calculate the rotating speed of the camera from the velocity of rotation value decelerate to zero to mistake In journey between the angle value of required rotation and the current angle value and value, as with reference to angle value;If the target angle angle value, which subtracts the difference with reference to obtained by angle value, is more than or equal to preset value, taken the photograph described in raising As the amplitude of the supply voltage of electro-motor in head.
- 2. according to the method for claim 1, it is characterised in that if the target angle angle value subtracts the reference angle value institute The difference obtained is less than preset value, and methods described also includes:Obtain the deceleration supply voltage of the default electro-motor;The power electric motors are supplied voltage to the deceleration, to be supplied to the acceleration magnitude that slows down described in the camera;According to the deceleration acceleration magnitude, the camera is controlled to stop operating.
- 3. according to the method for claim 1, it is characterised in that it is described according to default deceleration acceleration magnitude, described in calculating The rotating speed of camera from the velocity of rotation value decelerate to zero during the angle value of required rotation with it is described current Between angle value and value, includes as with reference to angle value:The angular acceleration values of the camera in current time interval are obtained, as deceleration acceleration magnitude;According to the deceleration acceleration magnitude and the velocity of rotation value, the rotating speed of the camera is calculated from the velocity of rotation value Decelerate to zero arrive during required rotation angle value;Between the required angle value rotated and the current angle value and value is calculated, as with reference to angle value.
- 4. according to the method for claim 3, it is characterised in that if the target angle angle value subtracts the reference angle value institute The difference obtained is less than preset value, and methods described also includes:The voltage opposite with amplitude equidirectional in current time interval is provided to the electro-motor, to be supplied to the shooting The deceleration acceleration magnitude;According to the deceleration acceleration magnitude, the camera is controlled to stop operating.
- 5. according to the method for claim 1, it is characterised in that the reception camera rotation command, obtain the mesh of input Mark angle value includes:Detect the sliding trace inputted on the touch-screen of terminal;According to the direction of the sliding trace and length, the target angle angle value is determined.
- A kind of 6. terminal, it is characterised in that including:Instruction reception unit, for receiving camera rotation command, obtain the target angle angle value of input;Camera control unit, for controlling the camera to start to rotate;Rotating speed acquiring unit, for obtaining the current velocity of rotation value of camera and current angle with Fixed Time Interval Value;Reference value computing unit, for according to default deceleration acceleration magnitude, calculating the rotating speed of the camera from the rotation Velocity amplitude decelerate to zero arrive during required rotation angle value and the current angle value between and value, as ginseng Examine angle value;Voltage control unit, subtract the difference with reference to obtained by angle value for the target angle angle value and be more than or equal in advance If during value, improve the amplitude of the supply voltage of electro-motor in the camera.
- 7. terminal according to claim 6, it is characterised in that the terminal also includes:Voltage acquisition unit, when subtracting the difference with reference to obtained by angle value for the target angle angle value and being less than preset value, Obtain the deceleration supply voltage of the default electro-motor;The voltage control unit, it is additionally operable to supply voltage to the power electric motors with the deceleration, it is described to be supplied to Slow down acceleration magnitude described in camera;The camera control unit, it is additionally operable to, according to the deceleration acceleration magnitude, control the camera to stop operating.
- 8. terminal according to claim 6, it is characterised in that the reference value computing unit includes:Acceleration obtains subelement, for obtaining the angular acceleration values of the camera in current time interval, adds as slowing down Velocity amplitude;Rotational angle obtains subelement, for according to the deceleration acceleration magnitude and the velocity of rotation value, calculating the shooting Head rotating speed from the velocity of rotation value decelerate to zero during required rotation angle value;Reference value computation subunit, for calculate it is described required for rotate angle value and the current angle value between and Value, as with reference to angle value.
- 9. terminal according to claim 8, it is characterised in that the voltage control unit, be additionally operable to the angle on target When value subtracts the difference with reference to obtained by angle value and is less than preset value, to the electro-motor provide with current time interval The opposite voltage of amplitude equidirectional, to be supplied to the acceleration magnitude that slows down described in the camera;The camera control unit, it is additionally operable to, according to the deceleration acceleration magnitude, control the camera to stop operating.
- 10. terminal according to claim 6, it is characterised in that the instruction reception unit includes:Sliding trace detection sub-unit, for detecting the sliding trace inputted on the touch-screen of terminal;Angle on target determination subelement, for the direction according to the sliding trace and length, determine the target angle angle value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510260795.4A CN104902174B (en) | 2015-05-19 | 2015-05-19 | A kind of camera method for controlling rotation and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510260795.4A CN104902174B (en) | 2015-05-19 | 2015-05-19 | A kind of camera method for controlling rotation and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104902174A CN104902174A (en) | 2015-09-09 |
CN104902174B true CN104902174B (en) | 2017-11-24 |
Family
ID=54034540
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510260795.4A Expired - Fee Related CN104902174B (en) | 2015-05-19 | 2015-05-19 | A kind of camera method for controlling rotation and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104902174B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105430131B (en) * | 2015-12-23 | 2018-11-02 | 惠州Tcl移动通信有限公司 | A kind of the adjustable-angle CCD camera assembly and mobile phone of mobile phone |
CN108769319B (en) * | 2018-06-08 | 2020-10-02 | Oppo广东移动通信有限公司 | Electromagnetic interference preventing speed changing method for sliding assembly, driving assembly, device and medium |
CN112154651A (en) * | 2019-08-13 | 2020-12-29 | 深圳市大疆创新科技有限公司 | Holder control method, holder and computer readable storage medium |
CN112543896A (en) * | 2020-01-21 | 2021-03-23 | 深圳市大疆创新科技有限公司 | Cloud platform and control method thereof |
CN113938599B (en) * | 2020-07-14 | 2024-03-08 | 浙江宇视科技有限公司 | Electric lens focusing method and device, electronic equipment and storage medium |
CN113949814B (en) * | 2021-11-09 | 2024-01-26 | 重庆紫光华山智安科技有限公司 | Gun-ball linkage snapshot method, device, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101068309A (en) * | 2007-05-24 | 2007-11-07 | 中兴通讯股份有限公司 | Method and device for automatic rotating mobile terminal camera head shooting results |
CN103605374A (en) * | 2013-08-30 | 2014-02-26 | 天津市亚安科技股份有限公司 | Method and device for increasing positioning accuracy of holder |
CN104135620A (en) * | 2014-08-13 | 2014-11-05 | 深圳市朵唯志远科技有限公司 | A method and a system for overturning an imaging picture from a rotating camera on a mobile terminal |
CN104238669A (en) * | 2014-09-04 | 2014-12-24 | 广东欧珀移动通信有限公司 | Method and device for controlling rotation of camera of mobile terminal and mobile terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9699373B2 (en) * | 2013-04-28 | 2017-07-04 | Tencnt Technology (Shenzhen) Company Limited | Providing navigation information to a point of interest on real-time street views using a mobile device |
-
2015
- 2015-05-19 CN CN201510260795.4A patent/CN104902174B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101068309A (en) * | 2007-05-24 | 2007-11-07 | 中兴通讯股份有限公司 | Method and device for automatic rotating mobile terminal camera head shooting results |
CN103605374A (en) * | 2013-08-30 | 2014-02-26 | 天津市亚安科技股份有限公司 | Method and device for increasing positioning accuracy of holder |
CN104135620A (en) * | 2014-08-13 | 2014-11-05 | 深圳市朵唯志远科技有限公司 | A method and a system for overturning an imaging picture from a rotating camera on a mobile terminal |
CN104238669A (en) * | 2014-09-04 | 2014-12-24 | 广东欧珀移动通信有限公司 | Method and device for controlling rotation of camera of mobile terminal and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN104902174A (en) | 2015-09-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104902174B (en) | A kind of camera method for controlling rotation and terminal | |
CN104238578B (en) | Method and device for controlling rotation of camera | |
CN104969163B (en) | Methods of exhibiting, device and the electronic equipment of application interface | |
WO2019019883A1 (en) | Method for determining relative position of double screen, display control method, and terminal | |
CN105007418B (en) | A kind of photographic method and mobile terminal | |
CN104360734B (en) | A kind of method of terminal operation | |
CN104902171B (en) | A kind of camera angle correcting method and terminal | |
CN110251936B (en) | Method and device for controlling virtual camera in game and storage medium | |
CN104536643B (en) | A kind of icon drag method and terminal | |
WO2015196703A1 (en) | Application icon display method and apparatus | |
CN106527842B (en) | Application icon control method and device of intelligent equipment and intelligent equipment | |
CN103645844A (en) | Page displaying method and device | |
US11739881B2 (en) | Gimbal control method, gimbal and machine-readable storage medium | |
JP2009516280A (en) | Method for displaying parameter status information and related portable electronic devices and parameters | |
US20150169165A1 (en) | System and Method for Processing Overlapping Input to Digital Map Functions | |
CN104167959B (en) | The determination method and apparatus of magnetic pole logarithm | |
EP3249498A1 (en) | Display screen controlling method and apparatus, and terminal | |
CN103823625B (en) | Control method, device and the mobile terminal of mobile terminal median surface picture | |
CN110069137A (en) | Gestural control method, control device and control system | |
CN109510531A (en) | The driving method and its driver and computer readable storage medium of stepper motor | |
CN104391646A (en) | Method and device for adjusting object attribute information | |
CN108134904A (en) | A kind of method and terminal that prevent camera from dallying | |
CN104567791B (en) | Rotation angle of camera detection method, device and mobile terminal | |
CN104166464A (en) | Method, device and portable terminal for controlling panorama display | |
CN107124550A (en) | A kind of camera closing, open method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171124 |