CN104702843A - Method for preventing camera idling and terminal - Google Patents

Method for preventing camera idling and terminal Download PDF

Info

Publication number
CN104702843A
CN104702843A CN201510079681.XA CN201510079681A CN104702843A CN 104702843 A CN104702843 A CN 104702843A CN 201510079681 A CN201510079681 A CN 201510079681A CN 104702843 A CN104702843 A CN 104702843A
Authority
CN
China
Prior art keywords
value
camera
hall
rotation
hall value
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.)
Granted
Application number
CN201510079681.XA
Other languages
Chinese (zh)
Other versions
CN104702843B (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 CN201510079681.XA priority Critical patent/CN104702843B/en
Priority to CN201810103566.5A priority patent/CN108134904B/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

Landscapes

  • Studio Devices (AREA)

Abstract

The invention discloses a method for preventing camera idling and a terminal. The method for preventing the camera idling includes that receiving a camera rotating command, and starting a camera to rotate in a single direction in a uniform speed; acquiring Hall values from a digital Hall sensor on the terminal according to a fixed time interval, and calculating the difference between the current acquired Hall value and the previous acquired Hall value; if the continuous times of the phenomenon that the difference between the current acquired Hall value and the previous acquired Hall value is less than or equal to a first preset value arrives at preset lasting times, stopping the rotation of the camera. The method for preventing the camera idling is capable of preventing the camera idling, the electrical resource of the terminal is saved, the mechanical loss of an electric motor in the rotating camera is reduced, and accordingly the service life of the rotating function of the rotating camera is increased.

Description

A kind of prevent camera from dallying method and terminal
Technical field
The present invention relates to field of terminal technology, particularly relate to a kind of prevent camera from dallying method and terminal.
Background technology
Along with the development of the communication technology, the function of terminal is increasingly abundant, and wherein, the camera function that terminal provides is liked by users deeply.At present, existing many manufacturer terminals are proposed electronic rotation camera, the structural representation of rotatable camera in a kind of terminal as shown in Figure 6, the principle of electronic rotation camera is: in camera, a built-in miniature electric motor makes camera to rotate, in addition, camera is provided with magnet, position corresponding with magnet on camera on the terminal body at camera place is also provided with digital hall sensor, when camera rotates, the angle of camera is in change, on camera, the distance of magnet and digital hall sensor also changes thereupon, and now the Hall value of digital hall sensor also changes along with the distance change between digital hall sensor and magnet, therefore the anglec of rotation of camera can be judged according to Hall value.
But, magnetic field is easy to the interference being subject to external electromagnetic field, when terminal is in different elect magnetic fields, even if Hall element Hall value identical with the distance of magnet is not identical yet, make the angle recognition of camera inaccurate, when camera reality has rotated to maximum angle, and terminal is not when identifying, electro-motor still in rotation, causes the problem that motor dallies, waste terminal electric power resource, the mechanical performance of loss motor.
Summary of the invention
Embodiments provide a kind of prevent camera from dallying method and terminal, can prevent rotating camera from dallying, save the electric power resource of terminal, reduce the mechanical loss of electro-motor in rotating camera, thus increase the useful life of the spinfunction of rotating camera.
Embodiments provide a kind of method preventing camera from dallying, described method comprises:
Receive camera rotation command, start described camera to single direction uniform rotation;
Obtain Hall value with Fixed Time Interval by digital hall sensor in terminal, and calculate the difference between the current Hall value that gets and the front Hall value once got;
If the number of times that the difference occurring continuously between the current Hall value that gets and the front Hall value once got is not more than the first preset value reaches default lasting number of times, then stop the rotation of described camera.
Accordingly, embodiments provide a kind of terminal, described terminal comprises:
Camera control unit, for receiving camera rotation command, starts described camera to single direction uniform rotation;
Hall value acquiring unit, for obtaining Hall value with Fixed Time Interval by digital hall sensor in terminal, and calculates the difference between the current Hall value that gets and the front Hall value once got;
Condition adjudgement unit, whether the number of times that the difference for judging to occur continuously between the current Hall value that gets and the front Hall value once got is not more than the first preset value reaches default lasting number of times;
Described camera control unit, when also reaching default lasting number of times for described condition adjudgement unit judges to the number of times that the difference occurred continuously between the current Hall value that gets and the front Hall value once got is not more than the first preset value, stop the rotation of described camera.
The embodiment of the present invention, camera rotation command can be received, start described camera to single direction uniform rotation, Hall value is obtained by the digital hall sensor in terminal with Fixed Time Interval, and the difference calculated between the current Hall value that gets and the front Hall value once got, and then when the number of times occurring that continuously the difference between the current Hall value that gets and the front Hall value once got is not more than the first preset value reaches default lasting number of times, stop the rotation of described camera, can prevent rotating camera from dallying, save the electric power resource of terminal, reduce the mechanical loss of electro-motor in rotating camera, thus increase the useful life of the spinfunction of rotating camera.
Accompanying drawing explanation
In order to be illustrated more clearly in embodiment of the present invention technical scheme, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of method flow schematic diagram preventing camera from dallying that the embodiment of the present invention provides;
Fig. 2 is the method flow schematic diagram that another kind that the embodiment of the present invention provides prevents camera from dallying;
Fig. 3 is a kind of terminal structure schematic diagram that the embodiment of the present invention provides;
Fig. 4 is the structural representation of a kind of condition adjudgement unit that the embodiment of the present invention provides;
Fig. 5 is the structural representation of the another kind of condition adjudgement unit that the embodiment of the present invention provides;
Fig. 6 is the structural representation of rotatable camera in a kind of terminal of providing of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
In specific implementation, terminal mentioned in the embodiment of the present invention includes but not limited to: the electronic equipment such as smart mobile phone (as Android phone, IOS mobile phone), panel computer, notebook computer, palmtop PC, wearable intelligent equipment.
Below in conjunction with Fig. 1 to Fig. 5 to the embodiment of the present invention provide a kind of prevent camera from dallying method and terminal be specifically described.
See Fig. 1, be a kind of method flow schematic diagram preventing camera from dallying that the embodiment of the present invention provides, the method preventing camera from dallying as shown in the figure can comprise the following steps:
S101, receives camera rotation command, starts described camera to single direction uniform rotation.
In specific implementation, user is when needs rotating camera, and the camera application provided by terminal opens interface of taking pictures, and then operates rotating camera function, starts this camera to single direction uniform rotation.Such as this cueing track of interface display operation rotating camera of taking pictures, this track divides upper and lower both direction, and user, according to this cueing track, when inputting track upwards by touch-screen, then starts camera and rotates to direction, terminal back; When inputting downward track by touch-screen, then start camera and rotate to terminal screen direction.And for example, user can pre-set the angle on target of camera, and when terminal receives camera rotation command, terminal, according to the difference between the current angle of camera and angle on target, automatically controls camera and rotates to angle on target.
S102, obtains Hall value with Fixed Time Interval by digital hall sensor in terminal, and calculates the difference between the current Hall value that gets and the front Hall value once got.
In specific implementation, the rotating camera that electro-motor controls is provided with magnet, position corresponding with magnet on camera on the terminal body at camera place is also provided with digital hall sensor, when camera rotates, the angle of camera is in change, on camera, the distance of magnet and digital hall sensor also changes thereupon, and now the Hall value of digital hall sensor also changes along with the distance change between digital hall sensor and magnet, the anglec of rotation of camera therefore can be judged according to Hall value.
Camera is in rotary course, and terminal obtains Hall value with the digital hall sensor in fixed time interval timing reading terminals, then calculates the difference between the current Hall value that gets and the front Hall value once got.At present, the maximum anglec of rotation of common rotating camera is generally about 210 degree, if when camera is rearmounted, the angle of camera is 0 degree, time preposition, the angle of camera is 180 degree, when usual camera rotates from 0 degree to 210 directions, when the angle that camera revolves is very fast close to the change of Hall value when 180 degree, and camera from 210 degree to 0 degree rotate time, when camera rotate over 180 degree to 0 degree near time Hall value transform slower, when therefore rotating from 0 degree to 210 directions, fixed time interval can be selected shorter, and when rotating from 210 degree to 0 degree direction, fixed time interval can be selected more longer.
S103, if the number of times that the difference occurring continuously between the current Hall value that gets and the front Hall value once got is not more than the first preset value reaches default lasting number of times, then stops the rotation of described camera.
In specific implementation, a Count of Status value can be pre-set, this Count of Status value difference being used for recording between the Hall value of the current acquisition of appearance continuously and the Hall value of previous acquisition is not more than the number of times of the first preset value, and in camera rotation process, the value of this read-around ratio is: current state count value deducts Count of Status value initial value later divided by the value of fixed step size.Terminal gets Hall value in second time, just start to calculate the difference between the Hall value of current acquisition and the Hall value of previous acquisition, if this difference is not more than the first preset value, just Count of Status value is added one or increase progressively with other fixed step sizes, and when judging that Count of Status value reaches the 3rd preset value (read-around ratio reaches default lasting number of times), stop camera rotating; If this difference is greater than the first preset value, just Count of Status value is recovered initial value, and then continue to perform step S102.
In another embodiment, described method also comprises: judge whether described camera dallies in the process of single direction uniform rotation; If dally, then stop the rotation of described camera, and reduce described default lasting number of times with the numerical value of specifying.
In specific implementation, the spinfunction of terminal camera is in the process constantly used, its inner member (as electro-motor) is in continuous aging individual difference of adding terminal, although shooting head-turned angle therefore may be caused not reach theoretic maximum angle, but camera has turned motionless, just there will be idle running phenomenon.Further causing the mechanical loss of motor to prevent from dallying, now, this lasting number of times preset can be reduced when idle running occurs camera, when startup next time camera is rotated, camera rotation can be stopped before generation idle running.
Further, judge that the method whether described camera occurs to dally in the process of single direction uniform rotation specifically comprises: gather the stall sound that described camera occurs in the process of single direction uniform rotation; If the number of times that described stall sound occurs continuously reaches the second preset value, determine that described camera dallies.
In specific implementation, the sound that can send during electro-motor stall in acquisition camera when terminal is dispatched from the factory, and store, start when camera rotates user and open microphone function simultaneously, acquisition camera rotates the sound sent, the sound whether sound judging to collect by the sound recognition module in terminal sends when being electro-motor stall, and when the number of times that this stall sound occurs continuously reaches the second preset value, can think that camera dallies.
In another embodiment, before execution step S102, described method also comprises: the rotation direction judging described camera, determines the account form of the difference between the current Hall value that gets of described calculating and the front Hall value once got according to the rotation direction of described camera.
In specific implementation, camera there will be with the Digital Hall on terminal body apart from identical situation in some position in rotary course, therefore the method described in the present embodiment is adopted, when calculating the difference between the current Hall value that gets and the previous Hall value got, the account form of absolute difference should not be adopted; And account form should be determined in advance, this account form comprises the described current Hall value got and deducts the described previous Hall value that gets or the described previous Hall value got deducts the described current Hall value got.
In another embodiment, after execution step S103, described method also comprises: receive camera rotation command, start the uniform rotation round about of described camera, and described Count of Status value is recovered initial value.Perform the method described by the present embodiment, can realize, when each use camera spinfunction, can judging whether camera soon turns to maximum angle in advance, and before camera turns to maximum angle, stopping camera rotating.
Further, in another optional enforcement, the described camera of described control specifically comprises to the method for single direction uniform rotation: start the electro-motor in described camera, controls described camera to single direction uniform rotation by described electro-motor.
The embodiment of the present invention, camera rotation command can be received, start described camera to single direction uniform rotation, Hall value is obtained by the digital hall sensor in terminal with Fixed Time Interval, and the difference calculated between the current Hall value that gets and the front Hall value once got, and then when the number of times occurring that continuously the difference between the current Hall value that gets and the front Hall value once got is not more than the first preset value reaches default lasting number of times, stop the rotation of described camera, can prevent rotating camera from dallying, save the electric power resource of terminal, reduce the mechanical loss of electro-motor in rotating camera, thus increase the useful life of the spinfunction of rotating camera.
See Fig. 2, be the method flow schematic diagram that another kind that the embodiment of the present invention provides prevents camera from dallying, the method preventing camera from dallying as shown in the figure can comprise the following steps:
S201, receives camera rotation command, starts described camera to single direction uniform rotation.
S202, obtains Hall value with Fixed Time Interval by digital hall sensor in terminal, and calculates the difference between the current Hall value that gets and the front Hall value once got.
Step S201 and step S202 can distinguish step S101 in embodiment shown in Figure 1 and step S102, repeats no more herein.
S203, judges whether the difference between the Hall value of described current acquisition and the Hall value of described previous acquisition is not more than the first preset value.
In actual use, when camera soon reaches maximum rotation angle, difference between the Hall value of its corresponding current acquisition and the Hall value of described previous acquisition there will be the trend continuing to be not more than certain numerical value, and therefore we can utilize this characteristic to judge whether camera soon reaches maximum rotation angle.In specific implementation, a Count of Status value can be pre-set, this Count of Status value difference being used for recording between the Hall value of the current acquisition of appearance continuously and the Hall value of previous acquisition is not more than the number of times of the first preset value, terminal gets Hall value in second time, just start to calculate the difference between the Hall value of current acquisition and the Hall value of previous acquisition, if this difference is not more than the first preset value, then perform step S204, and then perform step S205; If this difference is greater than the first preset value, perform step S207, this Count of Status value is recovered initial value, and then perform step S202.
S204, increases progressively Count of Status value once with fixed step size.
S205, judges whether described Count of Status value reaches the 3rd preset value.
In specific implementation, in camera rotation process, the concrete account form that the difference between the Hall value of the current acquisition of appearance continuously and the Hall value of previous acquisition is not more than the number of times of the first preset value is: current state count value deducts Count of Status value initial value later divided by fixed step size.If determine described Count of Status value to reach the 3rd preset value, then perform step S206, if do not reach the 3rd preset value, then perform step S202.
S206, stops the rotation of described camera.
S207, recovers initial value by described Count of Status value.
The embodiment of the present invention, occur that continuously the difference between the current Hall value that gets and the front Hall value once got is not more than the number of times of the first preset value by arranging Count of Status value to record, maximum rotation angle foundation whether is reached in this, as the rotating camera judged in terminal, and think that this rotating camera has reached maximum rotation angle when this Count of Status value reaches the 3rd preset value, thus stop camera being rotated further, can prevent rotating camera from dallying, save the electric power resource of terminal, reduce the mechanical loss of electro-motor in rotating camera, thus increase the useful life of the spinfunction of rotating camera.
See Fig. 3, be a kind of terminal structure schematic diagram that the embodiment of the present invention provides, terminal as shown in the figure can comprise: camera control unit 301, Hall value acquiring unit 302 and condition adjudgement unit 303.
Camera control unit 301, for receiving camera rotation command, starts described camera to single direction uniform rotation.
In specific implementation, user is when needs rotating camera, and the camera application provided by terminal opens interface of taking pictures, and then inputs camera rotation command, when camera control unit 301 receives this camera rotation command, start this camera to single direction uniform rotation.Such as this cueing track of interface display operation rotating camera of taking pictures, this track divides upper and lower both direction, and user, according to this cueing track, when inputting track upwards by touch-screen, then starts camera and rotates to direction, terminal back; When user inputs downward track by touch-screen, then start camera and rotate to terminal screen direction.
Hall value acquiring unit 302, for obtaining Hall value with Fixed Time Interval by digital hall sensor in terminal, and calculates the difference between the current Hall value that gets and the front Hall value once got.
In specific implementation, the rotating camera that electro-motor controls is provided with magnet, position corresponding with magnet on camera on the terminal body at camera place is also provided with digital hall sensor, when camera rotates, the angle of camera is in change, on camera, the distance of magnet and digital hall sensor also changes thereupon, and now the Hall value of digital hall sensor also changes along with the distance change between digital hall sensor and magnet, the anglec of rotation of camera therefore can be judged according to Hall value.
Camera is in rotary course, and Hall value acquiring unit 302 obtains Hall value with the digital hall sensor in fixed time interval timing reading terminals, then calculates the difference between the current Hall value that gets and the front Hall value once got.At present, the maximum anglec of rotation of common rotating camera is generally about 210 degree, if when camera is rearmounted, the angle of camera is 0 degree, time preposition, the angle of camera is 180 degree, when usual camera rotates from 0 degree to 210 directions, when the angle that camera revolves is very fast close to the change of Hall value when 180 degree, and camera from 210 degree to 0 degree rotate time, when camera rotate over 180 degree to 0 degree near time Hall value transform slower, when therefore rotating from 0 degree to 210 directions, fixed time interval can be selected shorter, and when rotating from 210 degree to 0 degree direction, fixed time interval can be selected more longer.
Condition adjudgement unit 303, whether the number of times that the difference for judging to occur continuously between the current Hall value that gets and the front Hall value once got is not more than the first preset value reaches default lasting number of times.
In actual use, when camera soon reaches maximum rotation angle, difference between the Hall value of its corresponding current acquisition and the Hall value of described previous acquisition there will be the trend continuing to be not more than certain numerical value, and therefore we can utilize this characteristic to judge whether camera soon reaches maximum rotation angle.If the difference that condition adjudgement unit 303 determines between the current Hall value that gets and the front Hall value once got is greater than the first preset value, then obtain Hall value with Fixed Time Interval by digital hall sensor in terminal by Hall value acquiring unit 302, and calculate the difference between the current Hall value that gets and the front Hall value once got.
Further alternative, see Fig. 4, the structural representation of a kind of condition adjudgement unit that the embodiment of the present invention provides, condition adjudgement unit 303 as shown in the figure can specifically comprise: difference judgment sub-unit 3301, state value count sub-element 3302 and state value judgment sub-unit 3303.
Difference judgment sub-unit 3301, for judging whether the difference between the Hall value of described current acquisition and the Hall value of described previous acquisition is not more than described first preset value;
State value count sub-element 3302, when being not more than described first preset value for described difference subelement 3301 difference determined between the Hall value of described current acquisition and the Hall value of described previous acquisition, increases progressively once with fixed step size by Count of Status value;
State value judgment sub-unit 3303, for judging whether described Count of Status value reaches the 3rd preset value, if the determination result is YES, described camera control unit 301 is also for stopping the rotation of described camera.
In specific implementation, a Count of Status value can be pre-set, this Count of Status value difference being used for recording between the Hall value of the current acquisition of appearance continuously and the Hall value of previous acquisition is not more than the number of times of the first preset value, and the account form of this read-around ratio is: current state count value deducts Count of Status value initial value later divided by the value of fixed step size.Hall value acquiring unit 302 gets Hall value in second time, just start to calculate the difference between the Hall value of current acquisition and the Hall value of previous acquisition, if difference judgment sub-unit 3301 determines this difference be not more than the first preset value, and then this Count of Status value increased progressively once with fixed step size by state value count sub-element 3302, and judge whether this state value reaches the 3rd preset value by state value judgment sub-unit 3303; If difference judgment sub-unit 3301 determines this difference be greater than the first preset value, then by state value count sub-element 3302, this Count of Status value is recovered initial value, and then obtain Hall value with Fixed Time Interval by digital hall sensor in terminal by Hall value acquiring unit 302, and calculate the difference between the current Hall value that gets and the front Hall value once got.
Described camera control unit 301, also for described condition adjudgement unit 303 determine number of times that the difference occurring continuously between the current Hall value that gets and the front Hall value once got is not more than the first preset value reach default lasting number of times time, stop the rotation of described camera.
In another embodiment, described condition adjudgement unit 303, also for judging whether described camera dallies in the process of single direction uniform rotation;
Described camera control unit 301, also for described condition adjudgement unit 303 determine described camera occur in the process of single direction uniform rotation idle running time, stop the rotation of described camera;
Accordingly, described terminal also comprises: continue number of times setting unit 304, for described condition adjudgement unit 303 determine described camera occurs in the process of single direction uniform rotation idle running time, with the numerical value of specifying reduction described default lasting number of times.
In specific implementation, the spinfunction of terminal camera is in the process constantly used, its inner member (as electro-motor) is constantly aging, add the individual difference of terminal, although shooting head-turned angle therefore may be caused not reach theoretic maximum angle, but camera has turned motionless, just there will be idle running phenomenon.The mechanical loss of motor is further caused in order to prevent from dallying, now, can when condition adjudgement unit 303 judges that idle running occurs camera, the rotation of camera is stopped by camera control unit 301, and reduce this lasting number of times preset by continuing number of times setting unit 304, when making to start camera rotation next time, can camera be stopped to rotate before generation idle running.
Further alternative, see Fig. 5, the structural representation of the another kind of condition adjudgement unit that the embodiment of the present invention provides, condition adjudgement unit 303 as shown in the figure can specifically comprise: stall sound collection subelement 3311, stall number of times judgment sub-unit 3312 and idling conditions determination subelement 3313.
Stall sound collection subelement 3311, for gathering the stall sound that described camera occurs in the process of single direction uniform rotation;
Stall number of times judgment sub-unit 3312, for judge process from described camera to single direction uniform rotation described in the number of times that occurs continuously of stall sound whether reach the second preset value;
Idling conditions determination subelement 3313, for described stall number of times judgment sub-unit 3312 determine process from described camera to single direction uniform rotation described in the number of times that occurs continuously of stall sound reach the second preset value time, determine that described camera dallies.
In specific implementation, the sound that can send during electro-motor stall in acquisition camera when terminal is dispatched from the factory, and store, stall sound collection subelement 3311 can be specially microphone, start when camera rotates user and open stall sound collection subelement 3311 simultaneously, acquisition camera rotates the sound sent.Then, start stall number of times judgment sub-unit 3312 and (can sound recognition module be specially, as voiceprint identification module) judge the sound that the sound that collects sends when whether being electro-motor stall, and when the number of times that this stall sound occurs continuously reaches the second preset value, idling conditions determination subelement 3313 can think that camera dallies.
In another embodiment, described terminal also comprises: rotation direction judging unit 305, before calculating the difference between the current Hall value that gets and the front Hall value once got for described Hall value acquiring unit 302, judge the rotation direction of described camera.
Accordingly, described terminal also comprises: account form determining unit 306, for determining the account form of the difference between the current Hall value that gets of described calculating and the front Hall value once got according to the rotation direction of described camera.
In specific implementation, camera there will be with the Digital Hall on terminal body apart from identical situation in some position in rotary course, therefore the method described in the present embodiment, when calculating the difference between the current Hall value that gets and the previous Hall value got, the account form of absolute difference should not be adopted; And account form should be determined in advance, this account form comprises the described current Hall value got and deducts the described previous Hall value that gets or the described previous Hall value got deducts the described current Hall value got.
In another embodiment, described camera control unit 301 specifically for: start the electro-motor in described camera, control described camera to single direction uniform rotation by described electro-motor.
The embodiment of the present invention, camera rotation command can be received, start described camera to single direction uniform rotation, Hall value is obtained by the digital hall sensor in terminal with Fixed Time Interval, and the difference calculated between the current Hall value that gets and the front Hall value once got, and then when the number of times occurring that continuously the difference between the current Hall value that gets and the front Hall value once got is not more than the first preset value reaches default lasting number of times, stop the rotation of described camera, can prevent rotating camera from dallying, save the electric power resource of terminal, reduce the mechanical loss of electro-motor in rotating camera, thus increase the useful life of the spinfunction of rotating camera.
Above to disclosed in the embodiment of the present invention a kind of prevent camera from dallying method and terminal be described in detail, above disclosedly be only present pre-ferred embodiments, certainly the interest field of the present invention can not be limited with this, therefore according to the equivalent variations that the claims in the present invention are done, the scope that the present invention is contained still is belonged to.

Claims (15)

1. the method preventing camera from dallying, is characterized in that, comprising:
Receive camera rotation command, start described camera to single direction uniform rotation;
Obtain Hall value with Fixed Time Interval by digital hall sensor in terminal, and calculate the difference between the current Hall value that gets and the front Hall value once got;
If the number of times that the difference occurring continuously between the current Hall value that gets and the front Hall value once got is not more than the first preset value reaches default lasting number of times, then stop the rotation of described camera.
2. method according to claim 1, is characterized in that, described method also comprises:
Judge whether described camera dallies in the process of single direction uniform rotation;
If so, stop the rotation of described camera, and reduce described default lasting number of times with the numerical value of specifying.
3. method according to claim 2, is characterized in that, describedly judges whether described camera in the process of single direction uniform rotation, idle running occurs and comprise:
Gather the stall sound that described camera occurs in the process of single direction uniform rotation; If the number of times that described stall sound occurs continuously reaches the second preset value, determine that described camera dallies.
4. method according to claim 1, it is characterized in that, if the number of times that the difference occurring continuously between the current Hall value that gets and the front Hall value once got described is not more than the first preset value reaches default lasting number of times, then stop the rotation of described camera to comprise:
Judge whether the difference between the Hall value of described current acquisition and the Hall value of described previous acquisition is not more than described first preset value;
If so, Count of Status value increases progressively once with fixed step size, otherwise described Count of Status value is recovered initial value;
Judge whether described Count of Status value reaches the 3rd preset value;
If so, the rotation of described camera is stopped.
5. method according to claim 4, is characterized in that, after the rotation of the described camera of described stopping, also comprising:
Receive camera rotation command, start the uniform rotation round about of described camera, described Count of Status value is recovered initial value.
6. method according to claim 1, is characterized in that, before the difference between the Hall value that described calculating is current to be got and the front Hall value once got, also comprises:
Judge the rotation direction of described camera, the account form of the difference between the current Hall value that gets of described calculating and the front Hall value once got is determined according to the rotation direction of described camera, wherein, described account form comprises the described current Hall value got and deducts the described previous Hall value that gets or the described previous Hall value got deducts the described current Hall value got.
7. method according to claim 1, is characterized in that, the described camera of described control comprises to single direction uniform rotation:
Start the electro-motor in described camera, control described camera to single direction uniform rotation by described electro-motor.
8. a terminal, is characterized in that, described terminal comprises:
Camera control unit, for receiving camera rotation command, starts described camera to single direction uniform rotation;
Hall value acquiring unit, for obtaining Hall value with Fixed Time Interval by digital hall sensor in terminal, and calculates the difference between the current Hall value that gets and the front Hall value once got;
Condition adjudgement unit, whether the number of times that the difference for judging to occur continuously between the current Hall value that gets and the front Hall value once got is not more than the first preset value reaches default lasting number of times;
Described camera control unit, when also reaching default lasting number of times for described condition adjudgement unit judges to the number of times that the difference occurred continuously between the current Hall value that gets and the front Hall value once got is not more than the first preset value, stop the rotation of described camera.
9. terminal according to claim 8, is characterized in that,
Described condition adjudgement unit, also for judging whether described camera dallies in the process of single direction uniform rotation;
Described camera control unit, when also occurring to dally in the process of single direction uniform rotation to described camera for described condition adjudgement unit judges, stops the rotation of described camera;
Described terminal also comprises:
Continue number of times setting unit, when occurring to dally in the process of single direction uniform rotation to described camera for described condition adjudgement unit judges, reduce described default lasting number of times with the numerical value of specifying.
10. terminal according to claim 9, is characterized in that, described condition adjudgement unit comprises:
Stall sound collection subelement, for gathering the stall sound that described camera occurs in the process of single direction uniform rotation;
Stall number of times judgment sub-unit, for judge process from described camera to single direction uniform rotation described in the number of times that occurs continuously of stall sound whether reach the second preset value;
Idling conditions determination subelement, for described stall number of times judgment sub-unit determine process from described camera to single direction uniform rotation described in the number of times that occurs continuously of stall sound reach the second preset value time, determine that described camera dallies.
11. terminals according to claim 8, is characterized in that, described condition adjudgement unit comprises:
Difference judgment sub-unit, for judging whether the difference between the Hall value of described current acquisition and the Hall value of described previous acquisition is not more than described first preset value;
State value count sub-element, when being not more than described first preset value for the described difference subelement difference determined between the Hall value of described current acquisition and the Hall value of described previous acquisition, increases progressively once with fixed step size by Count of Status value;
State value judgment sub-unit, for judging whether described Count of Status value reaches the 3rd preset value, if the determination result is YES, described camera control unit is also for stopping the rotation of described camera.
12. terminals according to claim 11, it is characterized in that, described state value count sub-element, when being also greater than described first preset value for the described difference subelement difference determined between the Hall value of described current acquisition and the Hall value of described previous acquisition, described Count of Status value is recovered initial value.
13. terminals according to claim 11, is characterized in that, described camera control unit, also for receiving camera rotation command, start the uniform rotation round about of described camera;
Described state value count sub-element, also receives camera rotation command for described camera control unit, start described camera round about uniform rotation time, described Count of Status value is recovered initial value.
14. terminals according to claim 8, is characterized in that, described terminal also comprises:
Rotation direction judging unit, before calculating the difference between the current Hall value that gets and the front Hall value once got, judges the rotation direction of described camera for described Hall value acquiring unit;
Account form determining unit, for determining the account form of the difference between the current Hall value that gets of described calculating and the front Hall value once got according to the rotation direction of described camera, wherein, described account form comprises the described current Hall value got and deducts the described previous Hall value that gets or the described previous Hall value got deducts the described current Hall value got.
15. terminals according to claim 8, is characterized in that, described camera control unit specifically for: start the electro-motor in described camera, control described camera to single direction uniform rotation by described 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
CN201510079681.XA CN104702843B (en) 2015-02-12 2015-02-12 A kind of method and terminal that prevent camera from dallying
CN201810103566.5A CN108134904B (en) 2015-02-12 2015-02-12 Method and terminal for preventing camera from idling

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 true CN104702843A (en) 2015-06-10
CN104702843B 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 (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954682A (en) * 2015-06-16 2015-09-30 广东欧珀移动通信有限公司 Control method for rotary camera, mobile terminal and wearable equipment
CN104950918A (en) * 2015-06-16 2015-09-30 广东欧珀移动通信有限公司 Control method for rotary camera and mobile terminal
CN110602297A (en) * 2019-09-17 2019-12-20 深圳市万普拉斯科技有限公司 Method and device for calibrating motion steps of lifting motor and mobile terminal
CN110602399A (en) * 2019-09-17 2019-12-20 深圳市万普拉斯科技有限公司 Processing method and device for lifting obstacle of camera and mobile terminal
CN111131674A (en) * 2019-12-23 2020-05-08 瑞声通讯科技(常州)有限公司 Imaging device and electronic apparatus
CN112399071A (en) * 2019-08-18 2021-02-23 海信视像科技股份有限公司 Control method and device for camera motor and display equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108134904B (en) * 2015-02-12 2020-06-02 Oppo广东移动通信有限公司 Method and terminal for preventing camera from idling
CN113411486B (en) * 2020-03-16 2022-05-17 浙江宇视科技有限公司 Pan-tilt camera control method and device, pan-tilt camera and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070154194A1 (en) * 2005-12-29 2007-07-05 Samsung Electro-Mechanics Co., Ltd. Camera position sensing device and mobile phone having the same
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 (3)

* 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
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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070154194A1 (en) * 2005-12-29 2007-07-05 Samsung Electro-Mechanics Co., Ltd. Camera position sensing device and mobile phone having the same
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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954682A (en) * 2015-06-16 2015-09-30 广东欧珀移动通信有限公司 Control method for rotary camera, mobile terminal and wearable equipment
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
CN112399071A (en) * 2019-08-18 2021-02-23 海信视像科技股份有限公司 Control method and device for camera motor and display equipment
CN112399071B (en) * 2019-08-18 2022-03-15 海信视像科技股份有限公司 Control method and device for camera motor and display equipment
CN110602297A (en) * 2019-09-17 2019-12-20 深圳市万普拉斯科技有限公司 Method and device for calibrating motion steps of lifting motor and mobile terminal
CN110602399A (en) * 2019-09-17 2019-12-20 深圳市万普拉斯科技有限公司 Processing method and device for lifting obstacle of camera and mobile terminal
CN111131674A (en) * 2019-12-23 2020-05-08 瑞声通讯科技(常州)有限公司 Imaging device and electronic apparatus

Also Published As

Publication number Publication date
CN108134904B (en) 2020-06-02
CN108134904A (en) 2018-06-08
CN104702843B (en) 2018-03-02

Similar Documents

Publication Publication Date Title
CN104702843A (en) Method for preventing camera idling and terminal
CN105049923B (en) Wake up the method and device of electronic equipment
EP3188406B1 (en) Method and apparatus for identity authentication and user equipment
CN104935823A (en) Method and device for entering shooting status and intelligent terminal
CN105049707A (en) Method of preventing camera from stalling and mobile terminal
CN105007418A (en) Photographing method and mobile terminal
KR20160042398A (en) Method and device for controlling background application and terminal device
CN107635078B (en) Game control method and device
CN104486451B (en) Application program recommends method and device
CN111240555A (en) Intelligent Internet of things menu using camera device
CN105260004B (en) The screen rotation method and system of Android system terminal
CN104902171B (en) A kind of camera angle correcting method and terminal
CN106371643B (en) Touch chip crash handling method and device
CN110554762A (en) Method and terminal for controlling application program
CN105182766A (en) Equipment control method and apparatus
EP3125525A1 (en) Method and system for enabling camera of mobile terminal to automatically adapt to scene
CN104580864A (en) Resetting method and device for camera
CN104238578B (en) Method and device for controlling rotation of camera
CN104243826A (en) Method and mobile terminal for controlling rotary camera to rotate
CN105338238A (en) Photographing method and electronic device
CN105975391A (en) Restart testing method and device and mobile terminal
CN103095912B (en) Method and system for automatic calling of mobile terminal
CN107515749A (en) Starting-up method, device and the electronic equipment of electronic equipment
CN105955441A (en) Method and device for application management
CN113375297A (en) Method and device for controlling air conditioner and air conditioner

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