CN104238579B - Camera rotation control method applied to mobile terminal and mobile terminal - Google Patents
Camera rotation control method applied to mobile terminal and mobile terminal Download PDFInfo
- Publication number
- CN104238579B CN104238579B CN201410505404.6A CN201410505404A CN104238579B CN 104238579 B CN104238579 B CN 104238579B CN 201410505404 A CN201410505404 A CN 201410505404A CN 104238579 B CN104238579 B CN 104238579B
- Authority
- CN
- China
- Prior art keywords
- value
- cam device
- hall sensor
- digital hall
- angle
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Studio Devices (AREA)
Abstract
The invention discloses a camera rotation control method applied to a mobile terminal and the mobile terminal. The mobile terminal comprises a terminal body and a camera device. The camera device can rotate relative to the terminal body and comprises a magnet. The position, corresponding to the camera device, of the terminal body is provided with a digital Hall sensor. The camera rotation control method includes: receiving an instruction to rotate the camera, in which a target angle is carried; detecting a value of the digital Hall sensor; according to the detected value of the digital Hall sensor as well as a table of correspondence between the value of the digital Hall sensor and an angle of the camera device, determining a current angle of the camera device; calculating an angle to be finished; rotating the camera device to the angle to be finished, through a motor. The camera rotation control method and the mobile terminal according to the technical scheme have the advantages that optionally angular rotation is allowed for the camera, and the service life of the motor used for controlling rotation of the camera is prolonged.
Description
Technical field
The present invention relates to field of photography, and in particular to a kind of camera method of controlling rotation for being applied to mobile terminal and shifting
Dynamic terminal.
Background technology
With the development of science and technology, the function of mobile terminal (such as mobile phone, panel computer etc.) also increasingly enrich and
Powerful, at present, most of mobile terminal is equipped with the camera of superior performance, is taken pictures or is recorded using mobile terminal so as to user
Picture.
For most of mobile terminals, provisioned is that fixed camera, i.e. camera are fixed on mobile terminal
On, fixed camera is divided into rear camera (i.e. installed in the camera at the mobile terminal back side) and front camera is (i.e.
Installed in the positive camera of mobile terminal) two kinds, this fixed camera using upper relatively simple, in shooting process
In, it is often necessary to mobile terminal where user's dollying head completes to find a view.For the deficiency of existing fixed camera,
Many manufacturers propose the mobile terminal for being equipped with rotating camera, by setting rotating mechanism so that camera can be in movement
The rotation of multi-angle is carried out on terminal body, it is achieved thereby that having replaced traditional front camera and rearmounted with a camera
Camera, improves the experience of taking pictures of user.
However, the mobile terminal with rotating camera can only control camera to rotate to two fixed position (examples at present
Position and the position parallel with the mobile terminal back side such as parallel with mobile terminal screen), the front and rear for realizing camera
Switching, and uncontrollable camera rotates to the position of any needs, in addition, in order to realize that the front and rear of camera switches, moving
Dynamic terminal needs the angle for being rotated up to camera, to ensure that front and rear switching can succeed, is so easy for shooting occur
Head goes to bottom, and controls the motor that camera rotates still in the problem of idle running, have impact on the service life of the motor.
The content of the invention
The present invention provides a kind of camera method of controlling rotation and mobile terminal for being applied to mobile terminal, for realizing taking the photograph
As the Arbitrary Rotation of head, the service life of the motor of control camera rotation is improved.
First aspect present invention provides a kind of camera method of controlling rotation for being applied to mobile terminal, above-mentioned mobile terminal
Including terminal body and cam device, above-mentioned cam device can be rotated relative to above-mentioned terminal body,
Magnet is provided with above-mentioned cam device, the position relative with above-mentioned cam device is provided with above-mentioned terminal body
Digital hall sensor, and, the distance between above-mentioned magnet and above-mentioned digital hall sensor are with above-mentioned cam device
Rotate and change;
Above-mentioned camera method of controlling rotation includes:Camera rotation instruction is received, wherein, above-mentioned camera rotation instruction
Middle carrying angle on target;
Detect the value of above-mentioned digital hall sensor;
According to the value of the above-mentioned digital hall sensor for detecting, and digital hall sensor value-cam device angle
Angle value mapping table determines the current angle of above-mentioned cam device, wherein, above-mentioned digital hall sensor value-camera dress
Angle setting angle value mapping table is that the value of the digital hall sensor measured under all angles according to above-mentioned cam device is pre-
The table for first setting;
The anglec of rotation is treated in calculating, wherein, it is above-mentioned to treat that the anglec of rotation is equal to above-mentioned angle on target and works as with above-mentioned cam device
Difference between preceding angle;
The anglec of rotation is treated by the way that the above-mentioned cam device rotation of motor control is above-mentioned.
Another aspect of the present invention provides a kind of mobile terminal, including:Terminal body and cam device, it is above-mentioned to take the photograph
As head device can be rotated relative to above-mentioned terminal body, magnet is provided with above-mentioned cam device, it is above-mentioned mobile whole
The position relative with above-mentioned cam device is provided with digital hall sensor on the body of end, and, above-mentioned magnet and above-mentioned numeral
The distance between Hall sensor changes with the rotation of above-mentioned cam device;
Above-mentioned terminal body includes:
Receiving unit, for receiving camera rotation instruction, wherein, carry target angle in above-mentioned camera rotation instruction
Degree;
Detection unit, the value for detecting above-mentioned digital hall sensor;
Determining unit, the value of the above-mentioned digital hall sensor for being detected according to above-mentioned detection unit, and numeral
Hall sensor value-cam device angle value mapping table determines the current angle of above-mentioned cam device, wherein, it is above-mentioned
Digital hall sensor value-cam device angle value mapping table is surveyed under all angles according to above-mentioned cam device
The table that the value of the digital hall sensor for obtaining pre-sets;
Computing unit, for calculate treat the anglec of rotation, wherein, it is above-mentioned treat the anglec of rotation be equal to above-mentioned angle on target with it is above-mentioned
Difference between the current angle of cam device;
Rotation control unit, for treating the anglec of rotation by the way that the above-mentioned cam device rotation of motor control is above-mentioned.
Knowable to above-mentioned technical proposal of the present invention, the present invention sets magnet on cam device, and in mobile terminal sheet
Position relative with cam device on body sets digital hall sensor, by the characteristic of digital hall sensor to camera
Design factors are judged and are recognized so that when mobile terminal receives camera rotation instruction, can be by cam device
The angle on target that camera rotation instruction is indicated is rotated to, the Arbitrary Rotation of camera is realized, further, since mobile
Terminal is that cam device is rotated into angle on target, therefore, be not in the situation of motor idle running, further increase control
The service life of the motor of cam device rotation.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, without having to pay creative labor, may be used also
Other accompanying drawings are obtained with according to these accompanying drawings.
A kind of mobile terminal one embodiment structural representation that Fig. 1 is provided for the present invention;
A kind of camera method of controlling rotation one embodiment flow for being applied to mobile terminal that Fig. 2 is provided for the present invention
Schematic diagram;
Fig. 3 illustrates for the corresponding relation between the digital hall sensor value for providing of the invention and cam device angle value
Figure;
A kind of mobile terminal one embodiment structural representation that Fig. 4 is provided for the present invention.
Specific embodiment
To enable that goal of the invention of the invention, feature, advantage are more obvious and understandable, below in conjunction with the present invention
Accompanying drawing in embodiment, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described reality
It is only a part of embodiment of the invention to apply example, and not all embodiments.Based on the embodiment in the present invention, the common skill in this area
The every other embodiment that art personnel are obtained under the premise of creative work is not made, belongs to the model of present invention protection
Enclose.
A kind of camera rotation for being applied to mobile terminal is provided the embodiment of the present invention in the embodiment of the present invention below
Control method, wherein, the mobile terminal includes terminal body and cam device, and above-mentioned cam device can be relative
Rotated in above-mentioned terminal body, and magnet be provided with above-mentioned cam device, on above-mentioned terminal body with it is above-mentioned
The relative position of cam device is provided with digital hall sensor, and, between above-mentioned magnet and above-mentioned digital hall sensor
Distance changed with the rotation of above-mentioned cam device;Above-mentioned camera method of controlling rotation includes:Receive shooting
Head rotation instruction, above-mentioned camera rotation instruction is for indicating above-mentioned mobile terminal that above-mentioned cam device is rotated into target angle
Degree;Detect the value of above-mentioned digital hall sensor;According to the value of the above-mentioned digital hall sensor for detecting, and Digital Hall
Sensor values-cam device angle value mapping table determines the current angle of above-mentioned cam device, wherein, above-mentioned numeral
Hall sensor value-cam device angle value mapping table is measured according to above-mentioned cam device under all angles
The table that the value of digital hall sensor pre-sets;The anglec of rotation is treated in calculating, wherein, it is above-mentioned to treat that the anglec of rotation is equal to above-mentioned target
Difference between angle and the current angle of above-mentioned cam device;Above-mentioned cam device is controlled to rotate by electro-motor
State and treat the anglec of rotation.The embodiment of the present invention also provides corresponding mobile terminal.It is described in detail individually below.
A kind of camera method of controlling rotation for being applied to mobile terminal provided in an embodiment of the present invention is said below
It is bright, illustrate first, mobile terminal that can be as shown in Figure 1 in the embodiment of the present invention, including terminal body 11 and
Cam device 12, cam device 12 includes the camera 121 being fixedly installed on inside cam device 12, cam device
12 can rotate relative to terminal body 11, so as to drive camera 121 to be rotated relative to terminal body 11.Shooting
Magnet 122 is provided with head device 12, the position relative with cam device 12 is provided with numeral suddenly on terminal body 11
That sensor 111, and, the distance between magnet 122 and digital hall sensor 111 are sent out with the rotation of cam device 12
Changing.It should be noted that in the mobile terminal shown in Fig. 1, cam device 12 can be around being arranged at mobile terminal sheet
The trunnion axis 112 at the top of body 11 is rotated, and certainly, in actual applications, the structure of the mobile terminal in the embodiment of the present invention also may be used
To be not used in the mobile terminal shown in Fig. 1, for example, cam device can also be arranged at the vertical axis of terminal body side
Rotate, the embodiment of the present invention is not defined to the specific setting structure between terminal body and cam device.
Fig. 2 is referred to, the camera method of controlling rotation in the embodiment of the present invention includes:
201st, camera rotation instruction is received;
Wherein, angle on target is carried in above-mentioned camera rotation instruction.
Alternatively, the input control of camera rotation instruction is added in the application of taking pictures of mobile terminal, user can be
The angle on target of input control input one come send camera rotation instruction, or, user can also be by external equipment to shifting
Dynamic terminal sends above-mentioned camera rotation instruction, and the external equipment is connected with the mobile terminal by wired mode or wireless mode
Connect, certainly, the embodiment of the present invention can also send above-mentioned camera rotation instruction to mobile terminal otherwise, to trigger
The execution of subsequent step, is not construed as limiting herein in embodiment illustrated in fig. 2.
202nd, the value of digital hall sensor is detected;
Mobile terminal detection is arranged at the value of the digital hall sensor on terminal body, wherein, detection numeral is suddenly
The value of your sensor is referred to prior art realization, and here is omitted.
203rd, according to the value of the above-mentioned digital hall sensor for detecting, and digital hall sensor value-camera dress
Angle setting angle value mapping table determines the current angle of above-mentioned cam device;
Wherein, above-mentioned digital hall sensor value-cam device angle value mapping table is according to above-mentioned camera
The table that the value of the digital hall sensor that device is measured under all angles pre-sets.
Because mobile terminal individual difference is than larger, uniformity is poor, therefore, in the embodiment of the present invention, in every movement
The value of the digital hall sensor that terminal obtains mobile terminal cam device when dispatching from the factory is measured under all angles, and shape
Into digital hall sensor value-cam device angle value mapping table storage in the terminal.
204th, calculate and treat the anglec of rotation, wherein, it is above-mentioned to treat that the anglec of rotation is equal to angle on target and works as with above-mentioned cam device
Difference between preceding angle;
Illustrate, it is assumed that the angle on target carried in camera rotation instruction is a, the camera dress that step 203 determines
The angle put is β, passes through formula T=a- β in mobile terminal, you can calculate and treat anglec of rotation T.
205th, the anglec of rotation is treated by the way that the above-mentioned cam device rotation of motor control is above-mentioned;
When step 204 is calculated whne the anglec of rotation, mobile terminal is controlled by the motor for controlling cam device to rotate
Above-mentioned cam device rotation is above-mentioned to treat the anglec of rotation.Due to the interior mechanical mechanism of motor, each gear rotation of motor
Angle is all accurate, therefore, the embodiment of the present invention can control cam device to rotate accurate angle by motor.
Optionally, the above-mentioned shooting by the front of above-mentioned cam device when parallel with the display screen of above-mentioned mobile terminal
The angle of head device is set to 0 degree, then, if step 204 calculate treat the anglec of rotation for positive number, control cam device edge
Rearmounted direction rotates, if step 204 calculate treat the anglec of rotation for negative, control cam device turns along preposition direction
It is dynamic.For example, mobile terminal as shown in Figure 1, the now display screen of the front of cam device and above-mentioned mobile terminal
It is parallel, if the angle of now cam device is set into 0 degree, when step 204 calculate whne the anglec of rotation be positive number when, control
Cam device is rotated along rearmounted direction, i.e., the placement direction of the mobile terminal shown in Fig. 1 controls camera as reference direction
Device is rotated clockwise around trunnion axis, when step 204 calculate whne the anglec of rotation be negative when, control cam device
Rotated along preposition direction, i.e., as reference direction, control cam device is around level for the placement direction of the mobile terminal shown in Fig. 1
Axle counterclockwise rotates.
Further, it is contemplated that when digital hall sensor value within a certain range when corresponding cam device angle
It is difficult to determine, therefore, can also be according to the property settings of the digital hall sensor of above-mentioned mobile terminal in the embodiment of the present invention
First preset range, when step 202 detects the value of digital hall sensor in first preset range, with a default step
The above-mentioned cam device of control long is rotated along a direction so that the distance between above-mentioned digital hall sensor and above-mentioned magnet
Taper into, until detecting the value of above-mentioned digital hall sensor not in first preset range;Detecting above-mentioned number
When the value of word Hall sensor is not in first preset range, according to the value of currently detected digital hall sensor, with
And digital hall sensor value-cam device angle value mapping table determines the current angle of above-mentioned cam device.
Further, it is contemplated that when digital hall sensor value within a certain range when corresponding cam device angle
Have two, and corresponding two angles necessarily have an angle more than between above-mentioned digital hall sensor and above-mentioned magnet away from
From it is nearest when the angle of cam device answered, and another angle less than above-mentioned digital hall sensor and above-mentioned magnet it
Between it is closest when corresponding cam device angle, also, when between above-mentioned digital hall sensor and above-mentioned magnet
It is closest when, the maximum absolute value of digital hall sensor, therefore, can also be according to above-mentioned movement in the embodiment of the present invention
The preset range of property settings second of the digital hall sensor of terminal, second preset range meets:When Digital Hall sensing
In second preset range and when absolute value is non-maximum, the value of the digital hall sensor corresponds to above-mentioned taking the photograph to the value of device
As two angles of head device.Then in above-mentioned steps 203, when step 202 detect the value of digital hall sensor this
When in two preset ranges, can be rotated along a direction with a default above-mentioned cam device of step size controlling so that above-mentioned numeral
The distance between Hall sensor and above-mentioned magnet are tapered into (or becoming big), and according to the value of above-mentioned digital hall sensor
Size variation situation determines the current angle of above-mentioned cam device.For example, for ease of describing, below by above-mentioned numeral suddenly
The angle of corresponding cam device is described as angle S when your sensor is nearest with the distance between above-mentioned magnet, it is assumed that with one
The default above-mentioned cam device of step size controlling is rotated along a direction so that between above-mentioned digital hall sensor and above-mentioned magnet
Distance taper into, then, if the absolute value of the value of above-mentioned digital hall sensor is tapered into, can determine now
The angle of cam device be more than the angle of angle S, if the absolute value of the value of above-mentioned digital hall sensor becomes larger,
The angle that now cam device can then be determined is less than the angle of angle S;Assuming that with an above-mentioned shooting of default step size controlling
Head device is rotated along a direction so that the distance between above-mentioned digital hall sensor and above-mentioned magnet become larger, then,
If the absolute value of the value of above-mentioned digital hall sensor is tapered into, the angle that can determine now cam device is small
In the angle of angle S, if the absolute value of the value of above-mentioned digital hall sensor becomes larger, now camera can be determined
The angle of device is more than the angle of angle S.
It should be noted that the preposition direction in the embodiment of the present invention refers to the front of cam device along mobile terminal
The direction of display screen rotation, the rearmounted direction in the embodiment of the present invention refers to the front of cam device along the back side of mobile terminal
The direction of rotation, wherein, the front of cam device refers to the face where camera in cam device.
Certainly, the angle that the embodiment of the present invention can also be by cam device in other positions is set to 0 degree, then accordingly
Ground, mobile terminal is waited to rotate by with the 0 of cam device degree of reference point by the way that the above-mentioned cam device rotation of motor control is above-mentioned
Angle.
It should be noted that the mobile terminal in the embodiment of the present invention can be smart mobile phone, panel computer or other
Mobile terminal comprising the above-mentioned cam device of the present invention, is not construed as limiting herein.
Knowable to above-mentioned technical proposal of the present invention, the present invention sets magnet on cam device, and in mobile terminal sheet
Position relative with cam device on body sets digital hall sensor, by the characteristic of digital hall sensor to camera
Design factors are judged and are recognized so that when mobile terminal receives camera rotation instruction, can be by cam device
The angle on target that camera rotation instruction is indicated is rotated to, the Arbitrary Rotation of camera is realized, further, since mobile
Terminal is that cam device is rotated into angle on target, therefore, be not in the situation of motor idle running, further increase control
The service life of the motor of cam device rotation.
Below by taking the mobile terminal shown in Fig. 1 as an example, with a concrete application scene to the camera in the embodiment of the present invention
Method of controlling rotation is described, in embodiment of the present invention application scenarios, by the front of cam device and mobile terminal
The angle of above-mentioned cam device when display screen is parallel is set to 0 degree, and when camera is in 0 degree of position, is arranged at and takes the photograph
As the magnet on head device is farthest with the distance of the digital hall sensor being arranged on terminal body, it is in camera
During 180 degree position, the magnet being arranged on cam device and the digital hall sensor being arranged on terminal body
Closest, then the characteristic based on digital hall sensor, deposits between digital hall sensor value and cam device angle value
In corresponding relation as shown in Figure 3, it is necessary to explanation, two curves in Fig. 3 respectively from two mobile terminals, by Fig. 3
It can be seen that, for different mobile terminals, the relation curve between digital hall sensor value and cam device angle value will have
Institute is different, but, the relation curve between the digital hall sensor value and cam device angle value of different mobile terminal
Meet identical rule.In figure 3, Y-axis represent digital hall sensor register output value (namely Digital Hall pass
The value of sensor), X-axis is the angle of cam device.From figure 3, it can be seen that when the angle of cam device is less than 180, number
The value of word Hall sensor is with big (i.e. change of the digital hall sensor apart from the distance of magnet of the change of the angle of cam device
It is small) and diminish, when rotating camera is located at 180 degree, digital hall sensor recently, works as cam device apart from magnet
During more than 180, (i.e. digital hall sensor is apart from magnetic as the change of the angle of cam device is big for the value of digital hall sensor
The distance of iron diminishes) and become big.
It is mobile to be somebody's turn to do based on the relation curve between the digital hall sensor value and cam device angle value shown in Fig. 3
Terminal, can be by detecting that the value of Contemporary Digital Hall sensor determines cam device when camera rotation instruction is received
Current angle, and then calculate and treat the anglec of rotation, and rotated by the above-mentioned cam device of motor control and above-mentioned treat the anglec of rotation
Degree.
Further, as seen from Figure 3, when cam device is in 0 to 50 degree left and right, because angle skew is little,
Magnetic field shifts are also little, so the value changes very little of digital hall sensor, now according to digital hall sensor value-camera
Tool face angle angle value mapping table, it is difficult to determine the angle of cam device.Therefore, setting first is preset in the embodiment of the present invention
Scope, first preset range meets:When the value of digital hall sensor is in the first preset range, the angle of cam device
Degree cannot determine.For example in figure 3, it is 0 to -10 that can set above-mentioned first preset range.Taken the photograph when the mobile terminal is received
When rotating instruction and detect the value of Contemporary Digital Hall sensor in above-mentioned first preset range as head, with a default step-length
(such as to rotate 3 degree for a step-length) controls cam device that (i.e. putting with the mobile terminal shown in Fig. 1 is rotated along rearmounted direction
Direction is put for reference direction, control cam device is rotated clockwise around trunnion axis), until detecting Digital Hall sensing
The value of device not in above-mentioned first preset range, when detecting the value of digital hall sensor not in above-mentioned first preset range
When, mobile terminal can be according to the value of the digital hall sensor for detecting, and digital hall sensor value-cam device
Angle value mapping table determines the current angle of cam device, and then calculates and treat the anglec of rotation, and by motor control
Above-mentioned cam device rotation is above-mentioned to treat the anglec of rotation.
Further, as seen from Figure 3, when cam device is in 100 or so to 200 degree or so, Digital Hall is passed
One value of sensor will correspond to two angles of cam device, i.e. two angles of certain of cam device can be correspondingly identical
Digital hall sensor value.In this case, from the foregoing it will be appreciated that when cam device be in 180 degree when, Digital Hall
Value minimum (maximum absolute value) of sensor, therefore, when the angle of cam device becomes larger from the angle less than 180 degree
When, the value of digital hall sensor will be tapered into, and the angle for working as cam device becomes larger from the angle more than 180
When, the value of digital hall sensor will become larger.The second preset range is set based on the characteristic, in the embodiment of the present invention, should
Second preset range meets:When the value of digital hall sensor is in the second preset range and when absolute value is maximum, numeral
The value of Hall sensor corresponds to two angles of cam device.For example in Fig. 3, above-mentioned second preset range can be set
It is -10 to -50, when the mobile terminal receives camera rotation instruction and detects the value of Contemporary Digital Hall sensor upper
State when in the second preset range, step-length (such as to rotate 3 degree for a step-length) control cam device is preset along rearmounted side with one
To rotating, (, as reference direction, control cam device is clockwise around trunnion axis for the placement direction of the mobile terminal i.e. shown in Fig. 1
Direction rotates) or preposition direction rotate and (placement direction of the mobile terminal i.e. shown in Fig. 1 as reference direction, control camera
Device is around trunnion axis counterclockwise rotates), the size variation situation and Digital Hall of the value according to digital hall sensor
Sensor values-cam device angle value mapping table determines the current angle of cam device, and then calculates and wait to rotate
Angle, and treat the anglec of rotation by the way that the above-mentioned cam device rotation of motor control is above-mentioned.Illustrate, it is assumed that when the mobile terminal
It is when receiving camera rotation instruction and detecting the value of Contemporary Digital Hall sensor in above-mentioned second preset range, then first
First mobile terminal can according to value and the digital hall sensor value-camera for detecting Contemporary Digital Hall sensor
Tool face angle angle value mapping table determines that two angles (wherein necessarily have an angle more than 180 degree, another angle is less than
180 degree), further, mobile terminal presets step-length (such as to rotate 3 degree for a step-length) control cam device along rearmounted with one
Direction rotates, if now the value of digital hall sensor becomes big, illustrates that the angle of cam device is more than 180 degree, now
The angle that the angle more than 180 degree that will be determined before rotates plus cam device under default step size controlling, you can obtain
The current angle of cam device;If now the value of digital hall sensor diminishes, illustrate that the angle of cam device is small
In the angle that 180 degree, the angle less than 180 degree that will now determine before rotate plus cam device under default step size controlling
Degree, you can obtain the current angle of cam device.Again for example, mobile terminal also can be pre- with one after two angles are determined
If step-length (for example with rotate 3 degree be a step-length) control cam device rotated along preposition direction, if now Digital Hall biography
The value of sensor becomes big, then illustrate that the angle of cam device is less than 180 degree, the angle less than 180 degree that will now determine before
Subtract the angle that cam device rotates under default step size controlling, you can obtain the current angle of cam device;If this
When digital hall sensor value diminish, then illustrate cam device angle be more than 180 degree, now by being more than for determining before
The angle of 180 degree subtracts the angle that cam device rotates under default step size controlling, you can obtain cam device current
Angle.
It should be noted that be only based in the embodiment of the present invention under a concrete scene of embodiment illustrated in fig. 2, in figure
On the basis of 2 illustrated embodiments, the specific handling process of camera method of controlling rotation be likely to in the embodiment of the present invention
Handling process is different.
The embodiment of the present invention also provides a kind of mobile terminal, refers to Fig. 4, the mobile terminal 400 in the embodiment of the present invention,
Including:Terminal body 401 and cam device 402, cam device 402 can be relative to terminal bodies 401
Rotate, magnet is provided with cam device 402, position relative with cam device 402 on terminal body 401 is set
There is digital hall sensor, and, the distance between above-mentioned magnet and above-mentioned digital hall sensor are with cam device 402
Rotate and change;
Terminal body 401 includes:
Receiving unit 4011, for receiving camera rotation instruction, wherein, carry target in above-mentioned camera rotation instruction
Angle;
Detection unit 4012, the value for detecting above-mentioned digital hall sensor;
Determining unit 4013, the value of the above-mentioned digital hall sensor for being detected according to detection unit 4012, and
Digital hall sensor value-cam device angle value mapping table determines the current angle of cam device 402, wherein,
Above-mentioned digital hall sensor value-cam device angle value mapping table is in all angles according to cam device 402
Under the table that pre-sets of the value of digital hall sensor that measures;
Computing unit 4014, for calculate treat the anglec of rotation, wherein, it is above-mentioned treat the anglec of rotation be equal to above-mentioned angle on target with
Difference between the current angle of cam device 402;
Rotation control unit 4015, above-mentioned the anglec of rotation is treated for being rotated by motor control cam device 402.
Optionally, cam device 402 can be rotated around the trunnion axis for being arranged at the top of terminal body 401, and will
The angle of the cam device 402 when the front of cam device 402 is parallel with the display screen of mobile terminal 400 is set to 0 degree.
Optionally, determining unit 4013 specifically for:If detection unit 4012 detects current above-mentioned Digital Hall sensing
The value of device triggers rotation control unit 4015 with a default above-mentioned cam device edge of step size controlling in the first preset range, then
Rearmounted direction rotates, until the value of above-mentioned digital hall sensor is detected not in above-mentioned first preset range, wherein, when upper
When stating the value of digital hall sensor in the first preset range, the angle of above-mentioned cam device cannot determine;It is single in detection
When unit 4012 detects the value of above-mentioned digital hall sensor not in above-mentioned preset range, according to currently detected numeral suddenly
The value of your sensor, and digital hall sensor value-cam device angle value mapping table determines above-mentioned camera dress
Put current angle.
Optionally, determining unit 4013 specifically for:If detection unit 4012 detects current above-mentioned Digital Hall sensing
The value of device triggers rotation control unit 4015 with a default above-mentioned cam device edge of step size controlling in the second preset range, then
Rearmounted direction rotates;The size variation situation of the value according to above-mentioned digital hall sensor determines that above-mentioned cam device is current
Angle, wherein, when the value of above-mentioned digital hall sensor is in the second preset range and when absolute value is non-maximum, above-mentioned number
The value of word Hall sensor corresponds to two angles of above-mentioned cam device.
Optionally, determining unit 4013 specifically for:If detection unit 4012 detects current above-mentioned Digital Hall sensing
The value of device triggers rotation control unit 4015 with a default above-mentioned cam device edge of step size controlling in the second preset range, then
Preposition direction rotates;The size variation situation of the value according to above-mentioned digital hall sensor determines that above-mentioned cam device is current
Angle, wherein, when the value of above-mentioned digital hall sensor is in the second preset range and when absolute value is non-maximum, above-mentioned number
The value of word Hall sensor corresponds to two angles of above-mentioned cam device.
It should be noted that the mobile terminal in the embodiment of the present invention can be smart mobile phone, panel computer or other
Mobile terminal comprising the above-mentioned cam device of the present invention, is not construed as limiting herein.
It should be noted that the mobile terminal in the embodiment of the present invention can be such as the movement referred in above-mentioned embodiment of the method
Terminal, can be used for realizing the whole technical schemes in above method embodiment, the function of its each functional module can basis
Method in above method embodiment is implemented, and it implements the associated description during process can refer to above-described embodiment, this
Place repeats no more.
Knowable to above-mentioned technical proposal of the present invention, the present invention sets magnet on cam device, and in mobile terminal sheet
Position relative with cam device on body sets digital hall sensor, by the characteristic of digital hall sensor to camera
Design factors are judged and are recognized so that when mobile terminal receives camera rotation instruction, can be by cam device
The angle on target that camera rotation instruction is indicated is rotated to, the Arbitrary Rotation of camera is realized, further, since mobile
Terminal is that cam device is rotated into angle on target, therefore, be not in the situation of motor idle running, further increase control
The service life of the motor of cam device rotation.
In several embodiments provided herein, it should be understood that disclosed apparatus and method, can be by it
Its mode is realized.For example, device embodiment described above is only schematical, for example, the division of the unit, only
Only a kind of division of logic function, can there is other dividing mode when actually realizing, such as multiple units or component can be tied
Another system is closed or is desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or discussed
Coupling each other or direct-coupling or communication connection can be the INDIRECT COUPLINGs or logical of device or unit by some interfaces
Letter connection, can be electrical, mechanical or other forms.
The unit that is illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part for showing can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be according to the actual needs selected to realize the mesh of this embodiment scheme
's.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to
It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list
Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is to realize in the form of SFU software functional unit and as independent production marketing or use
When, can store in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part for being contributed to prior art in other words or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, including some instructions are used to so that a computer
Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the invention
Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
It should be noted that for foregoing each method embodiment, in order to simplicity is described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the present invention not by described by sequence of movement limited because
According to the present invention, some steps can sequentially or simultaneously be carried out using other.Secondly, those skilled in the art should also know
Know, embodiment described in this description belongs to preferred embodiment, and involved action and module might not all be this hairs
Necessary to bright.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not have the portion described in detail in certain embodiment
Point, may refer to the associated description of other embodiments.
It is more than whole to a kind of camera method of controlling rotation for being applied to mobile terminal provided by the present invention and movement
The description at end, for those of ordinary skill in the art, according to the thought of the embodiment of the present invention, in specific embodiment and application
Be will change in scope, to sum up, this specification content should not be construed as limiting the invention.
Claims (10)
1. a kind of camera method of controlling rotation for being applied to mobile terminal, the mobile terminal include terminal body and
Cam device, the cam device can be rotated relative to the terminal body, it is characterised in that the camera
Magnet is provided with device, the position relative with the cam device is provided with Digital Hall biography on the terminal body
Sensor, and, the distance between the magnet and the digital hall sensor occur with the rotation of the cam device
Change;
The camera method of controlling rotation includes:Camera rotation instruction is received, wherein, taken in the camera rotation instruction
Band angle on target;
Detect the value of the digital hall sensor;
According to the value of the digital hall sensor for detecting, and digital hall sensor value-cam device angle value
Mapping table determines the current angle of the cam device, wherein, the digital hall sensor value-cam device angle
Angle value mapping table is that the value of the digital hall sensor measured under all angles according to the cam device sets in advance
The table put;
The anglec of rotation is treated in calculating, wherein, it is described to treat that the anglec of rotation is current with the cam device equal to the angle on target
Difference between angle;
The anglec of rotation is treated by described in cam device rotation described in motor control.
2. method according to claim 1, it is characterised in that the cam device can around be arranged at it is described it is mobile eventually
Hold bodies top trunnion axis rotate, and by the front of the cam device it is parallel with the display screen of the mobile terminal when
The angle of the cam device be set to 0 degree.
3. method according to claim 2, it is characterised in that the digital hall sensor that the basis is detected
Value, and digital hall sensor value-cam device angle value mapping table determines the current angle of the cam device
Degree, including:
If the value of presently described digital hall sensor is in the first preset range, with camera described in a default step size controlling
Device is rotated along rearmounted direction, until detecting the value of the digital hall sensor not in first preset range;
When the value of the digital hall sensor is detected not in first preset range, according to currently detected number
The value of word Hall sensor, and digital hall sensor value-cam device angle value mapping table determines the shooting
The current angle of head device.
4. according to the method in claim 2 or 3, it is characterised in that the Digital Hall sensing that the basis is detected
The value of device, and digital hall sensor value-cam device angle value mapping table determines that the cam device is current
Angle, including:
If the value of presently described digital hall sensor is in the second preset range, with camera described in a default step size controlling
Device is rotated along rearmounted direction;
The size variation situation of the value according to the digital hall sensor determines the current angle of the cam device, its
In, when the value of the digital hall sensor is in the second preset range and when absolute value is non-maximum, the Digital Hall
The value of sensor corresponds to two angles of the cam device.
5. according to the method in claim 2 or 3, it is characterised in that the Digital Hall sensing that the basis is detected
The value of device, and digital hall sensor value-cam device angle value mapping table determines that the cam device is current
Angle, including:
If the value of presently described digital hall sensor is in the second preset range, with camera described in a default step size controlling
Device is rotated along preposition direction;
The size variation situation of the value according to the digital hall sensor determines the current angle of the cam device, its
In, when the value of the digital hall sensor is in the second preset range and when absolute value is non-maximum, the Digital Hall
The value of sensor corresponds to two angles of the cam device.
6. a kind of mobile terminal, it is characterised in that including:Terminal body and cam device, the cam device
Can be rotated relative to the terminal body, it is characterised in that magnet, the movement are provided with the cam device
The position relative with the cam device is provided with digital hall sensor on terminal body, and, the magnet and the number
The distance between word Hall sensor changes with the rotation of the cam device;
The terminal body includes:
Receiving unit, for receiving camera rotation instruction, wherein, carry angle on target in the camera rotation instruction;
Detection unit, the value for detecting the digital hall sensor;
Determining unit, the value of the digital hall sensor for being detected according to the detection unit, and Digital Hall
Sensor values-cam device angle value mapping table determines the current angle of the cam device, wherein, the numeral
Hall sensor value-cam device angle value mapping table is measured according to the cam device under all angles
The table that the value of digital hall sensor pre-sets;
Computing unit, the anglec of rotation is treated for calculating, wherein, it is described to treat that the anglec of rotation is equal to the angle on target and the shooting
Difference between the current angle of head device;
Rotation control unit, for treating the anglec of rotation by described in cam device rotation described in motor control.
7. mobile terminal according to claim 6, it is characterised in that the cam device can be around being arranged at the shifting
Trunnion axis at the top of dynamic terminal body is rotated, and the front of the cam device is put down with the display screen of the mobile terminal
The angle of cam device during row is set to 0 degree.
8. mobile terminal according to claim 7, it is characterised in that
The determining unit specifically for:If detecting the value of presently described digital hall sensor in the first preset range,
Then trigger the rotation control unit to be rotated along rearmounted direction with cam device described in a default step size controlling, until detecting
The value of the digital hall sensor is not in first preset range;The Digital Hall is detected in the detection unit
When the value of sensor is not in first preset range, according to the value of currently detected digital hall sensor, and number
Word Hall sensor value-cam device angle value mapping table determines the current angle of the cam device.
9. the mobile terminal according to claim 7 or 8, it is characterised in that the determining unit specifically for:If detecting
The value of presently described digital hall sensor triggers the rotation control unit with a default step-length in the second preset range, then
The cam device is controlled to be rotated along rearmounted direction;The size variation situation of the value according to the digital hall sensor determines
The current angle of the cam device, wherein, when the value of the digital hall sensor is in the second preset range and absolute
It is worth during for non-maximum, the value of the digital hall sensor corresponds to two angles of the cam device.
10. the mobile terminal according to claim 7 or 8, it is characterised in that the determining unit specifically for:If detection
Value to presently described digital hall sensor triggers the rotation control unit with a default step in the second preset range, then
The control cam device long is rotated along preposition direction;The size variation situation of the value according to the digital hall sensor is true
The current angle of the fixed cam device, wherein, when the value of the digital hall sensor is in the second preset range and exhausted
During to value for non-maximum, the value of the digital hall sensor corresponds to two angles of the cam device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410505404.6A CN104238579B (en) | 2014-09-26 | 2014-09-26 | Camera rotation control method applied to mobile terminal and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410505404.6A CN104238579B (en) | 2014-09-26 | 2014-09-26 | Camera rotation control method applied to mobile terminal and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104238579A CN104238579A (en) | 2014-12-24 |
CN104238579B true CN104238579B (en) | 2017-05-24 |
Family
ID=52226869
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410505404.6A Active CN104238579B (en) | 2014-09-26 | 2014-09-26 | Camera rotation control method applied to mobile terminal and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104238579B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104580864B (en) * | 2015-01-21 | 2017-11-14 | 广东欧珀移动通信有限公司 | Camera repositioning method and device |
CN104702842B (en) * | 2015-02-12 | 2017-08-29 | 广东欧珀移动通信有限公司 | A kind of method for controlling rotating camera component to rotate and mobile terminal |
CN104822042B (en) * | 2015-03-03 | 2018-07-06 | 广东欧珀移动通信有限公司 | A kind of pedestrains safety detection method and device based on camera |
CN104902171B (en) * | 2015-05-19 | 2018-05-01 | 广东欧珀移动通信有限公司 | A kind of camera angle correcting method and terminal |
CN104902173B (en) * | 2015-05-19 | 2018-07-06 | 广东欧珀移动通信有限公司 | A kind of method and apparatus for shooting control |
CN104950918A (en) * | 2015-06-16 | 2015-09-30 | 广东欧珀移动通信有限公司 | Control method for rotary camera and mobile terminal |
CN105007088B (en) * | 2015-07-03 | 2018-03-02 | 广东欧珀移动通信有限公司 | Mobile terminal |
CN110995991B (en) * | 2019-11-28 | 2021-11-16 | 维沃移动通信有限公司 | Camera control method and wearable device |
CN113587386B (en) * | 2021-07-13 | 2022-11-22 | 青岛海信日立空调***有限公司 | Indoor unit of air conditioner |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202907005U (en) * | 2012-11-05 | 2013-04-24 | 上海兴格信息技术有限公司 | Rotatable camera for mobile phone |
CN103365338A (en) * | 2012-03-26 | 2013-10-23 | 联想(北京)有限公司 | Electronic equipment control method and electronic equipment |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100605974B1 (en) * | 2003-06-03 | 2006-07-28 | 삼성전자주식회사 | Method and apparatus for turning inverse video signal into normal video signal by sensor in mobile station having camera |
KR100608732B1 (en) * | 2003-12-26 | 2006-08-04 | 엘지전자 주식회사 | Mobile phone convertible into digital camera |
KR100716818B1 (en) * | 2005-12-29 | 2007-05-09 | 삼성전기주식회사 | Device for sensing position of camera and mobile phone comprising the same |
KR101299483B1 (en) * | 2007-02-06 | 2013-08-29 | 엘지전자 주식회사 | A apparatus of mobile terminal for perceiving rotation of camera and mobile terminal having the same |
CN103002083B (en) * | 2012-11-22 | 2016-12-21 | 惠州Tcl移动通信有限公司 | Mobile terminal |
CN203193692U (en) * | 2013-03-13 | 2013-09-11 | 深圳市有方科技有限公司 | Communication terminal having camera |
CN104023105A (en) * | 2014-06-13 | 2014-09-03 | 广东欧珀移动通信有限公司 | Detection device and detection method of angled rotation of camera of mobile terminal |
-
2014
- 2014-09-26 CN CN201410505404.6A patent/CN104238579B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103365338A (en) * | 2012-03-26 | 2013-10-23 | 联想(北京)有限公司 | Electronic equipment control method and electronic equipment |
CN202907005U (en) * | 2012-11-05 | 2013-04-24 | 上海兴格信息技术有限公司 | Rotatable camera for mobile phone |
Also Published As
Publication number | Publication date |
---|---|
CN104238579A (en) | 2014-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104238579B (en) | Camera rotation control method applied to mobile terminal and mobile terminal | |
CN104301609A (en) | Camera rotating control method used for mobile terminal and mobile terminal | |
US8855481B2 (en) | Apparatus and method for photographing timer control of a camera of a terminal | |
KR102144489B1 (en) | Method and device for determining a rotation angle of a human face, and a computer storage medium | |
CN104980538B (en) | The control method of mobile terminal and its rotation angle of camera | |
CN109460074B (en) | Directional display method and device for audio equipment and audio equipment | |
CN106055097A (en) | Screen lighting control method and apparatus, and electronic device | |
CN104238578B (en) | Method and device for controlling rotation of camera | |
CN104320591B (en) | A kind of front and rear method, apparatus switched of control camera and a kind of intelligent terminal | |
CN104883498B (en) | A kind of image pickup method and terminal based on rotating camera | |
CN104375628A (en) | Information processing method and electronic equipment | |
WO2013017023A1 (en) | Method and apparatus for controlling display state of terminal screen | |
CN106933350A (en) | AR exchange methods and device | |
CN105867800A (en) | Display region adjustment method and apparatus | |
CN104567791B (en) | Rotation angle of camera detection method, device and mobile terminal | |
CN108921798A (en) | The method, apparatus and electronic equipment of image procossing | |
CN107071282A (en) | The processing method and mobile terminal of a kind of photo | |
CN104182141A (en) | Method for processing information and electronic equipment | |
CN105278218B (en) | A kind of method and device of radiator fan that realizing protection projection device | |
CN104714740A (en) | Preset parameter adjusting method, adjusting device and electronic equipment | |
CN205490872U (en) | Camera shutter control device and system | |
CN104883495A (en) | Shooting method and device | |
CN110765926B (en) | Picture book identification method, device, electronic equipment and storage medium | |
CN106325648A (en) | Icon setting method and mobile terminal | |
CN105991903A (en) | Electronic apparatus and information processing method |
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 | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
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 523841 usha Beach Road No. 18 Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd. |