Summary of the invention
In view of above content, be necessary to provide a kind of focus function start-up system, utilize electronic compass and acceleration transducer the monitoring electronic equipment situation of movement, and according to the situation of movement that is monitored to the focusing mechanism automatic focusing in the electronic equipment.
In view of above content, also be necessary to provide a kind of focus function startup method, utilize electronic compass and acceleration transducer the monitoring electronic equipment situation of movement, and according to the situation of movement that is monitored to the focusing automatic focusing in the electronic equipment.
A kind of focus function start-up system, run in the camera apparatus of electronic equipment, this camera comprises focusing mechanism, this electronic equipment also comprises electronic compass and acceleration transducer, this system comprises: logging modle is used for the angle in three dimensional space coordinate system of this electronic equipment of recorded electronic lining at regular intervals; Judge module, be used for judging this electronic equipment the current angle of three dimensional space coordinate system with on once the difference of the angle of record whether in the error range of a permission, if this difference is in the error range that allows, judge that then this electronic equipment does not rotate in three dimensions, if this difference not in the error range of described permission, judges that then this electronic equipment has rotation in three dimensions; Control module is used to control the acceleration that acceleration transducer is measured electronic equipment; Described judge module, whether the acceleration of this electronic equipment that also is used to judge that acceleration transducer is measured surpasses a preset range, if this acceleration surpasses this preset range, judge that then this electronic equipment doing translational motion, if this acceleration, is then judged this electronic equipment not above this preset range and is not done translational motion; And start module, also be used for when above-mentioned judged result be that described electronic equipment rotates in three dimensions or when doing translational motion, the startup focusing mechanism is focused again.
A kind of focus function startup method is applied to electronic equipment, and this electronic equipment comprises camera apparatus, electronic compass and acceleration transducer, and this method comprises: the angle of recorded electronic lining electronic equipment in three dimensional space coordinate system at regular intervals; If the difference of the angle of current angle of this electronic equipment and last record in the error range of a permission, judges then that this electronic equipment does not rotate in three dimensions; If the difference of the angle of current angle of this electronic equipment and last record judges that then this electronic equipment has rotation in three dimensions not in the error range of described permission; The control acceleration transducer is measured the acceleration of electronic equipment; If this acceleration, is then judged this electronic equipment above a preset range and is being done translational motion; If this acceleration, is then judged this electronic equipment not above this preset range and is not done translational motion; And when above-mentioned judged result be that described electronic equipment rotates in three dimensions or when doing translational motion, the focusing mechanism of startup electronic equipment camera apparatus is focused again.
Above-mentioned focus function start-up system utilizes electronic compass to measure the angle of electronic equipment in three dimensions, and utilizes acceleration transducer to measure the acceleration of electronic equipment translation, judges whether electronic equipment moves, thereby starts the focusing mechanism automatic focusing.
Embodiment
As shown in Figure 1, be the hardware structure figure of focus function start-up system of the present invention preferred embodiment.This focus function start-up system 100 runs in the camera apparatus 10 of electronic equipment 1.In this preferred embodiment, this electronic equipment 1 can be mobile phone, also can (Personal Digital Assistant PDA) waits the equipment with camera focus function for palmtop PC.Described camera apparatus 10 comprises focusing mechanism 102, and this focusing mechanism 102 is used to adjust the focal length of camera apparatus 10.In this preferred embodiment, this focusing mechanism 102 is an automatic focusing mechanism.
Described electronic equipment 1 also comprises electronic compass (E-Compass) 11 and acceleration transducer 12.Whether utilize this electronic compass 11 and acceleration transducer 12 can monitor electronic equipment 1 moves.Mobile in the present embodiment comprises translation and rotation.Particularly, utilizing electronic compass 11 can measure the angle of electronic equipment 1 in three dimensions changes, change greatly I by this angle and judge whether this electronic equipment 1 rotates in three dimensions, utilize acceleration transducer 12 can measure the acceleration of electronic equipment 1, can judge according to this acceleration whether this electronic equipment 1 does translational motion.Translational motion in the present embodiment is meant electronic equipment 1 moving horizontally and vertical moving in the space.
As shown in Figure 2, be the functional block diagram of focus function start-up system 100 among Fig. 1.This focus function start-up system 100 comprises startup module 20, logging modle 21, judge module 22 and control module 23, by these a plurality of functional modules, focus function start-up system 100 can start 102 pairs of objects to be shot of focusing mechanism of camera apparatus 10 and focus again.Described module is the software program section with specific function, and this software is stored in computer-readable recording medium or other memory device, can be carried out by computer or other calculation element that comprises processor.
When the camera apparatus 10 of electronic equipment 1 started, described startup module 20 was used to start electronic compass 11 and acceleration transducer 12 with monitoring electronic equipment 1.
Logging modle 21 is used for recorded electronic compass at regular intervals 11 and measures the angle of these electronic equipments 1 in three dimensional space coordinate system.In this preferred embodiment, this electronic compass 11 is every the angle of 100 ~ 500ms record primary electron equipment 1 in three dimensional space coordinate system.
Judge module 22 is used to judge that the difference (being designated hereinafter simply as " difference ") of this electronic equipment 1 current angle and the angle of last record is whether in the error range of a permission.If this difference in the error range of described permission, is then judged this electronic equipment 1 and is not rotated in three dimensions.If this difference not in the error range of described permission, judges that then this electronic equipment 1 has rotation in three dimensions.In this preferred embodiment, the error range of described permission is smaller or equal to 10 degree, and promptly when this difference was spent smaller or equal to 10, the judged result of described judge module 22 was that this electronic equipment 1 does not rotate in three dimensions.When this difference was spent greater than 10, the judged result of described judge module 22 had rotation for this electronic equipment 1 in three dimensions.
Control module 23 is used to control the acceleration that acceleration transducer 12 is measured electronic equipment 1.
Described judge module 22 is used to also to judge whether the acceleration of this electronic equipment 1 that acceleration transducer 12 is measured surpasses a preset range.If this acceleration, is then judged this electronic equipment 1 above this preset range and is being done translational motion.If this acceleration, is then judged this electronic equipment 1 above described preset range and is not done translational motion.In this preferred embodiment, the setting range of this acceleration is smaller or equal to 0.3N/kg.That is to say that the acceleration of measuring these electronic equipments 1 when acceleration transducer 12 is during greater than 0.3N/kg, the judged result of described judge module 22 is being done translational motion for this electronic equipment 1.The acceleration of measuring these electronic equipments 1 when acceleration transducer 12 is during smaller or equal to 0.3N/kg, and the judged result of described judge module 22 is not done translational motion for this electronic equipment 1.
When the judged result of above-mentioned described judge module 22 is that electronic equipment 1 rotates in three dimensions or when doing translational motion, described startup module 20 also is used to start 102 pairs of camera apparatus of focusing mechanism 10 and carries out automatic focusing.Particularly, moving in case electronic compass 11 or acceleration transducer 12 monitor electronic equipment 1, startup module 20 will start focusing mechanism 102 immediately and focus again.
As shown in Figure 3, be the method flow diagram of focus function startup method of the present invention preferred embodiment.
Step S30 when the camera apparatus 10 of electronic equipment 1 starts, starts module 20 and starts electronic compass 11 and acceleration transducer 12.
Whether step S31 utilizes electronic compass 11 and acceleration transducer 12 monitoring electronic equipments 1 to move.In this preferred embodiment, this electronic equipment 1 mobile comprises rotation and the translation of this electronic equipment 1 in three dimensions.If judged result moves for this electronic equipment 1, then enter step S32.Do not move if judged result is this electronic equipment 1, repeat this step S31.
Step S32 starts module 20 startup focusing mechanisms 102 and focuses again.
As shown in Figure 4, be the refinement flow chart that utilizes electronic compass 11 monitoring electronic equipments 1 whether to rotate among the step S31 of Fig. 3.
Step S40, logging modle 21 recorded electronic compass 11 is at regular intervals measured the angle of this electronic equipment 1 in three dimensional space coordinate system.In this preferred embodiment, this electronic compass 11 is every the angle of 100 ~ 500ms record primary electron equipment 1 in three dimensional space coordinate system.
Step S41, judge module 22 judge that the difference of the current angle of this electronic equipment 1 and the angle of last record is whether in the error range of described permission.If this difference in the error range of described permission, enters step S42.If this difference not in the error range of described permission, then enters step S43.In this preferred embodiment, the error range of this permission is smaller or equal to 10 degree.
Step S42, judge module 22 judge that electronic equipment 1 does not rotate, and returns step S40 in three dimensions.
Step S43, judge module 22 judges that this electronic equipment 1 has rotation in three dimensions.
As shown in Figure 5, be to utilize the whether refinement flow chart of translation of acceleration transducer 12 monitoring electronic equipments 1 among the step S31 of Fig. 3.
Step S50, control module 23 control acceleration transducers 12 are measured the acceleration of electronic equipment 1.
Step S51, judge module 22 judge whether the acceleration of this electronic equipment 1 that acceleration transducer 12 is measured surpasses a preset range.In this preferred embodiment, the preset range of this acceleration is smaller or equal to 0.3N/kg.If this acceleration surpasses this preset range, then enter step S52.If this acceleration does not surpass this preset range, then enter step S53.
Step S52, judge module 22 these electronic equipments 1 of judgement are being done translational motion, process ends.
Step S53, judge module 22 these electronic equipments 1 of judgement are not done translational motion, and return step S50.
It should be noted last that, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not break away from the spirit and scope of technical solution of the present invention.