CN104506722A - Method and system for focusing through direction sensor of mobile phone - Google Patents
Method and system for focusing through direction sensor of mobile phone Download PDFInfo
- Publication number
- CN104506722A CN104506722A CN201410791416.XA CN201410791416A CN104506722A CN 104506722 A CN104506722 A CN 104506722A CN 201410791416 A CN201410791416 A CN 201410791416A CN 104506722 A CN104506722 A CN 104506722A
- Authority
- CN
- China
- Prior art keywords
- mobile phone
- direction sensor
- focusing
- value
- stable
- 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.)
- Pending
Links
Abstract
The invention relates to the technical field of camera modules of mobile phones, and discloses a method for focusing through a direction sensor of a mobile phone. The method specifically comprises the following steps of setting the direction sensor in the mobile phone, and judging whether the mobile phone rotates or not according to the direction data detected by the direction sensor; when the mobile phone rotates, further judging whether the mobile phone is stable or not; when the mobile phone does not rotate, continuing to judge whether the mobile phone rotates or not until the rotating of the mobile phone is judged, and then judging whether the mobile phone is stable or not; when the mobile phone is stable, executing focusing; when the mobile phone is not stable, continuing to judge whether the mobile phone is stable or not. The method has the advantage that when a user moves the mobile phone to the required range and the mobile phone is stable, the camera module executes the focusing action, so the shot picture is clear, the experience of the user is improved, the whole detection process is automatic, the user does not need to perform additional operations, and the operation method is simple and friendly for the user.
Description
Technical field
The present invention relates to the camera focus technical field in mobile phone, particularly relate to a kind of method and system being realized focusing on by the direction sensor in mobile phone.
Background technology
Camera in conventional mobile phone can perform three following steps when user presses shutter key: 1. mobile phone camera focuses on, and the interface that makes to find a view becomes clear; 2., after completing focusing, camera starts to catch picture; 3. the picture captured is converted into image file used in everyday, and is saved in the memory of mobile phone.
When adopting above-mentioned traditional method, when the current focal length of mobile phone camera not by the burnt section of distance of clapping between main body and camera time, picture of finding a view on mobile phone screen will be smudgy, and now affect very much the shooting impression of user, carrying out that cannot be happy is taken pictures.
Summary of the invention
There will be the unclear technical problem of fuzzy pictures for focus method of the prior art, the invention discloses a kind of method being realized focusing on by the direction sensor in mobile phone.The invention also discloses a kind of system being realized focusing on by the direction sensor in mobile phone.
Goal of the invention of the present invention is realized by following technical proposals:
A kind of method being realized focusing on by the direction sensor in mobile phone, it specifically comprises: setting direction transducer in mobile phone, judge whether mobile phone rotates according to the bearing data that direction sensor detects, judge whether mobile phone is stablized further, otherwise continue to judge whether mobile phone rotates, until judge that mobile phone judges whether mobile phone is stablized after rotating again; After mobile phone is stable, perform focusing, otherwise continue to judge whether mobile phone is stablized.Namely when user mobile phone moved to needs scope and stable after, camera module performs the action focused on, thus make the picture taking out clear, improve the experience of user, and whole testing process is carried out all automatically, extra operation is carried out, for the such mode of operation of user also unusual simple close friend without the need to user.
It specifically comprises the following steps: the camera module in step one, mobile phone carries out after starting focusing on (such as can set camera module startup namely to focus on for latter 1 second) immediately, records the value F(Fx that now direction sensor detects, Fy, Fz simultaneously); The value C(Cx that step 2, real time record direction sensor detect, Cy, Cz), calculate Δ x, Δ y, Δ z, and judge whether mobile phone rotates, and is according to result of calculation, enter the stability of step 3 to mobile phone and detect, otherwise continuation steps two; Wherein, Δ x=|Fx-Cx|, Δ y=|Fy-Cy|, Δ z=|Fz-Cz|; The message that step 3, transmission lag focus on is to camera module; record the value S(Sx that now direction sensor detects simultaneously; Sy, Sz), calculate Δ x '; Δ y '; Δ z ', and judge whether mobile phone is stablized according to result of calculation, be that then camera module performs focusing; otherwise cancel the message postponing to focus on, and re-execute step 3; Wherein, Δ x '=| Sx-Cx|, Δ y '=| Sy-Cy|, Δ z '=| Sz-Cz|.By said method, first judge whether mobile phone rotates, and is, carry out the judgement of stability, after mobile phone is stable, performs focusing.Namely when user mobile phone moved to needs scope and stable after, camera module performs the action focused on, thus make the picture taking out clear, improve the experience of user, and whole testing process is carried out all automatically, extra operation is carried out, for the such mode of operation of user also unusual simple close friend without the need to user.
Further, above-mentionedly judge whether mobile phone rotates according to result of calculation and be specially: as Δ x, Δ y, Δ z wherein any one value more than 30 ° or the value of Δ x+ Δ y+ Δ z more than 30 ° time, judge that mobile phone rotates, otherwise mobile phone does not rotate.
Further, above-mentionedly judge that mobile phone is whether stable and be specially: as Δ x ', Δ y ', Δ z ' wherein any one value more than 3 ° or the value of Δ x '+Δ y '+Δ z ' more than 5 ° time, judge that mobile phone is unstable, otherwise mobile phone is stable.
Further, the message postponing in above-mentioned steps three to focus on focuses on after postponing 500ms.
The invention also discloses a kind of system being realized focusing on by the direction sensor in mobile phone, it specifically comprises the direction sensor be arranged in mobile phone, camera module, rotation judge module and stable judge module; Described direction sensor is used for the bearing data of real-time detection of handset; Described camera module is for focusing on the shooting with photo; Described rotation judge module is for judging whether mobile phone rotates; Described stable judge module is for judging whether mobile phone is stablized; When judging the judgement of stability of carrying out mobile phone after mobile phone rotates, being that then camera module performs focusing, otherwise re-starting the stable judgement of mobile phone.By said system, make the picture taking out clear, improve the experience of user, and whole detection is all automatically carry out in inside modules, carries out extra operation without the need to user, for the such system of user also unusual simple close friend.
Further, above-mentioned camera module focuses on after starting immediately, records the value F(Fx that now direction sensor detects, Fy, Fz simultaneously); The value C(Cx of real-time detection direction sensor, Cy, Cz), calculate Δ x, Δ y, Δ z, and judge whether mobile phone rotates, and is according to result of calculation, carry out the judgement of stability of mobile phone, otherwise continue the value C detecting direction sensor; Wherein, Δ x=|Fx-Cx|, Δ y=|Fy-Cy|, Δ z=|Fz-Cz|; The judgement of stability of mobile phone specifically comprises: the message that transmission lag focuses on is to camera module, record the value S(Sx that now direction sensor detects simultaneously, Sy, Sz), calculate Δ x ', Δ y ', Δ z ', and judge whether mobile phone is stablized according to result of calculation, be that then camera module performs focusing, otherwise cancel the message postponing to focus on, and re-execute the judgement of stability of mobile phone; Wherein, Δ x '=| Sx-Cx|, Δ y '=| Sy-Cy|, Δ z '=| Sz-Cz|.Whether to be rotated by above-mentioned threshold determination mobile phone and whether mobile phone is stablized, when judging to judge whether mobile phone is stablized again after mobile phone rotates, starting focusing after stable, thus shooting picture clearly.
By adopting above technical scheme, the invention has the beneficial effects as follows: first judge whether mobile phone rotates, and is, carry out the judgement of stability, after mobile phone is stable, performs focusing.Namely when user mobile phone moved to needs scope and stable after, camera module performs the action focused on, thus make the picture taking out clear, improve the experience of user, and whole testing process is carried out all automatically, extra operation is carried out, for the such mode of operation of user also unusual simple close friend without the need to user.
Accompanying drawing explanation
Fig. 1 is the flow chart being realized the method focused on by the direction sensor in mobile phone of the present invention.
Fig. 2 is the schematic diagram of the value F that direction sensor detects.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with specific embodiment, the present invention is described in more detail.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
The invention discloses a kind of method being realized focusing on by the direction sensor in mobile phone, it specifically comprises: setting direction transducer in mobile phone, judge whether mobile phone rotates according to the bearing data that direction sensor detects, judge whether mobile phone is stablized further, otherwise continue to judge whether mobile phone rotates, until judge that mobile phone judges whether mobile phone is stablized after rotating again; After mobile phone is stable, perform focusing, otherwise continue to judge whether mobile phone is stablized.Namely when user mobile phone moved to needs scope and stable after, camera module performs the action focused on, thus make the picture taking out clear, improve the experience of user, and whole testing process is carried out all automatically, extra operation is carried out, for the such mode of operation of user also unusual simple close friend without the need to user.
Fig. 1 is the flow chart being realized the method focused on by the direction sensor in mobile phone of the present invention.It specifically comprises the following steps: step one, camera module in mobile phone carries out after starting focusing on (such as can set camera module startup namely to focus on for latter 1 second) immediately, record the value F(Fx that now direction sensor detects simultaneously, Fy, Fz), (Fx, Fy, Fz in detail as shown in Figure 2), rectangle ABCD represents horizontal plane, Fx in transducer: as shown in the figure, regulation X positive axis is north, mobile phone head points OF direction, now the value of Fx is 0, if mobile phone head points OG direction, now Fx value is 90, point to OH direction, Fx value is 180, point to OE, Fx value is 270, Fy in transducer: mobile phone is slowly upwards lifted along BC axle, i.e. mobile phone head still, afterbody is slowly tilted upward, until AD to go on the right of BC and drops in XOY plane, the value of Fy will change between 0-180, if mobile phone slowly upwards lifts along AD axle, namely mobile phone end part is motionless, until BC goes to the AD left side and drops in XOY plane, the value of Y will change between 0-180, the implication of Fy in Here it is direction sensor.Fz in transducer: mobile phone is slowly upwards lifted along AB axle, namely mobile phone left frame is motionless, left frame is slowly tilted upward, until CD to go on the right of AB and drops in XOY plane, the value of Fz will change between 0-180, if mobile phone slowly upwards lifts along CD axle, namely mobile phone left frame is motionless, until AB goes to the CD left side and drops in XOY plane, the value of Fz will change between 0-180, the implication of Fz in Here it is direction sensor.The value C(Cx that step 2, real time record direction sensor detect, Cy, Cz), calculate Δ x, Δ y, Δ z, and judge whether mobile phone rotates, and is according to result of calculation, enter the stability of step 3 to mobile phone and detect, otherwise continuation steps two; Wherein, Δ x=|Fx-Cx|, Δ y=|Fy-Cy|, Δ z=|Fz-Cz|; The message of step 3, transmission lag focusing is to camera module, and the present invention's needs reinform focusing after judgement is stable, and first sending out delay focusing is exactly in order to refocusing after follow-up stablizing; record the value S(Sx that now direction sensor detects simultaneously; Sy, Sz), calculate Δ x '; Δ y '; Δ z ', and judge whether mobile phone is stablized according to result of calculation, be that then camera module performs focusing; otherwise cancel the message postponing to focus on, and re-execute step 3; Wherein, Δ x '=| Sx-Cx|, Δ y '=| Sy-Cy|, Δ z '=| Sz-Cz|.By said method, first judge whether mobile phone rotates, and is, carry out the judgement of stability, after mobile phone is stable, performs focusing.Namely when user mobile phone moved to needs scope and stable after, camera module performs the action focused on, thus make the picture taking out clear, improve the experience of user, and whole testing process is carried out all automatically, extra operation is carried out, for the such mode of operation of user also unusual simple close friend without the need to user.
Further, above-mentionedly judge whether mobile phone rotates according to result of calculation and be specially: as Δ x, Δ y, Δ z wherein any one value more than 30 ° or the value of Δ x+ Δ y+ Δ z more than 30 ° time, judge that mobile phone rotates, otherwise mobile phone does not rotate.Certainly threshold value of this setting also can be 28,32 or 28-32 between an arbitrary angle.
Further, above-mentionedly judge that mobile phone is whether stable and be specially: as Δ x ', Δ y ', Δ z ' wherein any one value more than 3 ° or the value of Δ x '+Δ y '+Δ z ' more than 5 ° time, judge that mobile phone is unstable, otherwise mobile phone is stable.Certainly threshold value 3 ° of this setting also can be 2.7,3.3 or 2.7-3.3 between any one angle.Setting threshold value 5 ° also can be 4.5,5.5 or 4.5-5.5 between any one angle.
Further, the message postponing in above-mentioned steps three to focus on focuses on after postponing 500ms.Setting threshold value 500ms also can be 450,550 or 450-550 between any one time.
The invention also discloses a kind of system being realized focusing on by the direction sensor in mobile phone, it specifically comprises the direction sensor be arranged in mobile phone, camera module, rotation judge module and stable judge module; Described direction sensor is used for the bearing data of real-time detection of handset; Described camera module is for focusing on the shooting with photo; Described rotation judge module is for judging whether mobile phone rotates; Described stable judge module is for judging whether mobile phone is stablized; When judging the judgement of stability of carrying out mobile phone after mobile phone rotates, being that then camera module performs focusing, otherwise re-starting the stable judgement of mobile phone.By said system, make the picture taking out clear, improve the experience of user, and whole detection is all automatically carry out in inside modules, carries out extra operation without the need to user, for the such system of user also unusual simple close friend.
Further, above-mentioned camera module focuses on after starting immediately, records the value F(Fx that now direction sensor detects, Fy, Fz simultaneously); The value C(Cx of real-time detection direction sensor, Cy, Cz), calculate Δ x, Δ y, Δ z, and judge whether mobile phone rotates, and is according to result of calculation, carry out the judgement of stability of mobile phone, otherwise continue the value C detecting direction sensor; Wherein, Δ x=|Fx-Cx|, Δ y=|Fy-Cy|, Δ z=|Fz-Cz|; The judgement of stability of mobile phone specifically comprises: the message that transmission lag focuses on is to camera module, record the value S(Sx that now direction sensor detects simultaneously, Sy, Sz), calculate Δ x ', Δ y ', Δ z ', and judge whether mobile phone is stablized according to result of calculation, be that then camera module performs focusing, otherwise cancel the message postponing to focus on, and re-execute the judgement of stability of mobile phone; Wherein, Δ x '=| Sx-Cx|, Δ y '=| Sy-Cy|, Δ z '=| Sz-Cz|.Whether to be rotated by above-mentioned threshold determination mobile phone and whether mobile phone is stablized, when judging to judge whether mobile phone is stablized again after mobile phone rotates, starting focusing after stable, thus shooting picture clearly.
Above-mentioned explanation illustrate and describes a preferred embodiment of the present invention, but as previously mentioned, be to be understood that the present invention is not limited to the form disclosed by this paper, should not regard the eliminating to other embodiments as, and can be used for other combinations various, amendment and environment, and can in invention contemplated scope described herein, changed by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change do not depart from the spirit and scope of the present invention, then all should in the protection range of claims of the present invention.
Claims (7)
1. one kind realizes the method for focusing by the direction sensor in mobile phone, it specifically comprises: setting direction transducer in mobile phone, judge whether mobile phone rotates according to the bearing data that direction sensor detects, judge whether mobile phone is stablized further, otherwise continue to judge whether mobile phone rotates, until judge that mobile phone judges whether mobile phone is stablized after rotating again; After mobile phone is stable, perform focusing, otherwise continue to judge whether mobile phone is stablized.
2. the method being realized focusing on by the direction sensor in mobile phone as claimed in claim 1, it is characterized in that described method specifically comprises the following steps: that camera module in step one, mobile phone focuses on after starting immediately, record the value F(Fx that now direction sensor detects simultaneously, Fy, Fz); The value C(Cx that step 2, real time record direction sensor detect, Cy, Cz), calculate Δ x, Δ y, Δ z, and judge whether mobile phone rotates, and is according to result of calculation, enter the stability of step 3 to mobile phone and detect, otherwise continuation steps two; Wherein, Δ x=|Fx-Cx|, Δ y=|Fy-Cy|, Δ z=|Fz-Cz|; The message that step 3, transmission lag focus on is to camera module; record the value S(Sx that now direction sensor detects simultaneously; Sy, Sz), calculate Δ x '; Δ y '; Δ z ', and judge whether mobile phone is stablized according to result of calculation, be that then camera module performs focusing; otherwise cancel the message postponing to focus on, and re-execute step 3; Wherein, Δ x '=| Sx-Cx|, Δ y '=| Sy-Cy|, Δ z '=| Sz-Cz|.
3. the method being realized focusing on by the direction sensor in mobile phone as claimed in claim 2, it is characterized in that describedly judging whether mobile phone rotates according to result of calculation and being specially: as Δ x, Δ y, Δ z wherein any one value more than 30 ° or the value of Δ x+ Δ y+ Δ z more than 30 ° time, judge that mobile phone rotates, otherwise mobile phone does not rotate.
4. the method being realized focusing on by the direction sensor in mobile phone as claimed in claim 3, it is characterized in that describedly judging that mobile phone is whether stable and being specially: as Δ x ', Δ y ', Δ z ' wherein any one value more than 3 ° or the value of Δ x '+Δ y '+Δ z ' more than 5 ° time, judge that mobile phone is unstable, otherwise mobile phone is stablized.
5. the method being realized focusing on by the direction sensor in mobile phone as claimed in claim 4, is characterized in that the message postponing in described step 3 to focus on focuses on after postponing 500ms.
6. realized the system focused on by the direction sensor in mobile phone, it is characterized in that specifically comprising the direction sensor be arranged in mobile phone, camera module, rotation judge module and stable judge module; Described direction sensor is used for the bearing data of real-time detection of handset; Described camera module is for focusing on the shooting with photo; Described rotation judge module is for judging whether mobile phone rotates; Described stable judge module is for judging whether mobile phone is stablized; When judging the judgement of stability of carrying out mobile phone after mobile phone rotates, being that then camera module performs focusing, otherwise re-starting the stable judgement of mobile phone.
7. the system being realized focusing on by the direction sensor in mobile phone as claimed in claim 6, be is characterized in that described camera module focuses on after starting immediately, records the value F(Fx that now direction sensor detects, Fy, Fz simultaneously); The value C(Cx of real-time detection direction sensor, Cy, Cz), calculate Δ x, Δ y, Δ z, and judge whether mobile phone rotates, and is according to result of calculation, carry out the judgement of stability of mobile phone, otherwise continue the value C detecting direction sensor; Wherein, Δ x=|Fx-Cx|, Δ y=|Fy-Cy|, Δ z=|Fz-Cz|; The judgement of stability of mobile phone specifically comprises: the message that transmission lag focuses on is to camera module, record the value S(Sx that now direction sensor detects simultaneously, Sy, Sz), calculate Δ x ', Δ y ', Δ z ', and judge whether mobile phone is stablized according to result of calculation, be that then camera module performs focusing, otherwise cancel the message postponing to focus on, and re-execute the judgement of stability of mobile phone; Wherein, Δ x '=| Sx-Cx|, Δ y '=| Sy-Cy|, Δ z '=| Sz-Cz|.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410791416.XA CN104506722A (en) | 2014-12-19 | 2014-12-19 | Method and system for focusing through direction sensor of mobile phone |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410791416.XA CN104506722A (en) | 2014-12-19 | 2014-12-19 | Method and system for focusing through direction sensor of mobile phone |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104506722A true CN104506722A (en) | 2015-04-08 |
Family
ID=52948437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410791416.XA Pending CN104506722A (en) | 2014-12-19 | 2014-12-19 | Method and system for focusing through direction sensor of mobile phone |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104506722A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105847689A (en) * | 2016-04-08 | 2016-08-10 | 广东欧珀移动通信有限公司 | Focusing method, focusing device and mobile terminal |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102523380A (en) * | 2011-11-10 | 2012-06-27 | 深圳市同洲电子股份有限公司 | Method for preventing camera of mobile terminal from shaking, and mobile terminal |
JP2013003168A (en) * | 2011-06-10 | 2013-01-07 | Canon Inc | Vibration-proof control device, vibration-proof control method, imaging apparatus and control method thereof |
CN103327244A (en) * | 2013-06-05 | 2013-09-25 | 广东欧珀移动通信有限公司 | Shooting focusing method and device based on angular velocity detection |
CN104135614A (en) * | 2014-07-24 | 2014-11-05 | 浙江宇视科技有限公司 | Camera displacement compensation method and device |
-
2014
- 2014-12-19 CN CN201410791416.XA patent/CN104506722A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013003168A (en) * | 2011-06-10 | 2013-01-07 | Canon Inc | Vibration-proof control device, vibration-proof control method, imaging apparatus and control method thereof |
CN102523380A (en) * | 2011-11-10 | 2012-06-27 | 深圳市同洲电子股份有限公司 | Method for preventing camera of mobile terminal from shaking, and mobile terminal |
CN103327244A (en) * | 2013-06-05 | 2013-09-25 | 广东欧珀移动通信有限公司 | Shooting focusing method and device based on angular velocity detection |
CN104135614A (en) * | 2014-07-24 | 2014-11-05 | 浙江宇视科技有限公司 | Camera displacement compensation method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105847689A (en) * | 2016-04-08 | 2016-08-10 | 广东欧珀移动通信有限公司 | Focusing method, focusing device and mobile terminal |
CN105847689B (en) * | 2016-04-08 | 2019-02-19 | Oppo广东移动通信有限公司 | A kind of focusing method, device and mobile terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11831977B2 (en) | Photographing and processing method and electronic device | |
US11846877B2 (en) | Method and terminal for acquiring panoramic image | |
CN105141832B (en) | One kind focusing abnormality eliminating method and mobile terminal | |
KR101712301B1 (en) | Method and device for shooting a picture | |
US9826154B2 (en) | Imaging device, control method of imaging device, and computer program | |
WO2016038972A1 (en) | Imaging device, imaging method, and program | |
CN103118168A (en) | Display control method and terminal of unprocessed information | |
CN104469167A (en) | Automatic focusing method and device | |
CN102122107B (en) | Photographing system and method | |
CN110430357B (en) | Image shooting method and electronic equipment | |
CN102970485A (en) | Automatic focusing method and device | |
CN105915803B (en) | Photographing method and system based on sensor | |
US20220262035A1 (en) | Method, apparatus, and system for determining pose | |
CN105100634B (en) | Image capturing method and device | |
CN108462827B (en) | Method and device for acquiring image data | |
WO2019165938A1 (en) | Image collection method and apparatus, mobile terminal and storage medium | |
CN103327244A (en) | Shooting focusing method and device based on angular velocity detection | |
US20220272275A1 (en) | Photographing method and electronic device | |
CN104506722A (en) | Method and system for focusing through direction sensor of mobile phone | |
CN111050081B (en) | Shooting method and electronic equipment | |
JP2013130761A (en) | Imaging device, method for controlling the same, and program | |
CN112135060A (en) | Focusing processing method, mobile terminal and computer storage medium | |
CN110012208B (en) | Photographing focusing method and device, storage medium and electronic equipment | |
CN107783250A (en) | Picture pick-up device quick focusing method with automatic focusing function | |
CN109788274A (en) | Camera eyeglass smear detecting method, terminal and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150408 |
|
RJ01 | Rejection of invention patent application after publication |