The content of the invention
It is an object of the invention to provide a kind of bounce flash control method and mobile terminal applied to mobile terminal, it is intended to solves
Certainly above-mentioned existing mobile terminal mode of flashing of flash lamp when taking pictures is vertically to flash, and can make shooting object overexposure,
Cause shooting object excessively bright or pale, and without relief problem.
The present invention is achieved in that a kind of bounce flash control method applied to mobile terminal, and the mobile terminal includes
Mobile terminal main body, it is arranged at the top of the mobile terminal main body, and the rotation that can be rotated relative to the mobile terminal main body
CCD camera assembly, it is arranged at the top of the mobile terminal main body, and the rotation that can be rotated relative to the mobile terminal main body is dodged
Light lamp component and central processing unit;
The rotating camera component is fixed on the top of the mobile terminal main body, described first turn by first rotating shaft
One end of axle is provided with the first motor, and the rotating camera component includes the first connector and is arranged on first connection
Camera and the first magnet module on part;The position corresponding with the first magnet module is set in the mobile terminal main body
It is equipped with the first Hall sensor;The distance between the first magnet module and first Hall sensor are with the shooting
Head rotation and change;
The rotary flash lamp component is fixed on the top of the mobile terminal by the second rotating shaft, second rotating shaft
One end is provided with the second motor, and the rotary flash lamp component includes the second connector and is arranged on second connector
Flash lamp and the second magnet module;Position corresponding with the second magnet module is provided with the mobile terminal main body
Two Hall sensors;The distance between the second magnet module and second Hall sensor turn with the flash lamp
Move and change;
First Hall sensor and second Hall sensor are connected with the central processing unit;
Methods described includes:
The bounce flash photographing instruction that user inputs is received by the central processing unit;
First motor is controlled to drive the camera, the second motor band respectively according to the bounce flash photographing instruction
The dynamic flash lamp is rotated;
Detect the first Hall value and second Hall of the first Hall sensor output in real time in rotary course
Second Hall value of sensor output;
Judge whether to reach bounce flash angle according to the first Hall value and the second Hall value, if reaching the bounce flash
Angle, then make first motor and the second motor stop operating.
In the bounce flash control method of the present invention applied to mobile terminal, the bounce flash photographing instruction includes bounce flash
Angle, the first direction of rotation of the camera, the second direction of rotation of first object angle and the flash lamp.
It is described according to the bounce flash photographing instruction in the bounce flash control method of the present invention applied to mobile terminal
Control first motor to drive the camera, second motor to drive the flash lamp to rotate respectively to specifically include:
The second target angle turned off the light is dodged according to the bounce flash angle and the first object angle-determining of the camera
Degree;
First motor is controlled to drive the camera according to first direction of rotation and the first object angle
Rotate;Meanwhile,
Second motor is controlled to drive the flash lamp according to second direction of rotation and second angle on target
Rotate.
In the bounce flash control method of the present invention applied to mobile terminal, it is described according to the first Hall value and
The second Hall value judges whether to reach bounce flash angle, if reaching the bounce flash angle, makes first motor and second
Motor, which stops operating, to be specifically included:
According to the first Hall value and first Hall sensor and the corresponding relation of the camera angle value
Table determines the angle of the camera, when the angle of the camera reaches the first object angle, makes first horse
Up to stopping operating;The mapping table of first Hall sensor and the camera angle value is existed according to the camera
The table that the Hall value measured under all angles is pre-set;Meanwhile,
According to the second Hall value and the corresponding relation of second Hall sensor and the flash lamp angle value
Table determines the angle of the flash lamp, when the angle of the flash lamp reaches second angle on target, makes second motor
Stop operating;The mapping table of second Hall sensor and the flash lamp angle value is each according to the flash lamp
The table that the Hall value measured under individual angle is pre-set.
In the bounce flash control method of the present invention applied to mobile terminal, the camera and the flash lamp are equal
It can within a preset range rotate, also include in rotary course:
According to the first Hall value and first Hall sensor and the corresponding relation of the camera angle value
Table determines the angle of the camera, when the angle of the camera is less than the first preset value or more than the second preset value, makes
First motor stops operating;Meanwhile,
According to the second Hall value and the corresponding relation of second Hall sensor and the flash lamp angle value
Table determines the angle of the flash lamp, when the angle of the flash lamp is less than the first preset value or more than the second preset value, makes
Second motor stops operating.
The present invention also provides a kind of mobile terminal, including mobile terminal main body, is arranged at the top of the mobile terminal main body,
And can be rotated relative to the mobile terminal main body rotating camera component, be arranged at the top of the mobile terminal main body, and
The rotary flash lamp component and central processing unit that can be rotated relative to the mobile terminal main body;
The rotating camera component is fixed on the top of the mobile terminal main body, described first turn by first rotating shaft
One end of axle is provided with the first motor, and the rotating camera component includes the first connector and is arranged on first connection
Camera and the first magnet module on part;The position corresponding with the first magnet module is set in the mobile terminal main body
It is equipped with the first Hall sensor;The distance between the first magnet module and first Hall sensor are with the shooting
Head rotation and change;
The rotary flash lamp component is fixed on the top of the mobile terminal by the second rotating shaft, second rotating shaft
One end is provided with the second motor, and the rotary flash lamp component includes the second connector and is arranged on second connector
Flash lamp and the second magnet module;Position corresponding with the second magnet module is provided with the mobile terminal main body
Two Hall sensors;The distance between the second magnet module and second Hall sensor turn with the flash lamp
Move and change;
First Hall sensor and second Hall sensor are connected with the central processing unit;
The central processing unit includes:
Receiving unit, the bounce flash photographing instruction for receiving user's input;
Control unit, for according to the bounce flash photographing instruction control respectively first motor drive the camera,
Second motor drives the flash lamp to rotate;
Hall value detection unit, for detecting the first of first Hall sensor output in real time in rotary course suddenly
Value of and the second Hall value of second Hall sensor output;
Judging unit, for judging whether to reach bounce flash angle according to the first Hall value and the second Hall value,
If reaching the bounce flash angle, first motor and the second motor is set to stop operating.
In mobile terminal of the present invention, the bounce flash photographing instruction includes bounce flash angle, the of the camera
Second direction of rotation of one direction of rotation, first object angle and the flash lamp.
In mobile terminal of the present invention, described control unit includes:
Computation subunit, is closed for being dodged described in the first object angle-determining according to the bounce flash angle and the camera
Second angle on target of lamp;
First motor control subelement, for according to first direction of rotation and first object angle control
First motor drives the camera to rotate;
Second motor control subelement, for according to second direction of rotation and second angle on target control
Second motor drives the flash lamp to rotate.
In mobile terminal of the present invention, the judging unit includes:
First judgment sub-unit, for according to the first Hall value and first Hall sensor and the shooting
The mapping table of brilliance angle value determines the angle of the camera, when the angle of the camera reaches the first object angle
When spending, first motor is set to stop operating;First Hall sensor and the mapping table of the camera angle value
It is the table that the Hall value measured according to the camera under all angles is pre-set;
Second judgment sub-unit, for according to the second Hall value and second Hall sensor and the flash of light
The mapping table of lamp angle value determines the angle of the flash lamp, when the angle of the flash lamp reaches second target angle
Degree, makes second motor stop operating;The mapping table of second Hall sensor and the flash lamp angle value is
The table that the Hall value measured according to the flash lamp under all angles is pre-set.
In mobile terminal of the present invention, the camera and the flash lamp can be rotated within a preset range,
The judging unit also includes:
3rd judgment sub-unit, for according to the first Hall value and first Hall sensor and the shooting
The mapping table of brilliance angle value determines the angle of the camera, when the angle of the camera is less than the first preset value or big
When the second preset value, first motor is set to stop operating;Meanwhile,
4th judgment sub-unit, for according to the second Hall value and second Hall sensor and the flash of light
The mapping table of lamp angle value determines the angle of the flash lamp, when the angle of the flash lamp is less than the first preset value or big
When the second preset value, second motor is set to stop operating.
Implementing the bounce flash control method and mobile terminal applied to mobile terminal of the invention provided has following beneficial effect
Really:
The present invention is independent from rotating camera component due to sudden strain of a muscle being turned off the light, and flash lamp and camera is separately revolved
Turn, so as to reach the purpose of bounce flash, add the third dimension and visuality for shooting object;The present invention is due in rotation shooting
In head assembly and it is provided with magnet, and corresponding with above-mentioned magnet position in mobile terminal main body on rotary flash lamp component
Put and be provided with Hall sensor, central processing unit can pass through the angle of the characteristic of Hall sensor to camera and flash lamp
It is identified, so as to so that mobile terminal realizes any bounce flash angle;The present invention is due to the angle in camera or flash lamp
During less than the first preset value or more than the second preset value, the first motor or the second motor is set to stop operating, so as to effective
Reduce motor and the situation of stall occur, improve the service life of motor.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 is the structural representation of mobile terminal provided in an embodiment of the present invention.For convenience of description, it illustrate only and this
The related part of embodiment.
Shown in Figure 1, mobile terminal provided in an embodiment of the present invention includes mobile terminal main body, is arranged on the movement
At the top of terminal body, and can be rotated relative to the mobile terminal main body 1 rotating camera component 21, be arranged on the movement
The top of terminal body 1, and the rotary flash lamp component 22 and central processing unit that can be rotated relative to the mobile terminal main body 1
6;The rotating camera component 21 is fixed on the top of the mobile terminal main body 1, described first turn by first rotating shaft 31
One end of axle 31 is provided with the first motor 41, and the rotating camera component 21 includes the first connector 211 and is arranged on institute
State the magnet module 213 of camera 212 and first on the first connector 211;With first magnetic in the mobile terminal main body 1
The corresponding position of swage block 213 is provided with the first Hall sensor 51;The first magnet module 213 and first Hall
The distance between sensor 51 changes with the rotation of the camera 212;The rotary flash lamp component 22 passes through
The top of the mobile terminal is fixed in second rotating shaft 32, and one end of second rotating shaft 32 is provided with the second motor 42, described
Rotary flash lamp component 22 includes the second connector 221 and the sudden strain of a muscle that is arranged on second connector 221 is turned off the light 222 and the
Two magnet modules 223;In the mobile terminal main body 1 second is provided with the corresponding position of the second magnet module 223 suddenly
That sensor 52;The distance between the second magnet module 223 and second Hall sensor 52 are turned off the light with the sudden strain of a muscle
222 rotation and change;First Hall sensor 51 and second Hall sensor 52 with the centre
Reason device 6 is connected.
In the present embodiment, mobile terminal main body 1 is concave shape structure, and the component 21 of rotating camera 212 and rotation, which are dodged, closes
The component 22 of lamp 222 is fixed on the recess of mobile terminal main body 1 by the first rotary shaft and the second rotary shaft respectively.First motor 41
The same side inside mobile terminal main body 1 is arranged on the second motor 42.Implementing in real time, the mobile terminal can be hand
Machine.
In the present embodiment, the first magnet module 213 includes the first magnet and the second magnet, the first magnet and the second magnet
It is bar magnet, the set-up mode of the first magnet and the second magnet is oppositely arranged for same polarity, in the rotating camera 212
In the case that component 21 does not rotate, the first magnet, the second magnet and the first Hall sensor 51 are located along the same line;Together
Sample, the second magnet module 223 includes the 3rd magnet and the 4th magnet, and the 3rd magnet and the 4th magnet are bar magnet, and the 3rd
The set-up mode of magnet and the 4th magnet is oppositely arranged for same polarity, and the polarity setting direction phase of the 3rd magnet and the first magnet
Together, it is described rotation sudden strain of a muscle turn off the light 222 do not rotate in the case of, the 3rd magnet, the 4th magnet and the second Hall sensor 52
In on same straight line.It is preferred that, the first Hall sensor and the second Hall sensor in the embodiment of the present invention be numeral suddenly
That sensor.
Fig. 2 is that the bounce flash control method provided in an embodiment of the present invention applied to mobile terminal implements flow chart.
Shown in Figure 2, this method includes:
In S201, the bounce flash photographing instruction that user inputs is received by the central processing unit 6.
In the present embodiment, when user, which opens, takes pictures application program, whether mobile terminal meeting automatically prompting user is carried out
Bounce flash exposal model, if user's selection enters bounce flash exposal model, further prompting user inputs corresponding bounce flash and taken pictures finger
Order, the bounce flash photographing instruction includes bounce flash angle, the first direction of rotation of the camera 212, first object angle and institute
State dodge turn off the light 222 the second direction of rotation.
In S202, according to the bounce flash photographing instruction control respectively first motor 41 drive the camera 212,
Second motor 42 drives the sudden strain of a muscle to turn off the light 222 rotations.It is shown in Figure 3 that it implements flow:
In S301, dodge and turn off the light according to the bounce flash angle and the first object angle-determining of the camera 212
The second angle on target.
The second angle on target is the difference of first object angle and bounce flash angle in the present embodiment.It should be appreciated that this
First object angle and bounce flash angle in embodiment all can voluntarily be set, it is preferred that the first mesh in the present embodiment
It is 90 ° to mark angle, and bounce flash angle is 45 °, is 45 ° according to the second angle on target of first object angle and bounce flash angle-determining.
In S302, first motor 41 is controlled to drive according to first direction of rotation and the first object angle
The camera 212 is rotated;Meanwhile,
In S303, second motor 42 is controlled to drive according to second direction of rotation and second angle on target
It is described to dodge 222 rotations of turning off the light.
It should be appreciated that S302 and S303 are to carry out in the present embodiment simultaneously.
In S203, the first Hall value and the institute of the output of the first Hall sensor 51 are detected in real time in rotary course
State the second Hall value of the second Hall sensor 52 output.
In the present embodiment, during rotation, with fixed frequency, the first Hall sensor 51 of detection is exported in real time
The first Hall value and the second Hall sensor 52 output the second Hall value.
In S204, judge whether to reach bounce flash angle according to the first Hall value and the second Hall value, if reaching
To the bounce flash angle, then the motor 42 of the first motor 41 and second is set to stop operating.It implements flow referring to Fig. 4 institutes
Show:
In S401, according to the first Hall value and first Hall sensor 51 and 212 jiaos of the camera
The mapping table of angle value determines the angle of the camera 212, when the angle of the camera 212 reaches the first object
During angle, first motor 41 is set to stop operating;Pair of first Hall sensor 51 and the angle value of camera 212
It is the table that the Hall value measured according to the camera 212 under all angles is pre-set to answer relation table.
Fig. 5 shows the mapping table of the first Hall sensor 51 and the angle value of camera 212 in the present embodiment.Referring to
Shown in Fig. 5, when the first Hall sensor 51 Hall value between -110~24 (including -110, not including 24) or for 40 when,
Each Hall value is to that should have the angle of a determination camera 212, when the Hall value of the first Hall sensor 51 is 24~40
Between (including 24, not including 40) when, a Hall value is to that should have the angle of two cameras 212, therefore, will in the present embodiment
The Hall value of first Hall sensor 51 is preset as three scopes respectively, i.e. the first scope (- 110~24), the second scope (24~
40) and the 3rd scope (40), in the present embodiment, if detecting the first Hall value is in the first scope or the 3rd scope
Camera 212 is directly then determined according to the mapping table of first Hall sensor 51 and the angle value of camera 212
Angle;If detecting the first Hall value is in the second scope, central processing unit 6 can be passed according to first Hall
The mapping table of sensor 51 and the angle value of camera 212 determines that the angle of camera 212 is one in certain two angle
Individual, then the variation tendency further according to Hall value determines the angle of the camera 212, for example:If Hall value is changed from small to big,
It is that in two angles less than 180 ° that the angle of camera 212, which can then be determined,;Can be true if from large to small if Hall value
The angle for determining camera 212 is for that more than 180 ° in two angles.In addition, here it should be understood that due to movement
Terminal individual difference is than larger, and uniformity is poor, therefore, and the camera of mobile terminal is obtained when every mobile terminal dispatches from the factory
The Hall value of 212 the first Hall sensors 51 measured under all angles, and form the first Hall sensor 51 and camera
The mapping table storage of 212 angle values is in the terminal.
In S402, turned off the light 222 jiaos with the sudden strain of a muscle according to the second Hall value and second Hall sensor 52
The mapping table of angle value determine the sudden strain of a muscle turn off the light 222 angle, when turn off the light 222 angle of the sudden strain of a muscle reaches second target
Angle, makes second motor 42 stop operating;Second Hall sensor 52 dodges the corresponding of 222 angle values of turning off the light with described
Relation table is to dodge the table that the 222 Hall values measured under all angles of turning off the light are pre-set according to described.
In the present embodiment, because the second magnet module 223 and the second hall sensing turned off the light on 222 components 22 are dodged in rotation
Relative position relation between device 52 and the first magnet module 213 and the first hall sensing on the component 21 of rotating camera 212
The relative position relation of device 51 is essentially identical, therefore, the second Hall sensor 52 with dodge turn off the light 222 angle value corresponding relation
Table and the first Hall sensor 51 are roughly the same with the mapping table of the angle value of camera 212, its angle-determining step
It is basically identical, do not elaborating here.And it should be appreciated that S401 and S402 in the present embodiment are to carry out simultaneously.
Above as can be seen that independent from the component 21 of rotating camera 212 due to sudden strain of a muscle being turned off the light in the present embodiment, make
Sudden strain of a muscle turn off the light 222 and camera 212 separately rotate, so as to reach the purpose of bounce flash, add shoot object third dimension and
It is visual;And due to being provided with 222 components 22 of being turned off the light on the component 21 of rotating camera 212 with rotation sudden strain of a muscle in the present embodiment
Magnet, and corresponding with above-mentioned magnet position in mobile terminal main body 1 is provided with Hall sensor, central processing unit 6
222 angle of being turned off the light by the characteristic of Hall sensor to camera 212 and dodging is identified, so as to so that it is mobile eventually
Realize any bounce flash angle in end.
Fig. 6 is that the bounce flash control method applied to mobile terminal that another embodiment of the present invention is provided implements flow
Figure.Shown in Figure 6, relative in a upper embodiment, turn off the light 222 can be in default model for camera 212 and sudden strain of a muscle in the present embodiment
Interior rotation is enclosed, is also included in rotary course:
In S603-1, according to the first Hall value and first Hall sensor 51 and the camera 212
The mapping table of angle value determines the angle of the camera 212, when the angle of the camera 212 is less than the first preset value
Or during more than the second preset value, first motor 41 is stopped operating;Meanwhile,
In S603-2,222 are turned off the light according to the second Hall value and second Hall sensor 52 and the sudden strain of a muscle
The mapping table of angle value determine it is described sudden strain of a muscle turn off the light 222 angle, when it is described sudden strain of a muscle turn off the light 222 angle be less than the first preset value
Or during more than the second preset value, second motor 42 is stopped operating.
In the present embodiment, because mobile terminal individual difference is than larger, therefore, the camera 212 of different mobile terminal
Also and differed, the He of camera 212 on mobile terminal in the present embodiment preferably with the 222 rotatable preset range of turning off the light is dodged
Dodge turn off the light 222 rotatable preset range between 0 ° to 206 °;The first preset value in the present embodiment can be at 0 ° to 25 °
Between, the second preset value can be between 180 ° to 206 °, and the first preset value preferably in the present embodiment is 10 °, and second is pre-
If value is 200 °.
It should be understood that in S603-1, S603-2 and S604 being while carrying out, and this implementation in the present embodiment
S601~S603 and S604 is identical with a upper embodiment in example, no longer elaborates herein.
Relative to a upper embodiment, the present embodiment due to camera 212 or dodge turn off the light 222 angle be less than first preset
Value or during more than the second preset value, makes the first motor 41 or the second motor 42 stop operating, motor is reduced so as to effective
There is the situation of stall, improve the service life of motor.
Fig. 7 shows the structured flowchart inside central processing unit 6 in embodiment illustrated in fig. 2, real to Fig. 5 for service chart 2
Apply the bounce flash control method applied to mobile terminal described in example.For convenience of description, it illustrate only related to the present embodiment
Part.
Shown in Figure 7, the central processing unit 6 of the present embodiment mobile terminal includes:
Receiving unit 61, the bounce flash photographing instruction for receiving user's input;
Control unit 62, for controlling first motor 41 to drive the shooting respectively according to the bounce flash photographing instruction
First 212, second motor 42 drives the sudden strain of a muscle to turn off the light 222 rotations;
Hall value detection unit 63, for detect that first Hall sensor 51 exports in real time in rotary course the
One Hall value and the second Hall value of second Hall sensor 52 output;
Judging unit 64, for judging whether to reach bounce flash angle according to the first Hall value and the second Hall value
Degree, if reaching the bounce flash angle, makes the motor 42 of the first motor 41 and second stop operating.
Further, the bounce flash photographing instruction includes bounce flash angle, the first direction of rotation of the camera 212, the
One angle on target and the sudden strain of a muscle turn off the light 222 the second direction of rotation.
Further, described control unit 62 includes:
Computation subunit 621, for the first object angle-determining institute according to the bounce flash angle and the camera 212
State the second angle on target for dodging and turning off the light;
First motor control subelement 622, for according to first direction of rotation and first object angle control
First motor 41 drives the camera 212 to rotate;
Second motor control subelement 623, for according to second direction of rotation and second angle on target control
Second motor 42 drives the sudden strain of a muscle to turn off the light 222 rotations.
The further Hall value detection unit 63 includes:
The sub- detection unit 631 of first Hall value, for detecting first Hall sensor 51 in real time in rotary course
First Hall value of output;
The sub- detection unit 632 of second Hall value, for detecting second Hall sensor 52 in real time in rotary course
Second Hall value of output;
Further, the judging unit 64 includes:
First judgment sub-unit 641, for according to the first Hall value and first Hall sensor 51 and institute
The mapping table for stating the angle value of camera 212 determines the angle of the camera 212, when the angle of the camera 212 reaches
During to the first object angle, first motor 41 is set to stop operating;First Hall sensor 51 and the shooting
The mapping table of first 212 angle value is that the Hall value measured according to the camera 212 under all angles is pre-set
Table;
Second judgment sub-unit 642, for according to the second Hall value and second Hall sensor 52 and institute
State dodge 222 angle values of turning off the light mapping table determine the sudden strain of a muscle turn off the light 222 angle, when turn off the light 222 angle of the sudden strain of a muscle reaches
To second angle on target, second motor 42 is set to stop operating;Second Hall sensor 52 is turned off the light with the sudden strain of a muscle
The mapping table of 222 angle values is to dodge the table that the 222 Hall values measured under all angles of turning off the light are pre-set according to described.
Optionally, shown in Figure 8, the camera 212 and the sudden strain of a muscle are turned off the light and 222 can rotated within a preset range,
The judging unit 64 also includes:
3rd judgment sub-unit 643, for according to the first Hall value and first Hall sensor 51 and institute
The mapping table for stating the angle value of camera 212 determines the angle of the camera 212, when the angle of the camera 212 is small
In the first preset value or during more than the second preset value, first motor 41 is set to stop operating;Meanwhile,
4th judgment sub-unit 644, for according to the second Hall value and second Hall sensor 52 and institute
State dodge turn off the light 222 angle values mapping table determine it is described sudden strain of a muscle turn off the light 222 angle, when it is described sudden strain of a muscle turn off the light 222 angle it is small
In the first preset value or during more than the second preset value, second motor 42 is set to stop operating.
To sum up, the mobile terminal that the present embodiment is provided is due to turning off the light independently to go out from the component 21 of rotating camera 212 sudden strain of a muscle
Come, make sudden strain of a muscle turn off the light 222 and camera 212 separately rotate, so as to reach the purpose of bounce flash, add shoot object solid
Sense and visuality;Due to being provided with magnet on 222 components 22 of being turned off the light on the component 21 of rotating camera 212 with rotation sudden strain of a muscle, and
The position corresponding with above-mentioned magnet is provided with Hall sensor in mobile terminal main body 1, and central processing unit 6 can pass through
The characteristic of Hall sensor is to camera 212 and dodges 222 angle of turning off the light and is identified, so as to so that mobile terminal is realized appoints
Meaning bounce flash angle;Due to being less than the first preset value or during more than the second preset value in turn off the light 222 angle of camera 212 or dodge,
The first motor 41 or the second motor 42 is stopped operating, the situation of stall occur so as to the effective motor that reduces, improve
The service life of motor.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
Any modifications, equivalent substitutions and improvements made within refreshing and principle etc., should be included in the scope of the protection.