CN104702843B - A kind of method and terminal that prevent camera from dallying - Google Patents

A kind of method and terminal that prevent camera from dallying Download PDF

Info

Publication number
CN104702843B
CN104702843B CN201510079681.XA CN201510079681A CN104702843B CN 104702843 B CN104702843 B CN 104702843B CN 201510079681 A CN201510079681 A CN 201510079681A CN 104702843 B CN104702843 B CN 104702843B
Authority
CN
China
Prior art keywords
camera
value
hall
rotation
difference
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
Application number
CN201510079681.XA
Other languages
Chinese (zh)
Other versions
CN104702843A (en
Inventor
张强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810103566.5A priority Critical patent/CN108134904B/en
Priority to CN201510079681.XA priority patent/CN104702843B/en
Publication of CN104702843A publication Critical patent/CN104702843A/en
Application granted granted Critical
Publication of CN104702843B publication Critical patent/CN104702843B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the invention discloses a kind of method and terminal that prevent camera from dallying, wherein method includes:Camera rotation command is received, starts the camera to single direction uniform rotation;Hall value is obtained by the digital hall sensor in terminal with Fixed Time Interval, and calculates the difference between the Hall value currently got and the preceding Hall value once got;Continue number if the difference between the Hall value currently got and the preceding Hall value once got continuously occur and reaching default no more than the number of the first preset value, stop the rotation of the camera.It can prevent rotating camera from dallying using the present invention, save the electric power resource of terminal, the mechanical loss of electro-motor in rotating camera be reduced, so as to increase the service life of the spinfunction of rotating camera.

Description

A kind of method and terminal that prevent camera from dallying
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of method and terminal that prevent camera from dallying.
Background technology
With the continuous development of the communication technology, the function of terminal is increasingly abundant, wherein, camera function that terminal provides it is deep by Users like.At present, existing many manufacturer terminals are proposed electronic rotation camera, in a kind of terminal as shown in Figure 6 The structural representation of rotatable camera, the principle of electronic rotation camera are:A built-in miniature electric motor in camera Camera is rotated, in addition, magnet is provided with camera, on the terminal body where camera with shooting The corresponding opening position of head upper magnet is additionally provided with digital hall sensor, and the angle of camera is changing when camera rotates, The distance of camera upper magnet and digital hall sensor also changes therewith, and now the Hall value of digital hall sensor also with The change of the distance between digital hall sensor and magnet and change, therefore the rotation of camera can be judged according to Hall value Gyration.
But magnetic field is highly susceptible to the interference of external electromagnetic field, when terminal is in different electromagnetic fields, even if suddenly Your sensor Hall value identical with the distance of magnet also differs so that the angle recognition of camera is inaccurate, when camera is real When border has rotated into maximum angle, and when terminal does not identify, electro-motor is still in rotation, causes what motor dallied to ask Topic, terminal electric power resource is wasted, the mechanical performance of motor is lost.
The content of the invention
The embodiments of the invention provide a kind of method and terminal that prevent camera from dallying, rotating camera can be prevented Idle running, the electric power resource of terminal is saved, the mechanical loss of electro-motor in rotating camera is reduced, so as to increase rotating camera Spinfunction service life.
The embodiments of the invention provide a kind of method for preventing camera from dallying, methods described includes:
Camera rotation command is received, starts the camera to single direction uniform rotation;
Hall value is obtained by the digital hall sensor in terminal with Fixed Time Interval, and calculates what is currently got Difference between Hall value and the preceding Hall value once got;
If continuously there is difference between the Hall value currently got and the preceding Hall value once got no more than the The number of one preset value reaches default and continues number, then stops the rotation of the camera.
Accordingly, the embodiments of the invention provide a kind of terminal, the terminal to include:
Camera control unit, for receiving camera rotation command, start the camera and at the uniform velocity turn to single direction It is dynamic;
Hall value acquiring unit, for obtaining Hall by the digital hall sensor in terminal with Fixed Time Interval Value, and calculate the difference between the Hall value currently got and the preceding Hall value once got;
Condition adjudgement unit, for Hall value and the preceding Hall value once got for judging continuously to occur currently to get Between difference no more than the first preset value number whether reach it is default continue number;
The camera control unit, it is additionally operable to the condition adjudgement unit judges and is currently got suddenly to continuous appearance Difference between value of and the preceding Hall value once got reaches default no more than the number of the first preset value and continues number When, stop the rotation of the camera.
The embodiment of the present invention, camera rotation command can be received, start the camera to single direction uniform rotation, with Fixed Time Interval obtains Hall value by the digital hall sensor in terminal, and calculates the Hall value currently got with before Difference between the Hall value once got, and then once got with preceding in the Hall value that continuously occurs currently getting When difference between Hall value reaches default lasting number no more than the number of the first preset value, stop turning for the camera It is dynamic, it can prevent rotating camera from dallying, save the electric power resource of terminal, reduce the machinery of electro-motor in rotating camera Loss, so as to increase the service life of the spinfunction of rotating camera.
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 method flow schematic diagram for preventing camera from dallying provided in an embodiment of the present invention;
Fig. 2 is the method flow schematic diagram that another kind provided in an embodiment of the present invention prevents camera from dallying;
Fig. 3 is a kind of terminal structure schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of structural representation of condition adjudgement unit provided in an embodiment of the present invention;
Fig. 5 is the structural representation of another condition adjudgement unit 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.
Below in conjunction with Fig. 1 to Fig. 5 to a kind of method and terminal that prevent camera from dallying provided in an embodiment of the present invention It is specifically described.
It is a kind of method flow schematic diagram for preventing camera from dallying provided in an embodiment of the present invention, as schemed institute referring to Fig. 1 That shows prevents the method that camera dallies from may include following steps:
S101, camera rotation command is received, starts the camera to single direction uniform rotation.
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, starts the camera to single direction uniform rotation.Such as the interface display of taking pictures The cueing track of rotating camera is operated, both direction, user are defeated by touch-screen according to the cueing track up and down for the track point When entering upward track, then start camera and rotated to terminal back direction;When inputting downward track by touch-screen, then open Dynamic camera rotates to terminal screen direction.And for example, user can pre-set the angle on target of camera, receive and take the photograph in terminal During as head rotation command, terminal according to the difference between the current angle of camera and angle on target, automatically control camera to Angle on target rotates.
S102, Hall value is obtained by the digital hall sensor in terminal with Fixed Time Interval, and calculate and currently obtain Difference between the Hall value and the preceding Hall value once got got.
In the specific implementation, magnet is provided with the rotating camera of electro-motor control, in the terminal sheet where camera The opening position corresponding with camera upper magnet is additionally provided with digital hall sensor on body, the angle of camera when camera rotates Degree is changing, and the distance of camera upper magnet and digital hall sensor also changes therewith, and now digital hall sensor Hall value changes and changed also with the distance between digital hall sensor and magnet, therefore can be judged according to Hall value The anglec of rotation of camera.
In rotary course, terminal is passed camera with the Digital Hall in a fixed time interval timing reading terminals Sensor obtains Hall value, then calculates the difference between the Hall value currently got and the preceding Hall value once got.Mesh Before, the maximum anglec of rotation of common rotating camera is usually 210 degree or so, if camera is rearmounted, the angle of camera For 0 degree, the angle of camera is 180 degree when preposition, usual camera from 0 degree to 210 directions rotate when, when the angle of camera rotation Spend close to Hall value during 180 degree change it is very fast, and camera from 210 degree to 0 degree rotation when, when camera rotation more than 180 Spend to 0 degree close to when the conversion of Hall value it is slower, therefore from 0 degree to 210 directions rotate when fixed time interval can select It is more shorter, and when being rotated from 210 degree to 0 degree direction, fixed time interval can select longer.
S103, if the difference continuously occurred between the Hall value currently got and the preceding Hall value once got is little Reach default in the number of the first preset value and continue number, then stop the rotation of the camera.
In the specific implementation, a Count of Status value can be pre-set, the Count of Status value is used for recording continuous appearance currently Difference between the Hall value of acquisition and the Hall value of previous acquisition is not more than the number of the first preset value, is rotated in camera The value of the read-around ratio is in journey:Current state count value subtracts after Count of Status value initial value divided by the value of fixed step size. Terminal is getting Hall value for the second time, just starts to calculate the difference between the Hall value currently obtained and the Hall value of previous acquisition Value, if the difference is not more than the first preset value, is just added one by Count of Status value or is incremented by with other fixed step sizes, and judged When Count of Status value reaches three preset values (i.e. read-around ratio reaches default lasting number), stop camera and rotate;If should Difference is more than the first preset value, and Count of Status value just is recovered into initial value, and transfers to continue executing with step S102.
In another alternative embodiment, methods described also includes:Judge the camera to single direction uniform rotation During whether dally;If dallying, stop the rotation of the camera, and it is described pre- with specified numerical value reduction If lasting number.
In the specific implementation, the spinfunction of terminal camera is during continuing on, its inner member (such as electronic horse Up to) continuous aging add terminal individual difference, it is thus possible to although can cause image head-turned angle and not up to Theoretic maximum angle, but camera has turned motionless, and idle running phenomenon just occurs.In order to prevent idle running from further making Into the mechanical loss of motor, now, the default lasting number can be reduced when camera dallies so that start next time and take the photograph When being rotated as head, camera can be stopped before occurring to dally and rotated.
Further, judge that the camera has to the method whether to dally during single direction uniform rotation Body includes:The camera is gathered to the stall sound occurred during single direction uniform rotation;If the stall sound The number continuously occurred reaches the second preset value, determines that the camera dallies.
In the specific implementation, the sound that can be sent when terminal is dispatched from the factory in acquisition camera during electro-motor stall, and store, Start in user and open microphone function simultaneously when camera rotates, acquisition camera rotates the sound sent, by terminal Sound recognition module judge the sound sent when whether the sound that collects is electro-motor stall, and connect in the stall sound When the continuous number occurred reaches the second preset value, it is believed that camera dallies.
In another alternative embodiment, before step S102 is performed, methods described also includes:Judge the camera Rotation direction, determine that the Hall value that the calculating is currently got once is got with preceding according to the rotation direction of the camera Hall value between difference calculation.
In the specific implementation, camera occur in rotary course in some positions with the Digital Hall on terminal body away from From identical situation, therefore using the method described in the present embodiment, got in the Hall value that calculating is currently got with previous Hall value between difference when, should not use absolute difference calculation;And calculation should be determined in advance, the calculating Mode subtracts the previous Hall value got including the Hall value currently got or described previous got suddenly Value of subtracts the Hall value currently got.
In another alternative embodiment, after step S103 is performed, methods described also includes:Receive camera and rotate and refer to Order, starts camera uniform rotation round about, and the Count of Status value is recovered into initial value.Perform the present embodiment institute The method of description, it may be implemented in every time when using camera spinfunction, can judge whether camera soon turns in advance Maximum angle, and stop camera before camera turns to maximum angle and rotate.
Further, in another optional implementation, method of the control camera to single direction uniform rotation Specifically include:Start the electro-motor in the camera, the camera is controlled to single direction by the electro-motor Uniform rotation.
The embodiment of the present invention, camera rotation command can be received, start the camera to single direction uniform rotation, with Fixed Time Interval obtains Hall value by the digital hall sensor in terminal, and calculates the Hall value currently got with before Difference between the Hall value once got, and then once got with preceding in the Hall value that continuously occurs currently getting When difference between Hall value reaches default lasting number no more than the number of the first preset value, stop turning for the camera It is dynamic, it can prevent rotating camera from dallying, save the electric power resource of terminal, reduce the machinery of electro-motor in rotating camera Loss, so as to increase the service life of the spinfunction of rotating camera.
Referring to Fig. 2, it is the method flow schematic diagram that another kind provided in an embodiment of the present invention prevents camera from dallying, such as schemes Shown prevents the method that camera dallies from may include following steps:
S201, camera rotation command is received, starts the camera to single direction uniform rotation.
S202, Hall value is obtained by the digital hall sensor in terminal with Fixed Time Interval, and calculate and currently obtain Difference between the Hall value and the preceding Hall value once got got.
Step S201 and step S202 can distinguish step S101 and step S102 in embodiment shown in Figure 1, herein Repeat no more.
S203, judge whether the difference between the Hall value currently obtained and the Hall value of the previous acquisition is little In the first preset value.
In actual use, when camera soon reaches maximum rotation angle, its corresponding current acquisition The trend for being persistently not more than some numerical value, therefore we occur in difference between Hall value and the Hall value of the previous acquisition It can judge whether camera soon reaches maximum rotation angle using the characteristic.In the specific implementation, one can be pre-set Count of Status value, the Count of Status value are used for recording between the Hall value for the Hall value and previous acquisition currently obtained continuously occur Difference be not more than the number of the first preset value, terminal getting Hall value for the second time, just starts to calculate and currently obtains suddenly Difference between value of and the Hall value of previous acquisition, if the difference is not more than the first preset value, step S204 is performed, and then Perform step S205;If the difference is more than the first preset value, step S207 is performed, the Count of Status value is recovered into initial value, And transfer to perform step S202.
S204, by Count of Status value with fixed step size incrementally once.
S205, judges whether the Count of Status value reaches the 3rd preset value.
In the specific implementation, in camera rotation process, continuously there is the Hall value currently obtained and previous acquisition suddenly Difference between value of is no more than the specific calculation of the number of the first preset value:Current state count value subtracts state meter After numerical value initial value divided by fixed step size.If determining the Count of Status value reaches the 3rd preset value, step is performed S206, transfer to perform step S202 if the 3rd preset value is not reaching to.
S206, stop the rotation of the camera.
S207, the Count of Status value is recovered into initial value.
The embodiment of the present invention, the Hall value for continuously occurring currently getting can be recorded with before by setting Count of Status value Difference between the Hall value once got is not more than the number of the first preset value, is taken the photograph in this, as the rotation judged in terminal As whether head reaches maximum rotation angle foundation, and think the rotating camera when the Count of Status value reaches three preset values Maximum rotation angle is reached, has been rotated further so as to stop camera, can prevent rotating camera from dallying, save terminal Electric power resource, the mechanical loss of electro-motor in rotating camera is reduced, so as to increase making for the spinfunction of rotating camera Use the life-span.
It is a kind of terminal structure schematic diagram provided in an embodiment of the present invention referring to Fig. 3, terminal as depicted may include: Camera control unit 301, Hall value acquiring unit 302 and condition adjudgement unit 303.
Camera control unit 301, for receiving camera rotation command, start the camera to single direction at the uniform velocity Rotate.
In the specific implementation, the camera application that user when needing rotating camera, can be provided by terminal is opened and taken pictures Interface, camera rotation command is then inputted, when camera control unit 301 receives the camera rotation command, starting should Camera is to single direction uniform rotation.Such as the cueing track of the interface display operation rotating camera of taking pictures, the track point Upper and lower both direction, user when inputting upward track by touch-screen, then start camera to terminal according to the cueing track Back direction rotates;When user inputs downward track by touch-screen, then start camera and rotated to terminal screen direction.
Hall value acquiring unit 302, for being obtained suddenly by the digital hall sensor in terminal with Fixed Time Interval Value of, and calculate the difference between the Hall value currently got and the preceding Hall value once got.
In the specific implementation, magnet is provided with the rotating camera of electro-motor control, in the terminal sheet where camera The opening position corresponding with camera upper magnet is additionally provided with digital hall sensor on body, the angle of camera when camera rotates Degree is changing, and the distance of camera upper magnet and digital hall sensor also changes therewith, and now digital hall sensor Hall value changes and changed also with the distance between digital hall sensor and magnet, therefore can be judged according to Hall value The anglec of rotation of camera.
Camera is in rotary course, and Hall value acquiring unit 302 is with a fixed time interval timing reading terminals On digital hall sensor obtain Hall value, then calculate the Hall value that currently gets and the preceding Hall value once got Between difference.At present, the maximum anglec of rotation of common rotating camera is usually 210 degree or so, if camera is rearmounted, The angle of camera is 0 degree, and the angle of camera is 180 degree when preposition, usual camera from 0 degree to 210 directions rotate when, when The change of angle close to Hall value during 180 degree of camera rotation is very fast, and camera works as camera from during 210 degree to 0 degree rotation Rotation exceed 180 degree to 0 degree close to when Hall value convert it is slower, therefore when being rotated from 0 degree to 210 directions between regular time It is more shorter every that can select, and when being rotated from 210 degree to 0 degree direction, fixed time interval can select longer.
Condition adjudgement unit 303, the Hall value for judging continuously to occur currently getting once are got suddenly with preceding Difference between value of continues number no more than whether the number of the first preset value reaches default.
In actual use, when camera soon reaches maximum rotation angle, its corresponding current acquisition The trend for being persistently not more than some numerical value, therefore we occur in difference between Hall value and the Hall value of the previous acquisition It can judge whether camera soon reaches maximum rotation angle using the characteristic.Work as if condition adjudgement unit 303 determines Before difference between the Hall value that gets and the preceding Hall value once got be more than the first preset value, then pass through Hall value Acquiring unit 302 obtains Hall value with Fixed Time Interval by the digital hall sensor in terminal, and calculates current obtain To Hall value and the preceding Hall value once got between difference.
It is further alternative, referring to Fig. 4, a kind of structural representation of condition adjudgement unit provided in an embodiment of the present invention, Condition adjudgement unit 303 as depicted may particularly include:Difference judgment sub-unit 3301, the and of state value count sub-element 3302 State value judgment sub-unit 3303.
Difference judgment sub-unit 3301, for judging the Hall value of the Hall value currently obtained and the previous acquisition Between difference whether be not more than first preset value;
State value count sub-element 3302, the Hall value currently obtained is determined for the difference subelement 3301 When difference between the Hall value of the previous acquisition is not more than first preset value, with fixed step size by Count of Status value It is incremented by once;
State value judgment sub-unit 3303, for judging whether the Count of Status value reaches the 3rd preset value, if judging As a result it is yes, the camera control unit 301 is additionally operable to stop the rotation of the camera.
In the specific implementation, a Count of Status value can be pre-set, the Count of Status value is used for recording continuous appearance currently Difference between the Hall value of acquisition and the Hall value of previous acquisition is not more than the number of the first preset value, the meter of the read-around ratio Calculation mode is:Current state count value subtracts after Count of Status value initial value divided by the value of fixed step size.Hall value obtains single Member 302 is getting Hall value for the second time, just starts to calculate between the Hall value currently obtained and the Hall value of previous acquisition Difference, if difference judgment sub-unit 3301 determines the difference and is not more than the first preset value, and then son list is counted by state value Member 3302 by the Count of Status value with fixed step size incrementally once, and the state value is judged by state value judgment sub-unit 3303 Whether threeth preset value is reached;If difference judgment sub-unit 3301, which determines the difference, is more than the first preset value, pass through state When being worth count sub-element 3302 and the Count of Status value recovered into initial value, and transferring by Hall value acquiring unit 302 to fix Between interval Hall value is obtained by the digital hall sensor in terminal, and calculate the Hall value currently got and once obtained with preceding Difference between the Hall value got.
The camera control unit 301, it is additionally operable to the condition adjudgement unit 303 and determines the current acquisition of continuous appearance To Hall value and the preceding Hall value once got between difference reach default no more than the number of the first preset value and hold During continuous number, stop the rotation of the camera.
In another alternative embodiment, the condition adjudgement unit 303, it is additionally operable to judge the camera to single direction Whether dallied during uniform rotation;
The camera control unit 301, it is additionally operable to the condition adjudgement unit 303 and determines the camera to single When being dallied during the uniform rotation of direction, stop the rotation of the camera;
Accordingly, the terminal also includes:Continue number setting unit 304, judge for the condition adjudgement unit 303 To the camera to when dallying during single direction uniform rotation, described default hold is reduced with specified numerical value Continuous number.
In the specific implementation, the spinfunction of terminal camera is during continuing on, its inner member (such as electronic horse Up to) in continuous aging, along with the individual difference of terminal, it is thus possible to although head-turned angle and not up to can be caused to image Theoretic maximum angle, but camera has turned motionless, and idle running phenomenon just occurs.In order to prevent idle running from further making Into the mechanical loss of motor, now, can be controlled when condition adjudgement unit 303 judges that camera dallies by camera Unit 301 stops the rotation of camera, and reduces the default lasting number by lasting number setting unit 304 so that under When secondary startup camera rotates, camera can be stopped before occurring to dally and rotated.
It is further alternative, referring to Fig. 5, the structural representation of another condition adjudgement unit provided in an embodiment of the present invention Figure, condition adjudgement unit 303 as depicted may particularly include:Stall sound collection subelement 3311, stall number judge son Unit 3312 and idling conditions determination subelement 3313.
Stall sound collection subelement 3311, for gathering the camera to sending out during single direction uniform rotation Raw stall sound;
Stall number judgment sub-unit 3312, for judging the camera to institute during single direction uniform rotation State whether the number that stall sound continuously occurs reaches the second preset value;
Idling conditions determination subelement 3313, the camera is determined for the stall number judgment sub-unit 3312 When the number continuously occurred to the stall sound during single direction uniform rotation reaches the second preset value, it is determined that described Camera dallies.
In the specific implementation, the sound that can be sent when terminal is dispatched from the factory in acquisition camera during electro-motor stall, and store, Stall sound collection subelement 3311 can be specially microphone, start when camera rotates in user while open stall sound and adopt Collect subelement 3311, acquisition camera rotates the sound sent.Then, starting stall number judgment sub-unit 3312 (can be specific For sound recognition module, such as voiceprint identification module) judge the sound that is sent when whether the sound that collects is electro-motor stall, And when the number that the stall sound continuously occurs reaches the second preset value, idling conditions determination subelement 3313 is it is believed that shooting Hair life idle running.
In another alternative embodiment, the terminal also includes:Rotation direction judging unit 305, for the Hall value Before acquiring unit 302 calculates the difference between the Hall value currently got and the preceding Hall value once got, institute is judged State the rotation direction of camera.
Accordingly, the terminal also includes:Calculation determining unit 306, for the rotation side according to the camera To the determination calculation for calculating the difference between the Hall value currently got and the preceding Hall value once got.
In the specific implementation, camera occur in rotary course in some positions with the Digital Hall on terminal body away from From identical situation, therefore the method described in the present embodiment, got suddenly with previous in the Hall value that calculating is currently got During difference between value of, the calculation of absolute difference should not be used;And calculation should be determined in advance, the calculation The previous Hall value got or the previous Hall value got are subtracted including the Hall value currently got Subtract the Hall value currently got.
In another alternative embodiment, the camera control unit 301 is specifically used for:Start the electricity in the camera Dynamic motor, the camera is controlled to single direction uniform rotation by the electro-motor.
The embodiment of the present invention, camera rotation command can be received, start the camera to single direction uniform rotation, with Fixed Time Interval obtains Hall value by the digital hall sensor in terminal, and calculates the Hall value currently got with before Difference between the Hall value once got, and then once got with preceding in the Hall value that continuously occurs currently getting When difference between Hall value reaches default lasting number no more than the number of the first preset value, stop turning for the camera It is dynamic, it can prevent rotating camera from dallying, save the electric power resource of terminal, reduce the machinery of electro-motor in rotating camera Loss, so as to increase the service life of the spinfunction of rotating camera.
A kind of method for preventing camera from dallying and terminal disclosed in the embodiment of the present invention are described in detail above, Above disclosure is only preferred embodiment of present invention, can not limit the interest field of the present invention with this certainly, therefore The equivalent variations made according to the claims in the present invention, still belong to the scope that the present invention is covered.

Claims (11)

  1. A kind of 1. method for preventing camera from dallying, it is characterised in that including:
    Camera rotation command is received, starts the camera to single direction uniform rotation;
    When starting the camera to during single direction uniform rotation, gathering the camera to the single direction uniform rotation During the stall sound that occurs;
    If the number that the stall sound continuously occurs reaches the second preset value, determine that the camera dallies;
    When the camera dallies, stop the rotation of the camera, and it is default lasting with specified numerical value reduction Number;
    When starting the camera to during single direction uniform rotation, passed with Fixed Time Interval by the Digital Hall in terminal Sensor obtains Hall value, and calculates the difference between the Hall value currently got and the preceding Hall value once got, wherein, Used Fixed Time Interval is less than the camera from 210 degree to 0 when the camera rotates from 0 degree to 210 degree directions Used Fixed Time Interval during degree rotation, the angle of the camera is 0 degree when the camera is rearmounted, the camera The angle of the camera is 180 degree when preposition;
    If the difference continuously occurred between the Hall value currently got and the preceding Hall value once got is pre- no more than first If the number of value, which reaches default, continues number, then stop the rotation of the camera.
  2. 2. according to the method for claim 1, it is characterised in that if the Hall value for continuously occurring currently getting is with before Difference between the Hall value once got reaches default no more than the number of the first preset value and continues number, then stops institute Stating the rotation of camera includes:
    Judge difference between the Hall value currently obtained and the Hall value of the previous acquisition whether no more than described the One preset value;
    If so, Count of Status value with fixed step size incrementally once, the Count of Status value is otherwise recovered into initial value;
    Judge whether the Count of Status value reaches the 3rd preset value;
    If so, stop the rotation of the camera.
  3. 3. according to the method for claim 2, it is characterised in that after the rotation for stopping the camera, in addition to:
    Camera rotation command is received, starts camera uniform rotation round about, the Count of Status value is recovered Initial value.
  4. 4. according to the method for claim 1, it is characterised in that the Hall value currently got that calculates once obtains with preceding Before difference between the Hall value got, in addition to:
    Judge the rotation direction of the camera, determine what the calculating was currently got according to the rotation direction of the camera The calculation of difference between Hall value and the preceding Hall value once got, wherein, the calculation includes described work as Before the Hall value that gets subtract the previous Hall value got or the previous Hall value got subtracts described work as Before the Hall value that gets.
  5. 5. according to the method for claim 1, it is characterised in that described to start the camera to single direction uniform rotation Including:
    Start the electro-motor in the camera, control the camera at the uniform velocity to turn to single direction by the electro-motor It is dynamic.
  6. 6. a kind of terminal, it is characterised in that the terminal includes:
    Camera control unit, for receiving camera rotation command, start the camera to single direction uniform rotation;
    Condition adjudgement unit, for when starting the camera to during single direction uniform rotation, judging the camera to list Whether dallied during one direction uniform rotation, wherein, the condition adjudgement unit is additionally operable to gather the camera To the stall sound occurred during the single direction uniform rotation, if the number that the stall sound continuously occurs reaches Second preset value, determine that the camera dallies;
    The camera control unit, it is additionally operable to the condition adjudgement unit judges and at the uniform velocity turns to the camera to single direction When being dallied in dynamic process, stop the rotation of the camera;
    Continue number setting unit, for the condition adjudgement unit judges to the camera to single direction uniform rotation During when dallying, reduced with specified numerical value and default continue number;
    Hall value acquiring unit, for when starting the camera to during single direction uniform rotation, being led to Fixed Time Interval The digital hall sensor crossed in terminal obtains Hall value, and calculates the Hall value currently got and once got suddenly with preceding Difference between value of, wherein, used Fixed Time Interval is less than when the camera rotates from 0 degree to 210 degree directions The camera is from used Fixed Time Interval during 210 degree to 0 degree rotation, the camera when camera is rearmounted Angle is 0 degree, and the angle of the camera is 180 degree when the camera is preposition;
    The condition adjudgement unit, it is additionally operable to judge continuously to occur the Hall value that currently gets and the preceding Hall once got Difference between value continues number no more than whether the number of the first preset value reaches default;
    The camera control unit, the condition adjudgement unit judges are additionally operable to continuously there is the Hall value currently got When difference between the preceding Hall value once got reaches default lasting number no more than the number of the first preset value, stop The only rotation of the camera.
  7. 7. terminal according to claim 6, it is characterised in that the condition adjudgement unit includes:
    Difference judgment sub-unit, for judging the difference between the Hall value currently obtained and the Hall value of the previous acquisition Whether value is not more than first preset value;
    State value count sub-element, for the difference judgment sub-unit determine the Hall value currently obtained with it is described before When difference between the Hall value of secondary acquisition is not more than first preset value, Count of Status value is incremented by one with fixed step size It is secondary;
    State value judgment sub-unit, for judging whether the Count of Status value reaches the 3rd preset value, if the determination result is YES, The camera control unit is additionally operable to stop the rotation of the camera.
  8. 8. terminal according to claim 7, it is characterised in that the state value count sub-element, be additionally operable to the difference The difference that judgment sub-unit is determined between the Hall value currently obtained and the Hall value of the previous acquisition is more than described During the first preset value, the Count of Status value is recovered into initial value.
  9. 9. terminal according to claim 7, it is characterised in that the camera control unit, be additionally operable to receive camera Rotation command, start camera uniform rotation round about;
    The state value count sub-element, it is additionally operable to the camera control unit and receives camera rotation command, described in startup Camera round about uniform rotation when, by the Count of Status value recover initial value.
  10. 10. terminal according to claim 6, it is characterised in that the terminal also includes:
    Rotation direction judging unit, calculate the Hall value currently got for the Hall value acquiring unit and once obtained with preceding Before difference between the Hall value arrived, the rotation direction of the camera is judged;
    Calculation determining unit, for being determined described to calculate the Hall that currently gets according to the rotation direction of the camera The calculation of difference between value and the preceding Hall value once got, wherein, the calculation currently obtains including described The Hall value got subtracts the previous Hall value got or the previous Hall value got is subtracted and described currently obtained The Hall value got.
  11. 11. terminal according to claim 6, it is characterised in that the camera control unit is specifically used for:Described in startup Electro-motor in camera, the camera is controlled to single direction uniform rotation by the electro-motor.
CN201510079681.XA 2015-02-12 2015-02-12 A kind of method and terminal that prevent camera from dallying Expired - Fee Related CN104702843B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810103566.5A CN108134904B (en) 2015-02-12 2015-02-12 Method and terminal for preventing camera from idling
CN201510079681.XA CN104702843B (en) 2015-02-12 2015-02-12 A kind of method and terminal that prevent camera from dallying

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510079681.XA CN104702843B (en) 2015-02-12 2015-02-12 A kind of method and terminal that prevent camera from dallying

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN201810103566.5A Division CN108134904B (en) 2015-02-12 2015-02-12 Method and terminal for preventing camera from idling

Publications (2)

Publication Number Publication Date
CN104702843A CN104702843A (en) 2015-06-10
CN104702843B true CN104702843B (en) 2018-03-02

Family

ID=53349581

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201810103566.5A Expired - Fee Related CN108134904B (en) 2015-02-12 2015-02-12 Method and terminal for preventing camera from idling
CN201510079681.XA Expired - Fee Related CN104702843B (en) 2015-02-12 2015-02-12 A kind of method and terminal that prevent camera from dallying

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201810103566.5A Expired - Fee Related CN108134904B (en) 2015-02-12 2015-02-12 Method and terminal for preventing camera from idling

Country Status (1)

Country Link
CN (2) CN108134904B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134904A (en) * 2015-02-12 2018-06-08 广东欧珀移动通信有限公司 A kind of method and terminal that prevent camera from dallying

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104950918A (en) * 2015-06-16 2015-09-30 广东欧珀移动通信有限公司 Control method for rotary camera and mobile terminal
CN104954682B (en) * 2015-06-16 2019-04-16 Oppo广东移动通信有限公司 A kind of control method of rotating camera, mobile terminal and wearable device
CN112399071B (en) * 2019-08-18 2022-03-15 海信视像科技股份有限公司 Control method and device for camera motor and display equipment
CN110602399A (en) * 2019-09-17 2019-12-20 深圳市万普拉斯科技有限公司 Processing method and device for lifting obstacle of camera and mobile terminal
CN110602297B (en) * 2019-09-17 2021-02-02 深圳市万普拉斯科技有限公司 Method and device for calibrating motion steps of lifting motor and mobile terminal
CN111131674B (en) * 2019-12-23 2021-06-01 诚瑞光学(常州)股份有限公司 Imaging device and electronic apparatus
CN113411486B (en) * 2020-03-16 2022-05-17 浙江宇视科技有限公司 Pan-tilt camera control method and device, pan-tilt camera and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104023105A (en) * 2014-06-13 2014-09-03 广东欧珀移动通信有限公司 Detection device and detection method of angled rotation of camera of mobile terminal
CN104243826A (en) * 2014-09-22 2014-12-24 广东欧珀移动通信有限公司 Method and mobile terminal for controlling rotary camera to rotate
CN104301609A (en) * 2014-09-26 2015-01-21 深圳市欧珀通信软件有限公司 Camera rotating control method used for mobile terminal and mobile terminal
CN104320508A (en) * 2014-10-27 2015-01-28 广东欧珀移动通信有限公司 Mobile terminal with rotation camera and camera angle control method thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7342611B2 (en) * 2003-12-10 2008-03-11 Hewlett-Packard Development Company, L.P. Method for rapid power-on to first picture in a digital camera
KR100716818B1 (en) * 2005-12-29 2007-05-09 삼성전기주식회사 Device for sensing position of camera and mobile phone comprising the same
CN104320591B (en) * 2014-11-21 2018-07-03 广东欧珀移动通信有限公司 A kind of front and rear method, apparatus switched of control camera and a kind of intelligent terminal
CN108134904B (en) * 2015-02-12 2020-06-02 Oppo广东移动通信有限公司 Method and terminal for preventing camera from idling

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104023105A (en) * 2014-06-13 2014-09-03 广东欧珀移动通信有限公司 Detection device and detection method of angled rotation of camera of mobile terminal
CN104243826A (en) * 2014-09-22 2014-12-24 广东欧珀移动通信有限公司 Method and mobile terminal for controlling rotary camera to rotate
CN104301609A (en) * 2014-09-26 2015-01-21 深圳市欧珀通信软件有限公司 Camera rotating control method used for mobile terminal and mobile terminal
CN104320508A (en) * 2014-10-27 2015-01-28 广东欧珀移动通信有限公司 Mobile terminal with rotation camera and camera angle control method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134904A (en) * 2015-02-12 2018-06-08 广东欧珀移动通信有限公司 A kind of method and terminal that prevent camera from dallying
CN108134904B (en) * 2015-02-12 2020-06-02 Oppo广东移动通信有限公司 Method and terminal for preventing camera from idling

Also Published As

Publication number Publication date
CN104702843A (en) 2015-06-10
CN108134904A (en) 2018-06-08
CN108134904B (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CN104702843B (en) A kind of method and terminal that prevent camera from dallying
CN104461084B (en) A kind of control device and method
CN105163028B (en) A kind of control method and device of dual camera
CN104205016B (en) A kind of photographic method and mobile terminal
CN110223684A (en) A kind of voice awakening method and equipment
CN105404160B (en) Based on dormant control method and device
CN104902171B (en) A kind of camera angle correcting method and terminal
CN106167205B (en) Control method, control device, operation method and the intelligent elevator of intelligent elevator
CN106371643B (en) Touch chip crash handling method and device
CN103593640A (en) Information processing method and electronic equipment
CN103927200B (en) Electronic equipment awakening method and relevant apparatus
WO2014059882A1 (en) Terminal and method for the control thereof
CN103106031A (en) Operation method and operation device of mobile terminal
CN109521925A (en) Icon arrangement method, mobile terminal and computer readable storage medium
CN106919324A (en) A kind of control method, device and terminal
WO2015131743A1 (en) Incoming call processing method, device and terminal
CN105072335B (en) A kind of photographic method and user terminal
CN105357641B (en) A kind of location updating control method and user terminal
CN103024173A (en) Method for opening camera based on gravity sensing
CN105430272B (en) A kind of method and terminal reducing camera power consumption
CN106034323A (en) Wireless-terminal-based automatic recovery method and relevant apparatus for data connection
CN106331307A (en) Method and apparatus for controlling hanging up and mobile device
CN106507192A (en) A kind of television shutdown control method and system based on eye recognition
CN106406573A (en) Method and system for controlling page turning of mobile terminal
WO2015131813A1 (en) Method and system for operating 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

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.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180302

CF01 Termination of patent right due to non-payment of annual fee